﻿// JScript File

function popUpImg(iName,iTitle,iDesc) {
    var scrLeft = (window.screen.width / 2) - 160;
    var scrTop = (window.screen.height / 2) - 225;
    var popUpURL='/popup.aspx?pi='+iName+'&pt='+iTitle+'&pd='+iDesc;
    var popUpInfo;
        popUpInfo='toolbar=0,';
        popUpInfo+='location=0,';
        popUpInfo+='directories=0,';
        popUpInfo+='status=0,';
        popUpInfo+='menubar=0,';
        popUpInfo+='scrollbars=0,';
        popUpInfo+='resizable=1,';
        popUpInfo+='width=200,';
        popUpInfo+='height=200,';
        popUpInfo+='left='+scrLeft+',';
        popUpInfo+='top='+scrTop;
    window.open(popUpURL,'zoomPopup',popUpInfo);
}

function EnterBtnToTab()
{
    if(event.keyCode==13)
    {
        event.keyCode = 9;
        return;
    }
}

function ViewZoomImageWWW(ipath,ititle,idesc){
	var newWindow2;
	var winTop = (screen.height / 2) - 270;
	var winLeft = (screen.width / 2) - 250;
	var windowFeatures = "width=500,height=535,resizable=1,location=0,status=0,menubar=0,directories=0,toolbar=0,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow2 = window.open("","View",windowFeatures);
	newWindow2.document.write('<html><head><title>'+ititle+'</title></head><BODY><center><IMG SRC="'+ipath+'" BORDER="0" style="border-right: #cccccc 1px solid; border-top: #cccccc 1px solid; border-left: #cccccc 1px solid; border-bottom: #cccccc 1px solid;"  onError="null"><br /><strong><font size="2" face="Arial" color="#333333">'+idesc+'</font></strong></center><form><center><input type="button" value="Close Window" onClick="javascript:window.close();"><br /><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333">Actual colors may vary from displayed or printed images. Images are not shown at actual size. Please obtain a sample to ensure a proper color match and actual image size.</font></center></form></BODY></html>');
    newWindow2.document.close();
	}

function popupBigImage(ipath,ititle,idesc){
	var newWindow2;
	var winTop = (screen.height / 2) - 270;
	var winLeft = (screen.width / 2) - 250;
	var windowFeatures = "width=535,height=535,resizable=1,location=0,status=0,menubar=0,directories=0,toolbar=0,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow2 = window.open("","View",windowFeatures);
	newWindow2.document.write('<html><head><title>'+ititle+'</title></head><BODY><center><IMG SRC="'+ipath+'" BORDER="0" style="border-right: #cccccc 1px solid; border-top: #cccccc 1px solid; border-left: #cccccc 1px solid; border-bottom: #cccccc 1px solid;" onError="null"><br /><strong><font size="2" face="Arial" color="#333333">'+idesc+'</font></strong></center><form><center><input type="button" value="Close Window" onClick="javascript:window.close();"><br /></center></form></BODY></html>');
    newWindow2.document.close();
	}
	
function popupBigImageWide(ipath,ititle,idesc){
	var newWindow2;
	var winTop = (screen.height / 2) - 270;
	var winLeft = (screen.width / 2) - 250;
	var windowFeatures = "width=550,height=475,resizable=1,location=0,status=0,menubar=0,directories=0,toolbar=0,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow2 = window.open("","View",windowFeatures);
	newWindow2.document.write('<html><head><title>'+ititle+'</title></head><BODY><center><IMG SRC="'+ipath+'" BORDER="0" style="border-right: #cccccc 1px solid; border-top: #cccccc 1px solid; border-left: #cccccc 1px solid; border-bottom: #cccccc 1px solid;" onError="null"><br /><strong><font size="2" face="Arial" color="#333333">'+idesc+'</font></strong></center><form><center><input type="button" value="Close Window" onClick="javascript:window.close();"><br /></center></form></BODY></html>');
    newWindow2.document.close();
	}

function popupBigImageTall(ipath,ititle,idesc){
	var newWindow2;
	var winTop = (screen.height / 2) - 270;
	var winLeft = (screen.width / 2) - 250;
	var windowFeatures = "width=500,height=600,resizable=1,location=0,status=0,menubar=0,directories=0,toolbar=0,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow2 = window.open("","View",windowFeatures);
	newWindow2.document.write('<html><head><title>'+ititle+'</title></head><BODY><center><IMG SRC="'+ipath+'" BORDER="0" style="border-right: #cccccc 1px solid; border-top: #cccccc 1px solid; border-left: #cccccc 1px solid; border-bottom: #cccccc 1px solid;" onError="null"><br /><strong><font size="2" face="Arial" color="#333333">'+idesc+'</font></strong></center><form><center><input type="button" value="Close Window" onClick="javascript:window.close();"><br /></center></form></BODY></html>');
    newWindow2.document.close();
	}

function ViewSinkImage(ipath,ptitle,pmsg,pResize,pScoller)
{
	var NewWindow;
	var winTop = (screen.height / 2) - 295;
	var winLeft = (screen.width / 2) - 275;
	var winWidth = "width=600";
	var winHeight = "height=600";
	var winResize = "resizable=" + pResize;
	var winScoller = "scrollbars=" + pScoller;
	var windowFeatures = winWidth + "," + winHeight + "," + winResize + "," + winScoller + ","; //width=415,height=525,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow = window.open("","View",windowFeatures);
	newWindow.document.write('<html><head><title>'+ptitle+'</title><link rel="stylesheet" href="/masters/css/type.css" type="text/css"><style type="text/css"><!--body {background-color: #ffffff; margin-right: 0px;}--></style></head><body><center><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"><form><tr><td align="center"><h1>'+ptitle+'</h1></td></tr><tr><td align="center"><IMG SRC="'+ ipath + '" BORDER="0"></td></tr><tr><td align="center"><p>'+pmsg+'</p></td></tr><tr><td align="center" valign="top"><a href="javascript:window.close();">Close</a></td></tr></form></table></center></body></html>');
    newWindow.document.close();
}
function ViewSinkImageOld(ipath,ptitle,pmsg,pResize,pScoller)
{
	var NewWindow;
	var winTop = (screen.height / 2) - 295;
	var winLeft = (screen.width / 2) - 275;
	var winWidth = "width=600";
	var winHeight = "height=700";
	var winResize = "resizable=" + pResize;
	var winScoller = "scrollbars=" + pScoller;
	var windowFeatures = winWidth + "," + winHeight + "," + winResize + "," + winScoller + ","; //width=415,height=525,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow = window.open("","View",windowFeatures);
	newWindow.document.write('<html><head><title>'+ptitle+'</title><link rel="stylesheet" href="/masters/css/type.css" type="text/css"><style type="text/css"><!--body {background-color: #ffffff; margin-right: 0px;}--></style></head><body><center><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"><form><tr><td align="center"><h1>'+ptitle+'</h1></td></tr><tr><td align="center"><IMG SRC="'+ ipath + '" BORDER="0"></td></tr><tr><td align="center"><p>'+pmsg+'</p></td></tr><tr><td align="center" valign="top"><a href="javascript:window.close();">Close</a><p class="caption"><br />Width is measured side to side<br />Depth is measured from front to back<br />Bowl Depth is how deep</p></td></tr></form></table></center></body></html>');
    newWindow.document.close();
}

function ViewLamSinkImage(ipath,ptitle,pmsg,pResize,pScoller)
{
	var NewWindow;
	var winTop = (screen.height / 2) - 295;
	var winLeft = (screen.width / 2) - 275;
	var winWidth = "width=600";
	var winHeight = "height=600";
	var winResize = "resizable=" + pResize;
	var winScoller = "scrollbars=" + pScoller;
	var windowFeatures = winWidth + "," + winHeight + "," + winResize + "," + winScoller + ","; //width=415,height=525,";
	windowFeatures = windowFeatures + "left=" + winLeft + ",";
	windowFeatures = windowFeatures + "top=" + winTop;
	newWindow = window.open("","View",windowFeatures);
	newWindow.document.write('<html><head><title>'+ptitle+'</title><link rel="stylesheet" href="/masters/css/type.css" type="text/css"><style type="text/css"><!--body {background-color: #ffffff; margin-right: 0px;}--></style></head><body><center><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"><form><tr><td align="center"><h1>'+ptitle+'</h1></td></tr><tr><td align="center"><IMG SRC="'+ ipath + '" BORDER="0"></td></tr><tr><td align="center"><p>'+pmsg+'</p></td></tr><tr><td align="center" valign="top"><a href="javascript:window.close();">Close</a></td></tr></form></table></center></body></html>');
    newWindow.document.close();
}
	
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function FirstColumnRollOver(cchange)
{ if (!cchange.contains(event.fromElement))
	{ cchange.bgColor="#EEEDCE";}}

function FirstColumnRollOut(cchange)
{ if (!cchange.contains(event.toElement))
	{ cchange.bgColor="#DCDBB8";}}

function popUpMovie(moviePath) {
    var scrLeft = (window.screen.width / 2) - 160;
    var scrTop = (window.screen.height / 2) - 225;
    //var popUpURL='/mediafiles/WilsonartHDCommercial.html';
    var popUpInfo;
        popUpInfo='toolbar=0,';
        popUpInfo+='location=0,';
        popUpInfo+='directories=0,';
        popUpInfo+='status=0,';
        popUpInfo+='menubar=0,';
        popUpInfo+='scrollbars=0,';
        popUpInfo+='resizable=1,';
        popUpInfo+='width=570,';
        popUpInfo+='height=550,';
        popUpInfo+='left='+scrLeft+',';
        popUpInfo+='top='+scrTop;
    window.open(moviePath,'WilsonartWatchIt',popUpInfo);
}


function popUpHDMovie() {
    var scrLeft = (window.screen.width / 2) - 160;
    var scrTop = (window.screen.height / 2) - 225;
    var popUpURL='/mediafiles/WilsonartHDCommercial.html';
    var popUpInfo;
        popUpInfo='toolbar=0,';
        popUpInfo+='location=0,';
        popUpInfo+='directories=0,';
        popUpInfo+='status=0,';
        popUpInfo+='menubar=0,';
        popUpInfo+='scrollbars=0,';
        popUpInfo+='resizable=1,';
        popUpInfo+='width=570,';
        popUpInfo+='height=420,';
        popUpInfo+='left='+scrLeft+',';
        popUpInfo+='top='+scrTop;
    window.open(popUpURL,'WilsonartHDCommercial',popUpInfo);
}

function popUpDodgeMovie() {
    var scrLeft = (window.screen.width / 2) - 160;
    var scrTop = (window.screen.height / 2) - 225;
    var popUpURL='/mediafiles/MDBeforeandAfter.html';
    var popUpInfo;
        popUpInfo='toolbar=0,';
        popUpInfo+='location=0,';
        popUpInfo+='directories=0,';
        popUpInfo+='status=0,';
        popUpInfo+='menubar=0,';
        popUpInfo+='scrollbars=0,';
        popUpInfo+='resizable=1,';
        popUpInfo+='width=400,';
        popUpInfo+='height=300,';
        popUpInfo+='left='+scrLeft+',';
        popUpInfo+='top='+scrTop;
    window.open(popUpURL,'MDBeforeandAfter',popUpInfo);
}

