//common JS file, included in the <head>

//function changeShowHide(id){
//     ID = document.getElementById(id);
//    
//     if(ID.style.display == "")
//          ID.style.display = "none";
//     else
//          ID.style.display = "";
//     }

function changeShowHide(id, id2) {
    ID = document.getElementById(id);
    ID2 = document.getElementById(id2);

    if (ID.style.display == "") {
        ID.style.display = "none";
        ID2.className = "noColor";
    }
    else {
        ID.style.display = "";
        ID2.className = "withColor";

    }
}

function changeShowHideBullet(id, id2) {
    ID = document.getElementById(id);
    ID2 = document.getElementById(id2);

    if (ID.style.display == "") {
        ID.style.display = "none";
        ID2.className = "noColorBullet";
    }
    else {
        ID.style.display = "";
        ID2.className = "withColorBullet";

    }
}
     
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}

function ViewImageWHT(ipath,iwidth,iheight,ititle){
	var newWindow;
	var winTop = (screen.height / 2) - 275;
	var winLeft = (screen.width / 2) - 275;
	var windowFeatures = "width="+iwidth+",height="+iheight+",";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow = window.open("","ViewImageWHT",windowFeatures);
	newWindow.document.write('<html><head><title>Wilsonart Laminate: '+ititle+'</title><link rel="stylesheet" href="/style/layout.css" type="text/css"></head><body><img src="/images/logo.gif" border="0" hspace="4" vspace="3"><center><form><img src="'+ipath+'" style="border: 1px solid #666666;" align="center"><p style="color:#ffffff;"><b>'+ititle+'</b></p><input type="button" value="Close Window" onClick="javascript:window.close();" class="button"></form></center></body></html>');
	newWindow.document.close();
}

function ViewPAImage(ipath,ititle){
	var newWindow;
	var winTop = (screen.height / 2) - 275;
	var winLeft = (screen.width / 2) - 275;
	var windowFeatures = "width=515,height=575,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow = window.open("","ViewImageWHT",windowFeatures);
	newWindow.document.write('<html><head><title>Wilsonart Laminate: '+ititle+'</title><link rel="stylesheet" href="/style/layout.css" type="text/css"></head><body><img src="/images/logo.gif" border="0" hspace="4" vspace="3"><center><form><img src="'+ipath+'" style="border: 1px solid #666666;" align="center"><p style="color:#ffffff;"><b>'+ititle+'</b></p><input type="button" value="Close Window" onClick="javascript:window.close();" class="button"></form></center></body></html>');
	newWindow.document.close();
	}

function popupimg(ipath){
	var newWindow;
	var winTop = (screen.height / 2) - 275;
	var winLeft = (screen.width / 2) - 275;
	var windowFeatures = "width=525,height=585,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow = window.open("","popupimg",windowFeatures);
	newWindow.document.write('<html><head><title>Wilsonart Laminate:</title><link rel="stylesheet" href="/style/layout.css" type="text/css"></head><body><img src="/images/logo.gif" border="0" hspace="4" vspace="3"><center><form><img src="'+ipath+'" style="border: 1px solid #666666;" align="center"><input type="button" value="Close Window" onClick="javascript:window.close();" class="button"></form></center></body></html>');
	newWindow.document.close();
	}
	
function EnterBtnToTab()
{
    if(event.keyCode==13)
    {
        event.keyCode = 9;
        return event.keyCode;
    }
}
