isMac=(navigator.appVersion.indexOf("Mac")!=-1)?true:false;NS4=(document.layers)?true:false;IEmac=((document.all)&&(isMac))?true:false;IE4plus=(document.all)?true:false;IE4=((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1))?true:false;IE5=((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1))?true:false;ver4=(NS4||IE4plus)?true:false;NS6=(!document.layers)&&(navigator.userAgent.indexOf("Netscape")!=-1)?true:false;var gSafeOnload=new Array();function SafeAddOnload(A){if(IEmac&&IE4){window.onload=SafeOnload;gSafeOnload[gSafeOnload.length]=A}else{if(window.onload){if(window.onload!=SafeOnload){gSafeOnload[0]=window.onload;window.onload=SafeOnload}gSafeOnload[gSafeOnload.length]=A}else{window.onload=A}}}function SafeOnload(){for(var A=0;A<gSafeOnload.length;A++){gSafeOnload[A]()}}var ENV=new function(){this.bDebugging=true;this.Warning=function(A){if(this.bDebugging){alert(" [base.JS]:"+A)}return(this.bDebugging?false:true)}};function $(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}function jd(A,B){DebugUtils.jdebug(A,B)}function jdo(A,B){DebugUtils.jdebugObject(A,B)}var EventTypes={focus:"focus",blur:"blur",click:"click",dblclick:"dblclick",keypress:"keypress",keydown:"keydown",keyup:"keyup",onmousedown:"onmousedown",onmousemove:"onmousemove",onmouseout:"onmouseout",onmouseover:"onmouseover",onmouseup:"onmouseup",onresize:"onresize"};var EventCache=function(){var A=[];return{listEvents:A,add:function(B,D,C){A.push(arguments)},flush:function(){var B,C;for(B=A.length-1;B>=0;B=B-1){C=A[B];if(C[0].removeEventListener){C[0].removeEventListener(C[1],C[2],C[3])}if(C[1].substring(0,2)!="on"){C[1]="on"+C[1]}if(C[0].detachEvent){C[0].detachEvent(C[1],C[2])}C[0][C[1]]=null}}}}();function getFunctionName(A){var B=String(A);B=B.replace("function","");B=B.replace(/\((.|\n)*$/,"");B=B.replace(/^\s*|\s*$/g,"");return B}function returnFalse(){return false}function returnTrue(){return true}var EventUtils=new function(){this.generalEventList={};this.registerGeneralEvent=function(C,D,B){var A=this.generalEventList[C];if(!A){A=this.generalEventList[C]=new Array()}if(B==undefined){B=100}this.generalEventList[C].push(new Array(D,B,getFunctionName(D)))};this.fixEvent=function(A){A.preventDefault=EventUtils.fixEvent.preventDefault;A.stopPropagation=EventUtils.fixEvent.stopPropagation;return A};this.fixEvent.preventDefault=function(){this.returnValue=false};this.fixEvent.stopPropagation=function(){this.cancelBubble=true};this.stopEvent=function(A){if(typeof A.stopPropagation!="undefined"){A.stopPropagation()}else{A.cancelBubble=true}};this.addEvent=function(C,E,D,B){if(!C.events){C.events={}}var A=C.events[E];var F="";if(!A){A=C.events[E]=new Array();var G=C["on"+E];if(G){A.push(new Array(G,101,getFunctionName(G)));F="#inline:"+G+"#";C.events_debug+="on"+E+":"+F+"; "}}if(D){if(!B){B=100}A.push(new Array(D,B,getFunctionName(D)))}C["on"+E]=this.handleEvent;if(!C.events_debug){C.events_debug=""}if(D){F=getFunctionName(D)}else{F="#GeneralEventHandler()#"}C.events_debug+="on"+E+":"+F+"; "};this.removeEvent=function(C,E,D){var A;if(this.events&&this.events["on"+E]){D=this.events["on"+E]}if(A){for(var B=0;B<A.length;B++){if(A[B][2]==getFunctionName(A)){delete A[B]}}}};this.isGeneralEventHandler=function(A){return getFunctionName(A)=="generalEventHandler"};this.mergeEventList=function(A,D){var C=new Array();for(var B in A){C.push(A[B])}for(var B in D){C.push(D[B])}return C};this.sortEvent=function(B,A){var D,C;if(B.sort&&B.length>1){D=B[1]}else{D=100}if(A.sort&&A.length>1){C=A[1]}else{C=100}return C-D};this.handleEvent=function(E){var D;E=E||EventUtils.fixEvent(window.event);var A=EventUtils.mergeEventList(this.events[E.type],EventUtils.generalEventList[E.type]);A.sort(EventUtils.sortEvent);for(var C in A){this.$$handleEvent=A[C][0];if(ENV.bDebugging){if(this.$$handleEvent){if(this.$$handleEvent(E)===false){return false}}}else{try{if(this.$$handleEvent(E)===false){return false}}catch(B){}}}return D};this.getSrcElement=function(A){return A.srcElement?A.srcElement:A.target};this.getKeyCode=function(B){var A;if(!B){var B=window.event}if(B.keyCode){A=B.keyCode}else{if(B.which){A=B.which}}return A};this.getCharCode=function(A){return String.fromCharCode(this.getKeyCode(A))}};function generalEventHandler__depreciated(G,F){function C(J){for(D=0;D<J.length;D++){if(J[D][2]>=100){return D}}}var D,B,A;var I,E;if(!F){I=0;E=registerGeneralEvent.generalEventList.length}else{if(F<0){I=0;E=C(registerGeneralEvent.generalEventList)}else{I=C(registerGeneralEvent.generalEventList);E=registerGeneralEvent.generalEventList.length}}for(D=I;D<E;D++){B=registerGeneralEvent.generalEventList[D];if(B&&B[0]==G.type){try{if(B[1](G)===false){A=false}}catch(H){}}}return A}var EventUtils__depreciated=new function(){this.addEvent=function(C,A,B){if(!C){ENV.Warning("EventUtils : Cannot attach event to non-exist object : "+C);return }if(C.addEventListener){C.addEventListener(A,B,false);EventCache.add(C,A,B)}else{if(C.attachEvent){C["e"+A+B]=B;C[A+B]=function(){C["e"+A+B](window.event)};C.attachEvent("on"+A,C[A+B]);EventCache.add(C,A,B)}else{C["on"+A]=C["e"+A+B]}}};this.getSrcElement=function(A){return A.srcElement?A.srcElement:A.target};this.getKeyCode=function(B){var A;if(!B){var B=window.event}if(B.keyCode){A=B.keyCode}else{if(B.which){A=B.which}}return A};this.getCharCode=function(A){return String.fromCharCode(this.getKeyCode(A))}};var CursorUtils=new function(){this.positionCursor=function(C,A){var B=C.createTextRange();B.collapse(true);B.moveStart("character",A);B.select()};this.positionCursorAtStart=function(B){var A=B.createTextRange();A.collapse(true);A.select()};this.positionCursorAtEnd=function(B){var A=B.createTextRange();A.collapse(false);A.select()};this.highlightToEnd=function(A,B){highlight(A,B,A.value.length)};this.highlight=function(B,D,C){var A=B.createTextRange();A.collapse(true);A.moveStart("character",D);A.moveEnd("character",C);A.select()}};var FormUtils=new function(){this.focusFirstElement=function(D){if(D&&D.elements){for(var C=0;C<D.elements.length;C++){var A=false;var B=D.elements[C];if(((B.type=="select-one")||(B.type=="text")||(B.type=="textarea")||(B.type=="select"))){try{if(B.focus){B.focus()}A=true}catch(E){A=false}if(A){return }}}}};this.IsFocusableField=function(C){var A;try{A=C.type}catch(B){}return A&&((A=="text")||(A=="textarea")||(A=="checkbox")||(A=="radio")||(A=="select-one")||(A=="select-multiple"))};this.GetNextFocusableElement=function(A){return FormUtils.GetNextFocusableElementEx(A,A.form.elements)};this.GetNextFocusableElementEx=function(B,E){var A=FormUtils.CountFormElements(E);var D=FormUtils.IndexOf(B,E,A);for(;D<A;D++){var C=E[D];if(FormUtils.IsFocusableField(C)){return C}}return null};this.CountFormElements=function(B){var A=0;for(var C in B){A++}return A};this.IndexOf=function(B,E,A){if(B==null){return 0}for(var D=0;D<A;D++){var F=E[D];if(B==F){var C=D+1;for(;C<A;C++){if(FormUtils.IsFocusableField(E[C])&&F.name!=E[C].name){return C}}return C}}return D};this.PlaceFocusInForm=function(A){var C=FormUtils.GetNextFocusableElementEx(null,A);if(C&&(C.ty!="select-one")&&(C.ty!="select-multiple")){try{C.focus()}catch(B){}}};this.FocusInFirstForm=function(){if(document.dbfrm){FormUtils.PlaceFocusInForm(document.dbfrm.elements);return true}else{if(document.forms.length>0){FormUtils.PlaceFocusInForm(document.forms[0].elements);return true}}return false};this.FocusNextElement=function(C){var B=C;if(FormUtils.IsFocusableField(B)){var A=false;while((!A)&&B){try{B=FormUtils.GetNextFocusableElement(B);B.focus();A=true}catch(D){A=false}}}};this.submitPostData=function(C,E,F){DOMUtils.addFormIfNotExist("submitHelperForm","post",E,F);$("submitHelperForm").innerHTML="";var A=C.split("&");for(var D=0;D<A.length;D++){var B=A[D].split("=");DOMUtils.addInputIfNotExist(B[0],"submitHelperForm","hidden");$(B[0]).setAttribute("value",B[1])}$("submitHelperForm").submit();return false}};var FieldUtils={visible:function(A){A=$(A);return A.style.display!="none"},clear:function(){for(var A=0;A<arguments.length;A++){$(arguments[A]).value=""}},focus:function(B){for(var A=0;A<arguments.length;A++){var B=$(arguments[A])}if(B){if(B.style.display!="none"){B.focus()}}},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){A=$(A);A.focus();if(A.select){A.select()}}};var WindowUtils=new function(){this.popUp=function(C,B,A,F,H,E){var G,D;G=null;if(H=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-A)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-F)-75)):100}else{if(H=="center"){myleft=(screen.width)?(screen.width-A)/2:100;mytop=(screen.height)?(screen.height-F)/2:100}else{if((H!="center"&&H!="random")||H==null){myleft=0;mytop=20}}}if(E.length==0){E="scrollbars=yes,location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes"}D="width="+A+",height="+F+",top="+mytop+",left="+myleft+E;G=window.open(C,B,D);if(G){G.focus()}};this.maxWindow=function(){top.window.moveTo(0,0);if(document.all){top.window.resizeTo(screen.availWidth,screen.availHeight)}else{if(document.layers||document.getElementById){if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){top.window.outerHeight=screen.availHeight;top.window.outerWidth=screen.availWidth}}}};this.findMaxSize=function(){if(typeof (window.pageXOffset)=="number"){var A=window.pageXOffset,D=window.pageYOffset}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){var A=document.documentElement.scrollLeft,D=document.documentElement.scrollTop}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){var A=document.body.scrollLeft,D=document.body.scrollTop}else{var A=0,D=0}}}if(window.innerWidth){var B=window.innerWidth,C=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientWidth){var B=document.documentElement.clientWidth,C=document.documentElement.clientHeight}else{if(document.body&&document.body.clientWidth){var B=document.body.clientWidth,C=document.body.clientHeight}else{var B=400,C=400}}}if(window.opera||(navigator.product=="Gecko"&&navigator.taintEnabled)){B-=16}if(!window.ActiveXObject&&!navigator.taintEnabled){C-=4}return[A,D,B,C]}};var LayerUtils=new function(){this.moveAtCenter=function(C){var B,E,D,A;D=parseFloat(C.style.width||0);A=parseFloat(C.style.height||0);B=(screen.width)?(screen.width-D)/2:100;E=(screen.height)?(screen.height-A)/5:20;B=B+document.body.scrollLeft;E=E+document.body.scrollTop;C.style.left=B+"px";C.style.top=E+"px";C.style.width=D+"px";C.style.height=A+"px"};this.showAtCenter=function(A){this.moveAtCenter(A);this.show(A)};this.visible=function(A){return A.style.display!="none"};this.toggle=function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);if(this.visible(A)){this.hide(A)}else{this.show(A)}}};this.hide=function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.visibility="hidden";A.style.display="none"}};this.show=function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.visibility="visible";A.style.display=""}};this.showAtCursor=function(E,G,H,F){var D=G;var C=H;var B=((document.getElementById&&!document.all))?F.pageX:event.x+this.ietruebody().scrollLeft;var A=((document.getElementById&&!document.all))?F.pageY:event.y+this.ietruebody().scrollTop;E.style.left=B+D+"px";E.style.top=A+C+"px";E.style.visibility="visible";E.style.display="inline"};this.ietruebody=function(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}};var DOMUtils=new function(){this.getAllElements=function(B){function A(D,G,F){if(!D){return }if(G.length>50){return }if(F<0){return }try{if(D.name||D.id){G.push(D)}if(D.children&&D.children.length>0){for(var C in D.children){A(D.children[C],G,F-1)}}}catch(E){jd("error when get elements into array @ 78",E.description)}}array=new Array();A(B,array,3);return array};this.addDivIfNotExist=function(B,A,C){var E=document.getElementById(B);if(!E){E=document.createElement("DIV");E.id=B;var D;if(A&&$(A)){D=$(A)}else{D=document.body}if(C){D.appendChild(E)}else{D.insertBefore(E,D.firstChild)}}};this.addInputIfNotExist=function(A,B,C){if($(A)&&$(A).tagName=="INPUT"){}else{if($(B)){var D=B+"_dynamicInputDiv";if(!C){C="hidden"}this.addDivIfNotExist(D,B,true);$(D).innerHTML+="<input type="+C+" name='"+A+"' id='"+A+"'>"}else{alert("Fatal error: try to add hidden input, form object not found")}}};this.addFormIfNotExist=function(A,E,C,D){if(!$(A)){var B=A+"_dynamicFormDiv";this.addDivIfNotExist(B,document.body,true);$(B).innerHTML+="<form method=post name="+A+" id="+A+"></form>"}if(C){$(A).action=C}if(D){$(A).target=D}if(E){$(A).method=E}}};var StringUtils=new function(){this.nl2br=function(A){A=A.replace(/\n/g,"<br>");return A};this.escapeHTML=function(B){var C=document.createElement("div");var A=document.createTextNode(B);C.appendChild(A);return C.innerHTML};this.trim=function(A){return A.replace(/^\s*|\s*$/g,"")};this.updateOrderByField=function(C,B){var D=$(C);if(!D){return false}B='"'+B+'"';var A;if(D.value.indexOf(B)>=0){if(D.value.indexOf(B+" asc")>=0){D.value=D.value.replace(", "+B+" asc","");D.value=D.value.replace(B+" asc,","");D.value=D.value.replace(B+" asc","");A=B+" desc"}else{if(D.value.indexOf(B+" desc")>=0){D.value=D.value.replace(", "+B+" desc","");D.value=D.value.replace(B+" desc,","");D.value=D.value.replace(B+" desc","");A=B+" asc"}}}else{A=B+" asc"}if(Trim(D.value).length>0){D.value=D.value+", "+A}else{D.value=A}};this.CheckPassword=function(D,B){var C=document.getElementById(B);var A=document.getElementById(D);if(!A){return this.TestPassword(null,C.value)}if((C)&&(A)){return this.TestPassword(A.value,C.value)}return true};this.TestPassword=function(D,A){var B=true;var C="";if(D){if(A.indexOf(D)>=0){B=false;C+="Your password cannot contain the username. \r\n"}}if(A.length<8){B=false;C+="Your password is too short. \r\n"}if(!A.match(/\d+/)){B=false;C+="Your password should contain number(s). \r\n"}if(!A.match(/[A-Za-z]/)){B=false;C+="Your password should contain letter(s). \r\n"}if(!B){alert("Your password is too weak. \r\n"+C)}return B}};var CreditCardUtils=new function(){this.isValidCardNumber=function(E){var D=0;var C=0;var A=false;for(n=E.length-1;n>=0;n--){var B=E.charAt(n);if(CreditCardUtils.isDigit(B)){var C=parseInt(B,10);if(A){if((C*=2)>9){C-=9}}D+=C;A=!A}else{if(B!=" "&&B!="."&&B!="-"){return false}}}return(D%10)==0};this.isDigit=function(B){var A="1234567890";return(A.indexOf(B)!=-1)};this.isCardTypeCorrect=function(C,A){var B=0;for(n=0;n<C.length;n++){if(CreditCardUtils.isDigit(C.substring(n,n+1))){++B}}if(A=="Visa"){return((C.substring(0,1)=="4")&&(B==13||B==16))}else{if(A=="Amex"){return((C.substring(0,2)=="34"||C.substring(0,2)=="37")&&(B==15))}else{if(A=="Master"){return((C.substring(0,2)=="51"||C.substring(0,2)=="52"||C.substring(0,2)=="53"||C.substring(0,2)=="54"||C.substring(0,2)=="55")&&(B==16))}else{return false}}}}};var PositionUtils=new function(){this.getPosition=function(B){var E=B;var C=E.offsetLeft;var D=E.offsetTop;var A=E.offsetParent;while(A!=null){if(A.tagName=="TD"){C+=A.clientLeft;D+=A.clientTop}C+=A.offsetLeft;D+=A.offsetTop;if(A.scrollTop&&A.tagName!="BODY"){D-=A.scrollTop}if(A.scrollLeft&&A.tagName!="BODY"){C-=A.scrollLeft}A=A.offsetParent}return[D,C]};this.realOffset=function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]};this.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]};this.positionedOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent;if(B){p=Element.getStyle(B,"position");if(p=="relative"||p=="absolute"){break}}}while(B);return[C,A]};this.offsetParent=function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body}};MTGXML=new function(){this.getFirstNode=function(C,B){var A=new Array();for(var D=0;D<C.childNodes.length;D++){var E=C.childNodes[D];if(E.tagName==B){return E}}return null};this.getFirstNodeData=function(B,A){var C=this.getFirstNode(B,A);if(C){return this.nodeValue(C)}return""};this.getNodes=function(C,B){var A=new Array();for(var D=0;D<C.childNodes.length;D++){var E=C.childNodes[D];if(E.tagName==B){A.push(E)}}return A};this.nodeValue=function(A){if(A.firstChild){return A.firstChild.data}else{return A.nodeValue}};this.newDocument=function(B,A){if(!B){B=""}if(!A){A=""}if(document.implementation&&document.implementation.createDocument){return document.implementation.createDocument(A,B,null)}else{var F=new ActiveXObject("MSXML2.DOMDocument");if(B){var D="";var C=B;var E=B.indexOf(":");if(E!=-1){D=B.substring(0,E);C=B.substring(E+1)}if(A){if(!D){D="a0"}}else{D=""}var G="<"+(D?(D+":"):"")+C+(A?(" xmlns:"+D+'="'+A+'"'):"")+"/>";F.loadXML(G)}return F}};this.load=function(B){var A=this.newDocument();A.async=false;A.load(B);return A};this.loadAsync=function(B,C){var A=this.newDocument();if(document.implementation&&document.implementation.createDocument){A.onload=function(){C(A)}}else{A.onreadystatechange=function(){if(A.readyState==4){C(A)}}}A.load(B)};this.parse=function(D){if(typeof DOMParser!="undefined"){return(new DOMParser()).parseFromString(D,"application/xml")}else{if(typeof ActiveXObject!="undefined"){var C=this.newDocument();C.loadXML(D);return C}else{var A="data:text/xml;charset=utf-8,"+encodeURIComponent(D);var B=new XMLHttpRequest();B.open("GET",A,false);B.send(null);return B.responseXML}}};this.getDataIsland=function(D){var B;B=this.getDataIsland.cache[D];if(B){return B}B=document.getElementById(D);var A=B.getAttribute("src");if(A){B=this.load(A)}else{if(!B.documentElement){var C=B.firstChild;while(C!=null){if(C.nodeType==1){break}C=C.nextSibling}B=this.newDocument();if(C){B.appendChild(B.importNode(C,true))}}}this.getDataIsland.cache[D]=B;return B};this.getDataIsland.cache={}};var DebugUtils=new function(){this.jdebug=function(D,H){if(!ENV.bDebugging){return }var J="JDebugDiv";DOMUtils.addDivIfNotExist(J);var F=document.getElementById(J);var C=document.getElementById("debugTable");if(C==undefined){F.innerHTML+="<table id=debugTable width=100% border=1 bordercolor=blue cellspacing=0></table>";C=document.getElementById("debugTable")}var L=C.insertRow(C.rows.length);var K=L.insertCell(0);var I=L.insertCell(1);var G=L.insertCell(2);K.width="10%";I.width="20%";G.width="30%";K.innerHTML="JDEBUG";try{I.innerHTML=D;if(typeof H=="object"){G.innerHTML=A(H)}else{G.innerHTML=StringUtils.escapeHTML(H)}}catch(E){G.innerHTML="<font color = red>Error in jdebug:"+E.message+"</font>"}};this.jdebugObject=function(C,E){var D="";for(property in E){D=D+" ["+property+"]"}this.jdebug(C,D)};function B(D,C){var E="";if(C!=undefined){if(C.tagName){E+=" [ "+D+" ] ";E+="Current Tag Name: <font color=green>"+C.tagName+"</font><br>";if(C.id){E+=" id => <font color=red>"+C.id+"</font>"}if(C.name){E+=" name => <font color=green>"+C.name+"</font>"}if(C.value){E+=" value => "+escapeHTML(C.value)}E+="<hr>"}else{if(typeof C!="object"){E+=escapeHTML(C)}}if(E){E+="<br>"}}return E}function A(C){var D;var F="";F="<font color=blue>"+B("o",C)+"</font>";if(C&&C.sort){for(var D in C){var E=C[D];F+="__ "+D+"=>"+A(E)}F+="<hr>"}if(!C){F+=" undefined object<br>"}return F}};var globalRegisterObject=new Object();var Global=new function(){this.put=function(property,value,owner){if(!owner){owner=null}eval("globalRegisterObject."+property+"__value = value");eval("globalRegisterObject."+property+"__owner = owner")};this.get=function(property){return eval("globalRegisterObject."+property+"__value")};this.getOwner=function(property){return eval("globalRegisterObject."+property+"__owner")};this.isExist=function(property){return eval("globalRegisterObject."+property+"__value != undefined")}};function RunURL(A){RunURLEx("",A)}function RunURLEx(B,A){RunURLEx2(B,A,null)}function informParentRunURLResult(e,handler){var srcElement=EventUtils.getSrcElement(e);var handler=$(srcElement.id+"_handler");if(handler){handler=handler.value;if(handler=="UNLOAD"){eval("window.frames."+srcElement.id+"=null")}else{var result=null;if(eval("window.frames."+srcElement.id+".getFrameResult")){eval("result = window.frames."+srcElement.id+".getFrameResult()");eval("innerHTML = window.frames."+srcElement.id+".document.body.innerHTML")}handler=handler.replace("<result>","result");handler=handler.replace("<innerHTML>","innerHTML");eval(handler)}}}function getHostFromURL(A){var B=A.indexOf("?");if(B<0){return A}else{return A.substring(0,B)}}function RunURLEx2(prefix,url,handler){var frameHeight=0;var frameWidth=500;var onloadHandler="";var frameHTML;var frame_name=prefix+"cmd_frame";var frame_div_name=prefix+"frame_div";var frame_handler_name=frame_name+"_handler";var oldFrame=eval("window.frames."+frame_name);if(handler){onloadHandler='onload = "informParentRunURLResult(event)"'}if(oldFrame){}else{addCmdFrameDivIfNotExist();frameHTML="<div id="+frame_div_name+" name="+frame_div_name+"> <input type=hidden id="+frame_handler_name+" name="+frame_handler_name+' value="'+handler+'"><iframe id='+frame_name+" name="+frame_name+" width="+frameWidth+" height="+frameHeight+" "+onloadHandler+"></iframe></div>";document.getElementById("cmd_frame_div").innerHTML+=frameHTML}var frame=eval("window.frames."+frame_name);frame.location.replace(url)}function UnloadIFrameByPrefix(B){var A=B+"cmd_frame";var C=$(B+"frame_div");if(C){C.outerHTML=""}}function addCmdFrameDivIfNotExist(){var A=document.getElementById("cmd_frame_div");if(A==undefined){div=document.createElement("DIV");div.id="cmd_frame_div";document.body.insertBefore(div,document.body.firstChild);A=document.getElementById("cmd_frame_div")}}function markLastModified(){Global.put("lastModified",new Date(),"markLastModified")}function Debug(A,B){alert(A+": "+B)}function SetupGeneralEventHandler(){EventUtils.addEvent(document.body,"keydown");EventUtils.addEvent(document.body,"keypress");EventUtils.addEvent(document.body,"click");var D=FormUtils.CountFormElements(document.forms);for(var G=0;G<D;G++){if(document.forms[G]){var C=document.forms[G];var A=FormUtils.CountFormElements(C);for(var B=0;B<A;B++){try{var E=C[B];if(E&&FormUtils.IsFocusableField(E)){EventUtils.addEvent(E,"change")}}catch(F){}}}}EventUtils.registerGeneralEvent("change",markLastModified)}function DefaultPageOnLoad(){FormUtils.FocusInFirstForm()}function BasicPageOnLoad(){if(window.SetupASPEnv!=undefined){SetupASPEnv()}SetupGeneralEventHandler();if(window.PageOnLoadPre!=undefined){PageOnLoadPre()}if(window.PageOnLoad!=undefined){PageOnLoad()}else{DefaultPageOnLoad()}if(window.PageOnLoadPost!=undefined){PageOnLoadPost()}}if(window.SetupASPEnv!=undefined){EventUtils.addEvent(window,"load",BasicPageOnLoad)}function Choose(C,B,A){if(C){return B}else{return A}}function IfTrue(B,A){return Choose(B,A,"")}function IfFalse(B,A){return Choose(B,"",A)}function IfEmpty(A,B){if(IsEmptyString(A)){return B}return A}function IsEmpty(A){return IsEmptyString(A)}function IsEmptyString(A){if((A==null)||(Trim(A).length==0)){return true}else{return false}}function TrimLeft(B){var A=" \t\n\r";for(n=0;n<B.length;n++){if(A.indexOf(B.charAt(n))==-1){return(n>0)?B.substring(n,B.length):B}}return("")}function TrimRight(B){var A=" \t\n\r";for(n=B.length-1;n>-1;n--){if(A.indexOf(B.charAt(n))==-1){return(n<(B.length-1))?B.substring(0,n+1):B}}return("")}function Trim(A){return((A==null)?"":TrimRight(TrimLeft(A)))}function IsInt(A){return new RegExp("^-?\\d*$").test(A)}function IsDecimal(B,A){return new RegExp("^-?\\d*\\.\\d{0,"+A+"}$").test(B)}function ShowOrHideElements(A,D){var B;var E=document.all[A];if(!E){return false}if((navigator.userAgent.indexOf("Firefox")!=-1)&&(E.tagName.toLowerCase()=="tr")){ShowOrHideElementsFireFoxFix(A)}else{if(E.length>0){for(var C=0;C<E.length;C++){B=(E[C].style.display!="none");E[C].style.display=B?"none":"block"}}else{B=(E.style.display!="none");E.style.display=B?"none":"block"}}if(D){D.innerHTML="<img border=0 hspace=2 align=absmiddle src=/vbinc/images/"+(B?"open_layer.gif":"close_layer.gif")+">"}}function ShowOrHideElementsFireFoxFix(A){var B;var D=document.getElementsByTagName("tr");for(var C=0;C<D.length;C++){var E=D[C].getAttribute("id");if(E==A){B=(D[C].style.display!="none");D[C].style.display=B?"none":""}}}function ExpandOrHideLayer(B,A){ExpandOrHideLayerEx(B,A,"Show Details","Hide Details")}function ExpandOrHideLayerEx(C,B,A,D){if(C.style.display=="block"){C.style.display="none";B.innerHTML="<img border=0 hspace=2 align=absmiddle src=/vbinc/images/open_layer.gif>"+A}else{if(C.style.display=="none"){C.style.display="block";B.innerHTML="<img border=0 hspace=2 align=absmiddle src=/vbinc/images/close_layer.gif>"+D}}}function FormInputError(B,A){if(Trim(A)==""){return"Data is missing for a required field.  Please enter the data before continuing."}else{return'Please enter a value for "'+A+"'"}}function CheckFormField(C,B){var A,D;if((C.length>0)&&(!((C.type=="select-one")||(C.type=="select-multiple")))){A=C[0].type}else{A=C.type}D=true;if((A=="text")||(A=="textarea")||(A=="file")){D=checkStr(C,FormInputError("Please enter a value for ",B))}else{if(A=="hidden"){D=checkStr(C,"Please enter value for "+B)}else{if(A=="password"){D=checkStr(C,"Please enter the password ")}else{if((A=="select-one")||(A=="select-multiple")){D=checkSel(C,FormInputError("Please select a value for ",B))}else{if(A=="checkbox"){D=checkCheckBox(C,FormInputError("Please check a value for ",B))}else{if(A=="radio"){D=checkRadio(C,FormInputError("Please check a value for ",B))}else{alert("require field checking of unknown type: "+A+", name: "&C.name)}}}}}}if(!D){if(C&&C.style){C.style.background="#ffcccc"}focusOnField(C)}return D}function checkStr(B,C){if(B==null){alert(C);return false}var A=Trim(B.value);if(A.length==0){alert(C);focusOnField(B);return false}return true}function focusOnField(B){try{B.focus()}catch(A){}}function checkSel(A,B){if(Trim(A.value)==""){alert(B);focusOnField(A);return false}return true}function checkSearchInput(A){var B=3;if(A.search.value.length<B){alert("Please enter a string (at least with "+B+" alphabets) to search for related products.");focusOnField(A.search);return false}return true}function checkNumeric(A,B){if(isNaN(A.value)){alert(B);focusOnField(A);return false}return true}function checkEmptyStr(A,B){return checkStrLen(A,1,255,B)}function checkStrLen(D,C,B,E){var A=D.value.length;if(C!=null){if(A<C){alert(E);focusOnField(D);return false}}if(B!=null){if(A>B){alert(E);focusOnField(D);return false}}return true}function checkNumLen(D,A,B,C){if(isNaN(D.value)){alert(A+" must be numeric.");focusOnField(D);return false}else{if((B!=null)&&(!checkStr(D,"Please enter '"+A+"'."))){return false}if((B!=null)&&(D.value<B)){alert(A+" must not be less than "+B+".");focusOnField(D);return false}if((C!=null)&&(D.value>C)){alert(A+" must not be greater than "+C+".");focusOnField(D);return false}}return true}function checkOptionalNum(D,A,B,C){if(D.value.length==0){return true}return checkNumLen(D,A,B,C)}function checkEmailEx(F,J,H){var C,E,G,A,B,I;C=F.value;I=C.split(",");if(!J&&I.length>1){alert("Only 1 email address can be entered.");return false}for(var D=0;D<I.length;D++){C=I[D];E=C.length;B=C.indexOf(" ",0);G=C.indexOf("@",1);A=C.indexOf(".",G);if((B==-1)&&(G>0)&&(A>(G+1))&&(E>(A+2))&&(C.charAt(G-1)!=".")&&(C.charAt(E-1)!=".")){return true}alert(H);focusOnField(F);return false}return true}function checkEmail(B,A){return checkEmailEx(B,A,"The email address you entered is invalid.  Please enter your email address.")}function ValidateEmail(A){if(A.value==""){return true}if(!checkEmail(A,false)){A.select();focusOnField(A);return false}return true}function checkCountryCode(C,F){return true;var B,A,D,E;B=C.value.indexOf("-",0);A=C.value.length;if(B==-1){alert(F);focusOnField(C);return false}D=C.value.substr(0,B);E=C.value.substr(B+1,A);if((B==A-1)||isNaN(D)||isNaN(E)){alert("The phone number is invalid.");focusOnField(C);return false}return true}function checkAddress(A){if(!(checkStrLen(A.addr1,"your address (line 1)",1,64)&&checkStrLen(A.addr2,"your address (line 2)",null,64)&&checkStrLen(A.city,"your city",null,64)&&checkStrLen(A.state,"your state / province",null,64)&&checkStrLen(A.zip,"your zip / postal code",null,64)&&checkSel(A.country_id,"Please select a country.")&&checkStrLen(A.tel,"home telephone number",1,24)&&checkCountryCode(A.tel,"Please include country code in your home number.")&&checkStrLen(A.day_tel,"day time telephone number",1,24)&&checkCountryCode(A.day_tel,"Please include country code in your day time number."))){return false}return true}function checkDateSel(A,D,B,C){if(C.checked=="1"){return checkSel(A,"Please select day of due date.")&&checkSel(D,"Please select month of due date.")&&checkSel(B,"Please select year of due date.")}return true}function checkRadio(C,D){if(!(C.length)){if(C.checked){return true}}else{var A=C.length;for(var B=0;B<A;B++){if(C[B].checked){return true}}}alert(D);return false}function checkCheckBox(C,D){if(!(C.length)){if(C.checked){return true}}else{var A=C.length;for(var B=0;B<A;B++){if(C[B].checked){return true}}}alert(D);return false}function checkAccInfo(A){if((A.first_name==null||checkStrLen(A.first_name,"your first name",1,32))&&(A.last_name==null||checkStrLen(A.last_name,"your last name",1,32))&&(A.country_id==null||checkSel(A.country_id,"Please select a country."))&&(A.have_baby.checked==false||checkSel(A.month,"Please select due/birth month"))&&(A.have_baby.checked==false||checkSel(A.year,"Please select due/birth year"))&&(A.info_from_type==null||checkSel(A.info_from_type,"Please select the way you hear about us."))){return true}return false}function checkSignIn(A){return checkStr(A.email,"Please enter your email address.")&&checkEmail(A.email,"The email address you entered is not a valid email address.  Please try again.")&&checkStr(A.password,"Please enter your ebabyasia password.")}function checkClassified(A){if(!checkStrLen(A.name,"your name",1,32)){return false}if(A.email.value.length==0&&A.contact.value.length==0){alert("Please enter either your email address or your telephone/fax number");focusOnField(A.email);return false}if(A.email.value.length>0&&!checkEmail(A.email,false)){focusOnField(A.email);return false}return checkSel(A.country,"Please select where you're posting from.")&&checkStrLen(A.city,"your city",null,40)&&checkStrLen(A.title,"one-line summary for your listing",1,80)&&checkStr(A.msg,"Please enter some description for your listing.")}function CheckSubstringMatch(B,A,C){if(B.search(A)!=-1){alert(C);return false}return true}function CheckPasswordHint(B,A){if(!CheckSubstringMatch(B.value,A.value,"Your password should not be included in the password hint.")){focusOnField(B);return false}return true}function Popup(C,B,D,A){window.open(B,C,"dependent=yes,width="+D+", height="+A+", resizable=yes,scrollbars=yes")}function CheckCombo(B,A){if(B==""){alert("please enter "+A);return false}return true}function replaceSubstring(K,C,B){var L=K;if(C==""){return K}if(B.indexOf(C)==-1){while(L.indexOf(C)!=-1){var G=L.substring(0,L.indexOf(C));var J=L.substring(L.indexOf(C)+C.length,L.length);L=G+B+J}}else{var I=new Array("~","`","_","^","#");var F=1;var A="";while(A==""){for(var E=0;E<I.length;E++){var H="";for(var D=0;D<F;D++){H+=I[E]}if(C.indexOf(H)==-1){A=H;E=I.length+1}}}while(L.indexOf(C)!=-1){var G=L.substring(0,L.indexOf(C));var J=L.substring(L.indexOf(C)+C.length,L.length);L=G+A+J}while(L.indexOf(A)!=-1){var G=L.substring(0,L.indexOf(A));var J=L.substring(L.indexOf(A)+A.length,L.length);L=G+B+J}}return L}function ClearForm(C){for(var B=0;B<C.elements.length;B++){var D=C.elements[B];var A=D.type;if(A=="hidden"||A=="submit"||A=="reset"||A=="button"){}else{if(A=="select-one"||A=="select-multiple"){D.selectedIndex=0}else{if(A=="checkbox"||A=="radio"){D.checked=false}else{D.value=""}}}}}function FocusForm(C){for(var B=0;B<C.elements.length;B++){var D=C.elements[B];var A=D.type;if(A=="hidden"||A=="submit"||A=="reset"||A=="button"){}else{focusOnField(D);return false}}}function EncodeForm(D){var C="";for(var B=0;B<D.elements.length;B++){var E=D.elements[B];var A=E.type;if(A=="submit"||A=="reset"||A=="button"){}else{C=C+"&"+E.name+"="+URLEncode(E.value)}}return C}function ShowHideCommands(F,C){var A;try{C?hideProgressBar():showProgressBar(true)}catch(G){}if(F){A=document.getElementsByName(F.name)}else{A=document.getElementsByName("dbfrm_cmds")}for(var D=0;D<A.length;D++){var E=A[D].getElementsByTagName("INPUT");for(var B in E){if((E[B].type=="submit")||(E[B].type=="button")){E[B].disabled=!C}}}return }function HideCommands(A){ShowHideCommands(A,false)}function ShowCommands(A){ShowHideCommands(A,true)}function FormatNum(A,B){return FormatNumEx(A,B,false,false,false)}function FormatNumEx(I,F,L,B,K){if(isNaN(parseInt(I))){return"NaN"}var D=I;var G=I<0?-1:1;D*=Math.pow(10,F);D=Math.round(Math.abs(D));D/=Math.pow(10,F);D*=G;var H=new String(D);if(F>0){var C=H.indexOf(".");if(C<0){H=H+".";for(var E=0;E<F;E++){H=H+"0"}}else{if((C+F+1)!=H.length){var J=F-(H.length-C-1);for(var E=0;E<J;E++){H=H+"0"}}}}if(!L&&I<1&&I>-1&&I!=0){if(I>0){H=H.substring(1,H.length)}else{H="-"+H.substring(2,H.length)}}if(K&&(I>=1000||I<=-1000)){var A=H.indexOf(".");if(A<0){A=H.length}A-=3;while(A>=1){H=H.substring(0,A)+","+H.substring(A,H.length);A-=3}}if(B&&I<0){H="("+H.substring(1,H.length)+")"}return H}function IntergerOnly(B){B=(B)?B:window.event;var A=(B.which)?B.which:B.keyCode;if(!IsIntegerCode(A)){status="This field accepts integer only";return false}status="";return true}function NumOnly(B){B=(B)?B:window.event;var A=(B.which)?B.which:B.keyCode;if(!IsNumCode(A)){status="This field accepts numbers only";return false}status="";return true}function IsIntegerCode(A){if(A>31&&(A<48||A>57)&&(A!=45)&&(A!=43)){return false}return true}function IsNumCode(A){if(A!=46&&!IsIntegerCode(A)){return false}return true}function AutoFormatNum(A,B){if(IfEmptyString(A.value)){return true}var C=FormatNumEx(RemoveNumComma(A.value),B,false,false,true);if(isNaN(RemoveNumComma(C))){alert("Input should be numeric !!!");focusOnField(A);A.select();return false}else{A.value=C}return true}function RemoveNumComma(B){var A=new String(B);var C=A.indexOf(",");while(C>0){A=A.substring(0,C)+A.substring(C+1,A.length);C=A.indexOf(",")}return A}function IfEmptyString(A){if((A==null)||(Trim(A).length==0)){return true}else{return false}}function URLEncode(E){var G="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";var B="0123456789ABCDEF";var F="";for(var C=0;C<E.length;C++){var D=E.charAt(C);if(D==" "){F+="+"}else{if(G.indexOf(D)!=-1){F+=D}else{var A=D.charCodeAt(0);if(A>255){alert("Unicode Character '"+D+"' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted.");F+="+"}else{F+="%";F+=B.charAt((A>>4)&15);F+=B.charAt(A&15)}}}}return F}function URLDecode(E){var A="0123456789ABCDEFabcdef";var D="";var B=0;while(B<E.length){var C=E.charAt(B);if(C=="+"){D+=" ";B++}else{if(C=="%"){if(B<(E.length-2)&&A.indexOf(E.charAt(B+1))!=-1&&A.indexOf(E.charAt(B+2))!=-1){D+=unescape(E.substr(B,3));B+=3}else{alert("Bad escape combination near ..."+E.substr(B));D+="%[ERROR]";B++}}else{D+=C;B++}}}return D}function insertAtCursor(A,B){return insertAtCursorEx(null,A,B)}function insertAtCursorEx(D,C,E){if(!D){D=document}if(D.selection){C.focus();sel=D.selection.createRange();sel.text=E}else{if(C.selectionStart||C.selectionStart=="0"){var B=C.selectionStart;var A=C.selectionEnd;C.value=C.value.substring(0,B)+E+C.value.substring(A,C.value.length)}else{C.value+=E}}}function storeCaret(A){if(A.createTextRange){A.caretPos=document.selection.createRange().duplicate()}}function insertAtCaret(B,C){B.focus();if(B.createTextRange&&B.caretPos){var A=B.caretPos;A.text=C+" ";A.select()}else{B.value+=C+" "}}function AddCaretHandlers(A,B){var C=document.getElementById(A);if(!C){alert("warning: missing element: "+A);return }C.onselect=B;C.onchange=B;C.onkeyup=B;C.onclick=B}function UpdateEditor(B){var A=FCKeditorAPI.GetInstance(B);A.UpdateLinkedField()}function FormatDateTime(C,B){var A;if(B==1){A="%w, %M %d, %Y"}else{if(B==2){A="%m/%d/%y"}else{if(B==3){A="%h:%n %a"}else{if(B==4){A="%H:%n"}else{if(B==5){A="%w, %M %d, %Y %T"}else{if(B==6){A="%w, %d %M %Y"}else{if(B==7){A="%d/%m/%y"}}}}}}}return FormatDateTimeEx(C,A)}function FormatDateTimeEx(H,B){var J=new String(H);if(J.toUpperCase()=="NOW"){var E=new Date();J=String(E)}else{var E=new Date(H);J=String(E)}var I=new String(J.substring(0,3));var D=new String(J.substring(4,7));var C=11;var G=new String(J.substring(8,10));if(G.charAt(1)==" "){G="0"+G.charAt(0);C--}var F=new String(J.substring(C,C+8));var A=new String(J.substring(J.length-4,J.length));var K=B;K=replaceSubstring(K,"%M",""+D);K=replaceSubstring(K,"%m",""+MonthNumber(D));K=replaceSubstring(K,"%d",""+G);K=replaceSubstring(K,"%w",""+I);K=replaceSubstring(K,"%Y",""+A);K=replaceSubstring(K,"%y",""+A.substring(2,4));K=replaceSubstring(K,"%H",""+F.substring(0,2));K=replaceSubstring(K,"%h",""+(F.substring(0,2)>=12?F.substring(0,2):(F.substring(0,2)-12)));K=replaceSubstring(K,"%n",""+F.substring(3,5));K=replaceSubstring(K,"%s",""+F.substring(7,9));K=replaceSubstring(K,"%a",""+(F.substring(0,2)>=12&&F.substring(0,2)!="24"?" PM":" AM"));K=replaceSubstring(K,"%T",""+F);return K}function FullDay(B){var A;if(B=="Sun"){A="Sunday"}if(B=="Mon"){A="Monday"}if(B=="Tue"){A="Tuesday"}if(B=="Wed"){A="Wednesday"}if(B=="Thu"){A="Thursday"}if(B=="Fri"){A="Friday"}if(B=="Sat"){A="Saturday"}return A}function FullMonth(B){var A;if(B=="Jan"){A="January"}if(B=="Feb"){A="February"}if(B=="Mar"){A="March"}if(B=="Apr"){A="April"}if(B=="May"){A="May"}if(B=="Jun"){A="June"}if(B=="Jul"){A="July"}if(B=="Aug"){A="August"}if(B=="Sep"){A="September"}if(B=="Oct"){A="October"}if(B=="Nov"){A="November"}if(B=="Dec"){A="December"}return A}function MonthNumber(B){var A;if(B=="Jan"){A=1}if(B=="Feb"){A=2}if(B=="Mar"){A=3}if(B=="Apr"){A=4}if(B=="May"){A=5}if(B=="Jun"){A=6}if(B=="Jul"){A=7}if(B=="Aug"){A=8}if(B=="Sep"){A=9}if(B=="Oct"){A=10}if(B=="Nov"){A=11}if(B=="Dec"){A=12}return A}function GetNumberOfMonth(D,B){var E=new Date(D);var C=new Date(B);if(C<E){return 0}var A=GetNextMonthNextDay(E);if(DateDiff(A,C)>1){}else{if(DateDiff(C,A)==1){return 1}else{return DateDiff(E,C)/GetDaysInMonth(E)}}}function GetNextMonthNextDay(B){var A,C;if(B.getMonth()+1>12){C=0;A=B.getYear()+1}else{C=B.getMonth()+1;A=B.getYear()}var D=new Date((C+1)+"/"+B.getDate()+"/"+A);return D}function DateAdd(G,A){var C=1000;var F=60*C;var B=60*F;var D=24*B;var E=new Date();E.setTime(G.getTime()+(A*D));return E}function GetPreviousMonthOfDay(D){var C,E,A;if(D.getMonth()-1<0){E=11;C=D.getYear()-1}else{E=D.getMonth()-1;C=D.getYear()}var B=new Date((E+1)+"/"+D.getDate()+"/"+C);return B}function GetDaysInMonthEx(D,B){var A=(JSIsUsingMDY?(D+"/"+1+"/"+B):(1+"/"+D+"/"+B));var C=new Date(GetLastDayOfMonth(new Date(A)));return C.getDate()}function GetDaysInMonth(A){var B=new Date(GetLastDayOfMonth(A));return B.getDate()}function GetLastDayOfMonth(B){var A=new Date(B);A.setMonth(A.getMonth()+1);A.setDate(1);A.setTime(A.getTime()-GetOneDayTime());return A}function GetOneDayTime(){return 1*24*60*60*1000}function DateDiff(B,A){var E=new Date(B);var C=new Date(A);var D=((C.getTime()-E.getTime())/1000/60/60/24)+1;return D}function DateOnChangeAction(A,B){if(Trim(A.value).length==0){A.value=""}else{DateCompletion(A)}UpdateMRCInvoicePayment(B);UpdateTotalValue()}function DateCompletion(A){DateCompletionEx(A,true)}function DateCompletionEx(A,B){return DateCompletionEx3(A,B,false)}function DateCompletionEx3(A,B,C){return DateCompletionEx4(A,B,C,false)}function DateCompletionEx4(A,B,C,F){if(A&&A.value&&A.value.length>0){var E=MyParseDateEx(A.value,B);if(E){if(C&&(E.getFullYear()<1753)){alert("Please check the year in date entry: "+E.getFullYear());A.focus();A.select();return false}}var D=FormatDateEx(E,B,F);if(D==""){A.focus();A.select();return false}else{A.value=D;return true}}return true}function IsLeapYear(A){if((A/4)!=Math.floor(A/4)){return false}if((A/100)!=Math.floor(A/100)){return true}if((A/400)!=Math.floor(A/400)){return false}return true}function FindNumberOfDaysInSpecificMonth(B,C){var A=new Array(31,28,31,30,31,30,31,31,30,31,30,31);if(IsLeapYear(B)){A[1]=29}return A[C-1]}function padZeroForDate(A){if(isFinite(parseInt(A))&&parseInt(A)<10){A=parseInt(A);A="0"+A}return A}function forceConvertDate(C){var N,P,E;var M;var D=true;var R;var B="[0-3]?[0-9]";var Q="[0-1]?[0-9]";var K="[1-2][0-9]{3}";var F="\\s*";var S="^"+F;var O=F+"$";var A=F+"[/\\-\\. ]"+F;var J=new RegExp(S+B+A+Q+A+K+O);var I=new RegExp(S+Q+A+K+O);var H=new RegExp(S+K+A+Q+A+B+O);var G=new RegExp(S+K+A+Q+O);var L=new RegExp(A);if(J.exec(C)){M=C.split(L);day=M[0];P=M[1];E=M[2]}else{if(I.exec(C)){M=C.split(L);P=M[0];E=M[1];day=FindNumberOfDaysInSpecificMonth(E,P)}else{if(H.exec(C)){M=C.split(L);E=M[0];P=M[1];day=M[2]}else{if(G.exec(C)){M=C.split(L);E=M[0];P=M[1];day=FindNumberOfDaysInSpecificMonth(E,P)}else{D=false}}}}if(D){R=padZeroForDate(day)+"/"+padZeroForDate(P)+"/"+E}else{R=""}return R}function DateCompletionEx2(A,B,D){if(A&&A.value&&A.value.length>0){if(D){convertedResult=forceConvertDate(A.value);if(convertedResult){A.value=convertedResult}}var C=MyParseDate(A.value,B);if(C==""){A.focus();A.select();return false}else{A.value=C;return true}}return true}function DateTimeCompletion(B,C,A,D){if(B&&B.value&&(B.value.length>0)){dateTime=B.value.trim().split(" ");date=dateTime[0];if(dateTime.length>1){time=dateTime[1]}else{time=A}time=IsValidTimeStr(time,D)?time:A;var F=MyParseDateEx(date,C);if(F){if(F.getFullYear()<1753){alert("Please check the year in date entry: "+F.getFullYear());B.focus();B.select();return false}}var E=FormatDate(F,C);if(E==""){B.focus();B.select();return false}else{B.value=E+" "+time;return true}}return true}function IsValidTimeStr(C,B){var D;if(B){D="^([0-1][0-9]|[2][0-3]):([0-5][0-9])$"}else{D="^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$"}var A=new RegExp(D);return C.match(A)}function FormatDate(B,A){return FormatDateEx(B,A,false)}function FormatDateEx(F,C,E){var B="";if(F){var A=F.getDate();var D=(F.getMonth()+1);if(E){A=padZeroForDate(A);D=padZeroForDate(D)}if(C){B=""+D+"/"+A+"/"+F.getFullYear()}else{B=""+A+"/"+D+"/"+F.getFullYear()}}return B}function MyParseDate(C,B){var D=MyParseDateEx(C,B);var A=FormatDate(D,B);return A}function MyParseDateEx(E,D){var B=new Date();var F=E.split("/");var A,G,H;if(F.length==3){if(D){A=F[0];G=F[1];H=F[2]}else{G=F[0];A=F[1];H=F[2]}}else{if(F.length==2){if(D){A=F[0];G=F[1]}else{G=F[0];A=F[1]}H=B.getFullYear()}else{if(F.length==1){G=F[0];A=B.getMonth()+1;H=B.getFullYear()}else{A=B.getMonth()+1;G=B.getDate();H=B.getFullYear()}}}if((0+A)<=0){A=B.getMonth()+1}if((0+G)<=0){G=B.getDate()}if((0+H)<=0){H=B.getFullYear()}if(H<30){H=2000+parseInt(H)}if(A>12||G>31||H>(B.getFullYear()+100)){alert("Invalid date entry: "+E);return null}var C=(JSIsUsingMDY?(A+"/"+G+"/"+H):(G+"/"+A+"/"+H));return new Date(C)}function JSIsUsingMDY(){var A=new Date("1/7/2004");return(A.getMonth()==1)}function IsValidDate(A){var D=/^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;var C=A.match(D);if(C==null){alert("Date is not in a valid format.");return false}month=C[1];day=C[3];year=C[4];if(month<1||month>12){alert("Month must be between 1 and 12.");return false}if(day<1||day>31){alert("Day must be between 1 and 31.");return false}if((month==4||month==6||month==9||month==11)&&day==31){alert("Month "+month+" doesn't have 31 days!");return false}if(month==2){var B=(year%4==0&&(year%100!=0||year%400==0));if(day>29||(day==29&&!B)){alert("February "+year+" doesn't have "+day+" days!");return false}}return true}function LinkedDateInput(D,K,E,G,C,J,F,I){var H;if(!(D&&D.value&&D.value.length>0)){return }DateCompletionEx(D,I);if(D.value==""){return }var B=MyParseDateEx(D.value,I);if(E!=""){H=MyParseDateEx(E,I);if(B<H){B=H;D.value=FormatDate(B,I)}}var A=B;if(C=="y"){A.setYear(A.getYear()+J)}else{if(C=="m"){A.setMonth(A.getMonth()+J)}else{if(C=="d"){A=DateAdd(A,J)}}}if(F){A=DateAdd(A,-1)}if(G!=""){H=MyParseDateEx(G,I);if(A>H){A=H}}K.value=FormatDate(A,I)}function DateInputCharOnly(A){return DateInputCharOnlyEx(A)}function DateInputCharOnlyEx(D,C){D=(D)?D:window.event;var B=(D.which)?D.which:D.keyCode;if(!C){C=""}var F="/0-9-: ";var E="["+F+C+"]";var G=new RegExp(E);if(!A(B)){return true}if(String.fromCharCode(B).search(G)<0){status="This is a date input field and you have entered an invalid character.";return false}status="";return true;function A(H){return(H<127&&H>31)}}function MM_swapImgRestore(){var C,A,B=document.MM_sr;for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_preloadImages(){var D=document;if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&document.getElementById){A=document.getElementById(E)}return A}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]}}}var closebutton="/images/close_window.gif";var objPopup,xtra,ytra;function setupLayer(){if(event.button!=1){return }objPopup=eval("popupLayer");temp1=objPopup.style.posLeft;temp2=objPopup.style.posTop;xpos=event.clientX;ypos=event.clientY;xtra=temp1-xpos;ytra=temp2-ypos;document.onmousemove=moveLayer}function moveLayer(){if(event.button==1){objPopup.style.pixelLeft=event.clientX+xtra;objPopup.style.pixelTop=event.clientY+ytra;return false}}function ShowIWinAtCenter(E,C,D,B){var A,F;A=(screen.width)?(screen.width-D)/2:100;F=5;A=A+document.body.scrollLeft;F=F+document.body.scrollTop;InlineWindowUtils.show(iwin_def,C,E,D,B,A,F)}function showLayer(G,C,E,B,F,A,D){showLayerEx(G,C,E,B,F,A,D,true)}function showLayerEx(G,B,E,I,C,H,A,F){titlecolor="#333366";opacitytitle=100;if(!C){C=500;H=325}if(B.length>=0){if(F){InlineWindowUtils.showAtCenter(iwin_def,B,G,C,H,"")}else{InlineWindowUtils.showAtCenterNoScroll(iwin_def,B,G,C,H,"")}return }else{inside=E}if(!I){I="#ccccff"}popupLayer.style.pixelLeft=document.body.scrollLeft+50;popupLayer.style.pixelTop=document.body.scrollTop+50;popupLayer.style.visibility="visible";var D="<td bgcolor='#ccccff' align=center><input type='image' alt=\"Close\" onclick='closeLayer()'  src='"+closebutton+"'></td>";output="<table bgcolor=#333366 border=0 cellpadding=0 cellspacing=1 width="+C+" height="+H+"><tr>";output+=D;output+="<td align=center onmousedown='setupLayer()' style='cursor:move'  onmouseup='JavaScript:document.onmousemove=\"\" ' bgcolor='"+titlecolor+"'  style='z-Index:100; position: relative; filter:alpha(opacity="+opacitytitle+");'  width ="+C+" height=20><b><font face='verdana, arial' color=white>"+G+"</font></b></td>";output+=D;output+="</tr>";output+="<tr><td width=100% colspan=3><table ";if(A){output+="style='background-image:url(\" "+A+"\")'"}output+=" width=100% height=100% bgcolor='"+I+"'><tr><td height=100% width=100% >"+inside+"</td></tr></table></td></tr></table>";if(window.parent.popupFrame){window.parent.popupLayer.innerHTML=output}else{popupLayer.innerHTML=output}}function closeLayer(){popupLayer.style.visibility="hidden"}function IsOnPopupLayer(){return(window.name=="popupFrame")}function IsPopWindow(){return(window.name=="popview")}function IsIWinLayer(){return(window.name=="popupFrame_iwin")}function IsOnHiddenPopupLayer(){var A=IsOnPopupLayer()&&window.parent.popupLayer.style.visibility=="hidden";return A}function CloseMe(){if(parent.CloseExtWin){if(parent.CloseExtWin()==true){return true}}if(parent.myLightWindow){parent.myLightWindow.deactivate();return true}if(IsOnPopupLayer()){window.parent.closeLayer();return true}if(IsIWinLayer()){window.parent.HideIWin();return true}if(window.name.length>0&&window.opener){try{window.opener.focus();window.close();return true}catch(A){}}return false}function FindOpener(){if(IsOnPopupLayer()){return window.parent}if(IsIWinLayer()){return window.parent}if(window.opener){return window.opener}if(window.parent){return window.parent}}function CloseMeOrGoBack(){if(!CloseMe()){RemoveAllIFrames();window.history.go(-1)}return true}function IsOnHiddenFrame(){return window.name.match("hidden")||window.name.match("cmd_frame")}function RemoveAllIFrames(){var A=document.getElementsByTagName("IFRAME");while(A.length>0){A[A.length-1].removeNode(true);A=document.getElementsByTagName("IFRAME")}}var InlineWindowUtils=new function(){this.enableSetOpacity=true;this.MWJ_winZind=65535;this.iframeId="popupFrame_iwin";this.defaultURL="/vbinc/blank.asp";this.resetWin=function(C){var A,B,D;D=this.iframeId;A=C.maxName;B=C.minName;document.getElementById(D).src=this.defaultURL};this.show=function(E,B,G,C,A,F,D){this.showEx(E,B,G,C,A,F,D,true)};this.showEx=function(D,A,I,B,K,F,C,G){D=CreateDefaultIWinEx(D,G);if(IsIWinLayer()){if(window.parent&&window.parent.iwin_def){if(window.parent.document.getElementById(window.parent.iwin_def.iframeId).src==A){return false}}}var J,E,H;H=this.iframeId;J=D.maxName;E=D.minName;this.setTitle(D,I);this.resizeWinEx(J,E,B,K,H);this.showMinWin(J,E);document.getElementById(H).src=A;this.moveWin(J,E,F,C)};this.setTitle=function(A,B){document.getElementById(A.maxName+"_title").innerHTML=B};this.showAtCenter=function(E,C,F,D,B){var A,G;A=(screen.width)?(screen.width-D)/2:100;A=5;G=5;A=A+document.body.scrollLeft;G=G+document.body.scrollTop;this.show(E,C,F,D,B,A,G)};this.showAtCenterNoScroll=function(E,C,F,D,B){var A,G;A=(screen.width)?(screen.width-D)/2:100;A=5;G=5;A=A+document.body.scrollLeft;G=G+document.body.scrollTop;this.showEx(E,C,F,D,B,A,G,false)};this.resizeWin=function(B,C,E,D){B=[this.getRefToDivNest(B),this.getRefToDivNest(C)];if(!B[0]){return }if(B[0].getElementsByTagName&&document.childNodes){var A=B[0].offsetHeight-B[0].getElementsByTagName("div")[1].parentNode.offsetHeight;D=D-A;this.doActualResize(B,E,D,A)}};this.createIWinLayer=function(S,V,Y,G,R,K,X,N,Q,I,C,L,H,D,B,T){if(typeof (D)=="undefined"){window.alert("New mini window script incompatible.");return }window.MWJ_MINIWINS=window.MWJ_MINIWINS?(window.MWJ_MINIWINS+1):1;if(typeof (S)=="object"){var J="#000000";var A="IWinMIN"+window.MWJ_MINIWINS;var Z="IWinMAX"+window.MWJ_MINIWINS;var O=this.iframeId;V='<font id="'+Z+'_title" >'+V+"</font>";var F=S[4]?"":' scrolling="no" ';var W='<iframe src="'+S[1]+'" id="'+O+'" name="'+O+'" style=" width:'+S[2]+"px; height:"+S[3]+'px; padding:5px; " frameborder="0"'+F+'></iframe><div id="'+O+'_DPH" name="'+O+'_DPH" style="display:none; width:'+S[2]+"px; height:"+S[3]+'px"  ></div>';var M=S[2];T=false;var U;var E=" onmousedown=\"InlineWindowUtils.clickDiv('"+Z+"','"+A+"',arguments[0],false,'"+O+'\');return false;" onselectstart="return false;" ondragstart="return false;"';U='<div id="'+Z+'" style="width:'+M+"px;position:absolute;left:"+Y+"px;top:"+G+"px;visibility:"+((H==1)?"visible":"hidden")+';"'+(D?E:"")+">"+(document.childNodes?('<div style="position:absolute;right:2px;bottom:2px;">'+((L&&!D)?'<img src="'+L+'" height="11" width="11" border="0" alt="Resize." title="Resize." onmousedown="InlineWindowUtils.clickDiv(\''+Z+"','IWinMIN"+window.MWJ_MINIWINS+"',arguments[0],true,'"+O+'\');return false;" onselectstart="return false;" ondragstart="return false;" style="cursor:se-resize;" onmouseover="window.status=\'Drag to resize the mini window\';return true;" onmouseout="window.status=\'\';return true;">':"")+"</div>"):"")+'<table border="0" cellpadding="0" cellspacing="0" style="background-color:'+J+';border-left:0px solid #dfdfdf;border-top:0px solid #dfdfdf;border-right:0px solid black;border-bottom:0px solid black;" width="100%"><tr><td style="background-color:'+J+';border-left:0px solid white;border-top:0px solid white;border-right:0px solid #7f7f7f;border-bottom:0px solid #7f7f7f;"><table border="0" cellpadding="0" cellspacing="1" width="100%" style="border:0px solid '+J+';"><tr><td><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td bgcolor="'+R+'" align="left" valign="middle" height="16" width="20"><a style="text-decoration:none;cursor:hand;"  onclick="InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+X+'" border="0" height="16" width="16" alt="Close"></a></td><td bgcolor="'+R+'" align="left" valign="middle" style="color:#ffffff;font-family:Arial,Sans-Serif;font-weight:bold;font-size:12px;cursor:default;" onmouseover="window.status=\'Drag here to move the mini window\';return true;" onmouseout="window.status=\'\';return true;"'+(D?"":E)+" nowrap>"+V+'</td><td bgcolor="'+R+'" align="right" valign="middle" width="34"><nobr><a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.showMinWin(\''+A+"','"+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to minimise the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Minimise."><img src="'+N+'" border="0" height="16" width="16" alt="Minimise."></a>'+((C&&L&&document.childNodes&&!D)?'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.maximiseWin(\''+Z+"','"+A+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to maximise the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Maximise."><img src="'+C+'" border="0" height="16" width="16" alt="Maximise."></a>':"")+'<a style="text-decoration:none;cursor:default;"  onclick=" InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+I+'" border="0" height="16" width="16" alt="Close."></a></nobr></td></tr></table></td></tr><tr><td>'+((B&&document.childNodes)?B:"")+'<table border="0" cellpadding="4" cellspacing="0" style="border-left:0px solid #7f7f7f;border-top:0px solid #7f7f7f;border-right:0px solid white;border-bottom:0px solid white;" width="100%"><tr><td style="border-left:0px solid black;border-top:0px solid black;border-right:0px solid #dfdfdf;border-bottom:0px solid #dfdfdf;background-color:'+K+';padding:0px;" valign="top"><div style="'+((T&&document.childNodes&&!(!window.ActiveXObject&&!navigator.taintEnabled&&document.all)&&!(navigator.product=="Gecko"&&navigator.taintEnabled&&typeof (document.textContent)=="undefined")&&!(window.ActiveXObject&&!navigator.__ice_version&&window.ScriptEngineMajorVersion&&(ScriptEngineMajorVersion()+(0.1*ScriptEngineMinorVersion()))<5.5))?"overflow:auto;height:100%;":"")+'padding:0px;">'+W+"</div></td></tr></table></td></tr></table></td></tr></table></div>";U=U+'<div id="'+A+'" style="width:'+M+"px;position:absolute;left:"+Y+"px;top:"+G+"px;visibility:"+((H==2)?"visible":"hidden")+';"'+(D?E:"")+'><table border="0" cellpadding="0" cellspacing="0" style="background-color:'+J+';border-left:0px solid #dfdfdf;border-top:0px solid #dfdfdf;border-right:0px solid black;border-bottom:0px solid black;" width="100%"><tr><td style="background-color:'+J+';border-left:0px solid white;border-top:0px solid white;border-right:0px solid #7f7f7f;border-bottom:0px solid #7f7f7f;"><table border="0" cellpadding="0" cellspacing="1" width="100%" style="border:0px solid '+J+';"><tr><td><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td bgcolor="'+R+'" align="left" valign="middle" height="16" width="20"><a style="text-decoration:none;cursor:hand;"  onclick="InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+X+'" border="0" height="16" width="16" alt="Close."></a></td><td bgcolor="'+R+'" align="left" valign="middle" style="color:#ffffff;font-family:Arial,Sans-Serif;font-weight:bold;font-size:12px;cursor:default;" onmouseover="window.status=\'Drag here to move the mini window\';return true;" onmouseout="window.status=\'\';return true;"'+(D?"":E)+" nowrap>"+V+'</td><td bgcolor="'+R+'" align="right" valign="middle" width="34"><nobr><a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.showMinWin(\''+Z+"','"+A+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to restore the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Restore."><img src="'+Q+'" border="0" height="16" width="16" alt="Restore."></a>'+((C&&L&&document.childNodes&&!D)?'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.showMinWin(\''+Z+"','"+A+"');InlineWindowUtils.maximiseWin('"+Z+"','"+A+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to maximise the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Maximise."><img src="'+C+'" border="0" height="16" width="16" alt="Maximise."></a>':"")+'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.hideMinWin(\''+A+'\'); return false"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+I+'" border="0" height="16" width="16" alt="Close."></a></nobr></td></tr></table></td></tr></table></td></tr></table></div>'}else{if(document.layers&&!document.childNodes){var E=" onmouseover=\"this.captureEvents(Event.MOUSEDOWN);this.onmousedown = function () { InlineWindowUtils.clickDiv('IWinMAX"+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+"',arguments[0]);return false; };\"";U=U+'<layer bgcolor="'+J+'" name="IWinMAX'+window.MWJ_MINIWINS+'" width="'+M+'" left="'+Y+'" top="'+G+'" visibility="'+((H==1)?"show":"hide")+'"'+(D?E:"")+'><table border="2" cellpadding="2" cellspacing="2" width="100%"><tr><td bgcolor="'+R+'"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><td align="left" valign="middle" height="16" width="20"><a style="text-decoration:none;cursor:hand;"  onclick="InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+X+'" border="0" height="16" width="16" alt="Close."></a></td><td align="left" valign="middle">'+(D?"":'<ilayer width="'+(M-74)+'" height="16" left="0" top="0"><layer width="'+(M-74)+'" height="16" left="0" top="0"'+E+">")+'<font color="#ffffff" face="Arial" size="-1"><b>'+V+"</b></font>"+(D?"":"</layer></ilayer>")+'</td><td align="right" valign="middle" width="32"><a  onclick="InlineWindowUtils.showMinWin(\'IWinMIN'+window.MWJ_MINIWINS+"','IWinMAX"+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to minimise the mini window\';return true;" onmouseout="window.status=\'\';return true;"><img src="'+N+'" border="0" height="16" width="16" alt="Minimise."></a><a href="javascript:"  onclick="InlineWindowUtils.hideMinWin(\'IWinMAX'+window.MWJ_MINIWINS+'\');return false;"  onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;"><img src="'+I+'" border="0" height="16" width="16" alt="Close."></a></td></tr></table></td></tr><tr><td bgcolor="'+K+'">'+S+"</td></tr></table></layer>";U=U+'<layer bgcolor="'+J+'" name="IWinMIN'+window.MWJ_MINIWINS+'" width="'+M+'" left="'+Y+'" top="'+G+'" visibility="'+((H==2)?"show":"hide")+'"'+(D?E:"")+'><table border="2" cellpadding="2" cellspacing="2" width="100%"><tr><td bgcolor="'+R+'"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><td align="left" valign="middle" height="16" width="20"><a style="text-decoration:none;cursor:hand;"  onclick="InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;" href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+X+'" border="0" height="16" width="16" alt="Close."></a></td><td align="left" valign="middle">'+(D?"":'<ilayer width="'+(M-74)+'" height="16" left="0" top="0"><layer width="100%" left="0" top="0"'+E+">")+'<font color="#ffffff" face="Arial" size="-1"><b>'+V+"</b></font>"+(D?"":"</layer></ilayer>")+'</td><td align="right" valign="middle" width="32"><a  onclick="InlineWindowUtils.showMinWin(\'IWinMAX'+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to minimise the mini window\';return true;" onmouseout="window.status=\'\';return true;"><img src="'+N+'" border="0" height="16" width="16" alt="Maximise."></a><a  onclick="InlineWindowUtils.hideMinWin(\'IWinMIN'+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;"><img src="'+I+'" border="0" height="16" width="16" alt="Close."></a></td></tr></table></td></tr></table></layer>'}else{var E=" onmousedown=\"InlineWindowUtils.clickDiv('IWinMAX"+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+'\',arguments[0]);return false;" onselectstart="return false;" ondragstart="return false;"';U=U+'<div id="IWinMAX'+window.MWJ_MINIWINS+'" style="width:'+M+"px;position:absolute;left:"+Y+"px;top:"+G+"px;visibility:"+((H==1)?"visible":"hidden")+';"'+(D?E:"")+">"+(document.childNodes?('<div style="position:absolute;right:2px;bottom:2px;">'+((L&&!D)?'<img src="'+L+'" height="11" width="11" border="0" alt="Resize." title="Resize." onmousedown="InlineWindowUtils.clickDiv(\'IWinMAX'+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+'\',arguments[0],true);return false;" onselectstart="return false;" ondragstart="return false;" style="cursor:se-resize;" onmouseover="window.status=\'Drag to resize the mini window\';return true;" onmouseout="window.status=\'\';return true;">':"")+"</div>"):"")+'<table border="0" cellpadding="0" cellspacing="0" style="background-color:'+J+';border-left:0px solid #dfdfdf;border-top:0px solid #dfdfdf;border-right:0px solid black;border-bottom:0px solid black;" width="100%"><tr><td style="background-color:'+J+';border-left:0px solid white;border-top:0px solid white;border-right:0px solid #7f7f7f;border-bottom:0px solid #7f7f7f;"><table border="0" cellpadding="0" cellspacing="1" width="100%" style="border:0px solid '+J+';"><tr><td><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td bgcolor="'+R+'" align="left" valign="middle" height="16" width="20"><a style="text-decoration:none;cursor:hand;"  onclick="InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+X+'" border="0" height="16" width="16" alt="Close."></a></td><td bgcolor="'+R+'" align="left" valign="middle" style="color:#ffffff;font-family:Arial,Sans-Serif;font-weight:bold;font-size:12px;cursor:default;" onmouseover="window.status=\'Drag here to move the mini window\';return true;" onmouseout="window.status=\'\';return true;"'+(D?"":E)+" nowrap>"+V+'</td><td bgcolor="'+R+'" align="right" valign="middle" width="34"><nobr><a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.showMinWin(\'IWinMIN'+window.MWJ_MINIWINS+"','IWinMAX"+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to minimise the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Minimise."><img src="'+N+'" border="0" height="16" width="16" alt="Minimise."></a>'+((C&&L&&document.childNodes&&!D)?'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.maximiseWin(\'IWinMAX'+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to maximise the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Maximise."><img src="'+C+'" border="0" height="16" width="16" alt="Maximise."></a>':"")+'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.hideMinWin(\'IWinMAX'+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+I+'" border="0" height="16" width="16" alt="Close."></a></nobr></td></tr></table></td></tr><tr><td>'+((B&&document.childNodes)?B:"")+'<table border="0" cellpadding="4" cellspacing="0" style="border-left:0px solid #7f7f7f;border-top:0px solid #7f7f7f;border-right:0px solid white;border-bottom:0px solid white;" width="100%"><tr><td style="border-left:0px solid black;border-top:0px solid black;border-right:0px solid #dfdfdf;border-bottom:0px solid #dfdfdf;background-color:'+K+';padding:0px;" valign="top"><div style="'+((T&&document.childNodes&&!(!window.ActiveXObject&&!navigator.taintEnabled&&document.all)&&!(navigator.product=="Gecko"&&navigator.taintEnabled&&typeof (document.textContent)=="undefined")&&!(window.ActiveXObject&&!navigator.__ice_version&&window.ScriptEngineMajorVersion&&(ScriptEngineMajorVersion()+(0.1*ScriptEngineMinorVersion()))<5.5))?"overflow:auto;height:100%;":"")+'padding:2px;">'+S+"</div></td></tr></table></td></tr></table></td></tr></table></div>";U=U+'<div id="IWinMIN'+window.MWJ_MINIWINS+'" style="width:'+M+"px;position:absolute;left:"+Y+"px;top:"+G+"px;visibility:"+((H==2)?"visible":"hidden")+';"'+(D?E:"")+'><table border="0" cellpadding="0" cellspacing="0" style="background-color:'+J+';border-left:0px solid #dfdfdf;border-top:0px solid #dfdfdf;border-right:0px solid black;border-bottom:0px solid black;" width="100%"><tr><td style="background-color:'+J+';border-left:0px solid white;border-top:0px solid white;border-right:0px solid #7f7f7f;border-bottom:0px solid #7f7f7f;"><table border="0" cellpadding="0" cellspacing="1" width="100%" style="border:0px solid '+J+';"><tr><td><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td bgcolor="'+R+'" align="left" valign="middle" height="16" width="20"><a style="text-decoration:none;cursor:hand;"  onclick="InlineWindowUtils.hideMinWin(\''+Z+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+X+'" border="0" height="16" width="16" alt="Close."></a></td><td bgcolor="'+R+'" align="left" valign="middle" style="color:#ffffff;font-family:Arial,Sans-Serif;font-weight:bold;font-size:12px;cursor:default;" onmouseover="window.status=\'Drag here to move the mini window\';return true;" onmouseout="window.status=\'\';return true;"'+(D?"":E)+" nowrap>"+V+'</td><td bgcolor="'+R+'" align="right" valign="middle" width="34"><nobr><a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.showMinWin(\'IWinMAX'+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to restore the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Restore."><img src="'+Q+'" border="0" height="16" width="16" alt="Restore."></a>'+((C&&L&&document.childNodes&&!D)?'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.showMinWin(\'IWinMAX'+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+"');InlineWindowUtils.maximiseWin('IWinMAX"+window.MWJ_MINIWINS+"','IWinMIN"+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to maximise the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Maximise."><img src="'+C+'" border="0" height="16" width="16" alt="Maximise."></a>':"")+'<a style="text-decoration:none;cursor:default;"  onclick="InlineWindowUtils.hideMinWin(\'IWinMIN'+window.MWJ_MINIWINS+'\'); return false;"  href="javascript:" onfocus="this.blur()" onmouseover="window.status=\'Click to close the mini window\';return true;" onmouseout="window.status=\'\';return true;" title="Close."><img src="'+I+'" border="0" height="16" width="16" alt="Close."></a></nobr></td></tr></table></td></tr></table></td></tr></table></div>'}}var P=new Object();P.maxName="IWinMAX"+window.MWJ_MINIWINS;P.minName="IWinMIN"+window.MWJ_MINIWINS;P.iframeId=O;P.iwinDiv=U;P.bShowScrollBar=S[4];return P};this.getRefToDivNest=function(B,C){if(!C){C=document}if(document.layers){if(C.layers[B]){return C.layers[B]}else{for(var A=0,D;!D&&A<C.layers.length;A++){D=this.getRefToDivNest(B,C.layers[A].document)}return D}}if(document.getElementById){return document.getElementById(B)}if(document.all){return document.all[B]}return document[B]};this.winMousePos=function(C){if(!C){C=window.event}if(!C||(typeof (C.pageX)!="number"&&typeof (C.clientX)!="number")){return[0,0]}if(typeof (C.pageX)=="number"){var B=C.pageX;var A=C.pageY}else{var B=C.clientX;var A=C.clientY;if(!((window.navigator.userAgent.indexOf("Opera")+1)||(window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1)||window.navigator.vendor=="KDE")){if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollLeft)){B+=document.documentElement.scrollLeft;A+=document.documentElement.scrollTop}else{if(document.body&&(document.body.scrollTop||document.body.scrollLeft)){B+=document.body.scrollLeft;A+=document.body.scrollTop}}}}return[B,A]};this.clickDiv=function(D,C,F,G,A){window.storeUIF=A;if(A){var B=(document.getElementById?document.getElementById(A):(document.all?document.all[A]:false));var E=(document.getElementById?document.getElementById(A+"_DPH"):(document.all?document.all[A+"_DPH"]:false));if(B){B.style.display="none";E.style.display="";if(InlineWindowUtils.enableSetOpacity){InlineWindowUtils.setOpacity($(iwin_def.maxName),50)}}}if((!window.ActiveXObject||navigator.userAgent.indexOf("Mac")==-1||navigator.__ice_version)&&document.onmousemove==this.winIsMove){document.onmousemove=window.storeMOUSEMOVE;document.onmouseup=window.storeMOUSEUP;if(B){B.style.display="";E.style.display="none"}return }if((F&&(F.which>1||F.button>1))||(window.event&&(window.event.which>1||window.event.button>1))){return }this.MWJ_winZind+=2;D=this.getRefToDivNest(D);C=this.getRefToDivNest(C);if(!C){return }window.msStartCoord=this.winMousePos(F);D.currentMWJAction=G?true:false;if(G){window.lyStartCoord=[D.offsetWidth,D.getElementsByTagName("div")[1].parentNode.offsetHeight,D.offsetHeight-D.getElementsByTagName("div")[1].parentNode.offsetHeight]}else{window.lyStartCoord=D.style?[parseInt(D.style.left),parseInt(D.style.top)]:[parseInt(D.left),parseInt(D.top)]}if(D.style){D.style.zIndex=this.MWJ_winZind;C.style.zIndex=this.MWJ_winZind+1}else{D.zIndex=this.MWJ_winZind;C.zIndex=this.MWJ_winZind+1}if(document.captureEvents&&Event.MOUSEMOVE){document.captureEvents(Event.MOUSEMOVE);document.captureEvents(Event.MOUSEUP)}if(!window.ActiveXObject||navigator.userAgent.indexOf("Mac")==-1||navigator.__ice_version){window.storeMOUSEMOVE=document.onmousemove;window.storeMOUSEUP=document.onmouseup}window.storeLayer=[D,C];document.onmousemove=this.winIsMove;document.onmouseup=this.winIsMove};this.winIsMove=function(F){var B=window.storeUIF;var A=InlineWindowUtils.winMousePos(F);if(!F){F=window.event?window.event:(new Object())}F.cancelBubble=true;if(F.stopPropagation){F.stopPropagation()}var G=window.lyStartCoord[0]+(A[0]-window.msStartCoord[0]);var E=window.lyStartCoord[1]+(A[1]-window.msStartCoord[1]);if(F.type&&F.type.toLowerCase()=="mouseup"){document.onmousemove=window.storeMOUSEMOVE;document.onmouseup=window.storeMOUSEUP;if(B){var C=(document.getElementById?document.getElementById(B):(document.all?document.all[B]:false));var D=(document.getElementById?document.getElementById(B+"_DPH"):(document.all?document.all[B+"_DPH"]:false));if(C){if(InlineWindowUtils.enableSetOpacity){InlineWindowUtils.setOpacity($(iwin_def.maxName),100)}C.style.display="";D.style.display="none"}}}if(navigator.product=="Gecko"){window.setTimeout("InlineWindowUtils.winIsMove2("+G+","+E+",'"+B+"');",1)}else{InlineWindowUtils.winIsMove2(G,E,B)}};this.winIsMove2=function(F,E,B){if(window.storeLayer[0].currentMWJAction){this.doActualResize(window.storeLayer,F,E,window.lyStartCoord[2],B)}else{for(var A=0,D=(document.childNodes?"px":0);A<2;A++){var C=window.storeLayer[A].style?window.storeLayer[A].style:window.storeLayer[A];C.left=F+D;C.top=E+D}}};this.doActualResize=function(B,E,D,C,J){if(J){var F=(document.getElementById?document.getElementById(J):(document.all?document.all[J]:false));var H=(document.getElementById?document.getElementById(J+"_DPH"):(document.all?document.all[J+"_DPH"]:false));if(F){F.style.width=E-0+"px";F.style.height=D-0+"px";H.style.width=E-0+"px";H.style.height=D-0+"px"}}for(var G=0;G<2;G++){var I=B[G];if(E<0){E=0}if(!G&&I.getElementsByTagName("div")[1].style.overflow=="auto"&&navigator.product=="Gecko"&&navigator.taintEnabled){var A=I.getElementsByTagName("div")[1];if(!A.tmpDiv){A.tmpDiv=document.createElement("div");A.appendChild(A.tmpDiv);while(A.childNodes[0]!=A.tmpDiv){A.tmpDiv.appendChild(A.childNodes[0])}}A.tmpDiv.style.display="none";A.style.overflow="";A.style.height=""}I.style.width=E+"px";if(!G){E=I.getElementsByTagName("div")[1].parentNode.offsetWidth+10;I.style.width=E+"px";if(D<20){D=20}I.getElementsByTagName("div")[1].parentNode.style.height=D+"px";if(!window.ActiveXObject&&!navigator.taintEnabled){I.getElementsByTagName("div")[1].style.height=(D-4)+"px"}D=I.getElementsByTagName("div")[1].parentNode.offsetHeight;if(!window.ActiveXObject&&!navigator.taintEnabled){I.getElementsByTagName("div")[1].style.height=(D-4)+"px";D+=2}I.getElementsByTagName("div")[1].parentNode.style.height=D+"px";I.style.height=(D+C)+"px";if(I.getElementsByTagName("div")[1].tmpDiv){A.tmpDiv.style.display="block";A.style.overflow="auto";A.style.height=this.doNumMax(96+(A.parentNode.offsetHeight/500))+"%"}}}if(F){F.style.width=E-0+"px";F.style.height=D-0+"px";H.style.width=E-0+"px";H.style.height=D-0+"px"}};this.doNumMax=function(A){return(A>99)?99:A};this.reWriteWin=function(B,C,A){var B=this.getRefToDivNest(B),C=this.getRefToDivNest(C);if(B&&document.childNodes&&B.getElementsByTagName&&B.getElementsByTagName("div")[1]){if(!window.ActiveXObject&&!navigator.taintEnabled){B.getElementsByTagName("div")[1].style.height=(B.getElementsByTagName("div")[1].offsetHeight-4)+"px"}B.getElementsByTagName("div")[1].parentNode.style.height=B.getElementsByTagName("div")[1].parentNode.offsetHeight+"px";if(window.ActiveXObject&&navigator.platform.indexOf("Mac")+1&&!navigator.__ice_version){var D=B.offsetHeight-B.getElementsByTagName("div")[1].parentNode.offsetHeight}else{var D=B.offsetHeight-B.getElementsByTagName("div")[1].offsetHeight}B.getElementsByTagName("div")[1].innerHTML=A;if(window.ActiveXObject&&navigator.platform.indexOf("Mac")+1&&!navigator.__ice_version){B.style.height=(B.getElementsByTagName("div")[1].parentNode.offsetHeight+D)+"px"}else{B.style.height=(B.getElementsByTagName("div")[1].offsetHeight+D)+"px"}B.style.width=B.offsetWidth+"px";C.style.width=B.offsetWidth+"px"}};this.setOpacity=function(B,A){if(!B&&!B.style){return }if(typeof B.style.opacity!="undefined"){B.style.opacity=A/100}else{if(typeof B.style.filter!="undefined"){if(B.style.filter.indexOf("alpha")==-1){var C="";if(B.style.filter){C=B.style.filter+" "}B.style.filter=C+"alpha(opacity="+A+")"}B.filters.alpha.opacity=A}}if(A>0){B.style.visibility="visible"}else{B.style.visibility="hidden"}};this.changeWinBG=function(B,C){var A=this.getRefToDivNest(B);if(A&&A.parentNode&&A.getElementsByTagName&&A.getElementsByTagName("div")[1]){A.getElementsByTagName("div")[1].parentNode.style.backgroundColor=C}};this.moveWin=function(B,D,A,E){B=this.getRefToDivNest(B);D=this.getRefToDivNest(D);if(!B){return }if(B.style){B=B.style;D=D.style}var C=document.childNodes?"px":0;B.left=A+C;D.left=A+C;B.top=E+C;D.top=E+C};this.resizeWin=function(B,C,E,D){B=[this.getRefToDivNest(B),this.getRefToDivNest(C)];if(!B[0]){return }if(B[0].getElementsByTagName&&document.childNodes){var A=B[0].offsetHeight-B[0].getElementsByTagName("div")[1].parentNode.offsetHeight;D=D-A;this.doActualResize(B,E,D,A)}};this.resizeWinEx=function(B,C,F,D,E){B=[this.getRefToDivNest(B),this.getRefToDivNest(C)];if(!B[0]){return }if(B[0].getElementsByTagName&&document.childNodes){var A=B[0].offsetHeight-B[0].getElementsByTagName("div")[1].parentNode.offsetHeight;D=D-A;this.doActualResize(B,F,D,A,E)}};this.maximiseWin=function(C,E){var D=this.getRefToDivNest(C),B=this.getRefToDivNest(E);if(!B){return }this.MWJ_winZind+=2;if(D.style){D.style.zIndex=this.MWJ_winZind;B.style.zIndex=this.MWJ_winZind+1}else{D.zIndex=this.MWJ_winZind;B.zIndex=this.MWJ_winZind+1}var A=this.findMaxSize();this.moveWin(C,E,A[0],A[1]);this.resizeWinEx(C,E,A[2],A[3],this.iframeId)};this.findMaxSize=function(){if(typeof (window.pageXOffset)=="number"){var A=window.pageXOffset,D=window.pageYOffset}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){var A=document.documentElement.scrollLeft,D=document.documentElement.scrollTop}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){var A=document.body.scrollLeft,D=document.body.scrollTop}else{var A=0,D=0}}}if(window.innerWidth){var B=window.innerWidth,C=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientWidth){var B=document.documentElement.clientWidth,C=document.documentElement.clientHeight}else{if(document.body&&document.body.clientWidth){var B=document.body.clientWidth,C=document.body.clientHeight}else{var B=400,C=400}}}if(window.opera||(navigator.product=="Gecko"&&navigator.taintEnabled)){B-=16}if(!window.ActiveXObject&&!navigator.taintEnabled){C-=4}return[A+5,D+5,B-22,C-20]};this.hideMinWin=function(A){A=this.getRefToDivNest(A);if(!A){return }if(A.style){A.style.visibility="hidden"}else{A.visibility="hide"}if(document.getElementById(this.iframeId)){document.getElementById(this.iframeId).src=this.defaultURL}};this.showMinWin=function(A,B){A=this.getRefToDivNest(A);if(B){this.hideMinWin(B)}if(!A){return }this.MWJ_winZind+=2;if(A.style){A.style.visibility="visible";A.style.zIndex=this.MWJ_winZind}else{A.visibility="show";A.zIndex=this.MWJ_winZind}};this.hideMe=function(){this.hideMinWin(this.maxName);this.hideMinWin(this.minName)}};var iwin_def=null;function CreateDefaultIWin(A){return CreateDefaultIWinEx(A,true)}function CreateDefaultIWinEx(A,B){if(A!=null&&A.bShowScrollBar==B){iwin_def=A;return A}A=InlineWindowUtils.createIWinLayer(["iwin_iframe_def","/vbinc/blank.asp",10,10,B],"",0,0,"#699CC2","#FFFFFF","/vbinc/images/inlined_window/iwin_logo.gif","/vbinc/images/inlined_window/min.gif","/vbinc/images/inlined_window/restore.gif","/vbinc/images/inlined_window/cross.gif","/vbinc/images/inlined_window/max.gif","/vbinc/images/inlined_window/handle_classic.gif",0,false,"",false);iwin_def=A;AddIWINDivIfNotExist("MTG_IWIN_HOOK",A.iwinDiv);return A}function AddIWINDivIfNotExist(B,A){var C=document.getElementById(B);if(!C){C=document.createElement("DIV");C.id=B}C.innerHTML=A;if(document&&document.body){document.body.insertBefore(C,document.body.lastChild)}}function HideIWin(){if(iwin_def){InlineWindowUtils.hideMinWin(iwin_def.maxName);InlineWindowUtils.hideMinWin(iwin_def.minName);InlineWindowUtils.resetWin(iwin_def);if(typeof (InlinedWindowCloseCB)=="function"){InlinedWindowCloseCB()}}}function HideIWinEx(A){InlineWindowUtils.hideMinWin(A.maxName);InlineWindowUtils.hideMinWin(A.minName);InlineWindowUtils.resetWin(A)}function MaxIWin(){InlineWindowUtils.maximiseWin(iwin_def.maxName,iwin_def.minName)}var isOpera=navigator.userAgent.indexOf("Opera")>-1;var isIE=navigator.userAgent.indexOf("MSIE")>1&&!isOpera;var isMoz=navigator.userAgent.indexOf("Mozilla/5.")==0&&!isOpera;function ac_textboxSelect(C,B,A){switch(arguments.length){case 1:C.select();break;case 2:A=C.value.length;case 3:if(isIE){var D=C.createTextRange();D.moveStart("character",B);D.moveEnd("character",-C.value.length+A);D.select()}else{if(isMoz){C.setSelectionRange(B,A)}}}C.focus()}function AutoCompleteText(C,B,D){switch(B.keyCode){case 38:case 40:case 37:case 39:case 33:case 34:case 36:case 35:case 13:case 9:case 27:case 16:case 17:case 18:case 20:case 8:case 46:return true;break;default:ac_textboxReplaceSelect(C,String.fromCharCode(isIE?B.keyCode:B.charCode));var A=C.value.length;var E=ac_match(C.value,D);if(E!=null){C.value=E;ac_textboxSelect(C,A,C.value.length)}return false}}function ac_textboxReplaceSelect(B,C){if(isIE){var D=document.selection.createRange();D.text=C;D.collapse(true);D.select()}else{if(isMoz){var A=B.selectionStart;B.value=B.value.substring(0,A)+C+B.value.substring(B.selectionEnd,B.value.length);B.setSelectionRange(A+C.length,A+C.length)}}B.focus()}function ac_match(A,C){for(var B=0;B<C.length;B++){if(C[B].toLowerCase().indexOf(A.toLowerCase())==0){return C[B]}}return null}function validate_time(D,B){var C=document.getElementById(D).value;if(C.length==0){return }var A=time_str_to_int(C);document.getElementById(D).value=time_int_to_str(A,B)}function FindDuration(C,D){var B=time_str_to_int(C);var A=time_str_to_int(D);if(B<0||A<0){return -1}if(A-B<0){return A-B+24*60*60}else{return A-B}}function time_str_to_int(E){var C=/[^0-9]/;var F=E.split(C);var B,D,A;if(F.length<1||F.length>3){return -1}B=parseInt(F[0],10);if(F.length>=2){D=parseInt(F[1],10)}else{D=0}if(F.length==3){A=parseInt(F[2],10)}else{A=0}if(B<0||B>=24||isNaN(B)){return -1}if(D<0||D>=60||isNaN(D)){return -1}if(A<0||A>=60||isNaN(A)){return -1}return((B*60+D)*60)+A}function time_int_to_str(C,B){var E,F,D;if(C<0){var A=new Date();E=A.getHours();F=A.getMinutes();D=A.getSeconds()}else{D=C%60;C=(C-D)/60;F=C%60;C=(C-F)/60;E=C%24}if(E<10){E="0"+E}if(F<10){F="0"+F}if(D<10){D="0"+D}if(B==true){return E+":"+F+":"+D}else{return E+":"+F}}function time_short_cut(E,C){var D=document.getElementById(E).value;if(D.length==0){return }var A=D.charAt(D.length-1);var B="0123456789:-/.";if(B.search(A)==-1){document.getElementById(E).value=time_int_to_str(-1,C);FormUtils.FocusNextElement(document.getElementById(E))}}function displayPopup(A,B,C,J,I,G){var H,F,E,D;if(navigator.appName=="Microsoft Internet Explorer"){D=document.body.offsetHeight;E=window.screen.availWidth}else{D=screen.height;E=screen.width}leftvar=(E-C)/2;rightvar=(D-J)/2;if(navigator.appName=="Microsoft Internet Explorer"){H=leftvar;F=rightvar}else{H=(leftvar-pageXOffset);F=(rightvar-pageYOffset)}I=I+",left="+H;I=I+",top="+F;popupHandle=open(A,B,I)};