var __G=new Object();var N=null,T=true,F=false;function NG(){}NG.rev="$Id: ngcore.js 5331 2007-06-12 23:08:16Z michael $";function isFunc(d){if(typeof d=="function"){return T}if(!isObj(d)){return F}if(String(d.constructor)==String(Function)){return T}try{return(String(d).search(/^\s*function [a-zA-Z]+\(\) \{\s+\[native code\]\s+\}\s*$/)!=-1)}catch(c){}return F}function isDef(b){return b!="undefined"}function isObj(b){return typeof b=="object"&&!isNull(b)}function isArr(b){return isObj(b)&&String(b.constructor)==String(Array)}function isStr(b){return typeof b=="string"}function isNum(b){return typeof b=="number"}function isInt(b){return typeof b=="number"&&Math.floor(b)==b}function isA(d,c){return isObj(d)&&d.constructor==c}function isIntVal(b){return isInt(b)||(isStr(b)&&b.search(/^[\-\+]?[0-9]+$/)!=-1)}function isRegex(b){return(b&&isFunc(b.test))||(isObj(b)&&b.constructor==RegExp)}function isNull(b){return b===N}function isId(b){return isIntVal(b)&&b>=1}function ifnull(){var a=arguments;for(var d=0;d<a.length;d++){if(a[d]!==N){return a[d]}}return N}function ifnot(){var a=arguments;for(var d=0;d<a.length;d++){if(a[d]){return a[d]}}return N}NG.dump=function(t){var n=[],f=[],e,s="--------",m=15,u=0,c=0;s+=s;var p=(arguments.length>1)?arguments[1]:N;if(p&&!isRegex(p)){p=new RegExp(p)}for(e in t){if(p&&!p.test(e)){continue}try{if(isFunc(t[e])){f.push(e)}else{n.push("."+e+" = "+t[e])}}catch(v){n.push("."+e+" = *EXCEPTION* ")}}if(p){c="matching /"+p.source+"/ "}for(e=0;(e+m)<n.length;e+=m){if(!confirm(s+"[ Properties "+c+(e+1)+" to "+(e+m)+" of "+n.length+" ]"+s+"\n"+n.slice(e,e+m).join("\n")+"\n...")){throw ("NG.dump cancelled")}}if(!confirm(s+"[ Properties "+c+(e+1)+" to "+(n.length)+" of "+n.length+" ]"+s+"\n"+n.slice(e,e+m).join("\n")+"\n"+s+"[ Methods "+c+"]"+s+"\n"+f.join(", "))){throw ("NG.dump cancelled")}};if(Math.pow(2,2)==0){Math.pow=function(m,h){if(h==0){return 1}var j=Math.floor(Math.abs(h));var b=Math.abs(h)-j;var k=1;for(var l=0;l<j;l++){k*=m}if(b!=0&&m!=1){k*=Math.exp(Math.log(m)*b)}if(h<0){k=1/k}return k}}if(!isFunc(Array.prototype.splice)){Array.prototype.splice=function(m,k){var h=arguments.length-2,d=h-k,l=this.length+d;var j=this.slice(m,m+k);if(d<=0){for(i=m;i-m<h;i++){this[i]=arguments[i-m+2]}if(d<0){for(i++;i<=l;i++){this[i+d]=this[i]}}}else{for(i=l-1;i>=m+h;i--){this[i]=this[i-d]}for(i=0;i<h;i++){this[m+i]=arguments[i+2]}}this.length=l;return j}}if(!isFunc(Array.prototype.pop)){Array.prototype.pop=function(){return(this.splice(this.length-1,1))[0]}}if(!isFunc(Array.prototype.push)){Array.prototype.push=function(){this.splice(this.length,0,arguments);return this.length}}if(!isFunc(Array.prototype.shift)){Array.prototype.shift=function(){return(this.splice(0,1))[0]}}if(!isFunc(Array.prototype.unshift)){Array.prototype.unshift=function(){this.splice(0,0,arguments);return this.length}}if(!isFunc(Array.prototype.search)){if(isFunc(Array.prototype.indexOf)){Array.prototype.search=Array.prototype.indexOf}else{Array.prototype.search=function(c){for(var d=0;d<this.length;d++){if(this[d]===c){return d}}return -1}}}if(!isFunc(Number.prototype.toFixed)){Number.prototype.toFixed=function(k){if(isNaN(this)||!isFinite(this)||Math.abs(this)>1e+21){return this.toString()}if(!isIntVal(k)||k==0){return(((this<0)?-1:1)*Math.round(Math.abs(this))).toString()}if(k<0||k>20){return NaN}var g=(this<0?"-":"");var j=Math.abs(this),h=Math.floor(j),d=String(Math.round((j-h)*Math.pow(10,k)));d="0".repeat(k-d.length+1)+d;d=d.insert(".",d.length-k);h+=parseInt(d);d=d.substr(d.indexOf(".")+1);return g+h+"."+d}}if(!isFunc(Number.prototype.toPrecision)){Number.prototype.toPrecision=function(d){if(isNaN(this)||!isFinite(this)||!isIntVal(d)){return this.toString()}var e=this==0?1:Math.floor(Math.log(Math.abs(this))/Math.LN10);var f=Math.round(Math.abs(this)).toString().length;if(e<=-7||f>d){return this.toExponential(d-1)}else{return this.toFixed(Math.max(0,-e)+d-(Math.floor(Math.abs(this)).toString().length))}}}if(!isFunc(Number.prototype.toExponential)){Number.prototype.toExponential=function(f){if(isNaN(this)||!isFinite(this)){return this.toString()}var e=this==0?1:Math.floor(Math.log(Math.abs(this))/Math.LN10);var d=(e<=0)?(this*Math.pow(10,Math.min(-e,150))*Math.pow(10,Math.max(0,-e-150))):(this/Math.pow(10,Math.min(e,150))/Math.pow(10,Math.max(0,e-150)));return(isIntVal(f)?d.toFixed(f):d.toString())+"e"+(e>=0?"+":"")+((this==0)?"0":e)}}if(!isFunc(Function.prototype.apply)){Function.prototype.apply=function(o,a){var r,n="__NGapply";o[n]=this;switch(a.length){case 0:r=o[n]();break;case 1:r=o[n](a[0]);break;case 2:r=o[n](a[0],a[1]);break;case 3:r=o[n](a[0],a[1],a[2]);break;case 4:r=o[n](a[0],a[1],a[2],a[3]);break;default:var e="r=o[n](a[0]";for(var i=0;i<a.length;i++){e+=",a["+i+"]"}eval(e+");")}delete o[n];return r}}if(!isFunc(Function.prototype.call)){Function.prototype.call=function(b){return this.apply(b,arguments.slice(1))}}Array.prototype.unset=function(b){if(isInt(b)&&b>=0&&b<this.length){this.splice(b,1)}};Array.prototype.map=function(c){for(var d=0;d<this.length;d++){this[d]=c(this[d])}};NG.cloneObj=function(d){var e=new d.constructor();for(var f in d){e[f]=d[f]}return e};String.prototype.repeat=function(d){var e="";for(var f=0;f<d;f++){e+=this}return e};String.prototype.normalize_nl=function(d){var c=this.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return(d!="\n"?c.replace(/\n/g,d):c)};String.prototype.nl2unix=function(){return this.normalize_nl("\n")};String.prototype.nl2dos=function(){return this.normalize_nl("\r\n")};String.prototype.nl2mac=function(){return this.normalize_nl("\r")};String.prototype.span=function(c){for(var d=0;d<this.length&&c.indexOf(this.charAt(d))!=-1;d++){}return d};String.prototype.insert=function(d,c){return this.substr(0,c)+d+this.substr(c)};String.prototype.rev=function(){var c="";for(var d=this.length-1;d>=0;d--){c+=this.charAt(d)}return c};String.prototype.toHex=function(){var d="";for(var e,f=0;f<this.length;f++){e=this.charCodeAt(f).toString(16).toUpperCase();d+=(e.length==1?"0":"")+e}return d};String.prototype.fromHex=function(){var c="";for(var d=0;d<this.length;d+=2){c+=String.fromCharCode(parseInt(this.substr(d,2),16))}return c};Number.prototype.ordinal=function(d){if(!isDef(typeof d)){d=T}var c=Math.abs(this);return(d?this:"")+["th","st","nd","rd","th"][Math.min(c%100-c%10==10?0:c%10,4)]};NG.round=function(d,c){if(arguments.length<2){c=0}return new Number(d).toFixed(c)};NG.point=function(d,c){this.x=parseInt(d);this.y=parseInt(c)};NG.getPagePos=function(g,h){if(arguments.length==1){h=null}if(h&&g!=h){var f=new NG.point(0-g.scrollLeft,0-g.scrollTop)}else{var f=new NG.point(g.offsetLeft-g.scrollLeft,g.offsetTop-g.scrollTop);h=null}var j,k;if(g.parentNode&&g.parentNode.nodeType==1){k=NG.getPagePos(g.parentNode,(h?h:g.offsetParent));f.x+=k.x;f.y+=k.y}else{if(g.tagName=="BODY"&&isDef(typeof g.leftMargin)&&NG.ua.is("MACIE")){f.x+=parseInt((j=g.currentStyle.marginLeft.match(/([0-9]+)px/))?j[1]:g.leftMargin);f.y+=parseInt((j=g.currentStyle.marginTop.match(/([0-9]+)px/))?j[1]:g.topMargin)}}if(NG.ua.isEng("MSIE","6.0","=")&&g.currentStyle.styleFloat!="none"){f.y-=g.offsetTop}return f};NG.include=function(d,c){if(!isObj(__G.includes)){__G.includes=new Object()}if(!c&&isDef(typeof __G.includes[d])){return F}__G.includes[d]=T;document.writeln('<script type="text/javascript" language="Javascript1.2" src="'+d+'"><\/script>');return T};NG.imgPreload=function(b){new Image().src=b};NG.rollover=function(g,h,e){if(!isDef(typeof g.onmouseout)||isNull(g.onmouseout)){g.altSrc=h;g.origSrc=g.src;if(e){NG.imgPreload(g.altSrc)}g.onmouseout=function f(){this.src=this.origSrc}}g.src=g.altSrc};NG.attachRollovers=function(k){if(arguments.length==0){k=true}var j,h,f=document.getElementsByTagName("IMG");function g(){NG.rollover(this,this.getAttribute("altsrc"))}for(j=0;j<f.length;j++){h=f[j].getAttribute("altsrc");if(isStr(h)&&h!=""){if(k){NG.imgPreload(h)}f[j].onmouseover=g}}};function userAgent(){this.App=N;this.AppVer=[];this.Engine=N;this.EngineVer=[];this.OS=N;this.OSRel=N;this.OSVer=[];this.Arch=N;var e=navigator;var f=e.userAgent.indexOf("(");var a=e.userAgent.substr(f,e.userAgent.length-f);f=e.userAgent.substr(0,f);if((r=a.match(/ Opera ([.0-9]+)/))||(r=f.match(/^Opera\/([0-9.]+) /))){this.App="Opera";this.AppVer=r[1].split(".");this.Engine="OPERA";this.EngineVer=r[1].split(".")}else{if(a.indexOf("(KHTML, like Gecko)")!=-1||(r=a.match(/ KHTML\/([\.0-9]+) \(like Gecko\)/))){this.Engine="KHTML";this.EngineVer=r?r[1].split("."):N;if((r=a.match(/ Konqueror\/([\.0-9]+); /))){this.App="Konqueror";this.AppVer=r[1].split(".")}else{if((r=a.match(/ Safari\/([\.0-9]+)( |$)/))){this.App="Safari";this.AppVer=r[1].split(".");if(isNull(this.EngineVer)){this.EngineVer=this.AppVer}}}}else{if(e.product&&e.product=="Gecko"){this.Engine="GECKO";this.EngineVer=e.productSub;if(r=a.match(/ Netscape\/([6-9](\.[0-9]+)?)( |$)/)){this.App="Netscape";this.AppVer=r[1].split(".")}else{if((r=a.match(/ (SeaMonkey|Firefox|Camino|Netscape6)\/([0-9]+(\.([0-9]|b|rc|a|p)+)*)( |$)/))){this.App=r[1].replace(/6$/,"");this.AppVer=r[2].split(".")}else{if((r=a.match(/[;\(] rv:([\.0-9]+)[ \)]/))){this.App="Mozilla";this.AppVer=r[1].split(".")}else{if(e.vendor&&e.vendor.length>0){this.App=e.vendor;this.AppVer=e.vendorSub.split(".")}}}}}else{if((r=a.match(/[;\(] ?MSIE ([\.0-9]+)[;\)]/))){if(a.search("Mac")!=-1){this.Engine="MACIE"}else{this.Engine="MSIE"}this.EngineVer=r[1].split(".");if(r=a.match(/ Netscape\/([6-9](\.[0-9]+)?)( |$)/)){this.App="Netscape";this.AppVer=r[1].split(".")}else{this.App=e.appName;this.AppVer=this.EngineVer}}else{if((r=e.userAgent.match(/^Mozilla\/([\.0-9]+)/))&&r[1]<5){this.Engine="NS4";this.EngineVer=r[1];this.App="Netscape";this.AppVer=r[1]}}}}}f=e.platform?e.platform:N;if(f&&f.search(/^Linux.*/)!=-1){this.OS="Unix";this.OSRel="Linux";if(f.search(/^Linux i[0-9]86/)!=-1||a.search(/Linux i[0-9]86;/)!=-1){this.Arch="x86"}}else{if(f=="Win32"){this.OS="Win";if(e.oscpu&&(r=e.oscpu.match(/^Win(dows)? ?(95|98|NT)?( ?[0-9]+\.[0-9]+)?/))){this.OSRel=r[2];this.OSVer=r[3]?r[3].split("."):""}else{if((r=e.appVersion.match(/(\(|; ?)Win(dows)? ?(95|98|NT)?( ?[0-9]+\.[0-9]+)?/))){this.OSRel=r[3];this.OSVer=r[4]?r[4].split("."):""}}this.Arch=e.cpuClass?e.cpuClass:"x86"}else{if(f&&(r=f.match(/^Mac(PPC|Intel)$/))){this.OS="MacOS";this.Arch=(r[1]=="Intel"?"x86":"PPC");if(f.search(/ Mac OS X /)){this.OSRel="X";this.OSVer=[10]}}else{if(f&&(r=f.match(/^(SunOS) (.*)/))){this.OS=r[1];this.Arch=r[2]}}}}}NG.ua=function(){};NG.ua.get=function(){if(!isObj(__G.userAgent)){__G.userAgent=new userAgent()}return __G.userAgent};NG.ua.cmp=function(f,h,g){if(!isArr(f)){f=String(f).split(".")}if(!isArr(g)){g=String(g).split(".")}f.map(parseInt);g.map(parseInt);var k=Math.min(f.length,g.length);for(var j=0;j<k;j++){switch(h){case">":case">=":if(f[j]>g[j]){return T}if(f[j]<g[j]){return F}break;case"==":case"=":if(f[j]!=g[j]){return F}break;case"<":case"<=":if(f[j]>g[j]){return F}if(f[j]<g[j]){return T}break;case"!=":if(f[j]!=g[j]){return T}break}}switch(h){case">=":if(f.length==g.length){return T}case">":return(f.length>g.length);case"=":case"==":return(f.length==g.length);case"<=":if(f.length==g.length){return T}case"<":return(f.length<g.length);case"!=":return(f.length!=g.length)}};NG.ua.isCmp=function(c,d){return isRegex(c)?c.test(d):d==c};NG.ua.isEng=function(g,h,j){var a=arguments,k=NG.ua.get();if(a.length<3){j="="}if(a.length>0&&!isNull(g)&&k.Engine!=g){return F}if(a.length>1&&!isNull(h)&&!NG.ua.cmp(k.EngineVer,j,h)){return F}return T};NG.ua.isApp=function(g,h,j){var a=arguments,k=NG.ua.get();if(a.length<3){j="="}if(a.length>0&&!isNull(g)&&!NG.ua.isCmp(g,k.App)){return F}if(a.length>1&&!isNull(h)&&!NG.ua.cmp(k.AppVer,j,h)){return F}return T};NG.ua.isOS=function(j,n,l,a,m){var o=arguments,k=NG.ua.get();if(o.length<5){m="="}if(o.length>0&&!isNull(j)&&k.OS!=j){return F}if(o.length>1&&!isNull(n)&&k.OSRel!=n){return F}if(o.length>2&&!isNull(l)&&!NG.ua.cmp(k.osVer,m,l)){return F}if(o.length>3&&!isNull(a)&&k.Arch!=a){return F}return T};NG.ua.is=function(f,h,g,j,k){return(NG.ua.isEng(f,h,k)&&NG.ua.isApp(g,j,k))};NG.ua.hasPlugin=function(c,d){};NG.popup=function(){NG.popup.open.apply(NG.popup,arguments);return false};NG.popup.open=function(n){if(!isDef(typeof n)){n="/blank.php"}if(!isStr(n)){n=n.href}if(!isObj(__G.popup)){__G.popup=new Object()}var e=arguments,d="",p,g,a,o=(e.length>1&&isObj(e[e.length-1])?NG.cloneObj(e[e.length-1]):new Object());if(e.length>=2&&isInt(e[1])){o.width=e[1]}if(e.length>=3&&isInt(e[2])){o.height=e[2]}g={width:600,height:400,toolbars:"no",scrollbars:"yes",resizable:"yes"};for(p in g){if(!isDef(typeof o[p])){o[p]=g[p]}}if(isDef(typeof o.position)){switch(o.position){case"windowcentre":case"windowcenter":o.left=Math.max(0,Math.round((screen.width/2)-(o.width/2)));o.top=Math.max(0,Math.round((screen.height/2)-(o.height/2)));break}delete o.position}if(isDef(typeof o.modal)&&!NG.popup.isClosed(__G.popup.modalWindow)){return null}if(isDef(typeof o.modal)){o.dependant=N}if(isDef(typeof o.name)){a=o.name;delete o.name}else{a=n.replace(/[^a-zA-Z0-9_]/g,"")}if(isDef(typeof o.arg)){if(!isObj(__G.popup.args)){__G.popup.args=new Object()}__G.popup.args[a]=o.arg;delete o.arg}for(p in o){if(isStr(o[p])||isInt(o[p])){d+=(d==""?"":",")+p+"="+o[p]}else{if(isNull(o[p])){d+=(d==""?"":",")+p}}}p=window.open(n,a,d);try{p.focus()}catch(q){return null}if(isDef(typeof o.modal)){__G.popup.modalWindow=p;NG.popup.focusModal.install(window.top)}if(isDef(typeof o.dependant)&&(o.dependant===true||o.dependant==="yes")){if(!isObj(__G.popup.dependantWindows)){__G.popup.dependantWindows=new Object()}__G.popup.dependantWindows[a]=p;NG.addEventListener(window,"unload",NG.popup.closeDependant)}return p};NG.unpopup=function(b){if(NG.popup.hasOpener()){if(arguments.length==0||b){window.opener.location.reload()}window.opener.focus()}window.close()};NG.popup.isClosed=function(b){return(!isObj(b)||b.closed)};NG.popup.hasOpener=function(){return !NG.popup.isClosed(window.opener)};NG.popup.getArg=function(){var b=window.opener;if(isObj(b.__G)&&isObj(b.__G.popup)&&isObj(b.__G.popup.args)&&isDef(typeof b.__G.popup.args[window.name])){return b.__G.popup.args[window.name]}return N};NG.popup.focusModal=function(b){if(isObj(__G.popup)&&!NG.popup.isClosed(__G.popup.modalWindow)){__G.popup.modalWindow.focus();NG.stopPropagation(b);return false}else{NG.popup.focusModal.uninstall(window.top)}};NG.popup.focusModal.install=function(c){NG.addEventListener(c,"focus",NG.popup.focusModal);for(var d=0;d<c.frames.length;d++){NG.popup.focusModal.install(c.frames[d])}};NG.popup.focusModal.uninstall=function(c){NG.removeEventListener(c,"focus",NG.popup.focusModal);for(var d=0;d<c.frames.length;d++){NG.popup.focusModal.uninstall(c.frames[d])}};NG.popup.closeDependant=function(){if(!isObj(__G.popup)||!isObj(__G.popup.dependantWindows)){return}var c=__G.popup.dependantWindows;for(var d in c){if(!NG.popup.isClosed(c[d])){c[d].close()}}};NG.heightToContent=function(){window.resizeBy(0,document.body.clientHeight-document.documentElement.clientHeight)};NG.addEventListener=function(d,f,e){if((f=="mousewheel")&&(NG.ua.isEng("GECKO"))){return NG.addEventListener(d,"DOMMouseScroll",e)}else{if(isFunc(d.addEventListener)&&(f!="dblclick"||!NG.ua.is("KHTML"))){return d.addEventListener(f,e,F)}else{if(isFunc(d.attachEvent)){return d.attachEvent("on"+f,NG._msieE._addReg(d,f,e))}else{if(!isObj(d.NGEventListener)){d.NGEventListener=new Object()}if(!isArr(d.NGEventListener[f])){d.NGEventListener[f]=new Array()}d.NGEventListener[f][d.NGEventListener[f].length]=e;d["on"+f]=function(c){if(!c){c=window.event}for(var b=0;b<this.NGEventListener[f].length;b++){var a=this.NGEventListener[f][b];a.call(this,c)}}}}}};NG._msieE={};NG._msieE._reg=[];NG._msieE._addReg=function(f,h,g){var e=function(a){if(!a){a=window.event}g.apply(f,[a])};NG._msieE._reg.push({nf:f,eventName:h,origFunc:g,newFunc:e});return e};NG._msieE._delReg=function(f,n,k){var l=NG._msieE._reg;for(var m=l.length-1;m>=0;m--){try{if(l[m].eventName==n&&l[m].nf==f&&l[m].origFunc==k){var e=l[m].newFunc;delete l[m];l.splice(m,1);return e}}catch(o){}}return function(){}};NG.removeEventListener=function(e,h,f){if(isFunc(e.removeEventListener)&&(h!="dblclick"||!NG.ua.is("KHTML"))){return e.removeEventListener(h,f,F)}else{if(isFunc(e.detachEvent)){return e.detachEvent("on"+h,NG._msieE._delReg(e,h,f))}else{if(isObj(e.NGEventListener)&&isArr(e.NGEventListener[h])){for(var g=0;g<e.NGEventListener[h].length;g++){if(e.NGEventListener[h][g]==f){delete e.NGEventListener[h][g];return}}}}}};NG.stopPropagation=function(b){if(!isObj(b)&&isObj(window.event)){b=window.event}if(isObj(b)){if(isDef(typeof b.stopPropagation)&&isFunc(b.stopPropagation)){b.stopPropagation()}else{if(isDef(typeof b.cancelBubble)){b.cancelBubble=T}else{if(isDef(typeof b.originalEvent)&&isObj(b.originalEvent)){NG.stopPropagation(b.originalEvent)}}}}};NG.preventDefault=function(b){if(!isObj(b)&&isObj(window.event)){b=window.event}if(isObj(b)){if(isDef(typeof b.preventDefault)&&isFunc(b.preventDefault)){b.preventDefault()}else{if("returnValue" in b){b.returnValue=F}else{if(isDef(typeof b.originalEvent)&&isObj(b.originalEvent)){return NG.preventDefault(b.originalEvent)}}}}return false};NG.applyCallable=function(func,args){if(arguments.length<2){args=[]}else{if(!isArr(args)){args=[args]}}if(isFunc(func)){return func.apply(window,args)}else{if(isStr(func)){return eval(func)}else{if(isArr(func)&&func.length==2&&isObj(func[0])&&isStr(func[1])&&isFunc(func[0][func[1]])){return func[0][func[1]].apply(func[0],args)}}}};NG.hitch=function(d,c){return function(){c.apply(d,arguments)}};if(NG.ua.isEng("MSIE")){try{document.execCommand("BackgroundImageCache",false,true)}catch(err){}};
