/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.5
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2026 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| #        www.vbulletin.com | www.vbulletin.com/license.html        # ||
|| #################################################################### ||
\*======================================================================*/
var drag={on:false,dot:null};var defs={FPSlimiter:10,MaxRedrawRate:200,dotSize:6,wheelMid:{X:190,Y:190},sliderMid:{X:95,Y:95},sliderWidth:140,CBPreview:0};var API={on:false};var SchemeID;$(function(){var B=parseInt($.browser.version,10);if($.browser.msie&&B<7){alert(vbphrase.style_generator_browser_not_supported);return }$("#jscheck").hide();$("a").click(function(){$(this).blur()});$("#model a").click(function(){setScheme(this.id);return false});$("#tab-wheel").click(function(){togglePane("wheel");return false});$("#tab-vars").click(function(){togglePane("vars");return false});$("#wheel,#saturation,#contrast").bind("mousedown",function(I){I.preventDefault();var K=$(this);var J=K.offset();drag.on=true;drag.dW=K.width();drag.dH=K.height();drag.dX=J.left+drag.dW/2;drag.dY=J.top+drag.dH/2;K.bind("mousemove",function(L){L.preventDefault();dragMove(L,this)});if(!drag.dot){dragMove(I,this)}}).bind("mouseup",function(I){I.preventDefault();$(this).unbind("mousemove");drag.on=false;drag.dot=null;updateColorData()});$(".dot").bind("mousedown",function(I){drag.dot=this}).bind("mouseup",function(I){drag.dot=null});$("#dot1").bind("dblclick",enterHue);$("#hue-val").bind("click",enterHue);$("#dot2").bind("dblclick",enterComplHue);$("#dot3").bind("dblclick",enterDist);$("#dist-val").bind("click",enterDist);$("#rgb-val").bind("click",enterRGB);$("#sample-val").bind("dblclick",function(J){var I=prompt(vbphrase.enter_hex)});toggleContrast();$("#tab-light-ps").click(function(){pagePreview("light-ps");return false});$("#tab-light-pt").click(function(){pagePreview("light-pt");return false});$("#tab-grey").click(function(){pagePreview("grey");return false});$("#tab-dark").click(function(){pagePreview("dark");return false});$(document).ready(function(){$("#menu").droppy({speed:100,persist:250})});$("#menu a").click(function(I){I.preventDefault();$(this).blur()});$("#menu-undo").click(function(){History.back();return false});$("#menu-redo").click(function(){History.fwd();return false});$("#menu-export-light-ps").click(function(){exportCols("lps");return false});$("#menu-export-light-pt").click(function(){exportCols("lpt");return false});$("#menu-export-grey").click(function(){exportCols("gry");return false});$("#menu-export-dark").click(function(){exportCols("drk");return false});$("#menu-tooltips").click(function(){useShowTooltips();return false});$("#preview-palette .cbox").click(function(){if($("#tab-vars").hasClass("sel")&&UseManualVars){var I=$(this).attr("rel");var J=I.split("-");J=J[0];$("#manualvars a.ttl").filter(function(){return $(this).attr("rel")==J}).click();$("#manualvars a.col").filter(function(){return $(this).attr("rel")==I}).click()}return false});showTooltips();History.updateMenu();var E=document.location.search.substring(1);if(E){E=E.split("&");var D,A,F,C,H;API.data={};for(D=0,A=E.length;D<A;D++){F=E[D].split("=");C=F[0].toString();H=F[1].toString();API.data[C]=H}if(API.data.returnurl){API.on=true;if(API.data.format!="hex"&&API.data.format!="rgb"){API.data.format="hex"}if(API.data.method!="get"&&API.data.method!="post"){API.data.format="get"}}}var G=document.location.hash.substring(1);if(G){loadScheme(G)}else{usePreset("default");updateScheme();if(Palette.UseVarsOverlay){toggleContrast()}}populatePaletteText("light-ps")});function loadScheme(A){Palette.unserialize(A);updateScheme();if(Palette.UseVarsOverlay){toggleContrast()}}function togglePane(B,A){if(A==undefined){var A=true}if(!$("#tab-"+B).hasClass("sel")){$(".pane").hide();$("#pane-"+B).fadeIn(250);$("#tabs-color a").removeClass("sel");$("#tab-"+B).addClass("sel").blur()}if(B=="wheel"){updateWheel();$("#manualvars a.sel").removeClass("sel");$("#manualvars a#pal-pri-0").addClass("sel")}else{if((B=="vars")&&(A)){updateVars();setOriginalColor()}}}function toggleContrast(A){if(A=="c1"){Palette.resetVarsOverlay()}else{$("#manualvars, #ttl-c2").fadeIn(750);UseManualVars=true}updateVars()}function setScheme(A){Palette.setScheme(A);updateScheme()}function usePreset(B){if(!B){return }var A=Palette.usePreset(B);updateVars()}function useColorBlind(A){defs.CBPreview=A;$("#menu-vision, #colorblind a").removeClass("sel");if(A>0){$("#menu-vision").addClass("sel");$("#colorblind a").eq(A).addClass("sel");$("#cb-warning").show()}else{$("#cb-warning").hide()}colorize()}function useShowTooltips(){var A=!$("#menu-tooltips").hasClass("sel");if(A){showTooltips()}else{hideTooltips()}}var t0;function checkFPS_on(){t0=new Date()}function checkFPS_off(){var A=new Date()-t0;if(A>defs.FPSlimiter){defs.FPSlimiter=A+50}else{if(A<defs.FPSlimiter-50&&defs.FPSlimiter>10){defs.FPSlimiter=A}}$("#fps").text("fps: "+Math.round(1/defs.FPSlimiter*1000))}function updateScheme(){var A=Palette.Scheme;$("#model a").removeClass("sel");$("#"+A).addClass("sel").blur();$("#dot3").css("display",Boolean(Palette.Sec1)?"block":"none");$("#dist-val").css("display",Boolean(Palette.Sec1)?"block":"none");updateWheel();if($("#tab-vars").hasClass("sel")){updateVars()}}function updateWheel(){checkFPS_on();moveDot(1,Palette.Primary);moveDot(3,Palette.Sec1);var A=Palette.Primary.Col[0].RGB;$("#hue-val span").text(Palette.H+"°");$("#rgb-val span").text(A.getHex());$("#rgb-r").html(Math.round(A.R/255*100)+" %");$("#rgb-g").html(Math.round(A.G/255*100)+" %");$("#rgb-b").html(Math.round(A.B/255*100)+" %");$("#dist-val span").text(Palette.Dist+"°");colorize();checkFPS_off()}function updateVars(){if(UseManualVars){updateManualVars()}else{$("#saturation").css("background-color",Palette.Primary.Base.RGB.getCSS());updateContrast()}updateSV()}function updateSV(){checkFPS_on();var A,C;if(UseManualVars){var B=Palette.getVarOverlay(VarSelected[0],VarSelected[1]);A=B[0];C=B[1];A=A-0.5;C=C-0.5;moveSliderDot("#dots,#dotv"+VarSelected[1],A,-C)}else{A=Palette.dS;C=Palette.dV;A=A<0?(A+1)*0.9-0.5:0.4+A*0.1;C=C<0?(C+1)*0.9-0.5:0.4+C*0.1;moveSliderDot("#dots",A,-C)}colorize();checkFPS_off()}function updateContrast(){checkFPS_on();var A=Palette.cL,B=Palette.cS;moveSliderDot("#dotc",A-0.5,0.5-B);colorize();checkFPS_off()}var UseManualVars=false;var VarSelected=[0,0];var ColorHash={pri:0,sec1:1,sec2:2,compl:3};function updateManualVars(){function A(J,I,C){var H,F,D,G='<a class="ttl" rel="'+I+'" href="#"></a>';G+='<div class="var-set" id="">';for(var E=0;E<5;E++){H=J.getVarRGB(E).getHex();F=I+"-"+E;G+='<li><a class="col" id="pal-'+F+'" rel="'+F+'" href="#"><img src="../images/style_generator/e.png" id="cbox-bg-'+F+'" class="cbox bg-'+F+'">';G+='<span id ="info-'+I+"-"+E+'" class="paletteInfo"></span>';G+="</a></li>"}return G}var B='<ul class="palettedisplay">';B+=A(Palette.Primary,"pri","");B+=A(Palette.Sec1,"sec1","");B+="</ul>";$("#manualvars").html(B);$("#manualvars a.ttl").click(function(){var D,C,E=$(this).attr("rel");for(D=0;D<5;D++){C=Palette.getVarOverlay(ColorHash[E],D);moveSliderDot("#dotv"+D,C[0]-0.5,-C[1]+0.5)}if($(this).next(".var-set").hasClass("sel")){return false}$("#manualvars .var-set.sel").removeClass("sel").slideUp("fast");$(this).blur().next(".var-set").addClass("sel").slideDown("fast").find("a.col").eq(0).click();return false});$("#manualvars a.col").mouseenter(function(){var C=$("#preview-palette").find(".bg-"+$(this).attr("rel")).addClass("hilite")}).mouseleave(function(){var C=$("#preview-palette").find(".bg-"+$(this).attr("rel")).removeClass("hilite")}).click(function(){$("#manualvars a.sel").removeClass("sel");$(this).blur().addClass("sel");VarSelected=$(this).attr("rel").split("-");VarSelected[0]=ColorHash[VarSelected[0]];$("#saturation").css("background-color",Palette.getColorByIdx(VarSelected[0]).Base.RGB.getCSS());setOriginalColor();updateSV();return false});$("#manualvars a.ttl").eq(0).click();$("#manualvars a.col").click(function(){togglePane("vars",false)});populatePaletteText($("#tabs-preview a.sel").attr("id").replace(/tab-/g,""))}function exportCols(C){if(check_save_valid!==undefined){if(!check_save_valid()){return false}}function A(H,G,D){var F='"'+G+'":{"ttl":"'+D+'","col":[';for(var E=0;E<5;E++){v=H.getVarRGB(E);code=v.getHex();if(E>0){F+=","}F+='{"hex":"'+code+'","r":'+v.R+',"g":'+v.G+',"b":'+v.B+"}"}F+="]}";return F}var B='{"type":"'+C+'","id":"'+SchemeID+'","scheme":{';B+=A(Palette.Primary,"primary",vbphrase.primary_color);if(Palette.Sec1){B+=","+A(Palette.Sec1,"secondary-a",vbphrase.secondary_color_a)}if(Palette.Compl){B+=","+A(Palette.Compl,"complement",vbphrase.complementary_color)}B+="}}";$("#form").attr("action","template.php?do=stylegenerator&save=true").attr("method","POST").attr("target","_self");$("#form-data").val(B);$("#form").submit()}function pagePreview(A){var B=$("a.selected").attr("id").replace("menu-export-","");$("a.previewtab").removeClass("sel");$("#tab-"+A).addClass("sel").blur();$("a.previewing").removeClass("selected");$("li.savemenu").removeClass("selected");$("#menu-"+A).addClass("selected").blur();$("#menu-export-"+A).addClass("selected").blur();populatePaletteText(A);changePreview(B,A);colorize()}function changePreview(B,G){function A(I){$.each(I,function(J,K){$(J).removeClass(K);$(J).attr("style","")})}function F(I){$.each(I,function(J,K){$(J).addClass(K);$(J).attr("style","background-color:")})}var E={"#previewoverride":"bg-pri-0","#header":"bg-pri-2","#navbar":"bg-pri-2","#navtabs":"bg-sec1-0",".navtab":"bg-sec1-0","#body_wrapper":"bg-pri-3","#forumhead":"bg-pri-1","#subforumdescription":"bg-pri-3","#footer":"bg-pri-2",".mainforum":"col-pri-2",".navlinks":"col-pri-2"};var D={"#previewoverride":"","#header":"bg-pri-1","#navbar":"bg-pri-1","#navtabs":"bg-pri-0",".navtab":"bg-pri-0","#body_wrapper":"","#forumhead":"bg-pri-0","#subforumdescription":"","#footer":"bg-pri-1",".mainforum":"col-pri-0",".navlinks":"col-pri-0"};var C={"#previewoverride":"bg-gy-pri0","#header":"bg-gy-pri0","#navbar":"bg-gy-pri0","#navtabs":"bg-pri-0",".navtab":"bg-pri-0","#popupbody":"bg-gy-sec0","#body_wrapper":"bg-gy-sec0","#forumhead":"bg-pri-0","#subforumdescription":"bg-gy-pri0","#footer":"bg-pri-0 bg-gy-sec0-border",".mainforum":"col-pri-3",".navlinks":"col-pri-3"};var H={"#previewoverride":"bg-dk-pri0","#header":"bg-dk-pri0","#navbar":"bg-dk-pri0","#navtabs":"bg-pri-0",".navtab":"bg-pri-0","#popupbody":"bg-dk-sec0","#body_wrapper":"bg-dk-pri0","#forumhead":"bg-pri-0","#subforumdescription":"bg-dk-pri0","#footer":"bg-pri-0 bg-dk-sec0-border",".mainforum":"col-pri-3",".navlinks":"col-pri-3"};switch(B){case"light-ps":A(E);break;case"light-pt":A(D);break;case"grey":A(C);break;case"dark":A(H);break;default:A(E);A(D);A(C);A(H)}switch(G){case"light-ps":F(E);break;case"light-pt":F(D);break;case"grey":F(C);break;case"dark":F(H);break;default:F(E)}}var LastRefresh=0,RefreshTimerID;function colorize(){var A=new Date().valueOf();var B=A-LastRefresh;if(B<defs.MaxRedrawRate){if(!RefreshTimerID){RefreshTimerID=setTimeout(doColorize,defs.MaxRedrawRate-B)}}else{doColorize()}}function doColorize(){if(RefreshTimerID){clearTimeout(RefreshTimerID)}RefreshTimerID=null;LastRefresh=new Date().valueOf();var F,E;var G,A;$(".bg-pri").css("background-color",Palette.Primary.Base.RGB.getCSS());for(var D=0;D<5;D++){G=Palette.Primary.Col[D];if(Palette.Sec1){A=Palette.Sec1.Col[D]}else{A=Palette.Primary.Col[3]}F=G.RGB;E=A.RGB;if(defs.CBPreview){F="#"+ColorBlind.getHex(F.R,F.G,F.B,defs.CBPreview);E="#"+ColorBlind.getHex(E.R,E.G,E.B,defs.CBPreview)}else{F=F.getCSS();E=E.getCSS()}var C=parseInt($.browser.version,10);if($.browser.msie&&C==7){$("#cbox-bg-pri-"+D).attr("title",rgb2hex(F));$("#cbox-bg-sec1-"+D).attr("title",rgb2hex(E))}$(".col-pri-"+D).css("color",F);$(".col-sec1-"+D).css("color",E);$(".bg-pri-"+D).css("background-color",F).each(function(){this.paletteInfo={col:G,out:F}});$(".bg-sec1-"+D).css("background-color",E).each(function(){this.paletteInfo={col:A,out:E}});$("#currentcolor").css("background-color",$(".var-set .sel img").css("background-color"));$(".brd-pri-"+D).css("border-color",F);$(".brd-sec1-"+D).css("border-color",E)}SchemeID=Palette.serialize();var B=SchemeID;if(B.length>64){B="ID too long to display"}$("#schemeid a").html(B).attr("href",document.location.pathname+"#"+SchemeID);if(!drag.on){updateColorData()}}function updateColorData(){History.add();var A=parseInt($.browser.version,10);if($.browser.msie&&A==7){return }colorTooltips()}var History={List:[],Ptr:-1,add:function(){setOriginalColor();if(this.Ptr<0||this.List[this.Ptr]!=SchemeID){if(this.List.length>this.Ptr+1){this.List=this.List.splice(0,this.Ptr+1)}this.List.push(SchemeID);this.Ptr++;this.updateMenu()}},back:function(){if(this.Ptr<1){return }this.Ptr--;loadScheme(this.List[this.Ptr]);this.updateMenu()},fwd:function(){if(this.Ptr>=this.List.length-1){return }this.Ptr++;loadScheme(this.List[this.Ptr]);this.updateMenu()},updateMenu:function(){if(this.Ptr>0){$("#menu-undo").removeClass("disabled")}else{$("#menu-undo").addClass("disabled")}if(this.Ptr<this.List.length-1){$("#menu-redo").removeClass("disabled")}else{$("#menu-redo").addClass("disabled")}}};var moveTimer=0;function dragMove(B,C){var A=new Date();if(A-moveTimer<defs.FPSlimiter){return false}moveTimer=A;if(C.id=="wheel"){moveOnWheel(B)}else{moveOnSlider(B,C)}}function moveOnWheel(E){var A,H,C,D,G=false,F=false;if(E){A=E.pageX-drag.dX;H=E.pageY-drag.dY;C=Math.round(((Math.atan2(-A,H)*180/Math.PI)+180)%360);D=Math.sqrt(A*A+H*H)}else{G=true,F=true}if(D>60&&D<160){var B="dot1";if(drag.dot){B=drag.dot.id}if(B=="dot1"||B=="dot2"){if(D>125){if(D<135){C=(Math.floor((C-7.5)/15+1)*15)%360}else{C=(Math.floor((C-15)/30+1)*30)%360}}if(B=="dot2"){C=(C+180)%360}G=Palette.setHue(C)}else{if(Palette.Scheme=="m1"&&B=="dot4"){C=(C+180)%360}F=Palette.setDist(C)}}if(G||F){updateWheel()}}function moveOnSlider(F,H){var B=F.pageX-drag.dX;var G=F.pageY-drag.dY;B=B/defs.sliderWidth;G=G/defs.sliderWidth;if(B<-0.5){B=-0.5}if(B>0.5){B=0.5}if(G<-0.5){G=-0.5}if(G>0.5){G=0.5}if(H.id=="saturation"){var E,C;if(UseManualVars){E=B+0.5;C=-G+0.5;Palette.setVarOverlay(VarSelected[0],VarSelected[1],E,C)}else{E=B>0.4?(B-0.4)/0.1:(B+0.5)/0.9-1;G=-G;C=G>0.4?(G-0.4)/0.1:(G+0.5)/0.9-1;Palette.setSV(E,C)}updateSV()}else{if(H.id=="contrast"){var A=B+0.5;var D=0.5-G;Palette.setContrast(D,A);updateContrast()}}}function moveDot(D,A){if(!A){return }var B=A.Col[0].HSV.H;var C=(B-90)/360*2*Math.PI;x=Math.round(defs.wheelMid.X+109*Math.cos(C))-defs.dotSize;y=Math.round(defs.wheelMid.Y+109*Math.sin(C))-defs.dotSize;$("#dot"+D).css("left",x+"px").css("top",y+"px")}function moveSliderDot(B,A,C){A=defs.sliderMid.X+A*defs.sliderWidth-defs.dotSize+1;C=defs.sliderMid.Y+C*defs.sliderWidth-defs.dotSize+3;$(B).css("left",A+"px").css("top",C+"px")}function myPrompt(D,C,E){var A='<div id="prompt"><p>'+D+"</p>";A+='<p class="input"><input id="prompt-input" name="prompt-input" type="text" value="'+C+'"></p>';A+='<p class="submit"><button id="prompt-cancel" class="close-floatbox">'+vbphrase.cancel_js+'</button> <button id="prompt-ok" class="close-floatbox">'+vbphrase.ok_js+"</button></p>";A+="</div>";var B=new $.floatbox({content:A,button:"",fade:false,boxConfig:{position:($.browser.msie)?"absolute":"fixed",zIndex:999,width:"360px",marginLeft:"-180px",height:"auto",top:"33%",left:"50%",backgroundColor:"transparent",display:"none"}});$("#prompt-ok").click(function(){E($("#prompt-input").val())});$("#prompt-input").keypress(function(F){if(F.keyCode==13){$("#prompt-ok").click()}}).focus().select()}function getExpr(s){if(!s){return""}if(s.match(/[0-9\.\+\-\*/ ]+/)){s=eval(s)}return s}function enterHue(){myPrompt(vbphrase.enter_hue+" (0&deg;-360&deg;)",Palette.H,enterHue2)}function enterHue2(A){A=parseInt(getExpr(A),10)%360;if(A>=0&&A<=360){Palette.setHue(A%360);updateWheel()}}function enterComplHue(){myPrompt(vbphrase.enter_complement_hue+" (0&deg;&ndash;360&deg;)",(Palette.H+180)%360,enterComplHue2)}function enterComplHue2(A){A=parseInt(getExpr(A),10)%360;if(A>=0&&A<=360){Palette.setHue((A+180)%360);updateWheel()}}function enterDist(){var B=Palette.SchemeModel.minD,A=Palette.SchemeModel.maxD;myPrompt(vbphrase.enter_distance_angle+" ("+B+"&deg;&ndash;"+A+"&deg;)",Palette.Dist,enterDist2)}function enterDist2(B){var C=Palette.SchemeModel.minD,A=Palette.SchemeModel.maxD;B=Math.abs(parseInt(getExpr(B),10));if(B>=C&&B<=A){Palette.setDistNum(B);updateWheel()}}function enterRGB(){myPrompt(vbphrase.enter_hex_value+" (000000&ndash;FFFFFF)",Palette.Primary.getVarRGB(0).getHex(),enterRGB2)}function enterRGB2(D){if(D&&D.match(/^\s*#?([0-9a-f]{6}|[0-9a-f]{3})\s*$/i)){if(D.length==3){D="#"+D}if(D.length==4){D=D.substr(1,1)+D.substr(1,1)+D.substr(2,1)+D.substr(2,1)+D.substr(3,1)+D.substr(3,1)}if(D.length==6){D="#"+D}D=D.substr(1,6);var F=hex2dec(D.substring(0,2));var E=hex2dec(D.substring(2,4));var A=hex2dec(D.substring(4,6));var C=new RGB(F,E,A);var B=ColorWheel.getColorByRGB(C);Palette.setHSV(B);updateWheel()}}function colorTooltips(){$(".cbox").tooltip({bodyHandler:function(){var C="#"+this.paletteInfo.col.RGB.getHex();var A=this.paletteInfo.out;var B=C;if(defs.CBPreview){B+="<br>(as "+A+")"}return B},showURL:false,delay:500,fade:0,track:true,extraClass:"color",top:15,left:10})}function showTooltips(){$("#menu-tooltips").addClass("sel").html(vbphrase.hide_tooltips);$(".help").tooltip({bodyHandler:function(){return $("#help-"+$(this).attr("id")).html()},showURL:false,delay:500,fade:0,track:true,left:-50})}function hideTooltips(){$("#menu-tooltips").removeClass("sel").html(vbphrase.show_tooltips);$(".help").tooltipOff()}function populatePaletteText(B){switch(B){case"light-ps":var E=palInfoColorPri;var F=palInfoColorSec;break;case"light-pt":var E=palInfoWhitePri;var F=palInfoWhiteSec;break;default:var E=palInfoDarkPri;var F=palInfoDarkSec}for(var D=0;D<5;D++){$("#pal-pri-"+D).parent().css("display",E[D]==""?"none":"");$("#pal-sec1-"+D).parent().css("display",F[D]==""?"none":"");var C=parseInt($.browser.version,10);if($.browser.msie&&C==7){var A=$("#cbox-bg-pri-"+D).css("background-color");var G=rgb2hex(A);$("#cbox-bg-pri-"+D).attr("title",G);$("#cbox-bg-sec1-"+D).attr("title",G)}$("#info-pri-"+D).html(truncate_to_word(E[D],30));$("#info-pri-"+D).attr("title",PHP.unhtmlspecialchars(E[D],true));$("#info-sec1-"+D).html(truncate_to_word(F[D],30));$("#info-sec1-"+D).attr("title",PHP.unhtmlspecialchars(F[D],true))}}function rgb2hex(A){A=A.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!A){return""}return"#"+hex(A[1])+hex(A[2])+hex(A[3])}function hex(A){hexDigits=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");return isNaN(A)?"00":hexDigits[(A-A%16)/16]+hexDigits[A%16]}function setOriginalColor(){$("#originalcolor").css("background-color",$("#manualvars a.sel img").css("background-color"))}function check_save_valid(){title=document.getElementById("form-name");if(title===null){alert(vbphrase.err_order_need_name);return false}if(title.value==""){alert(vbphrase.err_order_need_name);return false}if(title.value.length==0||title.value.length>128||title.value.indexOf("'")!==-1||title.value.indexOf('"')!==-1){alert(vbphrase.err_invalid_name);return false}order=document.getElementById("form-displayorder");if(order===null){alert(vbphrase.err_order_need_order);return false}if(isNaN(parseInt(order.value))){alert(vbphrase.err_order_need_order);return false}if(parseInt(order.value)<=0){alert(vbphrase.err_order_negative);return false}if(parseInt(order.value)>=1000){alert(vbphrase.err_order_too_large);return false}return true};