var baseUrl=GetBaseUrl();function EmailFriend(){var a=document.getElementById("hidProductVariant").value;if(document.getElementById('divSelectItem')!=null){document.getElementById('divSelectItem').display="hidden"}if(document.getElementById('rdoProductVariant')==null){PopUpEmailItem('emailProductInfo.aspx?ProductSku='+a)}else{var b=document.getElementById('hidProductVariant').value;if(b==""){document.getElementById('divSelectItem').innerHTML='<span class="RedText s11 B">To email this product to a friend, please select an item above. Then, click "Email to a Friend."</span>'}else{PopUpEmailItem('emailProductInfo.aspx?ProductSku='+b)}}}function SetVariant(a,b){elem=document.getElementById("hidProductVariant");elem.value=a;priceelem=document.getElementById("hidProductVariantPrice");priceelem.value=b}function SelectedItemCheckWishList(){document.getElementById('divSelectItem').display="hidden";var a=document.getElementById('hidProductVariant').value;if(a>1){return true}else{document.getElementById('divSelectItem').innerHTML='<span class="RedText s11 B">To add this product to your Favorites, please select an item above. Then, click "Add to My Favorites."</span>';return false}}function SelectedItemCheckShoppingCart(){document.getElementById('divSelectItem').display="hidden";var a=document.getElementById('hidProductVariant').value;if(a>1){return true}else{document.getElementById('divSelectItem').innerHTML='<span class="RedText s11 B">To add this product to your cart, please select an item above. Then, click "Add to Cart."</span>';return false}}function imageProtectMouseDown(){if(window.event.button=='2'){var d=new Date();window.alert('Copyright '+d.getFullYear()+' Collections Etc., Inc.  All Rights Reserved.  Reproduction in part or in whole is strictly prohibited.')}}function PrintPage(){window.print()}function PopUpLargerView(a){newWin=window.open(baseUrl+a,"win","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=600,height=600");self.name="newWin"}function PopUpEmailItem(a){newWin=window.open(baseUrl+a,"win","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=500,height=410");self.name="newWin"}function PopUpGuaranteedShipping(a){newWin=window.open(baseUrl+a,"win","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=610,height=600");self.name="newWin"}function AdrPopUp(a){day=new Date();id=day.getTime();eval("page"+id+" = window.open(baseUrl + a, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=525,height=300,left = 209.5,top = 120');")}function popUp(a){day=new Date();id=day.getTime();eval("page"+id+" = window.open(baseUrl + a, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=400,left = 299.5,top = 150');")}function SourcePopUp(a){day=new Date();id=day.getTime();eval("page"+id+" = window.open(baseUrl + a, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375,left = 209.5,top = 120');")}function UpdatePrice(a){document.frmMain.price.value=a}function AddToBasketProductContent(){var a=document.getElementById("quantity");var b=a.options[a.selectedIndex].value;var c=document.getElementById("itemnumber").value;var d=document.getElementById("price").value;document.location.href=baseUrl+"shopCart.aspx?Add=TRUE&Item="+c+"&Price="+d+"&Qty="+b+"&SubTotal="+(d*b)}function RegisterPageRedirect(){var a=baseUrl.substring(0,4)+'s'+baseUrl.substring(4)+"CustomerRegistration.aspx?email=";a=a+RetrieveEmail();document.location.href=a}function SetEmail(){return(document.write(RetrieveEmail()))}function RetrieveEmail(){var a=document.URL.indexOf('?');var b="";var c=baseUrl+"CustomerRegistration.aspx?";if(a!=-1){b=document.URL.substring(a+7,document.URL.length)}return b}function GetQueryString(a){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){return ft[1]}}}function GetBaseUrl(){var a;var b="";if(document.all){a=document.all.tags("meta")}else if(document.documentElement){a=document.getElementsByTagName("meta")}if(typeof(a)!="undefined"){for(var i=1;i<=a.length;i++){var c=a.item(i-1);if(c.name){if(c.name.indexOf('BaseUrl')==0){b=c.content}}}}return b}function LTrim(a){var b=/\s*((\S+\s*)*)/;return a.replace(b,"$1")}function RTrim(a){var b=/((\s*\S+)*)\s*/;return a.replace(b,"$1")}function Trim(a){return LTrim(RTrim(a))}function CountDown(a,m,d,b){var c="Days Left for Guaranteed<br /> Christmas Shipping!";var e="1 Day Left for Guaranteed<br /> Christmas Shipping!";var f="Last Minute Guaranteed<br /> Christmas Shipping!";var g=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");theyear=a;themonth=m;theday=d;d=d-4;thehour=b;var h=new Date();var i=h.getYear();if(i<1000){i+=1900}var j=h.getMonth();var k=h.getDate();var l=h.getHours()+h.getTimezoneOffset()/60-6;var n=h.getMinutes();var o=h.getSeconds();var p=g[j]+" "+k+", "+i+" "+l+":"+n+":"+o;futurestring=g[m-1]+" "+d+", "+a+" "+b+":00:00";dd=Date.parse(futurestring)-Date.parse(p);dday=Math.floor(dd/(60*60*1000*24)*1);dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);dmin=Math.floor((dd%(60*60*1000*24))/(60*1000)*1);if((dday<1&&dhour<1&&dmin<1)||(isNaN(dday)||isNaN(dhour)||isNaN(dmin))){link='http://www.collectionsetc.com/WebSplash.aspx';return f}else if(dday<2&&(dhour>0||dmin>=0)){link='http://www.collectionsetc.com/WebSplash.aspx';return f}else if(dday<3&&(dhour>0||dmin>0)){link='http://www.collectionsetc.com/WebSplash.aspx';return e}else{if(dday<9&&(dhour>0||dmin>0)){link='http://www.collectionsetc.com/WebSplash.aspx'}else{link='http://www.collectionsetc.com/productgiftfinder.aspx'}dday=dday-1;return dday+" "+c}}function JSGetSwfVer(i){if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var a=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var b=navigator.plugins["Shockwave Flash"+a].description;descArray=b.split(" ");tempArrayMajor=descArray[2].split(".");versionMajor=tempArrayMajor[0];versionMinor=tempArrayMajor[1];if(descArray[3]!=""){tempArrayMinor=descArray[3].split("r")}else{tempArrayMinor=descArray[4].split("r")}versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;flashVer=versionMajor+"."+versionMinor+"."+versionRevision}else{flashVer=-1}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else{flashVer=-1}return flashVer}function DetectFlashVer(a,b,c){reqVer=parseFloat(a+"."+c);for(i=25;i>0;i--){if(isIE&&isWin&&!isOpera){versionStr=VBGetSwfVer(i)}else{versionStr=JSGetSwfVer(i)}if(versionStr==-1){return-1}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}versionMajor=versionArray[0];versionMinor=versionArray[1];versionRevision=versionArray[2];versionString=versionMajor+"."+versionRevision;versionNum=parseFloat(versionString);if((versionMajor>a)&&(versionNum>=reqVer)){return 1}else{return((versionNum>=reqVer&&versionMinor>=b)?1:0)}}}return(reqVer?-1:0.0)}function readCookie(a){var b=a+"=";var d=document.cookie.split(';');for(var i=0;i<d.length;i++){var c=d[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(b)==0)return c.substring(b.length,c.length)}return null}function CountDown(a,b,c,d,e,f,g,h){var i;var j=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");theyear=a;themonth=b;theday=c;thehour=d;var k=new Date();var l=k.getYear();if(l<1000){l+=1900}var m=k.getMonth();var n=k.getDate();var o=k.getHours()+k.getTimezoneOffset()/60-6;var p=k.getMinutes();var q=k.getSeconds();var r=j[m]+" "+n+", "+l+" "+o+":"+p+":"+q;var s=j[b-1]+" "+c+", "+a+" "+d+":00:00";var t=j[f-1]+" "+g+", "+e+" "+h+":00:00";dDiff=Date.parse(t)-Date.parse(r);dDays=Math.floor(dDiff/(60*60*1000*24)*1);dHours=Math.floor((dDiff%(60*60*1000*24))/(60*60*1000)*1)-1;dMinutes=Math.floor(((dDiff%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);dSeconds=Math.floor((((dDiff%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);dDiffFromStart=Date.parse(r)-Date.parse(s);if(dDiffFromStart>0){if(dDays<0||dHours<0||dMinutes<0||dSeconds<0){document.getElementById("countdown").innerHTML="00:00:00"}else{if(dDays>0)dHours=dHours+dDays*24;if(dHours.toString().length<2)dHours="0"+dHours;if(dMinutes.toString().length<2)dMinutes="0"+dMinutes;if(dSeconds.toString().length<2)dSeconds="0"+dSeconds;document.getElementById("countdown").innerHTML=dHours+":"+dMinutes+":"+dSeconds;setTimeout("CountDown("+a+","+b+","+c+","+d+","+e+","+f+","+g+","+h+")",1000)}}else{document.getElementById("countdown").innerHTML=""}}function ClearText(a){var b='InputBoxBlack';if(a.className.indexOf('FormInput')>-1){b=b+" FormInput"}switch(a.value){case'Type Gift Message':a.value='';a.className=b;case'Enter Promo Code':a.value='';a.className=b;case'Enter Keyword or Item #':a.value='';a.className=b;case'Enter Email Address':a.value='';a.className=b;case'MyEmail@Website.com':a.value='';a.className=b;case"Type your gift message here.":a.value='';a.className=b;default:}}function checkValidity(a){var b=null;if(a=='top'){b=document.getElementById('NttTop')}else if(a=='btm'){b=document.getElementById('NttBtm')}else{b=document.getElementById('NttSub')}var c=b.value;var d=0;var e='';e=c.replace(new RegExp('<','g'),'');e=e.replace(new RegExp('>','g'),'');for(y=0;y<c.length;y++){if(c.charAt(y)==" "){d++}}if(d==e.length||e.length==0||e=="Enter Keyword or Item #"){alert("Please enter a Keyword or an Item #.");return false}else{var f=e.trim().replace(/ /g,"-").replace(/&/g,"amp");var g=GetBaseUrl();if(a=='top'){var h=document.getElementById("searchTop");h.action=g+f+"/search.aspx";h.submit()}else if(a=='btm'){var i=document.getElementById("searchBtm");i.action=g+f+"/search.aspx";i.submit()}else{var j=document.getElementById("searchSub");j.action=g+f+"/search.aspx";j.submit()}}}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")}