phpLANGUAGE="RU";phpTHEME="default";phpRATE1="8.5";phpRATE2="11";phpBANKNOTE0="грн.";phpBANKNOTE1="дол.";phpBANKNOTE2="евр.";phpSTRING015="Загрузка изображений";phpSTRING016="Мой заказ";phpSTRING017="Ошибка";String.prototype.Find=function(what){if(what==null||what==""){return false;};return(this.indexOf(what)>=0?true:false);};String.prototype.FindEx=function(what){if(what==null||what==""){return false;};var NS_N=this.toLowerCase();return(NS_N.indexOf(String(what).toLowerCase())>=0?true:false);};function NS_GetElementById(id){if(document.getElementById){var NS_C=document.getElementById(id);if(!NS_C){return null;}else{return NS_C;};}else{return null;};};var catalogue_checklist=new Array();function refreshchecklist(NS_C,formid){catalogue_checklist=new Array();var f=eval("document.form"+formid);if(f.catalogue_checklist){var NS_C=NS_GetElementById("catalogue_check");while(NS_C){if(NS_C.type=="checkbox"&&NS_C.checked){catalogue_checklist.push(NS_C.value);};NS_C.id="catalogue_checked";NS_C=NS_GetElementById("catalogue_check");};f.catalogue_checklist.value=catalogue_checklist.join(",");NS_C=NS_GetElementById("catalogue_checked");while(NS_C){NS_C.id="catalogue_check";NS_C=NS_GetElementById("catalogue_checked");};};};function check(){var NS_C=NS_GetElementById("catalogue_check");var tmpobj=NS_C;while(NS_C){if(NS_C.type=="checkbox"){NS_C.checked=true;};NS_C.id="catalogue_checked";NS_C=NS_GetElementById("catalogue_check");};NS_C=NS_GetElementById("catalogue_checked");while(NS_C){NS_C.id="catalogue_check";NS_C=NS_GetElementById("catalogue_checked");};if(tmpobj&&tmpobj.onclick){tmpobj.onclick();};};function inverse_check(){var NS_C=NS_GetElementById("catalogue_check");var tmpobj=NS_C;while(NS_C){if(NS_C.type=="checkbox"){NS_C.checked=!NS_C.checked;};NS_C.id="catalogue_checked";NS_C=NS_GetElementById("catalogue_check");};NS_C=NS_GetElementById("catalogue_checked");while(NS_C){NS_C.id="catalogue_check";NS_C=NS_GetElementById("catalogue_checked");};if(tmpobj&&tmpobj.onclick){tmpobj.onclick();};};function sendLNG(language){var get="LNGValue=";var l=String(document.location);if(l.FindEx("LNGValue=")){l=replacefromto(l+"&","","LNGValue=","&");l=l.replace("LNGValue=&","");}else{if(l.Find("?")){get="&"+get;}else{get="?"+get;};};reloaddocument(l+get+language);};var ToWindow=new Object();ToWindow.window=null;ToWindow.data="";ToWindow.openwindow=function(w,h,url,full,scroll){var w=openwindow(w,h,url,full,scroll,true);if(this.window!=null){this.window.close();};this.window=w;this.recept=function(){};};ToWindow.send=function(receiver,value){if(receiver&&this.window&&!this.window.closed){this.window.ToWindow.recept(value);};if(!receiver&&opener&&!opener.closed){opener.ToWindow.recept(value);opener.ToWindow.window=null;close();};};ToWindow.beginwork=function(){if(opener&&!opener.closed){opener.ToWindow.send(true,opener.ToWindow.data);};};ToWindow.endwork=function(value){ToWindow.send(false,value);};ToWindow.recept=function(){};NTS=false;MIE=false;OPR=false;FIF=false;CHR=false;var agt=navigator.userAgent.toLowerCase();if(agt.FindEx("opera")){OPR=true;}else if(agt.FindEx("netscape")){NTS=true;}else if(agt.FindEx("msie")){MIE=true;}else if(agt.FindEx("chrome")){CHR=true;}else if(agt.FindEx("firefox")){FIF=true;};function tdovr(NS_E,color){NS_E.bgColor=color;}function tdout(NS_E){NS_E.bgColor='';}function setCookie(name,value,expires,path,code,domain,secure){if(code){value=escape(value);};var curCookie=name+"="+value+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;};function getCookie(name,decode){var dc=document.cookie;var prefix=name+"=";var NS_R=dc.indexOf("; "+prefix);if(NS_R==-1){NS_R=dc.indexOf(prefix);if(NS_R!=0)return null;}else{NS_R+=2;};var end=document.cookie.indexOf(";",NS_R);if(end==-1){end=dc.length;};if(decode){return unescape(dc.substring(NS_R+prefix.length,end));}else{return dc.substring(NS_R+prefix.length,end);};};function deleteCookie(name,path,domain){if(getCookie(name,false)){document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";};};function fixDate(date){var base=new Date(0);var skew=base.getTime();if(skew>0)date.setTime(date.getTime()-skew);};function toclipboard(mode){var NS_W=catalogue_checklist.reverse().join(",");if(NS_W!=""){var NS_G=new Date();fixDate(NS_G);NS_G.setTime(NS_G.getTime()+60*60*1000);setCookie("clipboard",mode+","+phpLANGUAGE+","+NS_W,NS_G,"/",false);document.images["pasteimage"].src="images/catalogue/"+phpTHEME+"/i_paste_0.gif";document.images["pastefullimage"].src="images/catalogue/"+phpTHEME+"/i_pastefull_0.gif";};};function styletoclipboard(NS_E){if(NS_E!=""&&NS_E!=null){var NS_G=new Date();fixDate(NS_G);NS_G.setTime(NS_G.getTime()+60*60*1000);setCookie("styleclipboard",NS_E+","+phpLANGUAGE,NS_G,"/",false);document.images["pastestyleimage"].src="images/catalogue/"+phpTHEME+"/i_pastestyle_0.gif";};};function clearclipboard(){var NS_G=new Date();fixDate(NS_G);NS_G.setTime(NS_G.getTime()+60*60*1000);setCookie("clipboard","",NS_G,"/",false);};function openwindow(w,h,url,full,scroll,returntarget){var NS_E,cx,cy;var wn="window"+Math.round((Math.random())*1000);NS_E="scrollbars=no";if(scroll){NS_E="scrollbars=yes";};if(full){w=screen.availWidth;h=screen.availHeight;cx=0;cy=0;}else{cx=screen.width/2-w/2;cy=screen.height/2-h/2;};neww=window.open(url,wn,"fullscreen=no, width="+w+", height="+h+", "+NS_E+", status=no, toolbar=no, menubar=no, resizable=no, alwaysLowered=yes, top="+cy+", left="+cx);if(returntarget){return neww;};};function reloaddocument(NS_E){document.location=NS_E;};function randomstring(NS_J){var chars="_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var NS_E="";var NS_B;for(NS_B=0;NS_B"+""+phpSTRING016+"
"+""+getalllotsum()+" "+phpBANKNOTE0+"
"+"1 "+phpBANKNOTE1+" = "+phpRATE1+" "+phpBANKNOTE0+"
1 "+phpBANKNOTE2+" = "+phpRATE2+" "+phpBANKNOTE0+"
"+"";NS_X=NS_GetElementById("order");if(getalllotcount()>0&&NS_X!=null){NS_X.innerHTML=content;NS_X.style.display="";NS_X.style.visibility="visible";}else{if(NS_X!=null){NS_X.style.display="none";NS_X.style.visibility="hidden";};};};function smartround(NS_U,NS_K){var NS_B;var NS_E="";for(NS_B=0;NS_B=0){NS_E=NS_E.substring(NS_R+from.length,NS_E.length);end=NS_E.indexOf(to);if(end>=0){return NS_E.substring(0,end);};if(toend){return NS_E;};};return"";};function replacefromto(NS_E,NS_K,from,to){var s1=NS_E;if(from==""||to==""){return"";};NS_R=s1.indexOf(from);if(NS_R>=0){s1=s1.substring(NS_R+from.length,s1.length);end=s1.indexOf(to);if(end>=0){return NS_E.substring(0,NS_R+from.length)+NS_K+s1.substring(end,s1.length);};};return NS_E;};function returnfromtoarray(NS_E,from,to){var a=new Array;var NS_B=0;NS_R=NS_E.indexOf(from);while(NS_R>=0){NS_E=NS_E.substring(NS_R+from.length,NS_E.length);end=NS_E.indexOf(to);if(end>=0){a[NS_B]=NS_E.substring(0,end);NS_E=NS_E.substring(end+to.length,NS_E.length)};NS_B++;NS_R=NS_E.indexOf(from);};return a;};function stringif(NS_H,NS_Q){if(NS_H){return NS_Q;};return"";};function stringif2(NS_H,val1,val2){if(NS_H){return val1;}else{return val2;};};function booltostr(NS_Q){if(NS_Q){return"true";};return"false";};function strtobool(NS_Q){if(NS_Q==null){return false;};NS_Q=NS_Q.toLowerCase();if(NS_Q=="true"||NS_Q=="on"||NS_Q=="yes"||NS_Q=="да"||NS_Q=="истина"||NS_Q=="правда"||NS_Q=="вкл."||Number(NS_Q)>0){return true;};return false;};function inttobool(NS_Q){if($val>0){return true;};return false;};function booltoint(NS_Q){if(NS_Q){return 1;};return 0;};function winclose(){window.close();};var loadbar_height=15;var loadbar_width=300;var loadbar_blocksize=0;var loadbar_imegesloaded=0;var loadbar_imagecount=0;var loadbar_content="";loadbar_content+="


"+phpSTRING015+" ...

";loadbar_content+="
";loadbar_content+="
";loadbar_content+="
";function ImageLoadCheck(NS_J){if(document.images[NS_J].complete||document.images[NS_J].name=="error"){ImageLoadCompletion(NS_J);}else{setTimeout("ImageLoadCheck("+NS_J+")",10);};};function ImageLoadShowDocument(){var NS_W=NS_GetElementById("LoadContent");var NS_L=NS_GetElementById("LoadProgress");NS_L.style.display="none";NS_L.style.visibility="hidden";NS_W.style.display="";NS_W.style.visibility="visible";};function ImageLoadCompletion(NS_J){var t=NS_GetElementById("LoadBarText");var NS_H=NS_GetElementById("LoadBarProgress");var w=Math.round(loadbar_imegesloaded*loadbar_blocksize);loadbar_imegesloaded++;if(loadbar_imegesloaded>=loadbar_imagecount||NS_J==undefined){t.innerHTML=phpSTRING015+" 100%";NS_H.style.width=loadbar_width+"px";setTimeout("ImageLoadShowDocument()",500);}else{t.innerHTML=phpSTRING015+" ("+loadbar_imagecount+"/"+loadbar_imegesloaded+") "+Math.round(loadbar_imegesloaded*100/loadbar_imagecount)+"% ...";NS_H.style.width=w+"px";};};function ImageLoadError(){this.name="error";};function ImageLoadCheckStatus(){if(document.readyState=="complete"){ImageLoadCompletion();}else{setTimeout("ImageLoadCheckStatus()",2000);};};function ImageLoadInit(){var NS_P=String(document.location).lastIndexOf("/");if(NS_P<0){NS_P=String(document.location).length;};var d=String(document.location).substring(0,NS_P+1).toLowerCase();for(NS_J=0;NS_J=0){loadbar_imagecount++;document.images[NS_J].onerror=ImageLoadError;document.images[NS_J].onabort=ImageLoadError;document.images[NS_J].onload=ImageLoadError;setTimeout("ImageLoadCheck("+NS_J+")",loadbar_imagecount*10);};};if(loadbar_imagecount==0){ImageLoadCompletion();return;};setTimeout("ImageLoadCheckStatus()",2000);loadbar_blocksize=loadbar_width/loadbar_imagecount;};function launchupdater(){var u=new Image();u.src="http://localhost/launcher.php";};function SetAlpha(id,alpha){var NS_C=NS_GetElementById(id);if(NS_C){if(MIE){NS_C.style.filter="alpha(opacity="+alpha+")";}else{NS_C.style.opacity=alpha/100;};};};function ShowSpecialRect(NS_C){var NS_P=GetPosition(NS_C);var NS_T=NS_GetElementById("SpecialRectT");if(NS_T){NS_T.style.left=(NS_P.x-7)+"px";NS_T.style.top=(NS_P.y-7)+"px";NS_T.style.width=(NS_C.offsetWidth+14)+"px";NS_T.style.visibility="visible";};var NS_T=NS_GetElementById("SpecialRectB");if(NS_T){NS_T.style.left=(NS_P.x-7)+"px";NS_T.style.top=(NS_P.y+NS_C.offsetHeight)+"px";NS_T.style.width=(NS_C.offsetWidth+14)+"px";NS_T.style.visibility="visible";};};function HideSpecialRect(){var NS_T=NS_GetElementById("SpecialRectT");if(NS_T){NS_T.style.visibility="hidden";};var NS_T=NS_GetElementById("SpecialRectB");if(NS_T){NS_T.style.visibility="hidden";};};function GetPosition(NS_C){var NS_P={x:0,y:0};while(NS_C){NS_P.x+=NS_C.offsetLeft;NS_P.y+=NS_C.offsetTop;NS_C=NS_C.offsetParent;};return NS_P;};function MSWordHTMLClean(NS_D){var NS_P=-1;NS_P=NS_D.search(/]*>/gi,"");NS_P=NS_D.search(/<\/body/i);if(NS_P!=-1){NS_D=NS_D.substr(0,NS_P);};NS_D=NS_D.replace(/]*>/gi,"").replace(/<\/div>/gi,"");NS_D=NS_D.replace(/]*>/gi,"").replace(/<\/o:p>/gi,"");NS_D=NS_D.replace(/class="[^"]*"/gi,"");NS_D=NS_D.replace(/class='[^']*'/gi,"");NS_D=NS_D.replace(/class=[^ >]*/gi,"");NS_D=NS_D.replace(/width="[^"]{1,}"/gi,"");NS_D=NS_D.replace(/width='[^"]{1,}'/gi,"");NS_D=NS_D.replace(/width=[^ >'"]{1,}/gi,"");var patern,NS_L,result,NS_K,style,NS_B;var quote=new Array("'","\"");for(NS_B=0;NS_B]*/gi,"");NS_D=NS_D.replace(//g,">");NS_D=NS_D.replace(/(\n){1,}/g,"").replace(/(\r){1,}/g,"");;NS_D=NS_D.replace(/

 <\/p>/gi," ");NS_D=NS_D.replace(/\s*( ){1}\s*/g," ");NS_D=NS_D.replace(/<\/tr>( )*\r\n( )*

/gi,"");NS_D=NS_D.replace(/>\s*<");NS_D=NS_D.replace(/<\/tr>/gi,"");NS_D=NS_D.replace(//gi,"");NS_D=NS_D.replace(/^(\s*( )*\s*)/g,"");NS_D=NS_D.replace(/(\s*( )*\s*)$/g,"");NS_D=NS_D.replace(/lang="[^"]*"/gi,"");NS_D=NS_D.replace(/lang='[^']*'/gi,"");NS_D=NS_D.replace(/lang=[^ >]*/gi,"");return NS_D;};var NS_RoundSideCss=false;function NS_AddRoundCss(){NS_RoundSideCss=true;var style;if(!MIE){style=document.createElement("STYLE");style.setAttribute("type","text/css");style.setAttribute("media","screen");style.innerHTML="b.NS_RoundSideCorners{display:block;}"+"b.NS_RoundSideFill{display:block;}"+"b.NS_RoundSideCorners *{display:block;height:1px;line-height:1px;font-size:1px;overflow:hidden;border-style:solid;border-width:0 1px;}"+"b.r1{margin:0 3px;border-width:0 2px;}"+"b.r2{margin:0 2px;}"+"b.r3{margin:0 1px;}"+"b.r4{height:2px;}"+"b.rb1{margin:0 8px;border-width:0 2px;}"+"b.rb2{margin:0 6px;border-width:0 2px;}"+"b.rb3{margin:0 5px;}"+"b.rb4{margin:0 4px;}"+"b.rb5{margin:0 3px;}"+"b.rb6{margin:0 2px;}"+"b.rb7{margin:0 1px;height:2px;}"+"b.rb8{margin:0;height:2px;}"+"b.rs1{margin:0 1px;}"+"b.t1{border-width:0 5px;}"+"b.t2{border-width:0 3px;}"+"b.t3{border-width:0 2px;}"+"b.t4{height:2px;}"+"b.tb1{border-width:0 10px;}"+"b.tb2{border-width:0 8px;}"+"b.tb3{border-width:0 6px;}"+"b.tb4{border-width:0 5px;}"+"b.tb5{border-width:0 4px;}"+"b.tb6{border-width:0 3px;}"+"b.tb7{border-width:0 2px;height:2px;}"+"b.tb8{border-width:0 1px;height:2px;}"+"b.ts1{border-width:0 2px;}";document.getElementsByTagName("HEAD")[0].appendChild(style);}else{style=document.createStyleSheet();style.addRule("b.NS_RoundSideCorners","display:block;");style.addRule("b.NS_RoundSideFill","display:block;");style.addRule("b.NS_RoundSideCorners *","display:block;height:1px;line-height:1px;font-size:1px;overflow:hidden;border-style:solid;border-width:0 1px;");style.addRule("b.r1","margin:0 3px;border-width:0 2px;");style.addRule("b.r2","margin:0 2px;");style.addRule("b.r3","margin:0 1px;");style.addRule("b.r4","height:2px;");style.addRule("b.rb1","margin:0 8px;border-width:0 2px;");style.addRule("b.rb2","margin:0 6px;border-width:0 2px;");style.addRule("b.rb3","margin:0 5px;");style.addRule("b.rb4","margin:0 4px;");style.addRule("b.rb5","margin:0 3px;");style.addRule("b.rb6","margin:0 2px;");style.addRule("b.rb7","margin:0 1px;height:2px;");style.addRule("b.rb8","margin:0;height:2px;");style.addRule("b.rs1","margin:0 1px;");style.addRule("b.t1","border-width:0 5px;");style.addRule("b.t2","border-width:0 3px;");style.addRule("b.t3","border-width:0 2px;");style.addRule("b.t4","height:2px;");style.addRule("b.tb1","border-width:0 10px;");style.addRule("b.tb2","border-width:0 8px;");style.addRule("b.tb3","border-width:0 6px;");style.addRule("b.tb4","border-width:0 5px;");style.addRule("b.tb5","border-width:0 4px;");style.addRule("b.tb6","border-width:0 3px;");style.addRule("b.tb7","border-width:0 2px;height:2px;");style.addRule("b.tb8","border-width:0 1px;height:2px;");style.addRule("b.ts1","border-width:0 2px;");};};function NS_RoundSide(id,options){if(!NS_RoundSideCss){NS_AddRoundCss();};if(options==null){options="";};var NS_C=NS_GetElementById(id);while(NS_C){NS_Rounded(NS_C,options);NS_C.id=id+'_tmp';NS_C=NS_GetElementById(id);};NS_C=NS_GetElementById(id+'_tmp');while(NS_C){NS_C.id=id;NS_C=NS_GetElementById(id+'_tmp');};};function NS_Rounded(NS_C,options){var top="";var bottom="";if(options!=""){options=options.replace("left","tl bl");options=options.replace("right","tr br");options=options.replace("top","tr tl");options=options.replace("bottom","br bl");options=options.replace("transparent","alias");if(options.FindEx("tl")){top="both";if(!options.FindEx("tr")){top="left";};}else if(options.FindEx("tr")){top="right";};if(options.FindEx("bl")){bottom="both";if(!options.FindEx("br")){bottom="left";};}else if(options.FindEx("br")){bottom="right";}};if(top==""&&bottom==""&&!options.FindEx("none")){top="both";bottom="both";};if(NS_C.currentStyle!=null&&NS_C.currentStyle.hasLayout!=null&&NS_C.currentStyle.hasLayout==false){NS_C.style.display="inline-block";}if(top!=""){NS_AddTopRound(NS_C,top,options);};if(bottom!=""){NS_AddBottomRound(NS_C,bottom,options);};};function NS_AddTopRound(NS_M,side,options){var NS_H=document.createElement("B");var lim=4;var border="";var btype="r";var NS_L,bk,color;NS_H.style.marginLeft="-"+NS_GetPadding(NS_M,"Left")+"px";NS_H.style.marginRight="-"+NS_GetPadding(NS_M,"Right")+"px";if(options.FindEx("alias")||(color=NS_GetBgColor(NS_M))=="transparent"){color="transparent";bk="transparent";border=NS_GetParentBgColor(NS_M);btype="t";}else{bk=NS_GetParentBgColor(NS_M);border=NS_MixColors(color,bk);};NS_H.style.background=bk;NS_H.className="NS_RoundSideCorners";NS_L=NS_GetPadding(NS_M,"Top");if(options.FindEx("small")){NS_H.style.marginBottom=(NS_L-2)+"px";btype+="s";lim=2;}else if(options.FindEx("big")){NS_H.style.marginBottom=(NS_L-10)+"px";btype+="b";lim=8;}else{NS_H.style.marginBottom=(NS_L-5)+"px";};for(var NS_B=1;NS_B<=lim;NS_B++){NS_H.appendChild(NS_RoundStrip(NS_B,side,color,border,btype));};NS_M.style.paddingTop=0;NS_M.insertBefore(NS_H,NS_M.firstChild);};function NS_AddBottomRound(NS_M,side,options){var NS_H=document.createElement("B");var lim=4;var border="";var btype="r";var NS_L,NS_B,bk,color;NS_H.style.marginLeft="-"+NS_GetPadding(NS_M,"Left")+"px";NS_H.style.marginRight="-"+NS_GetPadding(NS_M,"Right")+"px";if(options.FindEx("alias")||(color=NS_GetBgColor(NS_M))=="transparent"){color="transparent";bk="transparent";border=NS_GetParentBgColor(NS_M);btype="t";}else{bk=NS_GetParentBgColor(NS_M);border=NS_MixColors(color,bk);};NS_H.style.background=bk;NS_H.className="NS_RoundSideCorners";NS_L=NS_GetPadding(NS_M,"Bottom");if(options.FindEx("small")){NS_H.style.marginTop=(NS_L-2)+"px";btype+="s";lim=2;}else if(options.FindEx("big")){NS_H.style.marginTop=(NS_L-10)+"px";btype+="b";lim=8;}else NS_H.style.marginTop=(NS_L-5)+"px";for(NS_B=lim;NS_B>0;NS_B--){NS_H.appendChild(NS_RoundStrip(NS_B,side,color,border,btype));};NS_M.style.paddingBottom=0;NS_M.appendChild(NS_H);};function NS_RoundStrip(index,side,color,border,btype){var NS_H=document.createElement("B");NS_H.className=btype+index;NS_H.style.backgroundColor=color;NS_H.style.borderColor=border;if(side=="left"){NS_H.style.borderRightWidth="0";NS_H.style.marginRight="0";}else if(side=="right"){NS_H.style.borderLeftWidth="0";NS_H.style.marginLeft="0";};return(NS_H);};function NS_GetParentBgColor(NS_C){var NS_M=NS_C.parentNode;var color;while(NS_M.tagName.toUpperCase()!="HTML"&&(color=NS_GetBgColor(NS_M))=="transparent"){NS_M=NS_M.parentNode;};if(color=="transparent"){color="#FFFFFF";};return(color);};function NS_GetBgColor(NS_C){var color=NS_GetStyleProp(NS_C,"backgroundColor");if(color==null||color=="transparent"||color.FindEx("rgba(0, 0, 0, 0)")){return("transparent");};if(color.FindEx("rgb")){color=NS_GetWebColor(color);};return(color);};function NS_GetPadding(NS_C,side){var NS_L=NS_GetStyleProp(NS_C,"padding"+side);if(NS_L==null||!NS_L.FindEx("px")){return(0);};return(parseInt(NS_L));};function NS_GetStyleProp(NS_C,prop){if(NS_C.currentStyle){return(NS_C.currentStyle[prop]);};if(document.defaultView.getComputedStyle){return(document.defaultView.getComputedStyle(NS_C,"")[prop]);};if(NS_C.style){with(NS_C.style){return eval(prop);};};return(null);};function NS_GetWebColor(color){function hex(d){return(d<16)?("0"+d.toString(16)):d.toString(16);};if(!color){return"";};if(color.substr(0,1)=="#"){return color;};if(this.isIE){var NS_K=color&0xFF;var g=(color>>8)&0xFF;var NS_H=(color>>16)&0xFF;return"#"+hex(NS_K)+hex(g)+hex(NS_H);};if(color.substr(0,3)=="rgb"){var re=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/;if(color.match(re)){var NS_K=parseInt(RegExp.$1);var g=parseInt(RegExp.$2);var NS_H=parseInt(RegExp.$3);return"#"+hex(NS_K)+hex(g)+hex(NS_H);};return null;};return null;};function NS_MixColors(c1,c2){var step1,step2,x,y,NS_K=new Array(3);if(c1.length==4){step1=1;}else{step1=2;};if(c2.length==4){step2=1;}else{step2=2;};for(var NS_B=0;NS_B<3;NS_B++){x=parseInt(c1.substr(1+step1*NS_B,step1),16);if(step1==1){x=16*x+x;};y=parseInt(c2.substr(1+step2*NS_B,step2),16);if(step2==1){y=16*y+y;};NS_K[NS_B]=Math.floor((x*50+y*50)/100);NS_K[NS_B]=NS_K[NS_B].toString(16);if(NS_K[NS_B].length==1){NS_K[NS_B]="0"+NS_K[NS_B];};};return("#"+NS_K[0]+NS_K[1]+NS_K[2]);};