onerror=handleErr;
var txt="";

// Preload images script

var myimages=new Array();
function preloadimages(){
	for (i=0;i<preloadimages.arguments.length;i++){
			myimages[i]=new Image();
			myimages[i].src=preloadimages.arguments[i];
	}
}

preloadimages("assets/gfx/home_panel_valve_off","assets/gfx/home_panel_valve_on","gfx/home_panel_comp_on","assets/gfx/home_panel_comp_off","assets/gfx/home_panel_fab_off","assets/gfx/home_panel_fab_on","assets/gfx/home_panel_custom_off","assets/gfx/home_panel_custom_on");

function handleErr(msg,url,l)
{
return true;
}

function showPic(picName, picWidth, picHeight) 
{
picLocation = "assets/images/"+picName;
window.open(picLocation,"bigImage", "alwaysRaised=1, scrollbars=0, resizable=0, left=100, top=100, width="+(picWidth+20)+", height="+(picHeight+20));
}

function returnObjByID( id )
{
    if (document.getElementById)
        var returnVar = document.getElementById(id);
    else if (document.all)
        var returnVar = document.all[id];
    else if (document.layers)
        var returnVar = document.layers[id];
    return returnVar;
}

function showSub(subMenu)	{
	returnObjByID(subMenu).style.display='block';
}

function hideSub(subMenu)	{
	returnObjByID(subMenu).style.display='none';
}

