/* YL Legacy scripts | unminified: http://lib.store.yahoo.net/lib/ylighting/yl.legacy.js */
function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=[];var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)if(d[b].indexOf("#")!=0)a.MM_p[c]=new Image,a.MM_p[c++].src=d[b]}}function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc} function MM_findObj(a,b){var c,d;b||(b=document);if((c=a.indexOf("?"))>0&&parent.frames.length)b=parent.frames[a.substring(c+1)].document,a=a.substring(0,c);if(!(d=b[a])&&b.all)d=b.all[a];for(c=0;!d&&c<b.forms.length;c++)d=b.forms[c][a];for(c=0;!d&&b.layers&&c<b.layers.length;c++)d=MM_findObj(a,b.layers[c].document);!d&&b.getElementById&&(d=b.getElementById(a));return d} function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=[];for(a=0;a<d.length-2;a+=3)if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc)c.oSrc=c.src;c.src=d[a+2]}} function DatePosition(a,b,c){var d=new Date,e=parseInt(d.getYear()/100)*100;if(b==1)b=new Date(a.substring(0,4),a.substring(4,6)-1,a.substring(6,8));else if(b==2)b=d.getYear()%100>=parseInt(a.substring(0,2))?new Date(e+parseInt(a.substring(4,6)),parseInt(a.substring(2,4)-1),a.substring(4,6)):new Date(e-100+parseInt(a.substring(0,2)),parseInt(a.substring(2,4)-1),a.substring(4,6));else if(b==3)b=new Date(a.substring(6,10),a.substring(3,5)-1,a.substring(0,2));else if(b==4)d.getYear()%100>=parseInt(a.substring(6, 8))?(document.write(e+parseInt(a.substring(6,8)),"<P>"),b=new Date(e+parseInt(a.substring(4,6)),parseInt(a.substring(3,5)-1),a.substring(0,2))):(document.write(e-100+parseInt(a.substring(6,8)),"<P>"),b=new Date(e-100+parseInt(a.substring(4,6)),parseInt(a.substring(3,5)-1),a.substring(0,2)));else if(b==5)b=new Date(a.substring(6,10),a.substring(0,2)-1,a.substring(3,5));else if(b==6)b=new Date(a.substring(4,8),a.substring(0,2)-1,a.substring(2,4));else if(b==7)d.getYear()%100>=parseInt(a.substring(4, 6))?(document.write("datestring Century:",e+parseInt(a.substring(4,6)),"<P>"),b=new Date(e+parseInt(a.substring(4,6)),parseInt(a.substring(0,2)-1),a.substring(2,4))):(document.write("datestring Century:",e-100+parseInt(a.substring(4,6)),"<P>"),b=new Date(e-100+parseInt(a.substring(4,6)),parseInt(a.substring(0,2)-1),a.substring(2,4)));else return false;b>d&&(c.length==0?(document.write("<p class=textdarkgray>"),document.write("<b>Note:</b> Orders placed today for this item will not ship before "), document.write(a,". ")):(document.write("<p class=textdarkgray>"),document.write(c)),document.write("</p>"))}function tellAFriend(){var a=document.location.href,a=a.substring(a.lastIndexOf("/")+1),a=a.substring(0,a.lastIndexOf("."));MM_openBrWindow("reddot-tellafriend.html?item="+a,"tellAFriend","scrollbars=no,resizable=yes,width=453,height=447,left=200,top=50")} function askAQuestion(){var a=document.location.href,a=a.substring(a.lastIndexOf("/")+1),a=a.substring(0,a.lastIndexOf("."));MM_openBrWindow("ask-a-question.html?item="+a,"tellAFriend","scrollbars=no,resizable=yes,width=453,height=447,left=200,top=50")}function tellAFriendPlus(){var a="reddot-tellafriend.html?item="+document.location.href.substring(document.location.href.lastIndexOf("=")+1);MM_openBrWindow(a,"tellAFriend","scrollbars=no,resizable=yes,width=453,height=447,left=200,top=50")} function askAQuestionPlus(){var a="reddot-askquestion.html?item="+document.location.href.substring(document.location.href.lastIndexOf("=")+1);MM_openBrWindow(a,"tellAFriend","scrollbars=no,resizable=yes,width=453,height=447,left=200,top=50")}function popVolume(a){window.open(a,"","toolbar=no, width=550, height=575, resizable=1, scrollbars=1")}function popUp(a){window.open(a,"","toolbar=no, width=500, height=545, resizable=1, scrollbars=1")} function popImage(a){window.open(a,"","toolbar=no, width=450, height=520, resizable=0, scrollbars=0")}function MM_openBrWindow(a,b,c){window.name="main";smallWin=window.open(a,b,c)}function popProduct(a){window.open("product-zoom.html?"+a+"","","toolbar=no, width=575, height=600, resizable=1, scrollbars=1")}function popProductPlus(a,b){window.open("product-zoom-plus.html?"+b+"&pageid="+a,"","toolbar=no, width=575, height=600, resizable=1, scrollbars=1")} function popMore(a){window.open("more-zoom.html?"+a+"","","toolbar=no, width=400, height=400, resizable=1, scrollbars=1")}function ZoomPopUp(a){window.open("product-zoom.html?"+a+"","","toolbar=no, width=575, height=600, resizable=1, scrollbars=1")}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=[];var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)if(d[b].indexOf("#")!=0)a.MM_p[c]=new Image,a.MM_p[c++].src=d[b]}} function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc}function MM_findObj(a,b){var c,d;b||(b=document);if((c=a.indexOf("?"))>0&&parent.frames.length)b=parent.frames[a.substring(c+1)].document,a=a.substring(0,c);if(!(d=b[a])&&b.all)d=b.all[a];for(c=0;!d&&c<b.forms.length;c++)d=b.forms[c][a];for(c=0;!d&&b.layers&&c<b.layers.length;c++)d=MM_findObj(a,b.layers[c].document);!d&&document.getElementById&&(d=document.getElementById(a));return d} function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=[];for(a=0;a<d.length-2;a+=3)if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc)c.oSrc=c.src;c.src=d[a+2]}}sfHover=function(){var a=["nav","subnav"],b;for(b in a){var c=document.getElementById(a[b]);if(c){c=c.getElementsByTagName("LI");for(b=0;b<c.length;b++)c[b].onmouseover=function(){this.className+=" sfhover"},c[b].onmouseout=function(){this.className=this.className.replace(/ sfhover\b/,"")}}}}; window.attachEvent&&window.attachEvent("onload",sfHover);function popProductPress(a){window.open("product-zoom.html?"+a+"","","toolbar=no, width=650, height=600, resizable=1, scrollbars=1")}function goSite(a){if(a=a.options[a.selectedIndex].value)document.location.href=a+".html"}function goSiteSLI(a){if(a=a.options[a.selectedIndex].value)document.location.href="http://www.ylighting.com/"+a+".html"};

