///////////////////////////////////////////////////////////////////////
/*           JavaScript Resource file for Best Italia                */
///////////////////////////////////////////////////////////////////////

// Script Preload Images //


    if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      image_url = new Array();
      image_url[0] = "../images/butt-about.gif";
      image_url[1] = "../images/butt-about_over.gif";
      image_url[2] = "../images/butt-ovens.gif";
      image_url[3] = "../images/butt-ovens_over.gif";
      image_url[4] = "../images/butt-hobs.gif";
      image_url[5] = "../images/butt-hobs_over.gif";
	  image_url[6] = "../images/butt-extract.gif";
      image_url[7] = "../images/butt-extract_over.gif";
      image_url[8] = "../images/butt-galleries.gif";
      image_url[9] = "../images/butt-galleries_over.gif";
       var i = 0;
       for(i=0; i<=9; 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;

// Clear Initial Form value on Focus

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

// Popup Window - Scroll

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=80,left=80');
}

// Default Status
defaultStatus="";

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 

// 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');
}

