/* author: Andy Kale, kale@buzzmedia.ca */
/* Creation date: 5/26/2004 */
function buzzRO(img,state) {
 if (state == 'on') { document.images[img].src = eval(img + "_on.src"); }
 else { document.images[img].src = eval(img + ".src"); }
}

function preload(imgObj) {
	if (document.images) {
		eval(imgObj+' = new Image()');
		imgSrc = ('img/' + imgObj + '.gif');			
		eval(imgObj+'.src = "'+imgSrc+'"');
		eval(imgObj+'_on = new Image()');
		imgSrc = ('img/' + imgObj + '_on.gif');			
		eval(imgObj+'_on.src = "'+imgSrc+'"');		
	}
}

preload('nav_home');
preload('nav_news');
preload('nav_facility');
preload('nav_equipment');
preload('nav_services');
preload('nav_aboutus');
preload('nav_links');



function hideLayer(whichLayer) {
if (document.getElementById) {
  document.getElementById(whichLayer).style.visibility = "hidden";
}
else if (document.all) {
 document.all[whichlayer].style.visibility = "hidden";
}
else if (document.layers) {
 document.layers[whichLayer].visibility = "hidden";
}
}

function showLayer(whichLayer) {
if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "visible";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "visible";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "visible";
}
}

//function popPage(page,w,h) {
// windowprops = "location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes";
// window.open(page, "Popup", width='+w+',height='+h+',windowprops);
//}

function popPage(page,w,h) {
 eval('window.open(page, "popname", "height='+h+',width='+w+',location=no,scrollbars=yes,menubars=yes,toolbars=no,resizable=yes");');
}
