var sep=".";function formatCurrency(a){inpValue=a.value;var b=0;b=0;tlVal=inpValue;b=deCommafy(tlVal);if(b.length>9)b=b.substring(0,9);if(isNaN(parseInt(b,10))){a.value="";a.focus()}else{b=parseInt(b,10).toString();a.value=commafy(b)}}function deCommafy(a){if(a!=null){var b=eval("/\\"+sep+"/g");return a.replace(b,"")}}function commafy(a){for(var b=/(\d+)(\d{3})/;b.test(a);)a=eval("inpValue.replace(re,'$1"+sep+"$2')");return a}
function PopWin(a){a=a.replace("normal","big");popImage(a,"Images","middle_center",true,false);return false}function openWindow(a,b,c){window.open(a,b,c)}function clickclear(a,b){if(a.value==b)a.value=""}function clickrecall(a,b){if(a.value=="")a.value=b}function getLang(a){document.frmLang.ChangeLang.value=a;document.frmLang.submit()}function selectOptionLoading(){return"<option value='-1'>"+AllLoading+"</option>"}function selectOptionDefault(){return"<option value='-1'>"+All+"</option>"}
function selectOptionDefaultSelect(){return"<option value='-1'>"+Selected+"</option>"}function ajaxError(a){alert(a)}
function popImage(a,b,c,e,f){is_safari=navigator.userAgent.toLowerCase().indexOf("safari")!=-1?true:false;safari_version=Number(navigator.userAgent.substring(navigator.userAgent.indexOf("Safari/")+7));if(is_safari&&safari_version<300){var d="top=0, left=0, width="+screen.width+",height="+screen.height+" ,scrollbars=yes";imgWin=window.open(a,"im",d)}else{if(parseInt(navigator.appVersion.charAt(0))>=4){if(navigator.appName=="Netscape"||is_safari){d="width="+screen.width+",height="+screen.height;var i=
"var iWidth=window.innerWidth;iHeight=window.innerHeight",g="0"}if(document.all){d="width=150,height=150";i="var iWidth=document.body.clientWidth;iHeight=document.body.clientHeight;";g=typeof window.opera!="undefined"?"window.outerHeight-24":"32"}}v=c.substring(0,c.indexOf("_"));h=c.substring(c.indexOf("_")+1);d+=",left=0,top=0";imgWin=window.open("about:blank","",d);imDoc=imgWin.document;with(imDoc){writeln("<html><head><title>Loading...</title>");writeln("<script>");writeln('var sdstr="";window.onerror=function(){return true;}');
writeln("function resizeWin(){");writeln('sc=(navigator.userAgent.toLowerCase().indexOf("safari")!=-1)?15:"";');writeln("iW=document.images[0].width;iH=document.images[0].height;sW=screen.availWidth;sH=screen.availHeight;");writeln("if(iW>=sW || iH>=sH){window.resizeTo(sW,sH);window.moveTo(0,0)}else{");writeln(i);writeln('var v="'+v+'";var h="'+h+'";');writeln('switch (v){case "top":vPos=0;break;case "middle":vPos=(sH-iH-'+g+')/2;break;case "bottom":vPos=sH-'+g+"-iH"+(is_safari?"-20":"")+";break;default: vPos=0;}");
writeln('switch (h){case "left":hPos=0;break;case "center":hPos=(sW-iW)/2;break;case "right":hPos=sW-iW'+(is_safari?"-20":"")+";break;default: hPos=0;}");writeln("iWidth = document.images[0].width - iWidth;iHeight = document.images[0].height - iHeight;");writeln("window.resizeBy(iWidth+sc, iHeight+sc);");writeln("window.moveBy(hPos,vPos)}}");writeln('function doTitle(){document.title="'+unescape(b)+'";}<\/script>');b=!e?"":"onBlur=\"sdstr=setTimeout('window.close(this)',1000)\"";e=!e?"":'onfocus="clearTimeout(sdstr)"';
c=is_safari?" onload='resizeWin()'":"";if(f){f=' galleryimg="no" title="Copyright Protected" onmousedown="window.close()" ';d='oncontextmenu="return false" '}else d=f="";writeln('</head><body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="FFFFFF"  onload="'+(!is_safari?"resizeWin();doTitle();":"")+'self.focus()" '+b+" "+e+" "+d+">");writeln("<div "+e+' align="center" style="width:100%;height:100%;overflow:auto"><img src="'+a+'" '+f+c+" ></div></body></html>");close()}}}
function CheckNumberCode(a){ev=document.all?window.event:a;keyCode=document.all?ev.keyCode:ev.which;return keyCode>=48&&keyCode<=57||keyCode==13||keyCode==8||keyCode==9||keyCode==46||keyCode>=96&&keyCode<=105||keyCode==37||keyCode==39?true:false};