var errorMSG="Some fields require your attention";var errorBorder="1px solid #FF0000";var errorFont="#FF0000";function getIEVersion(){var rv=-1;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)
rv=parseFloat(RegExp.$1);}
return rv;}
function checkIEVersion(){var IE=false;var ver=getIEVersion();if(ver>-1){if(ver>=8.0)
IE=true;else
IE=false;}
return IE;}
function getIEVer(){var rv=-1;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)
rv=parseFloat(RegExp.$1);}
return rv;}
function checkIEVer(){var IE=0;var ver=getIEVer();if(ver>-1){if(ver>=8.0){IE=8;}else if(ver==7){IE=7;}else if(ver==6){IE=6;}}else{IE=0;}
return IE;}
quickLook={attach:function(parent,child,showtype,position,cursor){var p=document.getElementById(parent);if(p!=undefined){var c=document.getElementById(child);p["myParent"]=p.id;c["myParent"]=p.id;p["myChild"]=c.id;c["myChild"]=c.id;p["myPosition"]=position;c["myPosition"]=position;c.style.position="absolute";c.style.visibility="hidden";switch(showtype){case"click":p.onclick=quickLook.atClick;p.onmouseout=quickLook.atHide;c.onmouseover=quickLook.atShow;c.onmouseout=quickLook.atHide;break;case"hover":p.onmouseover=quickLook.atShow;p.onmouseout=quickLook.atHide;c.onmouseover=quickLook.atShow;c.onmouseout=quickLook.atHide;break;}}},atClick:function(){var p=document.getElementById(this["myParent"]);var c=document.getElementById(this["myChild"]);if(c.style.visibility!="visible"){quickLook.at_show_aux(p.id,c.id);}else{c.style.visibility="hidden";}
return false;},atHide:function(){var p=document.getElementById(this["myParent"]);var c=document.getElementById(this["myChild"]);c["at_timeout"]=setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'",20);},atShow:function(id){var p=document.getElementById(this["myParent"]);var c=document.getElementById(this["myChild"]);var xpos=(c.offsetWidth);quickLook.at_show_aux(p.id,c.id,xpos);clearTimeout(c["at_timeout"]);},at_show_aux:function(parent,child,xpos){var p=document.getElementById(parent);var c=document.getElementById(child);var pW=document.getElementById(child).offsetWidth;var cH=document.getElementById(child).offsetHeight;var top=(c["myPosition"]=="y")?p.offsetHeight-1:0;var left=(c["myPosition"]=="x")?p.offsetWidth-2:0;for(;p;p=p.offsetParent){top+=p.offsetTop;left+=p.offsetLeft;}
var xoffset=xpos;c.style.position="absolute";c.style.top=(top-(cH-8))+'px';c.style.left=(left-(xoffset-95))+'px';c.style.visibility="visible";c.style.zIndex=5000;}};quickLookRollOver={show:function(obj){obj.className='quickLookThumbOver';if(document.all){obj.childNodes[1].className="quickViewThumbTxtOver";}else{obj.childNodes[3].className="quickViewThumbTxtOver";}},hide:function(obj){obj.className='quickLookThumbOut';if(document.all){obj.childNodes[1].className="quickViewThumbTxt";}else{obj.childNodes[3].className="quickViewThumbTxt";}}};quickLookChildPanel={openedImg:'<img src="/resources/valspar/img/icon_QLArrowOpened.gif">',closedImg:'<img src="/resources/valspar/img/icon_QLArrowClosed.gif">',show:function(obj,id){panel=$('#quickLookSub_'+id);if($(panel).css('display')=='none'){if(document.all){obj.childNodes[1].innerHTML=this.openedImg;}else{obj.childNodes[3].innerHTML=this.openedImg;}
$(panel).css({'z-index':1,'position':'relative'});$(panel).slideDown("slow");}else{if(document.all){obj.childNodes[1].innerHTML=this.closedImg;}else{obj.childNodes[3].innerHTML=this.closedImg;}
$(panel).css({'z-index':1,'position':'relative'});$(panel).slideUp("slow");}}};quickLookIntPaintPanel={openedImg:'<img src="/resources/valspar/img/icon_QLArrowOpened.gif">',closedImg:'<img src="/resources/valspar/img/icon_QLArrowClosed.gif">',show:function(obj,id){panel=$('#quickLookSub_'+id);if($(panel).css('display')=='none'){if(document.all){obj.childNodes[1].innerHTML=this.openedImg;}else{obj.childNodes[3].innerHTML=this.openedImg;}
$(panel).css({'z-index':1,'position':'relative'});$(panel).children().each(function(i){$(panel).children().css({'position':'relative'});});$(panel).slideDown("slow");}else{if(document.all){obj.childNodes[1].innerHTML=this.closedImg;}else{obj.childNodes[3].innerHTML=this.closedImg;}
$(panel).slideUp("slow");}}};paintNav={show:function(obj){var index=obj.id.slice(8);var div=document.getElementById('paintNavSub'+index);var img=document.getElementById('paintArrow'+index);if(div.className=='paintNavSub'){div.className='paintNavSubClosed';img.innerHTML='<img src=""/resources/valspar/img/icon_paintArrowClosed.png">';}else{div.className="paintNavSub";img.innerHTML='<img src=""/resources/valspar/img/icon_paintArrowOpened.png">';}}};leftNavSubMenu={show:function(obj,id){panelObj=document.getElementById('leftNavSubMenuPanel_'+id);if(panelObj.className=="leftNavSubMenuPanelOpened"){panelObj.className="leftNavSubMenuPanelClosed";if(document.all){obj.childNodes[0].className="leftNavSubMenuBarsArrowClosed";}else{obj.childNodes[1].className="leftNavSubMenuBarsArrowClosed";}}else{panelObj.className="leftNavSubMenuPanelOpened";if(document.all){obj.childNodes[0].className="leftNavSubMenuBarsArrowOpened";}else{obj.childNodes[1].className="leftNavSubMenuBarsArrowOpened";}}}};tabingInteriorProducts={show:function(obj){var panel=document.getElementById('panel0');var panelB=document.getElementById('panel1');if(obj.id=="tab0"){objB=document.getElementById('tab1');obj.className="tabingLowesOver";objB.className="tabingIndependentOut";panel.style.display="block";panelB.style.display="none";}else{objB=document.getElementById('tab0');obj.className="tabingIndependentOver";objB.className="tabingLowesOut";panel.style.display="none";panelB.style.display="block";}}};tabingNationalTrust={show:function(obj){var panel=document.getElementById('panel0');var panelB=document.getElementById('panel1');if(obj.id=="tab0"){objB=document.getElementById('tab1');obj.className="tabingInteriorOver";objB.className="tabingExteriorOut";panel.style.display="block";panelB.style.display="none";}else{objB=document.getElementById('tab0');obj.className="tabingExteriorOver";objB.className="tabingInteriorOut";panel.style.display="none";panelB.style.display="block";}}};tabingFindPaint={show:function(obj,id,amt,start){var X=0;if(start!=undefined&&start!=""){X=start;}
for(i=X;i<amt;i++){var panel=document.getElementById('panel_'+i);var obj=document.getElementById('tab_'+i);if(i!=id){obj.className="tabingFindPaintOut";panel.style.display="none";}else{obj.className="tabingFindPaintOver";panel.style.display="block";}}}};tabingSearchCB={show:function(obj,id,amt){for(i=0;i<amt;i++){var panel=document.getElementById('panel_'+i);var obj=document.getElementById('tab_'+i);if(obj!=undefined){if(i!=id){obj.className="searchTabingCBOut";panel.style.display="none";}else{obj.className="searchTabingCBOver";panel.style.display="block";}}}}};tabingSearchRes={show:function(obj,id,amt){var panel=document.getElementById('panelRes_'+id);if(id==0){document.getElementById('tabRes_1').className="searchTabingResOut";document.getElementById('panelRes_1').style.display="none";obj.className="searchTabingLowesOver";panel.style.display="block";}else{document.getElementById('tabRes_0').className="searchTabingLowesOut";document.getElementById('panelRes_0').style.display="none";obj.className="searchTabingResOver";panel.style.display="block";}}};function createInputPWD(obj){var objDiv=document.getElementById(obj.div);var input=document.createElement('input');input.className=obj._class;input.setAttribute('type',obj.type);input.setAttribute('id',obj.id);input.setAttribute('name',obj.id);input.setAttribute('value',obj.value);if(checkIEVersion()){input.setAttribute('onblur','topNav.'+obj.fnBlur+'('+obj.index+',this, \''+obj.errorDiv+'\')');input.setAttribute('onfocus','topNav.'+obj.fnFocus+'('+obj.index+',this, \''+obj.errorDiv+'\')');}else{input.setAttribute('onblur',function(){topNav[obj.fnBlur](obj.index,this,obj.errorDiv);});input.setAttribute('onfocus',function(){topNav[obj.fnFocus](obj.index,this,obj.errorDiv);});}
objDiv.appendChild(input);if(obj.type!="text"){input.focus();}
return objDiv;}
$hover={show:function(elem){$('#'+elem).fadeIn('slow');$('#'+elem).hover('',function(){$(this).fadeOut('fast');});trackPlusSignOver();},hide:function(elem){$('#'+elem).fadeOut('slow');},resize:function(obj,w){var objW=obj.offsetWidth;if(objW>w){obj.style.width=w+"px";}}};var $overlayWin;var $viewWin;function AJAXview(url){$.ajax({url:url,type:"GET",cache:false,async:true,success:function(msg){show_overlay();$("#viewWin").html(msg);$("#viewWin").css('width',jQuery('table#pop').width());},error:function(XMLHttpRequest,textStatus,errorThrown){alert(errorThrown);}});}
function overlay(id){var txt=$("#"+id).html();show_overlay();$("#viewWin").html(txt);$("#viewWin").css('width',jQuery('table#pop').width());$("#viewWin .newProjectGiveTxt").append('<div style="float:left;clear:left;">hello world</div>');}
function show_overlay(){if(!$overlayWin){append_overlay();}
$overlayWin.fadeIn(700);}
function hide_overlay(){$overlayWin.fadeOut(500);}
function append_overlay(){$overlayWin=$('<div id="overlay"></div>').appendTo($('BODY'));$viewWin=$('<div id="viewWin"></div>').appendTo($overlayWin);}
function attach_overlay_events(){$("#overlay").click(function(ev){ev.preventDefault();hide_overlay();});}
jQuery.fn.center=function(){this.css("position","absolute");this.css("top",($(window).height()-this.outerHeight())/2+"px");this.css("left",($(window).width()-this.outerWidth())/2+"px");return this;};var z=0;var openedDivs=[];function hideDiv(){if(z==-1){z=0;}
openedDivs[(openedDivs.length-1)].fadeOut('fast');openedDivs.pop();}
var $overlay=$('<div></div>');function showDiv(id){if(z==0){$overlay[z]=$('<div></div>').appendTo($('BODY'));$overlay[z].addClass('overlayB');}else{$overlay[z]=$('<div></div>').appendTo($('BODY'));$overlay[z].addClass('overlay');}
$overlay[z].css('top','0px');$overlay[z].css('left','0px');$overlay[z].css('width',$(window).width());$overlay[z].css('height',$(window).height());$overlay[z].css('z-index','1000'+z);$overlay[z].fadeIn('slow');$overlay[z].css('position','fixed');$('#'+id).css('z-index','1000'+(z+1));$('#'+id).center();$('#'+id).css('position','fixed');$('#'+id).fadeIn('slow')
$('#'+id+' .close').bind('click',function(ev){z--;$('#'+id+' .close').onclick=null;$(this).unbind('click');$('#'+id).fadeOut('slow');$($overlay[z]).fadeOut('fast');hideDiv();return false;});$overlay[z].bind('click',function(ev){z--;$(this).onclick=null;$(this).unbind('click');$(this).fadeOut('fast');$('#'+id).fadeOut('slow');$('#'+id+' .close').onclick=null;$('#'+id+' .close').unbind('click');openedDivs.pop();return false;});openedDivs[z]=$overlay[z];z++;}
function checkForIE6Browser(){if(checkIEVer()==6){overlayWindow.showDiv({url:'/en/how-to/IE-6.html'});}}
function checkValsparUserCookie(callback){var valsparUserCookie=getCookie('valspar_user_id');if(valsparUserCookie!=null&&valsparUserCookie!=""){if(callback){if(typeof callback=="function")
callback.call();else
window.location=callback;}}else{overlayWindow.showDiv({url:"/en/how-to/enableCookies.html"});}}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)
c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
inputFields={onFocus:function(obj,options){if(options.label.toLowerCase()==options.value.toLowerCase()){obj.value="";obj.style.border="1px solid #CCCCCC";obj.style.color="#333";}},onBlur:function(obj,options){if(obj.value==""){obj.value=options.label;}}};itemAdded={btnID:undefined,addID:function(id){(id!=null)?this.btnID=id:this.btnID=this.btnID;},call:function(action){$('div[id=btnProj_'+itemAdded.btnID+']').fadeOut(200,function(){$('div[id=btnProj_'+itemAdded.btnID+']').css({'display':'none'});$('div[id=btnBProj_'+itemAdded.btnID+']').fadeIn(600);});}};function validPDF(pdf,general){$('#pdfError').html('');var val=document.frmPDF.pdf.options[document.frmPDF.pdf.selectedIndex].value;if(pdf)val=pdf;if(val==0){$('#pdfError').css({'font':'10px Arial, Helvetica, sans-serif','color':'#FF0000'}).html('Please Select a Product Detail (PDF)');return false;}else{document.frmPDF.target="_BLANK";document.frmPDF.action=val;if(general)trackFileDownload(val);else
trackProductInfoDownload(val);if(pdf)document.frmPDF.submit();else return true;}}
onload=checkForIE6Browser;
