function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()');
		eval(imgObj+'.src = "'+imgSrc+'"');
	}
}

function swap() {
  if (document.images) {
    for (var i=0; i<swap.arguments.length; i+=2) {
      document[swap.arguments[i]].src = eval(swap.arguments[i+1] + ".src");
    }
  }
}

function zoomImage(imageName,imageWidth,imageHeight,titl) {  // v4.01
   	var posLeft = Math.floor( (screen.width - imageWidth) / 2);
    var posTop = Math.floor( (screen.height - imageHeight) / 2);
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+titl+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+imageName+'\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

preload('about_off', '/images/header/2.jpg');
preload('about_on', '/images/header/2_on.jpg');
preload('loc_off', '/images/header/3.jpg');
preload('loc_on', '/images/header/3_on.jpg');
preload('contact_off', '/images/header/4.jpg');
preload('contact_on', '/images/header/4_on.jpg');
preload('home_off', '/images/header/5.jpg');
preload('home_on', '/images/header/5_on.jpg');

for(var i=1;i<=19;i++)
{
	preload('nav_'+i+'_off', '/images/nav/left/'+i+'.gif');
	preload('nav_'+i+'_on', '/images/nav/left/'+i+'_on.gif');
}
