var localIsDOM=document.getElementById?true:false;var localIsJava=navigator.javaEnabled();var localIsStrict=document.compatMode=="CSS1Compat";var localPlatform=navigator.platform;var localVersion="0";var localBrowser="";var localBFamily="";var isHttps=false;if(window.opera&&localIsDOM){localBFamily=localBrowser="Opera";if(navigator.userAgent.search(/^.*Opera.([\d.]+).*$/)!=-1){localVersion=navigator.userAgent.replace(/^.*Opera.([\d.]+).*$/,"$1")}else{if(window.print){localVersion="6"}else{localVersion="5"}}}else{if(document.all&&document.all.item){localBFamily=localBrowser="MSIE"}}if(navigator.appName=="Netscape"){localBFamily="NC";if(!localIsDOM){localBrowser="Netscape";localVersion=navigator.userAgent.replace(/^.*Mozilla.([\d.]+).*$/,"$1");if(localVersion!=""){localVersion="4"}}else{if(navigator.userAgent.indexOf("Safari")>=0){localBrowser="Safari"}else{if(navigator.userAgent.indexOf("Netscape")>=0){localBrowser="Netscape"}else{if(navigator.userAgent.indexOf("Firefox")>=0){localBrowser="Firefox"}else{localBrowser="Mozilla"}}}}}if(navigator.userAgent.indexOf("MSMSGS")>=0){localBrowser="WMessenger"}else{if(navigator.userAgent.indexOf("e2dk")>=0){localBrowser="Edonkey"}else{if(navigator.userAgent.indexOf("Gnutella")+navigator.userAgent.indexOf("Gnucleus")>=0){localBrowser="Gnutella"}else{if(navigator.userAgent.indexOf("KazaaClient")>=0){localBrowser="Kazaa"}}}}if(localVersion=="0"&&localBrowser!=""){var rg=new RegExp("^.*"+localBrowser+".([\\d.]+).*$");localVersion=navigator.userAgent.replace(rg,"$1")}var localIsCookie=((localBrowser=="Netscape"&&localVersion=="4")?(document.cookie!=""):navigator.cookieEnabled);if(document.location.protocol=="https:"){isHttps=true}function change_antibot_image(B){var A=document.getElementById(B);if(A){A.src=xcart_web_dir+"/antibot_image.php?tmp="+Math.random()+"&section="+B+"&regenerate=Y"}}function getElementsByClassName(E){var A=new Array();var C=document.getElementsByTagName("*");for(var B,D=0;(elem=C[D]);D++){if(elem.className==E){A[A.length]=elem}}return A}function visibleBox(D,B){elm1=document.getElementById("open"+D);elm2=document.getElementById("close"+D);elm3=document.getElementById("box"+D);if(!elm3){return false}if(B){elm3.style.display=(elm3.style.display=="")?"none":""}else{if(elm1){if(elm1.style.display==""){elm1.style.display="none";if(elm2){elm2.style.display=""}elm3.style.display="none";var A=getElementsByClassName("DialogBox");for(var C=0;C<A.length;C++){A[C].style.height="1%"}}else{elm1.style.display="";if(elm2){elm2.style.display="none"}elm3.style.display=""}}}}function urlEncode(A){return A.replace(/\s/g,"+").replace(/&/,"&amp;").replace(/"/,"&quot;")}function round(B,A){if(isNaN(B)){B=parseFloat(B)}if(!A||isNaN(A)){return Math.round(B)}A=Math.pow(10,A);return Math.round(B*A)/A}function price_format(F,D,G,B){var D=(arguments.length>1&&D!==false)?D:number_format_th;var G=(arguments.length>2&&G!==false)?G:number_format_dec;var B=(arguments.length>3&&B!==false)?B:number_format_point;if(B>0){B=Math.pow(10,B);F=Math.round(F*B)/B;var H=Math.floor(F);var C=Math.round((F-H)*B)+B}else{var H=Math.round(F);var C=0}H=H+"";C=C+"";var E=0;for(var A=H.length;A>=0;A--){if(E%3==0&&E>0&&A>0){H=H.substr(0,A)+D+H.substr(A,H.length)}E++}return(C>0)?(H+G+C.substr(1,C.length)):H}function substitute(C){var A,B;for(A=1;A<arguments.length;A+=2){if(arguments[A]&&arguments[A+1]){B=new RegExp("\\{\\{"+arguments[A]+"\\}\\}","gi");C=C.replace(B,arguments[A+1]);B=new RegExp("~~"+arguments[A]+"~~","gi");C=C.replace(B,arguments[A+1])}}return C}function getWindowOutWidth(A){if(!A){A=window}if(localBFamily=="MSIE"){return A.document.body.clientWidth}else{return A.outerWidth}}function getWindowOutHeight(A){if(!A){A=window}if(localBFamily=="MSIE"){return A.document.body.clientHeight}else{return A.outerHeight}}function getWindowWidth(A){if(!A){A=window}if(localBFamily=="MSIE"){return A.document.body.clientWidth}else{return A.innerWidth}}function getWindowHeight(A){if(!A){A=window}if(localBFamily=="MSIE"){return A.document.body.clientHeight}else{return A.innerHeight}}function getDocumentHeight(A){if(!A){A=window}if(localBFamily=="MSIE"||(localBFamily=="Opera"&&localVersion>=7&&localVersion<8)){return isStrict?A.document.documentElement.scrollHeight:A.document.body.scrollHeight}if(localBFamily=="NC"){return A.document.height}if(localBFamily=="Opera"){return A.document.body.style.pixelHeight}}function getDocumentWidth(A){if(!A){A=window}if(localBFamily=="MSIE"||(localBFamily=="Opera"&&localVersion>=7&&localVersion<8)){return isStrict?A.document.documentElement.scrollWidth:A.document.body.scrollWidth}if(localBFamily=="NC"){return A.document.width}if(localBFamily=="Opera"){return A.document.body.style.pixelWidth}}function expandWindowX(B,E,A){if(!B){B=window}if(!E){E=10}var D=true;var C=200;while(D&&C--){if(A&&getWindowOutWidth()+E>A){break}try{B.scrollTo(E,0);D=(B.document.documentElement&&B.document.documentElement.scrollLeft>0)||(B.document.body&&B.document.body.scrollLeft>0);if(D){B.resizeBy(E,0)}}catch(F){return false}}return true}function expandWindowY(B,E,A){if(!B){B=window}if(!E){E=10}var D=true;var C=200;while(D&&C--){if(A&&getWindowOutHeight()+E>A){break}try{B.scrollTo(0,E);D=(B.document.documentElement&&B.document.documentElement.scrollTop>0)||(B.document.body&&B.document.body.scrollTop>0);if(D){B.resizeBy(0,E)}}catch(F){return false}}return true}function checkMarks(D,C,E){var B=false;if(D.elements.length==0){return true}for(var A=0;A<D.elements.length;A++){if(D.elements[A].name.search(C)==0&&D.elements[A].type=="checkbox"&&!D.elements[A].disabled){B=true;if(D.elements[A].checked){return true}}}if(!B){return true}else{if(E){alert(E)}else{if(lbl_no_items_have_been_selected){alert(lbl_no_items_have_been_selected)}}}return false}function submitForm(A,B){if(!A){return false}if(A.tagName!="FORM"){if(!A.form){return false}A=A.form}if(A.mode){A.mode.value=B}A.submit()}function sleep(A){var B=new Date().getTime()+A;while(B>=new Date().getTime()){}}function convert_number(A){var B=new RegExp(reg_quote(number_format_dec),"gi");var D=new RegExp(reg_quote(number_format_th),"gi");var C=Math.pow(10,parseInt(number_format_point));A=parseFloat(A.replace(" ","").replace(D,"").replace(B,"."));return Math.round(A*C)/C}function check_is_number(A){var B=new RegExp(reg_quote(number_format_dec),"gi");var C=new RegExp(reg_quote(number_format_th),"gi");A=A.replace(" ","").replace(C,"").replace(B,".");return(A.search(/^[0-9]+(\.[0-9]+)?$/)!=-1)}function reg_quote(A){return A.replace(/\./g,"\\.").replace(/\//g,"\\/").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")}function createCookie(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"}function readCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null}function eraseCookie(A){createCookie(A,"",-1)}function setCookie(C,D,F,B){if(typeof(B)=="object"){try{var G=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];if(G[B.getDay()]&&A[B.getMonth()]){B=G[B.getDay()]+" "+B.getDate()+"-"+A[B.getMonth()]+"-"+B.getFullYear()+" "+B.getHours()+":"+B.getMinutes()+":"+B.getSeconds()+" GMT"}}catch(E){}}if(typeof(B)!="string"){B=false}document.cookie=C+"="+escape(D)+(B?"; expires="+B:"")+(F?"; path="+F:"")}function deleteCookie(A){document.cookie=A+"=0; expires=Fri, 31 Dec 1999 23:59:59 GMT;"}function cloneObject(C){var B={};for(var A in C){B[A]=C[A]}return B}function getFirstCB(C,B){while(C.tagName&&C.tagName.toUpperCase()!="FORM"){C=C.parentNode}if(!C.tagName||C.tagName.toUpperCase()!="FORM"||C.elements.length==0){return false}var D=false;for(var A=0;A<C.elements.length;A++){if(C.elements[A].name.search(B)==0&&C.elements[A].type=="checkbox"&&!C.elements[A].disabled&&C.elements[A].checked){D=C.elements[A];break}}if(!D){if(lbl_no_items_have_been_selected){alert(lbl_no_items_have_been_selected)}return false}return D}function _getById(C){if(typeof(C)!="string"||!C){return false}var B=document.getElementById(C);if(B&&B.id!=C){B=false;for(var A=0;A<document.all.length&&B===false;A++){if(document.all[A].id==C){B=document.all[A]}}}return B}function isset(A){return typeof(A)!="undefined"&&A!==null}function isFunction(A){return(typeof(A)=="function"||(typeof(A)=="object"&&(A+"").search(/\s*function /)===0))};