var counter=0;var selectedColorField;var colorMenuIsVisible=false;function doPost(B,A){if(counter==0){B.action=A;B.submit()}counter=counter+1}function OpenWindow(B,A){window.open(B,A,"menubar=no,toolbar=no,width=900,height=620,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,titlebar=no")}function doPostAdd(B,A,C){document.getElementById(C).disabled=true;if(counter==0){B.action=A;B.submit()}counter=counter+1}function hide(A){A.style.visibility="hidden";A.style.display="none"}function show(A){A.style.visibility="visible";A.style.display="block"}function ShowElement(B){var A=document.getElementById(B);if(A){show(A)}}function HideElement(B){var A=document.getElementById(B);if(A){hide(A)}}function ShowElements(B){for(var A=0;A<B.length;A++){show(B[A])}}function HideElements(B){for(var A=0;A<B.length;A++){hide(B[A])}}var elementTimers=new Object;function ShowElementWithDelay(D,A,C){if(C){var B=elementTimers[C];if(B){clearTimeout(B)}}elementTimers[C]=setTimeout("ShowElement('"+D+"')",A)}function HideElementWithDelay(D,A,C){if(C){var B=elementTimers[C];clearTimeout(B)}elementTimers[C]=setTimeout("HideElement('"+D+"')",A)}function ToggleElementVisibility(A){ToggleElementVisibility(A,false)}function ToggleElementVisibility(C,B){var A=document.getElementById(C);if(A){if(A.style.visibility=="visible"){HideElement(C)}else{if(A.style.visibility=="hidden"){ShowElement(C)}else{if(A.style.visibility==""){B?ShowElement(C):HideElement(C)}}}}}function checkQuantity(D){var E=D.value;var A="0123456789";var B=E.split("");var C="";for(i=0;i<B.length;i++){if(A.indexOf(B[i])!=-1){C+=B[i]}}if(C.length==0){D.value="0"}else{D.value=C}}function roundCorners(C){var B=$(C).getCoordinates();var A=new Element("div").addClass("roundImage").setStyles({width:B.width.toInt(),height:B.height.toInt()}).wraps(C);new Element("img").addClass("roundImageCorner").set("src","./images/radius-tl.png").setStyles({left:0,top:0}).inject(C,"after");new Element("img").addClass("roundImageCorner").set("src","./images/radius-tr.png").setStyles({left:(B.width-10),top:0}).inject(C,"after");new Element("img").addClass("roundImageCorner").set("src","./images/radius-bl.png").setStyles({top:(B.height-10),left:0}).inject(C,"after");new Element("img").addClass("roundImageCorner").set("src","./images/radius-br.png").setStyles({left:(B.width-10),top:(B.height-10)}).inject(C,"after");if(Browser.Engine.trident4){fixPNG(A.getChildren("img"))}}function ConfirmQuantity(B){var A=true;if(document.getElementById(B).value>9){A=confirm("The quantity that you have entered exceeds 9. Do you wish to proceed?")}return A}function outputMoney(A){return outputDollars(Math.floor(A-0)+"")+outputCents(A-0)}function outputDollars(C){if(C.length<=3){return(C==""?"0":C)}else{var B=C.length%3;var A=(B==0?"":(C.substring(0,B)));for(i=0;i<Math.floor(C.length/3);i++){if((B==0)&&(i==0)){A+=C.substring(B+3*i,B+3*i+3)}else{A+=","+C.substring(B+3*i,B+3*i+3)}}return(A)}}function outputCents(A){A=Math.round(((A)-Math.floor(A))*100);return(A<10?".0"+A:"."+A)};