/**
 * Copyright (c) 2008-2010 Borneosoft Pty. Ltd.
 * All rights reserved.
 * This program and the accompanying materials are
 * owned by Borneosoft Pty. Ltd.
 * Copying, modifying, and redistributing are prohibited
 * without written permission from Borneosoft Pty. Ltd.
 * 
 */
var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version"},searchString:function(d){for(var a=0;a<d.length;a++){var b=d[a].string;var c=d[a].prop;this.versionSearchString=d[a].versionSearch||d[a].identity;if(b){if(b.indexOf(d[a].subString)!=-1){return d[a].identity}}else{if(c){return d[a].identity}}}},searchVersion:function(b){var a=b.indexOf(this.versionSearchString);if(a==-1){return}return parseFloat(b.substring(a+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"}]};BrowserDetect.init();var fx;var ie6=false;var ie7=false;var ie8=false;if(BrowserDetect.browser=="Explorer"||BrowserDetect.browser=="Windows"){fx="ie";var ver=Math.round(BrowserDetect.version);if(ver<=6){ie6=true}else{if(ver<=7){ie7=true}else{if(ver<=8){ie8=true}}}}else{if(BrowserDetect.browser=="Mozilla"||BrowserDetect.browser=="Netscape"||BrowserDetect.browser=="Firefox"||BrowserDetect.browser=="Chrome"||BrowserDetect.browser=="Safari"||BrowserDetect.browser=="Konqueror"||BrowserDetect.browser=="Mac"||BrowserDetect.browser=="Linux"){fx="ns"}else{fx=BrowserDetect.browser}}function IEVersion(){var g=navigator,h=window,d=document;var c="NA";var b=g.userAgent;var f="NA";var a="NA";if(/msie/i.test(b)&&(!h.opera)){if(h.attachEvent&&h.ActiveXObject){c=parseInt((b.match(/.+ie\s([\d.]+)/i)||[])[1]);if(c==7){if(d.documentMode){c=8;if(/trident\/\d/i.test(b)){a="CompatMode"}else{a="IE7Mode"}}}else{if(c==8){if(d.documentMode){a="IE8Mode"}}}f=(d.documentMode)?d.documentMode:(d.compatMode&&d.compatMode=="CSS1Compat")?7:5}}return{UserAgent:b,Version:c,BrowserMode:a,DocMode:f}}var ieVer=new IEVersion();if(fx=="ns"){try{document.createElement("input");HTMLElement.prototype.click=function(){if(typeof this.onclick=="function"){this.onclick({type:"click"})}}}catch(e){alert("click method for HTMLElement couldn't be added")}try{document.createElement("a");HTMLElement.prototype.click=function(){if(typeof this.onclick=="function"){if(this.onclick({type:"click"})&&this.href){window.open(this.href,this.target?this.target:"_self")}}else{if(this.href){window.open(this.href,this.target?this.target:"_self")}}}}catch(e){alert("click method for HTMLAnchorElement couldn't be added")}HTMLElement.prototype.__defineSetter__("outerHTML",function(c){this.outerHTMLInput=c;var a=this.ownerDocument.createRange();a.setStartBefore(this);var b=a.createContextualFragment(c);this.parentNode.replaceChild(b,this)});var emptyElements={HR:true,BR:true,IMG:true,INPUT:true};var specialElements={TEXTAREA:true};HTMLElement.prototype.__defineGetter__("outerHTML",function(){var f=this;var c="";switch(f.nodeType){case Node.ELEMENT_NODE:c+="<";c+=f.nodeName;if(!specialElements[f.nodeName]){for(var b=0;b<f.attributes.length;b++){c+=" "+f.attributes[b].nodeName.toUpperCase()+'="'+f.attributes[b].nodeValue+'"'}c+=">";if(!emptyElements[f.nodeName]){c+=f.innerHTML;c+="</"+f.nodeName+">"}}else{switch(f.nodeName){case"TEXTAREA":for(var b=0;b<f.attributes.length;b++){if(f.attributes[b].nodeName.toLowerCase()!="value"){c+=" "+f.attributes[b].nodeName.toUpperCase()+'="'+f.attributes[b].nodeValue+'"'}else{var d=f.attributes[b].nodeValue}}c+=">";c+=d;c+="</"+f.nodeName+">";break}}break;case Node.TEXT_NODE:c+=f.nodeValue;break;case Node.COMMENT_NODE:c+="<!--"+f.nodeValue+"-->";break}return c});if(typeof CSSStyleDeclaration!="undefined"&&!CSSStyleDeclaration.prototype.pixelLeft){CSSStyleDeclaration.prototype.__defineSetter__("pixelTop",function(a){this.top=a+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelLeft",function(a){this.left=a+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelRight",function(a){this.right=a+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelBottom",function(a){this.bottom=a+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelWidth",function(a){this.width=a+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelHeight",function(a){this.height=a+"px"});CSSStyleDeclaration.prototype.__defineGetter__("pixelTop",function(){return parseInt(this.top)});CSSStyleDeclaration.prototype.__defineGetter__("pixelLeft",function(){return parseInt(this.left)});CSSStyleDeclaration.prototype.__defineGetter__("pixelRight",function(){return parseInt(this.right)});CSSStyleDeclaration.prototype.__defineGetter__("pixelBottom",function(){return parseInt(this.bottom)});CSSStyleDeclaration.prototype.__defineGetter__("pixelWidth",function(){return parseInt(this.width)});CSSStyleDeclaration.prototype.__defineGetter__("pixelHeight",function(){return parseInt(this.height)});HTMLElement.prototype.__defineGetter__("nsCurrentStyle",function(){var c={};try{var b=this;for(var a=0;a<properties.length;a++){c.__defineGetter__(properties[a],encapsulateObjects(b,properties[a]))}}catch(d){}return c});function encapsulateObjects(a,b){return function(){return document.defaultView.getComputedStyle(a,null).getPropertyValue(b)}}}}function trim(a){if(typeof a!="undefined"&&a!=null&&typeof a=="string"){return a.replace(/^\s*/,"").replace(/\s*$/,"")}else{return a}}function hexToDigit(a){var b=0;if(a=="0"||a=="1"||a=="2"||a=="3"||a=="4"||a=="5"||a=="6"||a=="7"||a=="8"||a=="9"){b=parseInt(a)}else{if(a=="a"||a=="A"){b=10}else{if(a=="b"||a=="B"){b=11}else{if(a=="c"||a=="C"){b=12}else{if(a=="d"||a=="D"){b=13}else{if(a=="e"||a=="E"){b=14}else{if(a=="f"||a=="F"){b=15}}}}}}}return b}function urlEncode(g){var f={},c={},d=0,b=[];var a=g.toString();f["!"]="%21";f["%20"]="+";a=encodeURIComponent(a);for(search in f){replace=f[search];b=a.split(search);a=b.join(replace)}return a.replace(/(\%([a-z0-9]{2}))/g,function(j,i,h){return"%"+h.toUpperCase()});return a}function urlDecode(g){var h="";if(typeof g!="undefined"&&g){var a=g.length;var d;var c,b;var f;d=0;while(d<a){f=g.charAt(d);if(f=="%"){d++;c=parseInt(hexToDigit(g.charAt(d)))<<4;d++;b=parseInt(hexToDigit(g.charAt(d)));h+=String.fromCharCode(c+b)}else{h+=f}d++}}return h}function htmlEncode(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/&/g,"&amp;")}function htmlEncode1(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")}function _nN(a){if(a){if(a.nodeType==1){return a}else{return _nN(a.nextSibling)}}else{return null}}function _pN(a){if(a){if(a.nodeType==1){return a}else{return _pN(a.previousSibling)}}else{return null}}function getOffsets(a){var f=a.target;if(typeof f.offsetLeft=="undefined"){f=f.parentNode}var b=getPageCoords(f);var c={x:window.pageXOffset+a.clientX,y:window.pageYOffset+a.clientY};var d={offsetX:c.x-b.x,offsetY:c.y-b.y};return d}function getPageCoords(a){var b={x:0,y:0};while(a){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}return b}function findPosX(d){var i=0;var f=d;var a;var h,b,g;while(typeof f!="undefined"&&f){h=parseInt(f.style.borderLeftWidth);b=parseInt(f.style.paddingLeft);g=parseInt(f.style.marginLeft);i+=f.offsetLeft+(!isNaN(h)?h:0)+(!isNaN(b)?b:0)+(!isNaN(g)?g:0);a=f;try{f=f.offsetParent}catch(c){break}}if(typeof a!="undefined"&&a){if(typeof a.left!="undefined"&&a.left){i+=a.left}}return i}function findPosY(g){var d=0;var i=g;var a;var c,h,b;while(typeof i!="undefined"&&i){c=parseInt(i.style.borderTopWidth);h=parseInt(i.style.paddingTop);b=parseInt(i.style.marginTop);d+=i.offsetTop+(!isNaN(c)?c:0)+(!isNaN(h)?h:0)+(!isNaN(b)?b:0);a=i;try{i=i.offsetParent}catch(f){break}}if(typeof a!="undefined"&&a){if(typeof a.top!="undefined"&&a.top){d+=a.top}}return d}function _dm(){var a={w:0,h:0};if(typeof window.innerHeight!="undefined"){a.h=window.innerHeight;a.w=window.innerWidth}else{if(document.documentElement&&typeof document.documentElement.clientHeight!="undefined"&&document.documentElement.clientHeight!=0){a.h=document.documentElement.clientHeight;
a.w=document.documentElement.clientWidth}else{if(document.body&&typeof document.body.clientHeight!="undefined"){a.h=document.body.clientHeight;a.w=document.body.clientWidth}else{}}}return a}function getStyle(x,styleProp){if(window.getComputedStyle){var y=x.ownerDocument.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp)}else{if(fx=="ie"){if(x.currentStyle){var y=eval("x.currentStyle."+styleProp)}}else{if(x.nsCurrentStyle){var y=eval("x.nsCurrentStyle."+styleProp)}}}return y}function getStyleInt(b,a){var c=0;try{var f=getStyle(b,a);var d=f.split("px");c=d[0]}catch(g){}return c}function XmlDocument(){}XmlDocument.create=function(){try{if(document.implementation&&document.implementation.createDocument){var b=document.implementation.createDocument("","",null);if(b.readyState==null){b.readyState=1;b.addEventListener("load",function(){b.readyState=4;if(typeof b.onreadystatechange!="undefined"){b.onreadystatechange()}},false)}return b}if(window.ActiveXObject){return new ActiveXObject(getControlPrefix()+".XmlDom")}}catch(a){}throw new Error("Your browser does not support XmlDocument objects")};function _zt(b){var c;if(typeof b=="string"){c=document.getElementById(b)}else{c=b}if(typeof c!="undefined"&&c){var a=c.value;if(typeof a!="undefined"&&a){if(a==""||(a!=""&&a.length<3)){a="###"}var d=document.body;var f=document.createElement("span");f.style.fontFamily=c.style.fontFamily;f.style.whiteSpace=c.style.whiteSpace;c.style.display="none";f.innerHTML=a.replace(/</,"H").replace(/>/,"H");d.appendChild(f);c.style.pixelWidth=f.offsetWidth+5;c.style.display="inline";f.style.display="none";d.removeChild(f)}}}function getRadioValue(a){return"<"+a+">"+_getRadioValue(a)+"</"+a+">"}function _getRadioValue(a){var c="";var d=document.getElementsByName("id"+a);if(typeof d!="undefined"&&d){var b;for(b=0;b<d.length;b++){if(d[b].checked){c=d[b].value;break}}}return c}function disableRadio(a,c){var d=document.getElementsByName("id"+a);if(typeof d!="undefined"&&d){var b;for(b=0;b<d.length;b++){d[b].disabled=c}}return -1}function getCheckboxValue(a){return"<"+a+">"+_getCheckboxValue(a)+"</"+a+">"}function _getCheckboxValue(a){var b="";var c=document.getElementById("id"+a);if(typeof c!="undefined"&&c){if(c.checked){b="1"}else{b="0"}}return b}window.onload=function(){layout()};window.onresize=function(){layout()};function layout(){var d=_dm();var b=document.getElementById("idPageBody");var k=document.getElementById("idTelp");var l=document.getElementById("idLogo");var a=document.getElementById("idHorzLine");var c=document.getElementById("idCompanyNoticeLine");var i=l.offsetHeight+a.offsetHeight+c.offsetHeight+k.offsetHeight+32;var j=d.w;var g=d.h-i;b.style.pixelWidth=j;b.style.pixelHeight=g;var f=document.getElementById("id_j_username");f.focus()}function rememberMeClick(){var a=document.getElementById("idLogonRememberMe");if(a.checked){var b=confirm("By enabling 'Remember Me', you can bookmark the page after you successfully logon\nand come back to the bookmarked page next time without logon.\n\nPlease do not enable this if you use shared or public computer.\nAre you sure you want to enable this?");if(b==false){a.checked=false}}};