var getElementsByClassName=function(f,g,h){if(document.getElementsByClassName){getElementsByClassName=function(a,b,c){c=c||document;var d=c.getElementsByClassName(a),nodeName=(b)?new RegExp("\\b"+b+"\\b","i"):null,returnElements=[],current;for(var i=0,il=d.length;i<il;i+=1){current=d[i];if(!nodeName||nodeName.test(current.nodeName)){returnElements.push(current)}}return returnElements}}else if(document.evaluate){getElementsByClassName=function(a,b,c){b=b||"*";c=c||document;var d=a.split(" "),classesToCheck="",xhtmlNamespace="http://www.w3.org/1999/xhtml",namespaceResolver=(document.documentElement.namespaceURI===xhtmlNamespace)?xhtmlNamespace:null,returnElements=[],elements,node;for(var j=0,jl=d.length;j<jl;j+=1){classesToCheck+="[contains(concat(' ', @class, ' '), ' "+d[j]+" ')]"}try{elements=document.evaluate(".//"+b+classesToCheck,c,namespaceResolver,0,null)}catch(e){elements=document.evaluate(".//"+b+classesToCheck,c,null,0,null)}while((node=elements.iterateNext())){returnElements.push(node)}return returnElements}}else{getElementsByClassName=function(a,b,c){b=b||"*";c=c||document;var d=a.split(" "),classesToCheck=[],elements=(b==="*"&&c.all)?c.all:c.getElementsByTagName(b),current,returnElements=[],match;for(var k=0,kl=d.length;k<kl;k+=1){classesToCheck.push(new RegExp("(^|\\s)"+d[k]+"(\\s|$)"))}for(var l=0,ll=elements.length;l<ll;l+=1){current=elements[l];match=false;for(var m=0,ml=classesToCheck.length;m<ml;m+=1){match=classesToCheck[m].test(current.className);if(!match){break}}if(match){returnElements.push(current)}}return returnElements}}return getElementsByClassName(f,g,h)};function fHideAll(a){var b=getElementsByClassName(a);for(j=0;j<b.length;j++){b[j].style.display='none'}return true}function updateQty(a,b){url='http://www.lauraleedesigns.com/otf.php?action=getqty&id='+b+'&color='+a+'&q='+parseInt(Math.random()*99999999);makeRequest(url);return false}function addSelectOption(a){var b=document.getElementById('qty');var i;for(i=b.length-1;i>=0;i--){b.remove(i)}for(i=1;i<=a;i++){var c=document.createElement('option');c.text=i;c.value=i;try{b.add(c,null)}catch(ex){b.add(c)}}}function showContents(){if(xhr.readyState==4){if(xhr.status==200){var a=xhr.responseText}else{var a="There was a problem with the request "+xhr.status}addSelectOption(a)}else{}}function makeRequest(a){if(window.XMLHttpRequest){xhr=new XMLHttpRequest()}else{if(window.ActiveXObject){try{xhr=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}if(xhr){xhr.onreadystatechange=showContents;xhr.open("GET",a,true);xhr.send(null)}else{document.getElementById('qty').innerHTML="Sorry, but I couldn't create an XMLHttpRequest"}}function fToggleVis(a){var e=document.getElementById(a);if(e.style.display=='block'){e.style.display='none'}else{e.style.display='block'}return true}function fToggleMenuVis(a){fHideAll('submenu');var e=document.getElementById(a);if(e.style.display=='block'){e.style.display='none'}else{e.style.display='block'}return true}function fToggleImageVis(a){fHideAll('imagefull');var e=document.getElementById(a);if(e.style.display=='block'){e.style.display='none'}else{e.style.display='block'}return true}function initCart(){var g=document.getElementById('cartSubmit');g.disabled=true}function colorHighlightOn(a,b){if(b=='in'){document.getElementById(a).className='colors-selected';document.getElementById('stockstatus').innerHTML=a+': <strong>In Stock</strong>'}else{document.getElementById('stockstatus').innerHTML=a+': <strong><font color="red">Out of Stock</font></strong>'}return true}function colorHighlightOff(a,b){if(b=='in'){document.getElementById(a).className='colors-instock';document.getElementById('stockstatus').innerHTML='&nbsp;'}return true}function colorSetChoice(a,b){var e=document.getElementById('showcolorchoice');var f=document.getElementById('colorchoice');var g=document.getElementById('cartSubmit');e.innerHTML=a;f.value=a;updateQty(a,b);g.disabled=false;return true}function copyAddress(){if(document.getElementById('bFirstName').disabled==false){document.getElementById('bFirstName').value=document.getElementById('sFirstName').value;document.getElementById('bLastName').value=document.getElementById('sLastName').value;document.getElementById('bAddress').value=document.getElementById('sAddress').value;document.getElementById('bAddress2').value=document.getElementById('sAddress2').value;document.getElementById('bCity').value=document.getElementById('sCity').value;document.getElementById('bState').value=document.getElementById('sState').value;document.getElementById('bZip').value=document.getElementById('sZip').value;document.getElementById('bFirstName').disabled=true;document.getElementById('bLastName').disabled=true;document.getElementById('bAddress').disabled=true;document.getElementById('bAddress2').disabled=true;document.getElementById('bCity').disabled=true;document.getElementById('bState').disabled=true;document.getElementById('bZip').disabled=true}else{document.getElementById('bFirstName').disabled=false;document.getElementById('bLastName').disabled=false;document.getElementById('bAddress').disabled=false;document.getElementById('bAddress2').disabled=false;document.getElementById('bCity').disabled=false;document.getElementById('bState').disabled=false;document.getElementById('bZip').disabled=false}}function clearForm(a){var b=a.elements;for(i=0;i<b.length;i++){field_type=b[i].type.toLowerCase();switch(field_type){case"text":case"password":case"textarea":case"hidden":b[i].value="";break;case"radio":case"checkbox":if(b[i].checked){b[i].checked=false}break;case"select-one":case"select-multi":b[i].selectedIndex=-1;break;default:break}}}function showProductList(){var a;if(xhr.readyState==4){if(xhr.status==200){a=xhr.responseText}else{a="There was a problem with the request "+xhr.status}document.getElementById('couponproductlist').innerHTML=a}else{}}function ReqCouponProductList(a){if(window.XMLHttpRequest){xhr=new XMLHttpRequest()}else{if(window.ActiveXObject){try{xhr=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}if(xhr){xhr.onreadystatechange=showProductList;xhr.open("GET",a,true);xhr.send(null)}else{document.getElementById('couponproductlist').innerHTML="Sorry, but I couldn't create an XMLHttpRequest"}}function couponsBuildProductList(a){url='http://www.lauraleedesigns.com/otf.php?action=couponprodlist&prodid='+a+'&q='+parseInt(Math.random()*99999999);ReqCouponProductList(url);return false}function updateCouponType(){if(document.getElementById('coupon_prod')){prodid=document.getElementById('coupon_prod').value}else{prodid=''}document.getElementById('couponproductlist').innerHTML='N/A';document.getElementById('couponcolorlist').innerHTML='N/A';if((document.getElementById('coupontype').value=='02')||(document.getElementById('coupontype').value=='03')){couponsBuildProductList(prodid)}}function showColorList(){var a;if(xhr.readyState==4){if(xhr.status==200){a=xhr.responseText}else{a="There was a problem with the request "+xhr.status}document.getElementById('couponcolorlist').innerHTML=a}else{}}function ReqCouponColorList(a){if(window.XMLHttpRequest){xhr=new XMLHttpRequest()}else{if(window.ActiveXObject){try{xhr=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}if(xhr){xhr.onreadystatechange=showColorList;xhr.open("GET",a,true);xhr.send(null)}else{document.getElementById('couponcolorlist').innerHTML="Sorry, but I couldn't create an XMLHttpRequest"}}function couponsBuildColorList(a,b){url='http://www.lauraleedesigns.com/otf.php?action=couponcolorlist&prodid='+a+'&id='+b+'&q='+parseInt(Math.random()*99999999);ReqCouponColorList(url);return false}function updateProductColors(a,b){if(document.getElementById('coupontype').value=='03'){couponsBuildColorList(a,b)}}function gup(a){a=a.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var b="[\\?&]"+a+"=([^&#]*)";var c=new RegExp(b);var d=c.exec(window.location.href);if(d==null){return""}else{return d[1]}}