if(!window.zw){window.zw={}}zw.forms={isDate:function(d){var b=d.split("/");var a="";var e="";var c="";a=b[0];if(b.length>1){e=b[1]}if(b.length>2){c=b[2]}if(a.length>0&&e.length>0&&c.length>0){return zw.forms.isDMY(a,e,c)}else{return false}},isDMY:function(a,d,c){var b;a=parseInt(a,10);d=parseInt(d,10);c=parseInt(c,10);b=new Date(d+"/"+a+"/"+c);if(b.getDate()!=a||b.getMonth()!=d-1||b.getFullYear()!=c){return false}return true},validate:function(d,g,h){var a=false,l=false,k=false,j=false;if(d==8){if(g){k=(g.length>0?document.getElementById(g[0].name+"_error"):false);j=g}else{g=true}}else{k=document.getElementById(g+"_error");j=document.getElementById(g)}if(!j){return true}switch(d){case 0:case 1:case 12:case 15:a=zw.forms.validateText(j,h);l=true;break;case 2:a=zw.forms.validateInteger(j,h);l=true;break;case 3:a=zw.forms.validateDecimal(j,h);l=true;break;case 4:a=zw.forms.validateCheck(j,h);break;case 5:a=zw.forms.validateDate(j,h);break;case 6:a=zw.forms.validateWYSWYG(j,h);break;case 7:a=zw.forms.validateImage(j,h);break;case 8:a=zw.forms.validateOptions(j,h);break;case 9:case 20:a=zw.forms.validateSelect(j,h);break;case 10:a=zw.forms.validateWeb(j,h);l=true;break;case 11:a=zw.forms.validateMail(j,h);l=true;break;case 14:a=zw.forms.validateColor(j,h);break;case 21:a=zw.forms.validateTime(j,h);break;case 16:case 19:case 99:default:a=true;break}if(l){if(j.className.indexOf("emptyvalue")>-1){a=false}}if(k){k.style.display=(a?"none":"")}return a},validateCheck:function(b,a){return(a?b.checked:true)},validateText:function(b,a){return(a&&b.value.length==0?false:true)},validateMail:function(b,a){return(a||b.value.length>0?zw.isMail(b.value):true)},validateWeb:function(b,a){return(a||b.value.length>0?zw.isWeb(b.value):true)},validateInteger:function(b,a){return(a||b.value.length>0?/^[-|+]?\d+$/.test(b.value):true)},validateDecimal:function(b,a){var c=/^(([+|-]?\d+(\.\d*)?)|([+|-]?(\d*\.)?\d+))$/;return(a||b.value.length>0?c.test(b.value):true)},validateDate:function(b,a){var c=/^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$/;return(a||b.value.length>0?c.test(b.value):true)},validateTime:function(b,a){var c=/^(([0-1]?[0-9])|([2][0-3])):([0-5]?[0-9])(:([0-5]?[0-9]))?$/;return(a||b.value.length>0?c.test(b.value):true)},validateImage:function(b,a){return(a&&(b.value==0||b.value.length==0)?false:true)},validateWYSWYG:function(b,a){return true},validateOptions:function(e,d){var c;var a=false;if(d){for(c=0;c<e.length;c++){if(e[c].checked){a=true;break}}}else{a=true}return a},validateSelect:function(c,b){var a=false;var d;if(b){if(c.selectedIndex>-1){d=c.options[c.selectedIndex];a=!(/\btextdes\b/i.test(d.className));if(a){a=(d.value.length==0&&c.selectedIndex==0?false:true)}}}else{a=true}return a},validateColor:function(b,a){return(a||b.value.length>0?/^#?([\dabcdef]{2}){3}$/i.test(b.value):true)},emptyValueInit:function(a){var b=document.getElementById(a);if(b.form){zw.addEventHandler(b.form,"onsubmit",function(){zw.forms.emptyValueSubmit(b)})}},emptyValueSubmit:function(a){zw.forms.emtpyValueClear(a)},emtpyValueClear:function(a){if(a.getAttribute("showempty")=="1"){a.className=a.className.replace(/[ ]?emptyvalue/g,"");a.value="";a.setAttribute("showempty","0")}},emtpyValueSet:function(a){if(a.getAttribute("showempty")=="0"&&a.value.length==0){a.className+=" emptyvalue";a.value=a.getAttribute("emptyvalue");a.setAttribute("showempty","1")}},emptyValueFocus:function(b,a){var b=(b?b:window.event);var c=(b.srcElement)?b.srcElement:b.target;if(a){zw.forms.emtpyValueClear(c)}else{zw.forms.emtpyValueSet(c)}},dateDMYKeyPress:function(a){a=(a?a:window.event);s=(window.event?a.keyCode:a.charCode);zw.forms.focusNext(a);if(s==46||s==47||s==45){zw.forms.focus(a,true,false,true)}if((s<48||s>57)&&s!=0){if(window.event){a.keyCode=0;return false}else{return(s>0?false:true)}}},numberKeyPress:function(a,b){a=(a?a:window.event);if(!b){b=false}s=(window.event?a.keyCode:a.charCode);zw.forms.focusNext(a);if((s<48||s>57)&&s!=0&&!(s==45&&b)){if(window.event){a.keyCode=0;return false}else{return(s>0?false:true)}}},decimalKeyPress:function(b,c){b=(b?b:window.event);if(!c){c=false}var a=(window.event?b.keyCode:b.charCode);zw.forms.focusNext(b);if(a==45&&c){}else{if(a==46||(a==44&&window.event)){if(window.event){a=46}}else{if(a<48||a>57){if(window.event){b.keyCode=0;return false}else{return(a>0?false:true)}}}}},colorKeyPress:function(a){a=(a?a:window.event);s=(window.event?a.keyCode:a.charCode);zw.forms.focusNext(a);if(s>=97&&s<=102){if(window.event){s-=32}else{return true}}if((s<65||s>70)&&(s<48||s>57)){if(window.event){a.keyCode=0;return false}else{return(s>0?false:true)}}},dateKeyPress:function(b,a){b=(b?b:window.event);s=(window.event?b.keyCode:b.charCode);a=(a?a:false);zw.forms.focusNext(b);if((s>=44&&s<=47&&window.event)||s==47||(a&&s==58)){if(window.event&&s!=58){b.keyCode=47}}else{if((s<48||s>57)){if(window.event){b.keyCode=0;return false}else{return(s>0?false:true)}}}},timeBlur:function(d,f){d=(d?d:window.event);var b=f.value,c=false,a=false;switch(b.length){case 4:c=b.substring(0,2);a=b.substring(2);break;case 3:c="0"+b.substring(0,1);a=b.substring(1);break;case 2:case 1:c=(b.length==1?"0":"")+b;a="00";break}if(c&&a){f.value=c+":"+a}},timeKeyPress:function(a){a=(a?a:window.event);s=(window.event?a.keyCode:a.charCode);zw.forms.focusNext(a);if((s>=44&&s<=47&&window.event)||s==47||s==58){if(window.event){a.keyCode=58}}else{if((s<48||s>57)){if(window.event){a.keyCode=0;return false}else{return(s>0?false:true)}}}},mailKeyPress:function(b){b=(b?b:window.event);var a=(window.event?b.keyCode:b.charCode);zw.forms.focusNext(b);if(a>=65&&a<=90){a+=32}if(a!=46&&a!=95&&a!=45&&a!=64&&(a<97||a>122)&&(a<48||a>57)){if(window.event){b.keyCode=0;return false}else{return(a>0?false:true)}}},lower:function(a){a=(a?a:window.event);var b=(a.srcElement)?a.srcElement:a.target;b.value=b.value.toLowerCase()},upper:function(a){a=(a?a:window.event);var b=(a.srcElement)?a.srcElement:a.target;b.value=b.value.toUpperCase()},upperFirst:function(k){var k=(k?k:window.event);var l=(k.srcElement)?k.srcElement:k.target;var h=l.value.toLowerCase().split("");var m="",f=" ",j="",d=false,g;for(g=0;g<h.length;g++){d=new RegExp("[^"+zw.upperCheck+"]").test(f);m=h[g];if(f==" "&&f==m){m=""}j+=(d?m.toUpperCase():m);f=h[g]}l.value=j},focusNext:function(a){zw.forms.focus(a,true,false)},focusPrev:function(a){zw.forms.focus(a,false,false)},focus:function(l,r,q,h){var l=(window.event?window.event:l);var g=(l.srcElement?l.srcElement:l.target);var k,m,j,a,u=0;if(h==undefined){h=false}if(!h&&l.keyCode==13){h=true}if(!h&&q){if(g.tagName=="INPUT"&&g.type=="text"){a=zw.getSelectionStart(g);if(((l.keyCode==39&&a==g.value.length)||(l.keyCode==40))&&r){h=true;u=1}if(((l.keyCode==37&&a==0)||(l.keyCode==38))&&!r){h=true;u=2}}else{if(l.keyCode==39&&r){h=true}if(l.keyCode==37&&!r){h=true}}}if(h){try{if(window.event){l.keyCode=0}k=g.form;if(k){if(g.tabIndex>0){for(j=0;j<k.elements.length;j++){if(k.elements[j].tabIndex==g.tabIndex+(r?1:-1)){m=k.elements[j];break}}}if(!m){for(j=0;j<k.elements.length;j++){if(k.elements[j].name==g.name){if(r){j++}else{j--}m=k.elements[j];break}}}}if(m){m.focus();m.select();switch(u){case 1:zw.setSelectionRange(m,0,0);zw.stopEventPropagation(l,true);break;case 2:zw.setSelectionRange(m,m.value.length,m.value.length);zw.stopEventPropagation(l,true);break}}return false}catch(t){}}},setFlag:function(b,c){var a=document.getElementById(c);if(b.value!=""){a.style.backgroundImage="url('media.php?zwflag="+b.value+"')";a.title=b.options[b.selectedIndex].text}else{a.style.backgroundImage="none";a.title=""}},dateValidate:function(e){var c,a,f;var b=e.value;b.replace(/[-\\]/g,"/");if(b.match(/[0-9]{6,8}/)){if(b.length==6){c=b.substr(0,2);a=b.substr(2,2);f=parseInt(b.substr(4),10);f+=(f<25?2000:1900);e.value=c+"/"+a+"/"+f}else{if(b.length==8){c=b.substr(0,2);a=b.substr(2,2);f=b.substr(4);e.value=c+"/"+a+"/"+f}}}else{if(b.length==8&&b.match(/[0-9]{2}\/[0-9]{2}\/[0-9]{2}/)){c=b.substr(0,2);a=b.substr(3,2);f=parseInt(b.substr(6),10);f+=(f<25?2000:1900);e.value=c+"/"+a+"/"+f}}},dateYears:function(f){var v="",u=true,j=document.getElementById(f.id+"_years");var k,h,r,e,g,w,q;zw.forms.dateValidate(f);if(f.value==""){u=false}if(u){e=f.value.split("/");if(e.length<3){u=false}}if(u){k=e[0];h=e[1];r=e[2];if(isNaN(k)||isNaN(h)||isNaN(r)){u=false}}if(u){w=new Date();g=new Date(r,h-1,k);q=w.getFullYear()-g.getFullYear();if(q>0){if((g.getMonth()>w.getMonth())||(g.getMonth()==w.getMonth()&&g.getDate()>w.getDate())){q--}v=q}}if(j){j.value=v}},setTableCell:function(f,a){var d=f.parentNode,c=true;while(c){if(d.tagName=="TD"&&(d.className=="zwcellfield"||d.className=="zwcellcaption")){zw.forms.setClass(d.parentNode,"zwrowfocus",a);c=false}if(d.parentNode){d=d.parentNode}else{c=false}}},setClass:function(f,g,a){var d=f.className,e=new RegExp(g,"gi");d=d.replace(e,"");d+=(a?(d.length>0?" ":"")+g:"");f.className=d}};zw.ContextContainer=function(){this.object=false;this.parent=false;this.x=0;this.y=0;this.shadow=false;this.hasShadow=true;this.callBack=false};zw.ContextContainer.prototype={show:function(d,f,a,h,g){var b,e;if(this.object){this.hide()}if(!f){f=document}this.callBack=g;this.hasShadow=!zw.Browser.canShadow();if(this.shadow==false&&this.hasShadow){this.shadow=document.createElement("DIV");this.shadow.className="cmspopupmenush";document.body.insertBefore(this.shadow,document.body.childNodes[0])}if(d.parentNode!=document.body){if(d.parentNode){d.parentNode.removeChild(d)}document.body.insertBefore(d,(this.hasShadow?this.shadow:document.body.childNodes[0]))}this.object=d;this.parent=f;if(this.parent){if(this.parent!=document){e=_getObjectSize(f);oRect=_getObjectPagePos(this.parent);this.x=oRect.x;this.y=oRect.y+e.height}else{this.x=0;this.y=0}}this.x+=a;this.y+=h;d.style.left=this.x+"px";d.style.top=this.y+"px";d.style.display="block";e=_getObjectSize(d);if(this.hasShadow){this.shadow.style.left=(this.x+3)+"px";this.shadow.style.top=(this.y+3)+"px";this.shadow.style.width=e.width+"px";this.shadow.style.height=e.height+"px";this.shadow.style.display="block"}zw.addEventHandler(document.body,"onmousedown",this.eventHandler);zw.addEventHandler(document.body,"onkeydown",this.eventHandler);zw.addEventHandler(d,"onmousedown",this.stopPropagation)},stopPropagation:function(a){a=(window.event?window.event:a);a.cancelBubble=true;if(window.event){a.returnValue=false}else{a.stopPropagation()}return false},eventHandler:function(a){a=(window.event?window.event:a);o=(window.event?a.srcElement:a.target);if(o!=zw.context.object){switch(a.type){case"mousedown":zw.context.hide();break;case"keydown":if(a.keyCode==27){zw.context.hide()}break}}},hide:function(){if(this.object){this.object.style.display="none";if(this.hasShadow){this.shadow.style.display="none"}zw.removeEventHandler(document.body,"onmousedown",this.eventHandler);zw.removeEventHandler(document.body,"onkeydown",this.eventHandler);zw.removeEventHandler(this.object,"onmousedown",this.stopPropagation);this.object=false;this.parent=false;if(this.callBack){this.callBack.call()}}}};zw.ContextMenu=function(){this.initialize()};zw.ContextMenu.prototype={options:Array(),obj:false,ondrop:false,tag:false,initialize:function(){this.options=Array();this.obj=false;this.ondrop=false;this.tag=false},addOption:function(a){this.options.push(a);return a},raiseOnDrop:function(){if(this.ondrop){this.ondrop.call(this,this)}},show:function(a,b){this.raiseOnDrop();if(this.options.length>0){this.doRender();zw.context.show(this.obj,null,a,b)}},bindObject:function(a){var b=this;zw.addEventHandler(a,"onmouseup",function(){b.showFromEvent(arguments[0])});this.avoidContextMenu()},clearOptions:function(){this.options=Array()},avoidContextMenu:function(){if(typeof zw.ContextMenu.contextEvent=="undefined"){zw.addEventHandler(document.body,"oncontextmenu",function(a){return zw.stopEventPropagation(window.event?window.event:a)});zw.ContextMenu.contextEvent=true}},doRender:function(){var b,a,f,j,g,e,d;if(!this.obj){this.obj=document.createElement("DIV");this.obj.className="cmsctxmenu cmspopupmenu"+(zw.Browser.canShadow?" cmsctxmenushad":"");this.obj.style.display="none"}else{this.obj.innerHTML=""}for(b=0;b<this.options.length;b++){a=this.options[b];if(!a.menuType){a.menuType=0}a.parentMenu=this;f=document.createElement("DIV");switch(a.menuType){case 1:f.className="cmsctxinfo";if(a.caption){f.innerHTML=a.caption}break;case 0:f.className="cmsctxopt"+(a.beginGroup?" cmsctxgroup":"");f.zwMenu=this;f.zwMenuOption=a;d=this;if(a.handle){zw.addEventHandler(f,"onclick",function(){var c=window.event?window.event:arguments[0];d.handleClick(c);return zw.stopEventPropagation(c)})}if(a.mouseDownHandle){zw.addEventHandler(f,"onmousedown",function(){var c=window.event?window.event:arguments[0];d.handleMouseDown(c)})}j=document.createElement("DIV");j.className="cmsctxtxt";g=document.createElement("DIV");g.className="cmsctxicon";if(a.icon){g.style.backgroundImage="url('"+a.icon+"')"}if(a.caption){j.innerHTML=a.caption}f.appendChild(g);f.appendChild(j);break}this.obj.appendChild(f);e=document.createElement("DIV");e.className="zwclear";this.obj.appendChild(e)}},showFromEvent:function(b){var a,c;if(b.button==2){a=_zwMousePositionFromEvent(b);c=zwGetScrollOffset();this.show(a.x-c.x,a.y-c.y);this.avoidContextMenu();return zw.stopEventPropagation(b,true)}},handleMouseDown:function(a){var a=(window.event?window.event:a);var b=(a.srcElement?a.srcElement:a.target);while(b.zwMenuOption==undefined){b=b.parentNode}if(b.zwMenuOption){if(b.zwMenuOption.mouseDownHandle){try{b.zwMenuOption.mouseDownHandle.call(b.zwMenuOption,a)}catch(a){}}}zw.context.hide()},handleClick:function(a){var a=(window.event?window.event:a);var b=(a.srcElement?a.srcElement:a.target);while(b.zwMenuOption==undefined){b=b.parentNode}if(b.zwMenuOption){if(b.zwMenuOption.handle){try{b.zwMenuOption.handle.call(b.zwMenuOption,a)}catch(a){}}}zw.context.hide()}};zw.forms.image=function(id,h,p,v){this.id=id;this.height=h;this.preview=p;this.value=v;this.ajax=false;this.deleteImage=function(){var f=document.getElementById(this.id);var o=document.getElementById(this.id+"_prv");if(this.preview){var c=document.getElementById(this.id+"_cnt")}if(f){f.value=0}if(o){o.style.display="none"}if(this.preview&&c){c.style.display="none"}this.value=0;this.loadMedia()};this.callBack=function(id,w,h){var f=document.getElementById(this.id);var o=document.getElementById(this.id+"_prv");if(this.preview){var c=document.getElementById(this.id+"_cnt")}this.value=id;if(f){f.value=id}if(o){o.src="media.php?zww="+this.height+"&zwh="+this.height+"&zwimg="+id+"&zwnc=0"}if(o){o.style.display="block"}if(this.preview&&c){if(c){c.style.display="block"}}this.loadMedia()};this.loadMedia=function(){var o=document.getElementById(this.id+"_nfo");var u;if(this.value==0){if(o){o.innerHTML="";o.style.display="none"}}else{if(this.ajax){this.ajax.cancel()}u=zw.rpcUrl+"&cmscmd=getmedia&cmsimgid="+this.value;this.ajax=new zw.Ajax(u,this.loadMediaCallBack);this.ajax.info=o;this.ajax.tag=this;this.ajax.call()}};this.loadMediaCallBack=function(o){var d=document.getElementById(o.obj.tag.id+"_nfo");var p=document.getElementById(o.obj.tag.id+"_cnt");var r;try{eval("r="+o.responseText+";")}catch(e){r={html:"",type:"",name:"",height:0,width:0,size:""}}if(d){d.innerHTML='<a href="javascript:void(0);" onclick="zw.getImagePreview('+o.obj.tag.value+');">'+r.name+"</a>"+(r.height>0&&r.width>0?" - ["+r.width+", "+r.height+"]":"")+(r.size.length>0?" - "+r.size:"")}if(p){p.innerHTML=r.html}};this.loadMedia()};zw.forms.color={preview:function(){var b;if(zw.context.object&&zw.context.object.id=="_zwcoloreditor"){b=document.getElementById(zw.context.parent.id+"_preview");if(b){try{b.style.backgroundColor="#"+zw.context.parent.value}catch(a){}}}},set:function(a){if(zw.context.object&&zw.context.object.id=="_zwcoloreditor"){zw.context.parent.value=a;zw.forms.color.preview();zw.context.hide()}},drop:function(f){var d;var e;var a=0,g=0;var b,c;if(f){e=f;while(e&&e.className!="cmscoloreditor"){e=e.parentNode}d=document.getElementById("_zwcoloreditor");zw.context.show(d,f,a,g)}},dropSel:function(){var a;if(zw.context.object&&zw.context.object.id=="_zwcoloreditor"){a=document.getElementById("_zwcoloreditor_dropinfo");zw.forms.color.set(a.innerHTML)}},showEditor:function(b){var a=document.getElementById("_zwcoloreditor_dropinfo");var d=document.getElementById("_zwcoloreditor_dropprv");var f=document.getElementById(b);try{if(d){d.style.backgroundColor="#"+f.value}if(a){a.innerHTML=f.value}}catch(c){}zw.forms.color.drop(f)},fromHBS:function(v,y,n,q){var x={r:0,g:0,b:0};var w=document.getElementById("_zwcoloreditor_hueimg");var m=w.height-1;var z=(m+1)/6;var l=0,a=0;var e=0,g=0,k=0;var u,j;var r,d;var t,f;l=v%z;a=(v-l)/z;r=parseInt(l*255/z);d=255-r;u=100-(y*100/m);j=100-(n*100/m);switch(a){case 0:x.r=255;x.g=0;x.b=r;break;case 1:x.r=d;x.g=0;x.b=255;break;case 2:x.r=0;x.g=r;x.b=255;break;case 3:x.r=0;x.g=255;x.b=d;break;case 4:x.r=r;x.g=255;x.b=0;break;case 5:x.r=255;x.g=d;x.b=0;break}if(!q){t=(255-x.r)*j/100;x.r+=t;f=(255-x.r)*y/100;x.r=x.r*u/100;t=(255-x.g)*j/100;x.g+=t;f=(255-x.g)*y/100;x.g=x.g*u/100;t=(255-x.b)*j/100;x.b+=t;f=(255-x.b)*u/100;x.b=x.b*u/100}return x},setHue:function(f){var d=document.getElementById("_zwcoloreditor_huesel");var b=document.getElementById("_zwcoloreditor_base");var a;var h;h=zw.forms.color.fromHBS(f,0,0,true);a=zw.hex(h.r)+zw.hex(h.g)+zw.hex(h.b);try{if(b){b.style.backgroundColor="#"+a}}catch(g){}},moveHBS:function(l,k){var j;var g=0,f=0,d=0;var a,m;if(zw.context.object&&zw.context.object.id=="_zwcoloreditor"){i=document.getElementById("_zwcoloreditor_dropinfo");j=document.getElementById("_zwcoloreditor_huesel");l=(l?l:window.event);if(window.event){f=l.offsetX;d=l.offsetY}else{f=l.layerX-7;d=l.layerY-7}g=parseInt(j.style.top)+3;m=zw.forms.color.fromHBS(g,d,f,false);a=zw.hex(m.r)+zw.hex(m.g)+zw.hex(m.b);zw.forms.color.setPreview(a)}},setPreview:function(a){i=document.getElementById("_zwcoloreditor_dropinfo");p=document.getElementById("_zwcoloreditor_dropprv");try{if(p){p.style.backgroundColor="#"+a}}catch(b){}try{if(i){i.innerHTML=a}}catch(b){}},move:function(l,h){var r,q;var v=h.width-1;var g=(v+1)/6;var u=0,n=0;var m=0,a=0,f=0;var t,k,d;var j,b;var c;if(g.context.object&&g.context.object.id=="_zwcoloreditor"){l=(l?l:window.event);if(window.event){r=l.offsetX;q=l.offsetY}else{r=l.layerX-5;q=l.layerY-5}u=r%g;n=(r-u)/g;t=parseInt(u*255/g);k=255-t;j=k;b=t;t=t+parseInt(q*j/v);k=k+parseInt(q*b/v);d=parseInt(q*255/v);switch(n){case 0:m=255;a=t;f=d;break;case 1:m=k;a=255;f=d;break;case 2:m=d;a=255;f=t;break;case 3:m=d;a=k;f=255;break;case 4:m=t;a=d;f=255;break;case 5:m=255;a=d;f=k;break}c=g.hex(m)+g.hex(a)+g.hex(f);g.forms.color.setPreview(c)}}};zw.context=new zw.ContextContainer();if(typeof(HTMLFormElement)!="undefined"){HTMLFormElement.prototype._submit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){zw.objFireEvent(this,"onsubmit");HTMLFormElement.prototype._submit.call(this)}};
