function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}


var myWindow;
function openCenteredWindow(url) {
    var width = 600;
    var height = 400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + 
        ",status,resizable,scrollbars,toolbar,left=" + left + ",top=" + top + 
        "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);
}

var b=new Array(
	'home',
	'services',
	'products',
	'gallery',
	'reviews',
	'contact',
	'ourstory'
);

for(x=0;x<b.length;x++) {
	eval(b[x]+"_off=new Image();");
	eval(b[x]+"_off.src=\"images/b"+b[x]+"0.png\";");
	eval(b[x]+"_on=new Image();");
	eval(b[x]+"_on.src=\"images/b"+b[x]+"1.png\";");
}

function button_on ( imgName ) {
	butOn = eval ( imgName + "_on.src" );
	document [imgName].src = butOn;
}

function button_off ( imgName ) {
	butOff = eval ( imgName + "_off.src" );
	document [imgName].src = butOff;
}


function WindowOpen(Url,x,y)

{

var String;

String = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=2,resizable=0,copyhistory=0,";

String += ",width=";

String += x;

String += ",height=";

String += y;



WinPic=window.open(Url,WinNum++,String);

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}