//alert('loading from javascript.jsp V1 [11] for DryDreams');
var name_of_company='DryDreams';
var name_of_cart_cookie='cart_DryDreams';

      var debug=false;
var warn=true;
   function newAjax() {
        if (window.XMLHttpRequest)// code for IE7+, Firefox, Chrome, Opera, Safari
            return new XMLHttpRequest();
        else// code for IE6, IE5
            return new ActiveXObject("Microsoft.XMLHTTP");
    }
    function async_script(url) {
        var ajax=newAjax();
        ajax.onreadystatechange=function() {
            if (this.readyState==4 && this.status==200)  {
                eval(this.responseText);
                if(debug)alert("document.cookie="+document.cookie);
            } else
                if (this.readyState==4)
                    if(debug)alert("Ajax Status="+this.status);
        }
        ajax.open("GET",url,true);
        ajax.send(null);
        return ajax;
    }
    function checkout(parms) {
        var cart=getCookie(name_of_cart_cookie);
        var url=orderServer;
        if(cart!=null && cart.length>0)
           url=url+(url.indexOf("?")==url.length-1?"":url.indexOf("?")<0?"?":"&")+"cart="+cart;
       if(parms!=null && parms.length>0)
           url=url+(url.indexOf("?")==url.length-1?"":url.indexOf("?")<0?"?":"&")+parms;
       if(debug)alert("checking out: "+url);
        document.location=url;
        return false;
    }
    function show_cart() {
         send_to_cart('show');
         //async_script('/Cart.jsp?cart=show');
    }
    function empty_cart() {
         send_to_cart('empty');
         //async_script('/Cart.jsp?cart=empty');
         return false;
    }
    function getCartStatus() {
        send_to_cart('get');
        //async_script("/Cart.jsp?cart=get");
    }
    function send_to_cart(verb,id,value,extra) {
        if(isNaN(value) || value<1)value=0;
        async_script("/Cart.jsp?cart="+verb+"&for="+name_of_company
            +(id==null?'':"&id="+id+"&q="+value+"&"+id+"="+value)
            +(extra==null?'':extra));
        return false;
    }
    function setHTML(id,html) {
        var d = document.getElementById(id);
        if(d){
            d.innerHTML=html;
        } else if(debug)alert("cannot find "+id);
    }
    function setProperty(id,property,value) {
        var d = document.getElementById(id);
        if(d){
            eval("d."+property+"=value;")
            //d.value=value;
        } else if(debug)alert("cannot find "+id);
    }
    function setPropertyByName(name,property,value) {
        var ds= document.getElementsByName(name);
        if(debug)alert("elements of name "+name+"="+ds.length);
        for(var i=0;i<ds.length;i++) {
            var d=ds[i];
            eval("d."+property+"=value;")
        }
    }
    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 "";
    }
    function setCookie(c_name,value,expiredays){
        var exdate=new Date();
        exdate.setDate(exdate.getDate()+expiredays);
        document.cookie=c_name+ "=" +escape(value)+
        ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
    }
    function getDocHeight() {
        var D = document;
        return Math.max(
            Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
            Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
            Math.max(D.body.clientHeight, D.documentElement.clientHeight)
            );
    }

    // var w=YAHOO.util.Dom.getViewportWidth();
    function overlay_window(title,html) {
        var w = document.getElementById("overlay_window");
        if(!w) {
            var div = document.createElement("DIV");
            div.id="overlay_container";
            div.style.visibility="hidden";
            div.style.textAlign="center";
            div.style.padding="0";
            div.style.margin="0";
            div.style.position="absolute";
            div.style.top=0; //document.body.scrollTop+"px";
            div.style.left="0";
            div.style.width="1019px";//100%"; //document.body.offsetWidth+"px";//"100%";
            div.style.height=getDocHeight();//document.body.height+"px";//"100%";//document.body.offsetHeight+"px";
            div.style.zIndex="1000";
            div.style.background="url('/images/transparent.png') repeat";
            var width = "900px";
            div.innerHTML=
              '<div id="overlay_border" style="padding:5% 5% 5% 5%;margin:0;position:relative;top:'+document.body.scrollTop+'px;height:'+YAHOO.util.Dom.getViewportHeight()+'px;width:980px">'
                +'<div id="overlay_controls" style="width:'+width+';padding:0px;margin:0px;border-bottom:none;">'
                +'  <table width="100%"><tr>'
                +'  <td align="left" id="overlay_title">'
                +title
                +'   </td>'
                +'  <td align="right">'
                +'       <input id="overlay_close" type="submit" value="Close" onclick="overlay_window_show(false);">'
                +'   </td></tr></table>'
                +'</div>'
                +'<div id="overlay_window"  style="width:'+width+';padding:0px;margin:0px;border-top:none;height:90%;overflow:auto">'

                +'</div>'
             +"</div>'";
            document.body.appendChild(div);
            w = document.getElementById("overlay_window");
            if(!w) {
                alert("cant open overlay wnidow");
                return;
            }
        }

        w.innerHTML=html;
        overlay_window_show(true);
     }
     function overlay_window_show(on) {
       var d = document.getElementById("overlay_container");
       if(d)
           if(on) {
               d.style.visibility="visible";
           } else {
               document.body.removeChild(d);
           }
       return false;
   }
   function submit_action_form(field,action) {
       //action.value=action;
       var form=field.form;
       form.elements["action"].value=action;
       form.submit();
       return false;
   }








      /*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var D=function(H){var I=0;return parseFloat(H.replace(/\./g,function(){return(I++==1)?"":".";}));},G=navigator,F={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:G.cajaVersion,secure:false,os:null},C=navigator&&navigator.userAgent,E=window&&window.location,B=E&&E.href,A;F.secure=B&&(B.toLowerCase().indexOf("https")===0);if(C){if((/windows|win32/i).test(C)){F.os="windows";}else{if((/macintosh/i).test(C)){F.os="macintosh";}}if((/KHTML/).test(C)){F.webkit=1;}A=C.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){F.webkit=D(A[1]);if(/ Mobile\//.test(C)){F.mobile="Apple";}else{A=C.match(/NokiaN[^\/]*/);if(A){F.mobile=A[0];}}A=C.match(/AdobeAIR\/([^\s]*)/);if(A){F.air=A[0];}}if(!F.webkit){A=C.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){F.opera=D(A[1]);A=C.match(/Opera Mini[^;]*/);if(A){F.mobile=A[0];}}else{A=C.match(/MSIE\s([^;]*)/);if(A&&A[1]){F.ie=D(A[1]);}else{A=C.match(/Gecko\/([^\s]*)/);if(A){F.gecko=1;A=C.match(/rv:([^\s\)]*)/);if(A&&A[1]){F.gecko=D(A[1]);}}}}}}return F;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C++){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,A=Object.prototype,H="[object Array]",C="[object Function]",G="[object Object]",E=[],F=["toString","valueOf"],D={isArray:function(I){return A.toString.apply(I)===H;},isBoolean:function(I){return typeof I==="boolean";},isFunction:function(I){return(typeof I==="function")||A.toString.apply(I)===C;},isNull:function(I){return I===null;},isNumber:function(I){return typeof I==="number"&&isFinite(I);},isObject:function(I){return(I&&(typeof I==="object"||B.isFunction(I)))||false;},isString:function(I){return typeof I==="string";},isUndefined:function(I){return typeof I==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(K,J){var I,M,L;for(I=0;I<F.length;I=I+1){M=F[I];L=J[M];if(B.isFunction(L)&&L!=A[M]){K[M]=L;}}}:function(){},extend:function(L,M,K){if(!M||!L){throw new Error("extend failed, please check that "+"all dependencies are included.");}var J=function(){},I;J.prototype=M.prototype;L.prototype=new J();L.prototype.constructor=L;L.superclass=M.prototype;if(M.prototype.constructor==A.constructor){M.prototype.constructor=M;}if(K){for(I in K){if(B.hasOwnProperty(K,I)){L.prototype[I]=K[I];}}B._IEEnumFix(L.prototype,K);}},augmentObject:function(M,L){if(!L||!M){throw new Error("Absorb failed, verify dependencies.");}var I=arguments,K,N,J=I[2];if(J&&J!==true){for(K=2;K<I.length;K=K+1){M[I[K]]=L[I[K]];}}else{for(N in L){if(J||!(N in M)){M[N]=L[N];}}B._IEEnumFix(M,L);}},augmentProto:function(L,K){if(!K||!L){throw new Error("Augment failed, verify dependencies.");}var I=[L.prototype,K.prototype],J;for(J=2;J<arguments.length;J=J+1){I.push(arguments[J]);}B.augmentObject.apply(this,I);},dump:function(I,N){var K,M,P=[],Q="{...}",J="f(){...}",O=", ",L=" => ";if(!B.isObject(I)){return I+"";}else{if(I instanceof Date||("nodeType" in I&&"tagName" in I)){return I;}else{if(B.isFunction(I)){return J;}}}N=(B.isNumber(N))?N:3;if(B.isArray(I)){P.push("[");for(K=0,M=I.length;K<M;K=K+1){if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}if(P.length>1){P.pop();}P.push("]");}else{P.push("{");for(K in I){if(B.hasOwnProperty(I,K)){P.push(K+L);if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}}if(P.length>1){P.pop();}P.push("}");}return P.join("");},substitute:function(Y,J,R){var N,M,L,U,V,X,T=[],K,O="dump",S=" ",I="{",W="}",Q,P;for(;;){N=Y.lastIndexOf(I);if(N<0){break;}M=Y.indexOf(W,N);if(N+1>=M){break;}K=Y.substring(N+1,M);U=K;X=null;L=U.indexOf(S);if(L>-1){X=U.substring(L+1);U=U.substring(0,L);}V=J[U];if(R){V=R(U,V,X);}if(B.isObject(V)){if(B.isArray(V)){V=B.dump(V,parseInt(X,10));}else{X=X||"";Q=X.indexOf(O);if(Q>-1){X=X.substring(4);}P=V.toString();if(P===G||Q>-1){V=B.dump(V,parseInt(X,10));}else{V=P;}}}else{if(!B.isString(V)&&!B.isNumber(V)){V="~-"+T.length+"-~";T[T.length]=K;}}Y=Y.substring(0,N)+V+Y.substring(M+1);}for(N=T.length-1;N>=0;N=N-1){Y=Y.replace(new RegExp("~-"+N+"-~"),"{"+T[N]+"}","g");}return Y;},trim:function(I){try{return I.replace(/^\s+|\s+$/g,"");}catch(J){return I;}},merge:function(){var L={},J=arguments,I=J.length,K;for(K=0;K<I;K=K+1){B.augmentObject(L,J[K],true);}return L;},later:function(P,J,Q,L,M){P=P||0;J=J||{};var K=Q,O=L,N,I;if(B.isString(Q)){K=J[Q];}if(!K){throw new TypeError("method undefined");}if(O&&!B.isArray(O)){O=[L];}N=function(){K.apply(J,O||E);};I=(M)?setInterval(N,P):setTimeout(N,P);return{interval:M,cancel:function(){if(this.interval){clearInterval(I);}else{clearTimeout(I);}}};},isValue:function(I){return(B.isObject(I)||B.isString(I)||B.isNumber(I)||B.isBoolean(I));}};B.hasOwnProperty=(A.hasOwnProperty)?function(I,J){return I&&I.hasOwnProperty(J);}:function(I,J){return !B.isUndefined(I[J])&&I.constructor.prototype[J]!==I[J];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.8.1",build:"19"});

      /*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.1
*/
(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},DOT_ATTRIBUTES:{},get:function(z){var AB,x,AA,y,Y,G;if(z){if(z[l]||z.item){return z;}if(typeof z==="string"){AB=z;z=K.getElementById(z);G=(z)?z.attributes:null;if(z&&G&&G.id&&G.id.value===AB){return z;}else{if(z&&K.all){z=null;x=K.all[AB];for(y=0,Y=x.length;y<Y;++y){if(x[y].id===AB){return x[y];}}}}return z;}if(YAHOO.util.Element&&z instanceof YAHOO.util.Element){z=z.get("element");}if("length" in z){AA=[];for(y=0,Y=z.length;y<Y;++y){AA[AA.length]=E.Dom.get(z[y]);}return AA;}return z;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC===c)){G=S(AF[v],q);x=S(AF[v],R);if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom._getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom._getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom._getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom._getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom._getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;
y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom._getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e]&&y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){E.Dom.batch(Y,E.Dom._setAttribute,{attr:G,val:x});},_setAttribute:function(x,Y){var G=E.Dom._toCamel(Y.attr),y=Y.val;if(x&&x.setAttribute){if(E.Dom.DOT_ATTRIBUTES[G]){x[G]=y;}else{G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;x.setAttribute(G,y);}}else{}},getAttribute:function(Y,G){return E.Dom.batch(Y,E.Dom._getAttribute,G);},_getAttribute:function(Y,G){var x;G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;if(Y&&Y.getAttribute){x=Y.getAttribute(G,2);}else{}return x;},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}if(m.ie&&m.ie>=8&&K.documentElement.hasAttribute){E.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;
this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.8.1",build:"19"});
      //alert("Product_input.js V10.07.03a");

 function Attr(code,name,show_color,extra_charge,img_type) {
   this.code=code;
   this.name=name;
   this.show_color=show_color;
   this.extra_charge=extra_charge;
   this.img_type=img_type;
   this.getStyle = function(extra) {
       var t=" style='";
       if(this.show_color)
             t+=';background:'+this.show_color+';color:'+invert_rgb(this.show_color);
       if(this.img_type==1)
           t+=';height:.3in;background-image: url("/images/attributes/'+name+'.png") ;background-repeat:repeat;';
       else if(this.img_type==2)
           t+=';height:.15in;background-image: url("/images/attributes/'+name+'.png") ;background-repeat:repeat;';
       else
           t+='';//;height:.1in;';
       if(extra)
           t+=extra;
       t+="' "
       return t;
   }
   this.getShortName = function(extra) {
       var t="";
       if(this.show_color)
           ;
       else if(this.img_type==1)
           ;
       else if(this.img_type==2)
           ;
       else
           t+=this.name;
       if(this.extra_charge)
           t+=" <span style='font-size:smaller'>+$"+extra_charge.replace(".00","")+"</span>";
       return t;
   }
 }
 function putResultValues(target
              ,product_name
              ,desc
              ,productNbr
              ,product_price
              ) {
        var comma = desc.indexOf(",");
        if(comma<0)comma=desc.length;
        var comma2 = desc.indexOf(",",comma+1);
        if(comma2<0)comma2=desc.length;
        var p1=desc.substring(0,comma);
        var p2=desc.substring(comma+2,comma2);
        var product_size=p1.replace('size','');//(p1.indexOf('size')>0?p1:p2.indexOf('size')>0?p2:'')
        var product_color=p2.replace('color','');//(p1.indexOf('color')>0?p1:p2.indexOf('color')>0?p2:'').replace('color','');
        var variety_description=comma2<0?'':desc.substring(comma2+2) //
         var te = document.getElementById("result_any");
         var say_buy=false;
         if(!te) {
             te = document.getElementById(target);
             var tt = document.getElementById("title_"+target);
             if(tt)tt.style.display="";
             say_buy=true;
         }
         var div = document.createElement("TR");
         var td=document.createElement("TH");
         td.className='product_name';
         td.colSpan=2;
         td.align='left';

         td.innerHTML="<input class='cart_edit_item' type=submit value=edit onclick='edit_item_from_cart("+'"'+productNbr+'"'+");'>";
         td.appendChild(document.createTextNode(product_name));
         div.appendChild(td);
         td=document.createElement("TD");
         td.className='product_size';
         td.appendChild(document.createTextNode(product_size));
         div.appendChild(td);
         td=document.createElement("TD");
         td.className='product_color';
         td.appendChild(document.createTextNode(product_color));
         div.appendChild(td);

         td=document.createElement("TD");
         td.className='product_quantity';


         td.innerHTML="<input size=3 onkeyup='variety_calc(this,"+(100*product_price)+");'name="+productNbr+" id="+productNbr+" value=''>";
         div.appendChild(td);
         //<td class="product_price">$79.00</td><td class="product_price"><script>product_total('P1','$79.00');</script><div id="P1_total">$79.00</div></td>
         td=document.createElement("TD");
         td.className='product_price';
         td.innerHTML="$"+product_price;
         div.appendChild(td);
         td=document.createElement("TD");
         td.className='product_total';
         td.colSpan=3;
         td.innerHTML="<div id='"+productNbr+"_total'>$00.00</div>";
         div.appendChild(td);
         td=document.createElement("TD");

         if(say_buy) {
             td.className='buy_now';
             //td.innerHTML="<input id='buy_"+productNbr+"' class='buy_now_off' type='submit' value='Buy Now'/>";
             td.innerHTML="<input id='buy_"+productNbr+"' class='buy_now_off' onclick='add_to_cart(this);return false;' type='submit' value='Add to Cart'/>"
             div.appendChild(td);
         }
         te.parentNode.insertBefore(div,te);
         /* second row */
         if(variety_description!='') {
             div = document.createElement("TR");
             td=document.createElement("TH");
             div.appendChild(td);
             td=document.createElement("TH");
             td.className="product_options";
             td.align="right";
             td.appendChild(document.createTextNode("Options"));
             div.appendChild(td);
             td=document.createElement("TD");
             td.className='product_options';
             td.colSpan=6;
             td.appendChild(document.createTextNode(variety_description));
             div.appendChild(td);
             te.parentNode.insertBefore(div,te);
         }
 }
 function Option(product,oNbr,option_name,option_is_set,values,default_aNbr) {
    this.product=product;
    this.oNbr=oNbr;
    if(product.prodID=='WMSP')
        oNbr=oNbr;
    this.option_name=option_name;
    this.option_is_set=option_is_set;
    this.values=values;
    this.default_aNbr=default_aNbr;
    this.chosen_aNbr=default_aNbr;
  
    this.getSelector = function() {
        var t='';
        var selected=" SELECTED='selected' ";
        var first="<option "+selected+" value='0'>Choose "+this.option_name+"</option>";
        var count=0;
        var seenChosen=false;

        for(var v=0;v<this.values.length;v++) {
            var i = this.values[v];
            count++;
            var isChosen=(this.chosen_aNbr && this.chosen_aNbr==i);
            if(isChosen)
                seenChosen=true;
            only=i;
            if(count==2 && !seenChosen)
                t=t.replace(selected,"");
            t+='<option class="attribute_value" ';
            if(count==1 || isChosen)
                t+=selected;
            t+=prodattrs[i].getStyle();
           
            t+=' value="'+i+'">';
            t+=prodattrs[i].name;
            if(prodattrs[i].extra_charge)
                t+=" ($"+prodattrs[i].extra_charge+" extra)";
            t+="</option>\n";
        }
        if(count==1)
            this.product.chosen(this.values[0],oNbr);
        if(count==1 ||seenChosen)
            first=first.replace(selected,"");

        return "<select name='selector_"+oNbr+"' class='choose_attribute' onchange='"+this.product.meDot()+"choose(this,"+this.oNbr+");'>" +first+t+"</select>";
    }
    this.getChooser = function() {
        var t='<table width=100% class="attribute_chooser"  ><tr>';
        var count=0;
        var seenChosen=false;
        var extra=";text-align:center;width:"+(100/this.values.length)+"%;";

        for(var v=0;v<this.values.length;v++) {
            var i = this.values[v];
            count++;
            var isChosen=this.chosen_aNbr==i;
            if(isChosen)
                seenChosen=true;
            only=i;
//            if(count==2 && !seenChosen)
//                t=t.replace(selected,"");
            t+='<td class="attribute_chooser'+(isChosen?'_clicked':'')+'" ';
            t+=" onmouseover='"+this.product.meDot()+"chooser(this,"+this.oNbr+",1);'";
            t+=" onmouseout='"+this.product.meDot()+"chooser(this,"+this.oNbr+",2);'";
            t+=" onclick='"+this.product.meDot()+"chooser(this,"+this.oNbr+",3);'";

            t+=prodattrs[i].getStyle(extra);
            t+=' index="'+v+'" ';
            t+=' value="'+i+'">';
            t+=prodattrs[i].getShortName();
//            if(!prodattrs[i].img_type)t+=prodattrs[i].name;
//            if(prodattrs[i].extra_charge)
//                t+=" ($"+prodattrs[i].extra_charge+" extra)";
            t+='&nbsp;';
            //t+='<input type=radio name="radio_'+this.product.id+"_"+this.option_name+'" >';
            t+="</td>\n";
        }
//        if(count==1)
//            this.product.chosen(this.values[0],oNbr);
//        if(count==1 ||seenChosen)
//            first=first.replace(selected,"");
        t+='</tr></table>'

        return t;//"<select name='selector_"+oNbr+"' class='choose_attribute' onchange='"+this.product.meDot()+"choose(this,"+this.oNbr+");'>" +first+t+"</select>";
    }
    this.getSelectorTR=function() {
      var id="select_"+this.option_name+"_"+this.product.id;
      return "<tr><td "+(this.chosen_aNbr==null?"align=left >Choose ":"align=right >")+this.option_name+":</td><td id='"+id+"' >"
            +this.getSelector()
            +"</td>"
            +"<td>"+this.getChooser()+"</td>"
            +"</tr>";
    }
    this.validate_selector=function(form,oNbr) {
      var e=form.elements['selector_'+oNbr];
      var value=e.options[e.selectedIndex].value;
      if(this.chosen_aNbr!=value && value!=0) {
          if(debug)alert("change from "+this.chosen_aNbr+" to" +value);
          this.chosen_aNbr=value;
      }
    }
    this.chosen_variety_name = function(n) {
        return prodattrs[this.chosen_aNbr].name+" "+this.option_name;
    }
    this.option_say = function() {

        return (this.option_name=='size' || this.option_name=='color')?
                this.values.length+' '+this.option_name+'s'
                   : this.option_name;
    }
    this.setChosenFromCode =function(codes){
        var found="";
        for(var i=0;i<this.values.length;i++){
            var attr=prodattrs[this.values[i]];
            if(attr.code.length>found.length
               && attr.code==codes.substring(0,attr.code.length)){
                  this.chosen_aNbr=this.values[i];
                  found=attr.code;
               }
        }
        return codes.substring(found.length);
    }
 }
 
 function variety_calc(field,price_in_cents) {
     calc(field,price_in_cents);
     //alert("calc"+typeof field.value+"="+field.value+", "+field.name);
     var e = document.getElementById('buy_'+field.name);
     if(e)
         e.className=field.value>0?'buy_now':'buy_now_off';
     else {
         send_to_cart('change',field.id,field.value);
     }
 }
     
// function does nothing but gets called.
 function show_chosen(name) {

 }
 
  function choose_product(value) {
      var target=document.getElementById('select_any');

      if(value==0)
          target.innerHTML='';
      else {
          target.innerHTML=
          '<table width="100%"><tr><td rowspan="2"><img src="/images/'+products[value].icon+'"></td><td class="product_description" >'
          +products[value].description
          +'</td></tr><tr><td class="variety_selector">'
          +products[value].getVariety_selector()
          +"</td></tr></table>";
          
      }
  }
//  function product_selector(site) {
//      //Choose "+site+" to add to your order
//       var t="<select id=product_select onchange='choose_product(this.value);'><option value='0'>Continue Shopping</option>";
//          for(i=1;i<products.length;i++) {
//              t+='<option value="'+i+'">'+products[i].name+"</option>\n";
//          }
//          t+="</select>";
//          //alert('getSelector='+t);
//          document.write(t);
//  }
  function create_product_selector() {
      //Choose "+site+" to add to your order
       var t="Quickly add more to your order <select id=product_select onchange='choose_product(this.value);'><option value='0'>Choose ...</option>";
          for(i=1;i<products.length;i++) {
              t+='<option value="'+i+'">'+products[i].name+"</option>\n";
          }
          t+="</select>";
          //alert('getSelector='+t);
          document.getElementById("product_selector").innerHTML=t;
  }
     

     function Product(prodID,name,price,max_price
       //,varieties
       ,icon,description) {
         this.prodID=prodID;
         this.name=name;
         this.price=price;
         this.max_price=max_price;
 
         //this.varieties=varieties;

         this.icon=icon;
         this.description=description;
         this.options=new Array();

         this.addOption = function(option_name,option_is_set,values,default_aNbr) {
             if(option_is_set==true){
// create yes/no options
//                 for(var v=0;v<values.length;v++) {
//                     var this_attr=prodattrs[values[v]];
//                     var yes_aNbr = prodattrs.length;prodattrs.push(new Attr(this_attr.type,this_attr.code,"Yes"));
//                     var no_aNbr = prodattrs.length;prodattrs.push(new Attr(this_attr.type,"","No"));
//                     this.options.push(new Option(this,this.options.length,option_name+": "+this_attr.name,false,new Array(no_aNbr,yes_aNbr)));
//                 }
// create compound options
                 var total = Math.pow(2,values.length);
                 var attrs=[];
                 for (var i=0;i<total;i++) {
                     var text="";
                     var code="";
                     var extra_charge=null;
                     if(i==0)
                         text="No "+option_name;
                     else {
                         var bits=i;
                         for(var v=0;v<values.length;v++) {
                            
                             if((bits&1)==1){
                                 if(text.length>0)
                                    text+=v<values.length-1?", ":" and ";
                                 code+=prodattrs[values[v]].code;
                                 if(prodattrs[values[v]].extra_charge!=null)
                                    extra_charge=+prodattrs[values[v]].extra_charge+(extra_charge==null?0:extra_charge);
                                text+=" "+prodattrs[values[v]].name;
                             }
                             
                             
                             bits = Math.floor(bits/2);
                         }
                     }
                     attrs.push(prodattrs.length);
                     prodattrs.push(new Attr(code,text,null,null,extra_charge));
                 }
                 this.options[this.options.length]=new Option(this,this.options.length,option_name,false,attrs);
             }
            else
                this.options[this.options.length]=new Option(this,this.options.length,option_name,option_is_set,values,default_aNbr);
             return this;
         }
         this.chosen = function(value,oNbr) {
             if(value==0)value=null;
             if(value<0) {
                 for(var i=0;i<this.options.length;i++)
                     this.options[i].chosen_aNbr=null;
                 value=-value;
             }
             if(oNbr>=0) this.options[oNbr].chosen_aNbr=value;

             recolor_sketch("recolor_"+this.id,this.chosen_attrOrder('color'),this.chosen_attrOrder('piping'),this.chosen_attrOrder('buttons'));
         }
         this.chosen_attrOrder = function(opt_name) {
             for(var oNbr=0;oNbr<this.options.length;oNbr++)
                if(this.options[oNbr].option_name==opt_name)
                     return this.options[oNbr].chosen_aNbr;
             return null;
         }
         this.productNbr = function() {
             var n = "P"+this.prodID;
             for(var oNbr=0;oNbr<this.options.length;oNbr++)
                 n+=prodattrs[this.options[oNbr].chosen_aNbr].code;
             return n;
         }
         this.variant_price = function() {
             var n = +this.price;
             for(var oNbr=0;oNbr<this.options.length;oNbr++) {
                 if(this.options[oNbr].chosen_aNbr) {
                    var ec=+prodattrs[this.options[oNbr].chosen_aNbr].extra_charge;
                    if(ec)n=n+ec;
                 }
             }
             return Math.round(100*n)/100;
         }
         this.all_options_set = function() {
             for(var oNbr=0;oNbr<this.options.length;oNbr++)
                if(this.options[oNbr].chosen_aNbr==null)
                     return false;
             return true;
         }
         this.say_unset_options = function() {
             var r="";
             for(var oNbr=0;oNbr<this.options.length;oNbr++)
                if(this.options[oNbr].chosen_aNbr==null)
                     r+=(r.length>0?", ":"")+this.options[oNbr].option_name;
             return r;
         }
         this.show_result = function(field) {
             var all_set=this.all_options_set();
             var qe = field.form.elements["quantity"]; //document.getElementById("quantity_"+this.id);
             var pe = qe.nextSibling;//document.getElementById("price_"+this.id);
             if(qe) {
                var q=+qe.value;

                var p=this.variant_price();
                pe.innerHTML= "Price:$"+p
                 +(isNaN(q) || q<1 ?""
                    :" Total $"+(Math.round(100*p*q)/100)
                  );
                field.form.elements["add"].className="buy_now";//all_set?"buy_now":"buy_now_off";
             } else
                 alert("cant find quantity element");

             return true;
             var productNbr=this.productNbr();
             var e = document.getElementById(productNbr);
             if(!e) {
               this.putResult("result_"+this.id);
               e = document.getElementById(productNbr);
             }
             e.focus();
             //alert("found");
             return true;

             
         }
       this.sayOptionCounts = function() {
         if(this.options.length==0)
             return "";
         var say = " your choice of ";
         for(var oNbr=0;oNbr<this.options.length;oNbr++)
            //say+=" and "+this.options[oNbr].values.length+" "+this.options[oNbr].option_name+"s";
            say+=(oNbr==0?"":oNbr<this.options.length-1?", ":" and ")
               +this.options[oNbr].option_say();
         return say;
       }
       this.getVariety_selector = function() {
             p=this;

             var generic = name.indexOf("Scrubs")>-1?"Scrubs":"Sleepwear";
             return p==null?"":
             ("<br><strong>Available in "+p.sayOptionCounts()

             +(p.price==p.max_price && false ?". $":", starting at $")+p.price
             +"</strong>"
             +(p.prodID=='WPSL' && null==document.getElementById("result_any")?
               "<br>Select your choice of colors using our <a href='/about/Design Your Own/Preview'>Designer</a>"
             : "<div id='"+p.id+"'><table><tr><td><form><table>"

               +p.getOptionSelectTRs()

               +"</table></form></td><td>"
               +recolor_template("recolor_"+p.id)
               +"</td></table></div>"
            )
               //+"<table  width='95%' ><tr id='title_result_"+p.id+"' style='display:none'><th>"+generic+"</th><th>Size</th><th>Color</th><th>Quantity</th><th>Price</th><th>Total</th</tr><tr id='result_"+p.id+"'></tr></table>"
          );
         }
         this.validate_selector = function(form) {
             //alert("validating");
             for(var oNbr=0;oNbr<this.options.length;oNbr++)
                 this.options[oNbr].validate_selector(form, oNbr);
         }
        this.choose = function(field,oNbr,value) {
             var value=value==null?field.value:value;
             this.chosen(value,oNbr);
             if(this.show_result(field)) return;

             for(var i=0;i<this.options.length;i++)
                if(this.options[i].chosen_aNbr==null)
                    this.revise_option_selector(i);
             this.show_result(field);
         }

         this.revise_selector = function(type) {
             var e=document.getElementById('select_'+type+'_'+this.id);
             if(e){
                 e.innerHTML=this.getSelector(type);
                 //alert("Revise "+type+"="+this.getSelector(type));
             }
         }
         this.revise_option_selector = function(oNbr) {
             var opt=this.options[oNbr];
             var e=document.getElementById('select_'+opt.option_name+'_'+this.id);
             if(e){
                 e.innerHTML=opt.getSelector();
                 //alert("Revise "+type+"="+this.getSelector(type));
             }
         }
         this.meDot = function() {
             if(!(this.myNumber)) {
                for(i=1;i<products.length;i++) {
                    if(this==products[i])break;
                }
                this.myNumber=i;
             }
             return "products["+this.myNumber+"].";
         };

         this.getOptionSelectTRs = function() {
             if(!this.options) return "";
             var result="";
             for(var i=0;i<this.options.length;i++) {
                var opt=this.options[i];
                result+=opt.getSelectorTR();
             }
             result+=
                 "<tr><td align=right>Quantity:</td><td colSpan=2 ><input size=4 name='quantity' id='quantity_"+this.id+"' onkeyup='"+this.meDot()+"show_result(this);' value=1><span> Price:$"+this.price
                 +"</span><input class='buy_now' name='add' type=submit value='Add To Cart' onclick='"+this.meDot()+"add_to_cart(this);return false;' >\n\</td></tr>";
             return result;
         }
         this.putResult = function(target) {
             var variety_description='';
             for(var oNbr=0;oNbr<this.options.length;oNbr++)
                 variety_description+=(variety_description.length>0?', ':'')+this.options[oNbr].chosen_variety_name();
             putResultValues(target
                  ,this.name
                  ,variety_description
                  ,this.productNbr()
                  ,this.variant_price()
                   );
         }
        this.add_to_cart = function(field) {
            this.validate_selector(field.form);
            var r=this.say_unset_options();
            if(r.length>0) {
                alert("You have not chosen "+r);
                return false;
            }
            var id = this.productNbr();
            var value = field.form.elements["quantity"].value;
            if(isNaN(value) || value<1 ||value.indexOf('.')>-1) {
                alert("The quantity you entered is not valid");
                return false;
            }
            if(document.getElementById("result_any")) {
                var e=document.getElementById(id);
                if(!e) {
                    this.putResult("result_any");
                    e=document.getElementById(id);
                } else
                    value=(+value)+(+e.value);
                e.value=value;
                send_to_cart('change',id,value);
                //async_script("/Cart.jsp?cart=change&id="+id+"&q="+value+"&"+id+"="+value+"&total=cart_total");
                calc(e,100*this.variant_price());
                field.value='added';
                return false;
            }
            if(field.value=='Checkout') {
                checkout();
                return false;
            }

            field.value='..adding..';
            send_to_cart('add',id,value,"&button="+field.id)
            //async_script("/Cart.jsp?cart=add&id="+id+"&q="+value+"&"+id+"="+value+"&button="+field.id);
            return false;
        }
        this.setChosenFromProductNbr = function(productNbr) {
            var codes=productNbr.substring(5);
            for(oNbr=0;oNbr<this.options.length;oNbr++)
                codes=this.options[oNbr].setChosenFromCode(codes);
        }
        this.chooser = function(field,oNbr,action) {
            var value=field.getAttribute("value");
            var index=field.getAttribute("index");
           
            if(!field.form)field.form=find_form(field);
            var form=field.form;
            //annoy=confirm('chooser '+oNbr+" "+action+" value="+value+" index="+index+" "+find_form(field));
            if(action==1){
                if(this.options[oNbr].chosen_aNbr==value)
                    return;
                field.className='attribute_chooser_mousein';
                field.old_selected_index= form.elements['selector_'+oNbr].selectedIndex;
                form.elements['selector_'+oNbr].selectedIndex=+index+1;
            } else if(action==2) {
                
                if(this.options[oNbr].chosen_aNbr==value) {
                   field.className="attribute_chooser_clicked";
                } else {
                    form.elements['selector_'+oNbr].selectedIndex=field.old_selected_index;
                    field.className="attribute_chooser";
                }
            } else {
                for(var f=field.parentNode.firstChild;f!=null;f=f.nextSibling)
                    f.className='attribute_chooser';


                field.className='attribute_chooser_clicked';
                this.options[oNbr].chosen_aNbr=value;
                form.elements['selector_'+oNbr].selectedIndex=+index+1;
                this.choose(field,oNbr,value);
            }
        }
     }
     find_form=function(field) {
         var f=field;
         while(f!=null && f.tagName!='FORM')
             f=f.parentNode;
         return f;
     }
     var annoy=true;

     function setQuantity(pNbr,value,price_in_cents,product_name,desc) {
         //fixme ... needs to chosen options
         var e=document.getElementById(pNbr);
         //alert("setQ "+pNbr+" "+value);
         if(!e) {             
             putResultValues("result_any"
              ,product_name
              ,desc
              ,pNbr
              ,price_in_cents/100
               );
             e=document.getElementById(pNbr);
             if(!e)alert("failed to setQuantity");
         }
         e.value=value;
         calc(e,price_in_cents);
     }

     function find_product(name) {
         for(i=1;i<products.length;i++) {
             var p = products[i];
             if(p.name==name) {
                 p.id='product_'+i;
                 return p;
             }
         }
         alert("unknown product '"+name+"'");
         return p;
     }

     
     function new_variety_selector(name) {
        var p= name==''?null:find_product(name);
        document.write(p.getVariety_selector());
        //p.validate_selector();
     }
    function recolor_sketch(prefix,color,trim,buttons) {
        if(true)return;
        var d = document.getElementById(prefix+"_div");
        if(d) {
            if(buttons){
                var img = document.getElementById(prefix+"_img");
                img.src ="/images/button_"+prodattrs[buttons].show_color.substring(1)+".png";
                img.style.display='inline';

            }
            if(trim)d.style.borderColor=prodattrs[trim].show_color;
            if(color){
                d.style.backgroundColor=prodattrs[color].show_color;
                if(!trim)
                    d.style.borderColor=d.style.backgroundColor;
            }
            if(trim || buttons || color) {
                //alert("debug: "+typeof d)
                d.style.display='inline';
            }
        }
    }
    function recolor_template(prefix) {
        if(true)return '';
        return '<div id="'+prefix+'_div" style="width:.4in;height:.4in;background:white;border: thick solid black; border-left-width:0; border-top-width:0;display:none">'
              +'<image id="'+prefix+'_img" style ="margin:.1in .2in .2in .10in;display:none" ></div>';
          //xsrc="/images/button_000000.png"
    }
//     function add_to_cart(field) {
//        if(field.value=='Checkout') {
//            var url=field.form.action;
//            checkout(url);
//            return false;
//        }
//        var id = field.id.substring("buy_".length);
//        var value = document.getElementById(id).value;
//        field.value='..adding..';
//        async_script("/Cart.jsp?cart=add&id="+id+"&q="+value+"&"+id+"="+value+"&button="+field.id);
//        return false;
//    }
    function find_product_prodid(name) {
         for(i=1;i<products.length;i++) {
             var p = products[i];
             if(p.prodID==name) {
                 p.id='product_'+i;
                 return i;
             }
         }
         alert("unknown product '"+name+"'");
         return p;
     }
    function edit_item_from_cart(productNbr) {
       var i =find_product_prodid(productNbr.substring(1,5));
       products[i].setChosenFromProductNbr(productNbr);
       choose_product(i);
       document.getElementById("product_select").selectedIndex=i;
    }
    function invert_rgb(hex) {
        if(hex.substring(0,1)=='#')
            return '#'+invert_rgb(hex.substring(1));
        var d=parseInt(hex,16);
        var e = parseInt('808080',16);//Math.pow(2,4*hex.length-1)-1;
        if(d>e)
            return "000000";
        else
            return "FFFFFF";
//        var f=(e-d)
//        var g = ("000000"+f.toString(16));
//        g=g.substring(g.length-6);
//        return g;
    }
  
      
function changeable_text(name,text) {
    document.write("<div id='"+name+"'>"+text+"</div>");
}
function change_text(name,text) {
    var e = document.getElementById(name);
    if(e)e.innerHTML = text;
}

function totalizer() {
   this.add = totalizer_add;
   //this.total = totalizer_total;
   this.names = new Array();
   this.prices = new Array(); 
}
function totalizer_add(name,price_in_cents) {
   this.names[this.names.length]=name;
   this.prices[this.prices.length]=price_in_cents;
   //alert("added "+name);
}



order_total = new totalizer();
function product_total(product,value,price_in_cents) {
   order_total.add(product,price_in_cents);
   //document.write("changeable text");
   changeable_text(product+"_total",value);
}
function calc(field,price_in_cents) {
    var qty = field.value;
    //if(typeof qty != "number" ) qty=0;
    change_text(field.name+"_total","$"+format_number(qty*price_in_cents/100,2));
    //order_total.total(); 
}
function order_total_field(value) {
    changeable_text("order_total",value);
}

function format_number(p,d) 
{
  var r;
  if(p<0){r="-"+format_number2(-p,d);}
  else   {r=format_number2(p,d);}
  return r;
}

function format_number2(pnumber,decimals) 
{
  var strNumber = new String(pnumber);
  var arrParts = strNumber.split('.');
  var intWholePart = parseInt(arrParts[0],10);
  var strResult = '';
  if (isNaN(intWholePart))
    intWholePart = '0';
  if(arrParts.length > 1)
  {
    var decDecimalPart = new String(arrParts[1]);
    var i = 0;
    var intZeroCount = 0;
     while ( i < String(arrParts[1]).length )
     {
       if( parseInt(String(arrParts[1]).charAt(i),10) == 0 )
       {
         intZeroCount += 1;
         i += 1;
       }
       else
         break;
    }
    decDecimalPart = parseInt(decDecimalPart,10)/Math.pow(10,parseInt(decDecimalPart.length-decimals-1)); 
    Math.round(decDecimalPart); 
    decDecimalPart = parseInt(decDecimalPart)/10; 
    decDecimalPart = Math.round(decDecimalPart); 

    //If the number was rounded up from 9 to 10, and it was for 1 'decimal' 
    //then we need to add 1 to the 'intWholePart' and set the decDecimalPart to 0. 

    if(decDecimalPart==Math.pow(10, parseInt(decimals)))
    { 
      intWholePart+=1; 
      decDecimalPart="0"; 
    } 
    var stringOfZeros = new String('');
    i=0;
    if( decDecimalPart > 0 )
    {
      while( i < intZeroCount)
      {
        stringOfZeros += '0';
        i += 1;
      }
    }
    decDecimalPart = String(intWholePart) + "." + stringOfZeros + String(decDecimalPart); 
    var dot = decDecimalPart.indexOf('.');
    if(dot == -1)
    {
      decDecimalPart += '.'; 
      dot = decDecimalPart.indexOf('.'); 
    } 
    var l=parseInt(dot)+parseInt(decimals); 
    while(decDecimalPart.length <= l) 
    {
      decDecimalPart += '0'; 
    }
    strResult = decDecimalPart;
  }
  else
  {
    var dot; 
    var decDecimalPart = new String(intWholePart); 

    decDecimalPart += '.'; 
    dot = decDecimalPart.indexOf('.'); 
    var l=parseInt(dot)+parseInt(decimals); 
    while(decDecimalPart.length <= l) 
    {
      decDecimalPart += '0'; 
    }
    strResult = decDecimalPart;
  }
  return strResult;
}

    
 var prodattrs=[new Attr("","","no")/*1*/,new Attr('n','Standard')
/*2*/,new Attr('p','Extra Small 0-2')
/*3*/,new Attr('s','Small 4-6')
/*4*/,new Attr('m','Medium 8-10')
/*5*/,new Attr('l','Large 12-14')
/*6*/,new Attr('xl','Extra Large 16-18')
/*7*/,new Attr('2xl','2XL 20-22',null,'10.00',null)
/*8*/,new Attr('3xl','3XL 24-28',null,'10.00',null)
/*9*/,new Attr('4xl','4XL',null,'10.00',null)
/*10*/,new Attr('5xl','5XL',null,'10.00',null)
/*11*/,new Attr('s','Small')
/*12*/,new Attr('m','Medium')
/*13*/,new Attr('l','Large')
/*14*/,new Attr('xl','Extra Large')
/*15*/,new Attr('2xl','2XL',null,'10.00',null)
/*16*/,new Attr('3xl','3XL',null,'10.00',null)
/*17*/,new Attr('4xl','4XL',null,'10.00',null)
/*18*/,new Attr('5xl','5XL',null,'10.00',null)
/*19*/,new Attr('p','Extra Small 0-2')
/*20*/,new Attr('s','Small 4-6')
/*21*/,new Attr('sm','Small/Medium')
/*22*/,new Attr('m','Medium 8-10')
/*23*/,new Attr('ml','Medium/Large')
/*24*/,new Attr('l','Large 12-14')
/*25*/,new Attr('xl','Extra Large 16-18')
/*26*/,new Attr('xxl','XXL  20-22')
/*27*/,new Attr('xxxl','XXXL 24-28')
/*28*/,new Attr('s','Small')
/*29*/,new Attr('m','Medium')
/*30*/,new Attr('l','Large')
/*31*/,new Attr('xl','Extra Large')
/*32*/,new Attr('xxl','XXL')
/*33*/,new Attr('xxxl','XXXL')
/*34*/,new Attr('Wh','Soft White','#ffffff',null,null)
/*35*/,new Attr('Pk','Soft Pink','#ffe4e1',null,null)
/*36*/,new Attr('Bk','Charcoal Black','#292929',null,null)
/*37*/,new Attr('Bk','Black','#292929',null,null)
/*38*/,new Attr('Nb','Navy Blue','#4737a6',null,null)
/*39*/,new Attr('Sb','Blue','#9495ed',null,null)
/*40*/,new Attr('Sg','Green','#32cd32',null,null)
/*41*/,new Attr('Rb','Raspberry','#ff1493',null,null)
/*42*/,new Attr('Wh','White','#ffffff',null,null)
/*43*/,new Attr('Bl','Royal Blue')
/*44*/,new Attr('Thp','Hot Pink','#ff1493',null,null)
/*45*/,new Attr('Tsp','Soft Pink','#ffb6c1',null,null)
/*46*/,new Attr('Tsg','Seabreeze Green','#90ee90',null,null)
/*47*/,new Attr('Trr','Racy Red','#cd0000',null,null)
/*48*/,new Attr('Tbb','Beautiful Brown','#8b6508',null,null)
/*49*/,new Attr('Tsw','Snow White','#ffffff',null,null)
/*50*/,new Attr('Tbk','Midnight Black','#000000',null,null)
/*51*/,new Attr('Tsy','Sunshine Yellow','#ffd700',null,null)
/*52*/,new Attr('Tpo','Pumpkin Orange','#ff7f24',null,null)
/*53*/,new Attr('Trb','Royal Blue','#0000cd',null,null)
/*54*/,new Attr('Tw','White','#ffffff',null,null)
/*55*/,new Attr('Tb','Black','#000000',null,null)
/*56*/,new Attr('Tr','Red','#d20000',null,null)
/*57*/,new Attr('Tlp','Light Pink','#fdd5e7',null,null)
/*58*/,new Attr('Thp','Hot Pink','#ff4db8',null,null)
/*59*/,new Attr('Tp','Purple','#644d77',null,null)
/*60*/,new Attr('To','Orange','#ff4a00',null,2)
/*61*/,new Attr('Tlg','Lime Green','#00ff00',null,null)
/*62*/,new Attr('Tng','Neon Green','#00ff00',null,2)
/*63*/,new Attr('Ty','Yellow','#ffef00',null,null)
/*64*/,new Attr('Tlb','Light Blue','#7a8aa4',null,2)
/*65*/,new Attr('Trb','Royal Blue','#0040a4',null,null)
/*66*/,new Attr('Tnb','Navy Blue','#29004a',null,null)
/*67*/,new Attr('Tm','Matching')
/*68*/,new Attr('Tw','White','#ffffff',null,null)
/*69*/,new Attr('Tb','Black','#292929',null,null)
/*70*/,new Attr('Tr','Red','#d20000',null,null)
/*71*/,new Attr('To','Orange','#ff4a00',null,2)
/*72*/,new Attr('Thp','Hot Pink','#ff4db8',null,null)
/*73*/,new Attr('Trp','Raspberry','#ff1493',null,null)
/*74*/,new Attr('Tg','Green','#32cd32',null,null)
/*75*/,new Attr('Ty','Yellow','#ffef00',null,null)
/*76*/,new Attr('Tlb','Light Blue','#7a8aa4',null,2)
/*77*/,new Attr('Tbl','Royal Blue','#0040a4',null,null)
/*78*/,new Attr('Tnb','Navy Blue','#4737a6',null,null)
/*79*/,new Attr('Bhp','Hot Pink','#ff1493',null,null)
/*80*/,new Attr('Bpk','Pink','#ffb6c1',null,null)
/*81*/,new Attr('Bg','Green','#90ee90',null,null)
/*82*/,new Attr('Br','Red','#cd0000',null,null)
/*83*/,new Attr('Bbb','Brown','#8b6508',null,null)
/*84*/,new Attr('Bw','White','#ffffff',null,null)
/*85*/,new Attr('Bbk','Black','#000000',null,null)
/*86*/,new Attr('By','Sunshine Yellow','#ffd700',null,null)
/*87*/,new Attr('Bo','Orange','#ff7f24',null,2)
/*88*/,new Attr('Bb','Blue','#0000cd',null,null)
/*89*/,new Attr('Ls','Short')
/*90*/,new Attr('Lr','Regular')
/*91*/,new Attr('Lt','Tall')
/*92*/,new Attr('Ls','Short 28"')
/*93*/,new Attr('Lr','Regular 30"')
/*94*/,new Attr('Lt','Tall 32"')
/*95*/,new Attr('Lxt','Extra Tall 34"')
/*96*/,new Attr('Ss','Short')
/*97*/,new Attr('S3','Three-quarter')
/*98*/,new Attr('Pn','No')
/*99*/,new Attr('Pr','Right Front')
/*100*/,new Attr('Pl','Left Front')
/*101*/,new Attr('Pi','Interior Pen')
/*102*/,new Attr('PrPl','Right and Left Front')
/*103*/,new Attr('PrPi','Right Front with Interior Pen')
/*104*/,new Attr('PrPlPi','All three')
/*105*/,new Attr('Pa','Aviator - arm')
/*106*/,new Attr('Pn','No')
/*107*/,new Attr('Pa','Aviator - arm')
/*108*/,new Attr('Pnp','No')
/*109*/,new Attr('Ph','Hip')
/*110*/,new Attr('Ps','Side',null,'10.00',null)
/*111*/,new Attr('PhPs','Hip and Side',null,'10.00',null)
/*112*/,new Attr('Rn','No')
/*113*/,new Attr('Rz','Black and White Zebra',null,'5.00',1)
/*114*/,new Attr('Rzgw','Green and White Zebra',null,'5.00',1)
/*115*/,new Attr('Rht','Black and White Houndstooth',null,'5.00',1)
/*116*/,new Attr('Rwb','White with blue polka dots',null,'5.00',1)
/*117*/,new Attr('Rwg','White with green polka dots',null,'5.00',1)
/*118*/,new Attr('An','No')
/*119*/,new Attr('A3','3 inch',null,'5.00',null)
/*120*/,new Attr('30','$30',null,'30.00',null)
/*121*/,new Attr('40','$40',null,'40.00',null)
/*122*/,new Attr('60','$60',null,'60.00',null)
/*123*/,new Attr('80','$80',null,'80.00',null)
/*124*/,new Attr('100','$100',null,'100.00',null)
/*125*/,new Attr('150','$150',null,'150.00',null)
/*126*/,new Attr('200','$200',null,'200.00',null)
/*127*/,new Attr('p','Extra Small 0-2')
/*128*/,new Attr('s','Small 4-6')
/*129*/,new Attr('m','Medium 8-10')
/*130*/,new Attr('l','Large 12-14')
/*131*/,new Attr('xl','Extra Large 16-18')
/*132*/,new Attr('2xl','2XL 20-22',null,'15.00',null)
/*133*/,new Attr('3xl','3XL 24-28',null,'15.00',null)
/*134*/,new Attr('4xl','4XL',null,'15.00',null)
/*135*/,new Attr('5xl','5XL',null,'15.00',null)
/*136*/,new Attr('s','Small')
/*137*/,new Attr('m','Medium')
/*138*/,new Attr('l','Large')
/*139*/,new Attr('xl','Extra Large')
/*140*/,new Attr('2xl','2XL',null,'15.00',null)
/*141*/,new Attr('3xl','3XL',null,'15.00',null)
/*142*/,new Attr('4xl','4XL',null,'15.00',null)
/*143*/,new Attr('5xl','5XL',null,'15.00',null)
/*144*/,new Attr('p','Extra Small 0-2')
/*145*/,new Attr('s','Small 4-6')
/*146*/,new Attr('sm','Small/Medium')
/*147*/,new Attr('m','Medium 8-10')
/*148*/,new Attr('ml','Medium/Large')
/*149*/,new Attr('l','Large 12-14')
/*150*/,new Attr('xl','Extra Large 16-18')
/*151*/,new Attr('xxl','XXL  20-22')
/*152*/,new Attr('xxxl','XXXL 24-28')
/*153*/,new Attr('s','Small')
/*154*/,new Attr('m','Medium')
/*155*/,new Attr('l','Large')
/*156*/,new Attr('xl','Extra Large')
/*157*/,new Attr('xxl','XXL')
/*158*/,new Attr('xxxl','XXXL')
/*159*/,new Attr('p','Extra Small 0-2')
/*160*/,new Attr('s','Small 4-6')
/*161*/,new Attr('m','Medium 8-10')
/*162*/,new Attr('l','Large 12-14')
/*163*/,new Attr('xl','Extra Large 16-18')
/*164*/,new Attr('2xl','2XL 20-22',null,'5.00',null)
/*165*/,new Attr('3xl','3XL 24-28',null,'5.00',null)
/*166*/,new Attr('4xl','4XL',null,'5.00',null)
/*167*/,new Attr('5xl','5XL',null,'5.00',null)
/*168*/,new Attr('s','Small')
/*169*/,new Attr('m','Medium')
/*170*/,new Attr('l','Large')
/*171*/,new Attr('xl','Extra Large')
/*172*/,new Attr('2xl','2XL',null,'5.00',null)
/*173*/,new Attr('3xl','3XL',null,'5.00',null)
/*174*/,new Attr('4xl','4XL',null,'5.00',null)
/*175*/,new Attr('5xl','5XL',null,'5.00',null)
/*176*/,new Attr('p','Extra Small 0-2')
/*177*/,new Attr('s','Small 4-6')
/*178*/,new Attr('sm','Small/Medium')
/*179*/,new Attr('m','Medium 8-10')
/*180*/,new Attr('ml','Medium/Large')
/*181*/,new Attr('l','Large 12-14')
/*182*/,new Attr('xl','Extra Large 16-18')
/*183*/,new Attr('xxl','XXL  20-22')
/*184*/,new Attr('xxxl','XXXL 24-28')
/*185*/,new Attr('s','Small')
/*186*/,new Attr('m','Medium')
/*187*/,new Attr('l','Large')
/*188*/,new Attr('xl','Extra Large')
/*189*/,new Attr('xxl','XXL')
/*190*/,new Attr('xxxl','XXXL')];



 var products=new Array(null
,new Product('WSCG',
'Cami Gown',
'59.99',
'59.99','icons/WSCG.jpg'
,'Short and sweet in our exclusive silky, soft fabric. Our spaghetti-strap nightgown offers a soft neckline and falls to the knee. This whisper light short gown is feminine and stylish with a touch of attitude. A little flirty, a little refined and the ultimate in comfort.  The Performance equivalent of the Little Black Cocktail Dress!')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])

,new Product('WPSL',
'Pajama Set',
'99.99',
'99.99','icons/WPSL.jpg'
,'This pajama set is crafted in Performance\'s  luxurious, moisture-wicking fabric for quick-drying comfort to keep women comfortably relaxed. Notch collar top, elastic waistband with drawstring bottom and artful contrast of white with black piping outline and black buttons provides consumers everyday versatility. This soft, lightweight pajama set is flattering while being casual yet feminine.')
.addOption('size','0',[144,145,147,149,150,151,152])
.addOption('color','0',[34,35,36])
.addOption('buttons','0',[79,80,81,82,83,84,85,86,87,88])
.addOption('piping','0',[44,45,46,47,48,49,50,51,52,53])

,new Product('WPJT',
'Pajama Top',
'59.99',
'59.99','icons/WPJT.jpg'
,'This pajama top is crafted in Performance\'s  luxurious, moisture-wicking fabric for quick-drying comfort to keep women comfortably relaxed. Notch collar top and artful contrast of white with black piping outline and black buttons provides consumers everyday versatility. This soft, lightweight pajama set is flattering while being casual yet feminine.')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])
.addOption('buttons','0',[79,80,81,82,83,84,85,86,87,88])
.addOption('piping','0',[44,45,46,47,48,49,50,51,52,53])

,new Product('WPPL',
'Pajama Pants (Long)',
'39.99',
'39.99','icons/WPPL.jpg'
,'The pajama pant, constructed out of the finest in wicking material using the latest in nanotechnology with silver ions  imbedded in ceramic cubes that help prevent odor and bacteria. The waist has a draw string to help you get that perfect fit every time.')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])

,new Product('WPBS',
'Pajama Boxer Bottoms (short)',
'29.99',
'29.99','icons/WPBS.jpg'
,'Our short pajama bottoms (Boxers) are so simple and light weight. With a draw string to give you that perfect fit every time. Made for those of us that don?t want the extra material of long pants.')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])

,new Product('WCSL',
'Short Cami Top & Pajama Pants Set',
'69.99',
'69.99','icons/WCSL.jpg'
,'Our most popular set with the younger group. Fun relaxed with a little bit of midriff showing.  Combine the cool comfort of a spaghetti-strap top with the relaxed feel of a draw stringed long pajama pant.  An ideal choice for sleeping or sipping your morning coffee!')
.addOption('size','0',[144,145,147,149,150,151,152])
.addOption('color','0',[34,35,36])

,new Product('WCSS',
'Short Cami Top & Boxer Set',
'59.99',
'59.99','icons/WCSS.jpg'
,'Cool and comfortable, our easy-fitting spaghetti-strap camisole is paired with roomy, pull-on shorts featuring a tie waist to always give that perfect fit every time. An updated design on a sporty, sassy classic.  Hold on tight to the boxers - as brothers have been known to try them on an occasion or two.  We know of several lacrosse players who use them themselves!')
.addOption('size','0',[144,145,147,149,150,151,152])
.addOption('color','0',[34,35,36])

,new Product('WCTS',
'Short Cami Top',
'29.99',
'29.99','icons/WCTS.jpg'
,'Cool and comfortable, our easy-fitting spaghetti-strap camisole is ever so light and flirty!  An updated design on a sporty, sassy classic.')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])

,new Product('WSNG',
'Signature Nightgown',
'79.99',
'79.99','icons/WSNG.jpg'
,'Using a super soft and silky weave, Performance Sleepwear has created an elegant and simple night gown which is the solution to sleepless nights. Crafted in luxurious, moisture-wicking fabric for quick-drying comfort, the Signature nightgown has a slightly squared neck with lining in the bodice. Soft, romantic details add a touch of the unexpected with soft gathers in front and back for a romantic, draping flow. The design is timeless, heirloom quality with flounced hemline falling to just above the ankle. The nightgown has decidedly feminine white on white with classic piping around the gathers, hemline, and cuffs that captures beauty and function.  This is definitely not your grandmother\'s nightgown!')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])

,new Product('WSLG',
'Sleeveless Nightgown',
'79.99',
'79.99','icons/WSLG.jpg'
,'Inspired by our Signature Nightgown, the Sleeveless nightgown is fluid and feminine with a relaxing style. Made from Performances\' soft and silky moisture-wicking fabric for quick drying comfort this nightgown provides comfortable, carefree sophistication. Soft seaming with elegant squared neck and lined bodice with beautiful piping detailing the gathers and hemline making it perfect for any night\'s sleep.  Made for those of us that just want the freedom of no sleeves. Made of the same silky material as our other gowns using the latest in nanotechnology.')
.addOption('size','0',[19,20,22,24,25,26,27])
.addOption('color','0',[34,35,36])

,new Product('MPSS',
'Men\'s PJ  Set - Short',
'59.98',
'59.98','icons/MPSS.jpg'
,'You expect the highest performance out of you clothes on the sports field and in the boardroom why wouldn?t you in bed? You can now get the same light weight comfort in your pajamas. Introducing the finest in men\'s sleepwear from Performance - silky, light, wicking, using nano technology with silver ions wrapped in ceramic cubes to help eliminate odor.  Our performance T\'s have a raglan sleeve, crew neck and come with stitching in contrasting colors.  There is just simply nothing better for sleeping - or reading the Sunday paper and having your morning cup!')
.addOption('size','0',[153,154,155,156,157,158])
.addOption('color','0',[34,35,36])
.addOption('stitching','0',[67,68,69,70,71,72,73,75,76,77,78])

,new Product('MPSL',
'Men\'s PJ Set - Long',
'79.98',
'79.98','icons/MPSL.jpg'
,'You expect the highest performance out of you clothes on the sports field and in the boardroom why wouldn?t you in bed? You can now get the same light weight comfort in your pajamas. Introducing the finest in men\'s sleepwear from Performance - silky, light, wicking, using nano technology with silver ions wrapped in ceramic cubes to help eliminate odor.  Our Performance  Super "T\'s"  have a raglan sleeve, crew neck and come with stitching in contrasting colors.  And for those of us who prefer a long pant pajama set - these are your answer!  There is just simply nothing better for sleeping - or reading the Sunday paper and having your morning cup! Comes with full length pant with a tie front for the ultimate in comfort every time.')
.addOption('size','0',[153,154,155,156,157,158])
.addOption('color','0',[34,35,36])
.addOption('stitching','0',[67,68,69,70,71,72,73,75,76,77,78])

,new Product('MSTS',
'Men\'s Super "T"',
'29.99',
'29.99','icons/MSTS.jpg'
,'You will love your mans Super "T" - although made for sleeping most guys end up wearing it everywhere.  using nano technology with silver ions wrapped in ceramic cubes to help eliminate odor.  Our performance T\'s have a raglan sleeve, crew neck and come with stitching in contrasting colors.  There is just simply nothing better for sleeping - or reading the Sunday paper and having your morning cup!')
.addOption('size','0',[28,29,30,31,32,33])
.addOption('color','0',[34,35,36])
.addOption('stitching','0',[67,68,69,70,71,72,73,75,76,77,78])

,new Product('MLWS',
'Men\'s Super Light Weight Shorts',
'29.99',
'29.99','icons/MLWS.jpg'
,'The PJ short - made for a man! Cut long with a super wide elastic band for pure comfort. It falls to just above the knee and is built for those warm evenings where coolness is essential.  It\'s a combination board short and boxer - perfect for picking up the mail, sprinting the mile or for just sleeping in!')
.addOption('size','0',[28,29,30,31,32,33])
.addOption('color','0',[34,35,36])
.addOption('stitching','0',[67,68,69,70,71,72,73,75,76,77,78])

,new Product('MPPL',
'Men\'s Pajama Pants (Long)',
'49.99',
'49.99','icons/MPPL.jpg'
,'These pajama pants are full length and made of the same space age material with nano technology.  They come with a tie front and have a generous cut for those lazy mornings. Designed for both sitting around and sleeping.  There is just simply nothing better for sleeping - or reading the Sunday paper and having your morning cup!')
.addOption('size','0',[28,29,30,31,32,33])
.addOption('color','0',[34,35,36])
.addOption('stitching','0',[67,68,69,70,71,72,73,75,76,77,78])

,new Product('PCSS',
'Pair of Pillow cases',
'39.99',
'39.99','icons/PCSS.jpg'
,'A pair of pillow cases crafted in DryDreams\' luxurious, moisture-wicking fabric for quick-drying comfort keeps you from waking up freezing cold after the hot flash is over. You will love its comfort and cherish a complete night of sleep.')
.addOption('size','0',[1],1)
.addOption('color','0',[34,35,36])

,new Product('CERT',
'Gift Certificate',
'0.00',
'0.00','icons/CERT.jpg'
,'Give the gift of a good night\'s sleep. For on-line purchase of our sleepwear at this store.  <p>You will receive a coupon code by email. Your gift recipient enters that code to purchase products chosen from this site.</p>')
.addOption('value','0',[120,121,122,123,124,125,126])

);


