if(typeof PINT=="undefined"){var PINT={}}PINT.util={};PINT.connection={};PINT.widget={};PINT.util={getQueryParamValue:function(A){var B=document.location.search;var C=B.indexOf(A);if(B.length>1&&C!=-1){return B.substring(B.indexOf("=",C)+1,B.indexOf("&",C))}else{return""}},setWindowTitle:function(A){document.title=A},setWindowStatus:function(A){window.status=A},getRandomString:function(B,D){var B=B||8;var D=D||"abcdefghijklmnopqrstuvwxyz0123456789";var C="";for(var A=0;A<B;A++){C+=D.charAt(parseInt(D.length*Math.random(),10))}return C},getCurrentFileName:function(){var C=unescape(window.location.pathname);var B=C.lastIndexOf("/")+1;var A=(C.indexOf("?")>0)?C.indexOf("?"):C.length;return C.substring(B,A)},getCurrentFilePath:function(){var B=unescape(window.location.pathname);var A=B.lastIndexOf("/");return B.substring(0,A)},getCurrentDirectory:function(){var B=this.getCurrentFilePath();var A=B.split("/");return A.length&&A[A.length-1]!=""?A[A.length-1]:""}};var sUserAgent=navigator.userAgent.toLowerCase();PINT.util.browser={bNetscape4:(typeof (document.layers)!="undefined")?true:false,bSafari:(sUserAgent.indexOf("safari")!=-1),bKonqueror:(sUserAgent.indexOf("konqueror")!=-1),bNetscape6:(sUserAgent.indexOf("netscape")!=-1),bMozilla:((sUserAgent.indexOf("mozilla")!=-1)&&(sUserAgent.indexOf("gecko")!=-1)&&(sUserAgent.indexOf("konqueror")==-1)),bFirefox:(sUserAgent.indexOf("firefox")!=-1),bOpera:(sUserAgent.indexOf("opera")!=-1),bIe:((sUserAgent.indexOf("msie")!=-1)&&(sUserAgent.indexOf("opera")==-1)),bIe4:((sUserAgent.indexOf("msie 4.")!=-1)&&(sUserAgent.indexOf("opera")==-1)),bIe5:((sUserAgent.indexOf("msie 5.")!=-1)&&(sUserAgent.indexOf("opera")==-1)),bIe6:((sUserAgent.indexOf("msie 6.")!=-1)&&(sUserAgent.indexOf("opera")==-1)),bIe7:((sUserAgent.indexOf("msie 7.")!=-1)&&(sUserAgent.indexOf("opera")==-1)),bOmniWeb:(sUserAgent.indexOf("omniweb")!=-1),bWebTv:(sUserAgent.indexOf("webtv")!=-1),bICab:(sUserAgent.indexOf("icab")!=-1),bMac:(sUserAgent.indexOf("mac")!=-1),sUserAgent:navigator.userAgent,fVersion:parseFloat(navigator.appVersion),setCookie:function(D,I,F,H,A,C,J,B){var E=D+"="+escape(I);if(F&&H&&A){var G=new Date(F,H,A);E+="; expires="+G.toGMTString()}if(C){E+="; path="+escape(C)}if(J){E+="; domain="+escape(J)}if(B){E+="; secure"}document.cookie=E},getCookie:function(D){var C=document.cookie.indexOf(D+"=");var A=C+D.length+1;if(!C&&(D!=document.cookie.substring(0,D.length))){return null}if(C==-1){return null}var B=document.cookie.indexOf(";",A);if(B==-1){B=document.cookie.length}return unescape(document.cookie.substring(A,B))},deleteCookie:function(B){var A=new Date();A.setTime(A.getTime()-1);document.cookie=B+="=; expires="+A.toGMTString()},getBrowserInfo:function(){var A="Others";if(sUserAgent.indexOf("linux")!=-1){A="Linux"}if(sUserAgent.indexOf("x11")!=-1){A="Unix"}if(sUserAgent.indexOf("mac")!=-1){A="Mac"}if(sUserAgent.indexOf("win")!=-1){A="Windows"}var B="Others";if(PINT.util.browser.bIe){B="Internet Explorer"}if(PINT.util.browser.bNetscape4||PINT.util.browser.bNetscape6){B="Netscape Navigator"}if(PINT.util.browser.bOpera){B="Opera"}if(PINT.util.browser.bSafari){B="Safari"}if(PINT.util.browser.bKonqueror){B="Konqueror"}if(PINT.util.browser.bMozilla&&!PINT.util.browser.bFirefox){B="Mozilla"}if(PINT.util.browser.bFirefox){B="Firefox"}if(PINT.util.browser.bOmniWeb){B="OmniWeb"}if(PINT.util.browser.bWebTv){B="WebTv"}if(PINT.util.browser.bICab){B="iCab"}return[A,B,PINT.util.browser.fVersion]},getResolution:function(){return[screen.width,screen.height]},getSize:function(){var B=0;var A=0;if(typeof (window.innerWidth)=="number"){iWinWidth=window.innerWidth;iWinHeight=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){iWinWidth=document.documentElement.clientWidth;iWinHeight=document.documentElement.clientHeight}else{if(document.body&&document.body.clientWidth){iWinWidth=document.body.clientWidth;iWinHeight=document.body.clientHeight}}}if(typeof (window.innerWidth)=="number"){if(window.innerWidth>0&&window.innerWidth>B){B=window.innerWidth}if(window.innerHeight>0&&window.innerHeight>A){A=window.innerHeight}}if(document.body&&typeof (document.body.clientWidth)=="number"){if(document.body.clientWidth>0&&document.body.clientWidth>B){B=document.body.clientWidth}if(document.body.clientHeight>0&&document.body.clientHeight>A){A=document.body.clientHeight}}if(document.documentElement&&typeof (document.documentElement.clientWidth)=="number"){if(document.documentElement.clientWidth>0&&document.documentElement.clientWidth>B){B=document.documentElement.clientWidth}if(document.documentElement.clientHeight>0&&document.documentElement.clientHeight>A){A=document.documentElement.clientHeight}}return[iWinWidth,iWinHeight,B,A]},getScroll:function(){var A=0;var B=0;if(typeof (window.pageXOffset)=="number"){if(window.pageXOffset>0&&window.pageXOffset>A){A=window.pageXOffset}if(window.pageYOffset>0&&window.pageYOffset>B){B=window.pageYOffset}}if(document.body&&typeof (document.body.scrollLeft)=="number"){if(document.body.scrollLeft>0&&document.body.scrollLeft>A){A=document.body.scrollLeft}if(document.body.scrollTop>0&&document.body.scrollTop>B){B=document.body.scrollTop}}if(document.documentElement&&typeof (document.documentElement.scrollLeft)=="number"){if(document.documentElement.scrollLeft>0&&document.documentElement.scrollLeft>A){A=document.documentElement.scrollLeft}if(document.documentElement.scrollTop>0&&document.documentElement.scrollTop>B){B=document.documentElement.scrollTop}}return[A,B]},redirectUnsupportedBrowser:function(A){var B=PINT.util.getCurrentFileName();if(!document.getElementById&&(browserUpgradeFile.indexOf(B)=="-1"||B=="")){window.location.replace(A)}}};PINT.util.dom={getElementById:function(A){if(oNode=document.getElementById(A)){return oNode}else{return null}},getElementsByTagName:function(A,B){if(B==null||typeof (B)=="undefined"){return document.getElementsByTagName(A)}else{if(oNode=document.getElementsByTagName(A)[B]){return oNode}else{return null}}},getElementsByClassName:function(B,C,F){C=C||"*";F=F||document;var G=(C=="*"&&document.all)?document.all:F.getElementsByTagName(C);var A=new Array();for(var E=0;E<G.length;E++){var H=G[E].className.split(" ");for(var D=0;D<H.length;D++){if(H[D]==B){A[A.length]=G[E];break}}}return A},createElement:function(A,B,C){var G=[];if(aMatches=A.match(/(.+)\[(.+)\]/)){A=aMatches[1];G=aMatches[2].split(",")}if(PINT.util.browser.bIe&&A=="INPUT"&&G.indexOf("type=radio")!=-1){var D="";for(var E=0;E<G.length;E++){var H=G[E].split("=");if(H[0]=="name"){D=H[1]}}var I=document.createElement('<input type="radio" name="'+D+'" />')}else{if(A=="TEXT"&&C!=null&&typeof (C)!="undefined"){var I=document.createTextNode(C)}else{var I=document.createElement(A)}}for(var E=0;E<G.length;E++){var H=G[E].split("=");try{I.setAttribute(H[0],H[1])}catch(F){}}if(B&&typeof (B)!="undefined"){B.appendChild(I)}return I},removeElement:function(A){if(A&&A.parentNode){A.parentNode.removeChild(A)}},getFirstParentByTagName:function(B,A){while(B.parentNode&&B.tagName!=A){B=B.parentNode}return B},createXmlElement:function(B){if(window.ActiveXObject){var A=new ActiveXObject("Microsoft.XMLDOM");A.async="false";A.loadXML(B)}else{if(navigator.userAgent.toLowerCase().indexOf("konqueror")!=-1){B=B.replace(/<\?xml(.+)\?>/,"");var A=document.implementation.createDocument("","",null);A.loadXML(B)}else{var A=document.createElement("xmldata");A.innerHTML=B}}return A},getElementLeftOffset:function(B){var A=parseInt(B.offsetLeft,10);var C=B.offsetParent;while(C){A+=parseInt(C.offsetLeft,10);C=C.offsetParent}return A},getElementTopOffset:function(B){var A=parseInt(B.offsetTop,10);var C=B.offsetParent;while(C){A+=parseInt(C.offsetTop,10);C=C.offsetParent}return A},getElementWidth:function(A){if(PINT.util.browser.bIe){return parseInt(A.offsetWidth,10)}else{return(parseInt(A.offsetWidth,10)>parseInt(A.clientWidth,10))?parseInt(A.offsetWidth,10):parseInt(A.clientWidth,10)}},getElementHeight:function(A){if(PINT.util.browser.bIe){return parseInt(A.offsetHeight,10)}else{return(parseInt(A.offsetHeight,10)>parseInt(A.clientHeight,10))?parseInt(A.offsetHeight,10):parseInt(A.clientHeight,10)}}};PINT.util.event={aEvents:[],add:function(A){PINT.util.event.aEvents.push(A)},clear:function(){if(PINT.util.browser.bIe){for(var A=0;A<PINT.util.event.aEvents.length;A++){PINT.util.event.aEvents[A][0].detachEvent("on"+PINT.util.event.aEvents[A][1],PINT.util.event.aEvents[A][2])}PINT.util.event.aEvents=[]}},addEvent:function(B,C,A){if(PINT.util.browser.bIe||PINT.util.browser.bOpera){B.attachEvent("on"+C,A)}else{B.addEventListener(C,A,true)}PINT.util.event.add([B,C,A]);return A},removeEvent:function(C,D,A){if(A==null||typeof (A)=="undefined"){for(var B=0;B<PINT.util.event.aEvents.length;B++){if(PINT.util.event.aEvents[B][0]==C&&PINT.util.event.aEvents[B][1]==D){A=PINT.util.event.aEvents[B][2];break}}}if(A!=null&&typeof (A)!="undefined"){if(PINT.util.browser.bIe||PINT.util.browser.bOpera){C.detachEvent("on"+D,A)}else{C.removeEventListener(D,A,true)}}},getEvent:function(A){return A||window.event},stopEvent:function(A){if(!A){A=PINT.util.event.getEvent(A)}if(PINT.util.browser.bIe){A.cancelBubble=true;A.returnValue=false}else{A.preventDefault();A.stopPropagation()}},getSource:function(A){if(!A){A=PINT.util.event.getEvent(A)}return A.target||A.srcElement},getKey:function(A){if(!A){A=PINT.util.event.getEvent(A)}return[A.keyCode,String.fromCharCode(A.keyCode)]},getMouseInfo:function(A){if(!A){A=PINT.util.event.getEvent(A)}return[parseInt(A.clientX,10),parseInt(A.clientY,10),(A.button==2?2:0)]},checkMouseOutTrigger:function(D,B){if(!D){D=window.event}var C=document.getElementById(B);var A=(D.relatedTarget)?D.relatedTarget:D.toElement;while(A!=C&&A!=null){A=A.parentNode}return(!(A==C))},checkMouseOverTrigger:function(D,B){if(!D){D=window.event}var C=document.getElementById(B);var A=(D.relatedTarget)?D.relatedTarget:D.fromElement;while(A!=C&&A!=null){A=A.parentNode}return(!(A==C))}};PINT.util.form={disableSubmit:function(A){var C=PINT.util.form.getForm(A);if(!C||(C.tagName.toUpperCase()!="FORM")){C=document.forms[0]}if(C&&(C.tagName.toUpperCase()=="FORM")){for(var B=0;B<C.elements.length;B++){if(C.elements[B].type=="submit"){C.elements[B].disabled=true}}}},selectFirst:function(A){var C=PINT.util.form.getForm(A);if(!C||C.tagName.toUpperCase()!="FORM"){C=document.forms[0]}if(C&&C.tagName.toUpperCase()=="FORM"){for(var B=0;C.elements.length;B++){if(C.elements[B].type=="text"||C.elements[B].type=="password"||C.elements[B].type=="textarea"){C.elements[B].focus();break}}}},getForm:function(A){if((oForm=PINT.util.dom.getElementById(A))&&oForm.tagName.toUpperCase()=="FORM"){return oForm}else{if(oForm=document.forms[A]){return oForm}}return null},getElement:function(B,A){if(A&&(oForm=PINT.util.form.getForm(A))){if(oElement=oForm.elements[B]){return oElement}}else{for(var D=0;D<document.forms.length;D++){for(var C=0;C<document.forms[D].elements.length;C++){if(document.forms[D].elements[C].length>1){if(document.forms[D].elements[C][0].name==B){return document.forms[D].elements[C]}}else{if(document.forms[D].elements[C].name==B){return document.forms[D].elements[C]}}}}}return null},getValue:function(C){if(C.type=="text"||C.type=="textarea"||C.type=="password"||C.type=="hidden"||C.type=="file"){return[C.value]}else{if(C.type=="select-one"){if(C.options.length==0){return[""]}else{if(C.options[C.selectedIndex].getAttribute("value")!=null){return[C.options[C.selectedIndex].value]}else{return[C.options[C.selectedIndex].text]}}}else{if(C.type=="select-multiple"){if(C.options.length==0){return[""]}else{var A=[];for(var B=0;B<C.options.length;B++){if(C.options[B].getAttribute("value")!=null){A.push(C.options[B].value)}else{A.push(C.options[B].text)}}return A}}}}}};PINT.util.form.select=function(A){this.oSelect=A;this.getValue=function(){return this.oSelect.value};this.getText=function(){return this.oSelect.text};this.add=function(D,C){var B=this.oSelect.options.length;this.oSelect.options[B]=new Option(C,D);return this};this.removeByValue=function(C){var B=this.oSelect.options.length;for(i=(B-1);i>=0;i--){if(this.oSelect.options[i].value==C){this.oSelect.options[i]=null}}return this};this.removeByText=function(C){var B=this.oSelect.options.length;for(i=(B-1);i>=0;i--){if(this.oSelect.options[i].text==C){this.oSelect.options[i]=null}}return this};this.selectByValue=function(C){var B=this.oSelect.options.length;for(i=(B-1);i>=0;i--){if(this.oSelect.options[i].value==C){this.oSelect.options[i].selected=true}}return this};this.selectByText=function(C){var B=this.oSelect.options.length;for(i=(B-1);i>=0;i--){if(this.oSelect.options[i].text==C){this.oSelect.options[i].selected=true}}return this};this.removeAll=function(){this.oSelect.options.length=0;return this};this.selectAll=function(){var B=this.oSelect.options.length;for(i=0;i<B;i++){this.oSelect.options[i].selected=true}return this}};PINT.util.form.validator=function(){this.aParams=arguments[0]||[];this.sForm=this.aParams["form"]||"";this.aRules=[];this.aMessages=[];this.aElements=[];this.oDefaultErrorHandler=function(B){if(B.length&&B.length>0){for(var A=0;A<B.length;A++){B[A].style.backgroundColor="#ff0000"}}else{B.style.backgroundColor="#ff0000"}};this.oDefaultClearHandler=function(B){if(B.length&&B.length>0){for(var A=0;A<B.length;A++){B[A].style.backgroundColor=""}}else{B.style.backgroundColor=""}};this.oDefaultNotificationHandler=function(){var B="One or more errors occured during the process\n\n";for(var A=0;A<this.aMessages.length;A++){B+=this.aMessages[A]+"\n"}alert(B)};this.oErrorHandler=this.aParams["errorHandler"]||this.oDefaultErrorHandler;this.oClearHandler=this.aParams["clearHandler"]||this.oDefaultClearHandler;this.oNotificationHandler=this.aParams["notificationHandler"]||this.oDefaultNotificationHandler;this.addRule=function(A){A.oValidator=this;A.oElement=PINT.util.form.getElement(A.sTarget,this.sForm);this.aRules.push(A)};this.activate=function(){var A=this;PINT.util.dom.getElementById(this.sForm).onsubmit=function(){for(var B=0;B<A.aRules.length;B++){if(A.aRules[B].oElement.length&&A.aRules[B].oElement.length>0){if(A.aElements.indexOf(A.aRules[B].oElement[0])==-1){A.oClearHandler(A.aRules[B].oElement);if(""!=(sMessage=A.aRules[B].check())){A.aMessages.push(sMessage);A.aElements.push(A.aRules[B].oElement[0])}}}else{if(A.aElements.indexOf(A.aRules[B].oElement)==-1){A.oClearHandler(A.aRules[B].oElement);if(""!=(sMessage=A.aRules[B].check())){A.aMessages.push(sMessage);A.aElements.push(A.aRules[B].oElement)}}}}if(A.aMessages.length>0){A.oNotificationHandler(A.aMessages);A.aMessages=[];A.aElements=[];return false}else{A.aMessages=[];A.aElements=[];return true}}}};PINT.util.form.rule=function(){var self=this;this.aParams=arguments[0]||[];this.sTarget=this.aParams["element"]||"";this.sRule=this.aParams["rule"]||"NOTNULL";this.oConditions=this.aParams["conditions"]||null;this.sMessage=this.aParams["message"]||"";this.oValidator=null;this.oElement=null;this.bChecked=false;this.check=function(){eval("this.check"+this.sRule)();if(!this.bChecked){this.oValidator.oErrorHandler(this.oElement);return this.sMessage}else{return""}};this.checkJS=function(){self.bChecked=eval(self.oConditions())};this.checkNOTNULL=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){self.bChecked=self.bChecked&&(aValues[i].replace(/(\s)*/g,"")!="")}};this.checkEMAIL=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].search(/^[a-zA-Z0-9]([a-zA-Z0-9\+\._-])*(@){1}([a-zA-Z0-9_-])+(\.){1}([a-zA-Z0-9\._-])+$/)!=-1)}}};this.checkDIGITS=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].replace(/([0-9])*/g,"")=="")}}};this.checkNUMERIC=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].replace(/([0-9\.])*/g,"")=="")}}};this.checkALPHA=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].replace(/([a-zA-Z])*/g,"")=="")}}};this.checkUSZIP=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].replace(/([0-9]{5}(\-*)[0-9]{0,5})*/g,"")=="")}}};this.checkUSPHONE=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].replace(/([0-9]{3}\-[0-9]{3}\-[0-9]{4})*/g,"")=="")}}};this.checkMINCHARS=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].length>=parseInt(self.oConditions,10))}}};this.checkMAXCHARS=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&(aValues[i].length<=parseInt(self.oConditions,10))}}};this.checkEQ=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){if(typeof (self.oConditions)=="object"){var sValue=PINT.util.form.getValue(self.oConditions)[0];self.bChecked=self.bChecked&&(aValues[i]==sValue)}else{self.bChecked=self.bChecked&&(aValues[i]==self.oConditions)}}}};this.checkEXTENSION=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;var aExtensions=self.oConditions.split(",");for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){var aTokens=aValues[i].split(".");var sExtension=aTokens[aTokens.length-1].toLowerCase();self.bChecked=self.bChecked&&(aExtensions.indexOf(sExtension)!=-1)}}};this.checkREGEXP=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;var oRegExp=new RegExp(this.oConditions);for(var i=0;i<aValues.length;i++){if(aValues[i].replace(/(\s)*/g,"")!=""){self.bChecked=self.bChecked&&oRegExp.test(aValues[i])}}};this.checkCHECKED=function(){self.bChecked=self.oElement.checked};this.checkSELECTED=function(){self.bChecked=false;for(var i=0;i<self.oElement.length;i++){self.bChecked=self.bChecked||self.oElement[i].checked}};this.checkCC=function(){var aValues=PINT.util.form.getValue(self.oElement);self.bChecked=true;for(var i=0;i<aValues.length;i++){if((sValue=aValues[i].replace(/(\s)*/g,""))!=""){if(sValue.length>19){self.bChecked=false;return }else{var iSum=0;var iMul=1;var iLen=sValue.length;for(var i=0;i<iLen;i++){iDigit=sValue.substring(iLen-i-1,iLen-i);iCode=parseInt(iDigit,10)*iMul;if(iCode>=10){iSum+=(iCode%10)+1}else{iSum+=iCode}if(iMul==1){iMul++}else{iMul--}}if((iSum%10)==0){self.bChecked=self.bChecked&&true}else{self.bChecked=false;return }}}}}}
