///////////////////////////////////////////////////////////////////////
/*                                                                   */
///////////////////////////////////////////////////////////////////////
// by LotusHead > he does it cause he loves it! lotus@finegrafix.co.za

if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      image_url = new Array();     
      image_url[0] = "http://www.sycom.co.za/images/butt_home.gif";
      image_url[1] = "http://www.sycom.co.za/images/butt_home_over.gif";
      image_url[2] = "http://www.sycom.co.za/images/butt_about.gif";
      image_url[3] = "http://www.sycom.co.za/images/butt_about_over.gif";
	  image_url[4] = "http://www.sycom.co.za/images/butt_portfolio.gif";
      image_url[5] = "http://www.sycom.co.za/images/butt_portfolio_over.gif";      
      image_url[6] = "http://www.sycom.co.za/images/butt_future.gif";
      image_url[7] = "http://www.sycom.co.za/images/butt_future_over.gif";
	  image_url[8] = "http://www.sycom.co.za/images/butt_press.gif";
      image_url[9] = "http://www.sycom.co.za/images/butt_press_over.gif";
	  image_url[10] = "http://www.sycom.co.za/images/butt_contact.gif";
      image_url[11] = "http://www.sycom.co.za/images/butt_contact_over.gif";	  

       var i = 0;
       for(i=0; i<=3; i++) 
         preload_image_object.src = image_url[i];
    }

// Mouse Overs - DOM3
startList = function() {
if (document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
  node.onmouseover=function() {
  if (document.all) { this.className+=" over"; }
  tmpSrc = this.childNodes[0].childNodes[0].src;
  var suffix = tmpSrc.substring(tmpSrc.lastIndexOf('.'));
  this.childNodes[0].childNodes[0].src = tmpSrc.substring(0,tmpSrc.lastIndexOf('.')) + "_over" + suffix;
  }
  node.onmouseout=function() {
  if (document.all) { this.className=this.className.replace(" over", "");}
  tmpSrc = this.childNodes[0].childNodes[0].src;
  var suffix = tmpSrc.substring(tmpSrc.lastIndexOf('.'));
  tmpSrc = tmpSrc.replace("_over" + suffix, suffix);
  this.childNodes[0].childNodes[0].src = tmpSrc;
   }
   }
  }
 }
}
window.onload=startList;

// Popup Window - Scroll

var desktop;
function key(Pop, name, size)
{
desktop=window.open(Pop, name, size+'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=80,left=80');
}


// Popup
var desktop;
function keyScroll(Pop, name, size)
{
desktop=window.open(Pop, name, size+'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=20,left=20');
}

// Clear Initial Form value on Focus

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 
