var g_pageDownFuncs=new Array();
function Browser(){
var ua,s,i;
this.isIE=false;
this.isOP=false;
this.isNS=false;
this.isSA=false;
this.isKO=false;
this.version=null;
ua=navigator.userAgent;
s="MSIE";
if(document.all&&(i=ua.indexOf(s))){
this.isIE=true;
this.version=parseFloat(ua.substr(i+s.length));
return;
}
s="Opera";
if((i=ua.indexOf(s))>=0){
this.isOP=true;
this.version=parseFloat(ua.substr(i+s.length));
return;
}
s="Netscape6/";
if((i=ua.indexOf(s))>=0){
this.isNS=true;
this.version=parseFloat(ua.substr(i+s.length));
return;
}
s="Safari";
if((i=ua.indexOf(s))>=0){
this.isSA=true;
this.version=parseFloat(ua.substr(i+s.length));
}
s="Gecko";
if((i=ua.indexOf(s))>=0){
this.isNS=true;
this.version=6.1;
return;
}
s="konqueror";
if((i=ua.indexOf(s))){
this.isKO=true;
this.version=parseFloat(ua.substr(i+s.length));
return;
}
}
var browser=new Browser();
if(browser.isIE){
document.onmousedown=pageMousedown;
}else{
document.addEventListener("mousedown",pageMousedown,true);
}
function pageMousedown(_4){
var el=browser.isIE?window.event.srcElement:(_4.target.tagName?_4.target:_4.target.parentNode);
var _6=false;
for(i=0;i<g_pageDownFuncs.length;i++){
if(g_pageDownFuncs[i].ProcessMouseDown(el,_4)){
if(!_6){
_6=true;
}
}
}
return _6;
}
function getContainerWith(_7,_8,_9){
while(_7!=null){
if(_7.tagName!=null&&_7.tagName==_8&&hasClassName(_7,_9)){
return _7;
}
_7=_7.parentNode;
}
return _7;
}
function hasClassName(el,_b){
var i,_d;
_d=el.className.split(" ");
for(i=0;i<_d.length;i++){
if(_d[i]==_b){
return true;
}
}
return false;
}
function getRemovedClassName(el,_f){
var i,_11,_12;
if(el.className==null){
return null;
}
var _13=new RegExp("(^|\\s)("+_f+")(\\s|$)");
return el.className.replace(_13,"");
}
function removeClassName(el,_15){
el.className=getRemovedClassName(el,_15);
}
function getPageOffset(el,_17){
var pos=new Object();
pos.x=0;
pos.y=0;
while((el!=_17)&&(el!=null)){
pos.y+=el.offsetTop;
pos.x+=el.offsetLeft;
el=el.offsetParent;
}
return pos;
}
function GetMaxXY(){
var _19,_1a;
if(browser.isIE){
_19=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)+(document.documentElement.clientWidth!=0?document.documentElement.clientWidth:document.body.clientWidth);
_1a=Math.max(document.documentElement.scrollTop,document.body.scrollTop)+(document.documentElement.clientHeight!=0?document.documentElement.clientHeight:document.body.clientHeight);
}
if(browser.isOP||browser.isSA){
_19=document.documentElement.scrollLeft+window.innerWidth;
_1a=document.documentElement.scrollTop+window.innerHeight;
}
if(browser.isNS){
_19=window.scrollX+window.innerWidth;
_1a=window.scrollY+window.innerHeight;
}
this.maxX=_19;
this.maxY=_1a;
}
var NODE_TYPE_TEXT=3;
function DoXmlHttpRequest(url,_1c){
var req=null;
if(window.ActiveXObject){
try{
req=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
req=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
}else{
if(window.XMLHttpRequest){
try{
req=new XMLHttpRequest();
}
catch(e){
}
}
}
if(req){
req.onreadystatechange=function(){
_1c(req);
delete (req);
};
req.open("GET",url,true);
req.send("");
}
return req;
}
function XmlHttpGetRootNode(req){
if(browser.isIE){
return req.responseXML.childNodes[1];
}else{
return req.responseXML.childNodes[0];
}
}
function DoXmlHttpRequestV(url,_20,_21){
var _22=function(req){
if((req.readyState==4)&&(req.status==200)){
var _24=XmlHttpGetRootNode(req);
if((_24!=null)&&(!_21||(_24.nodeName==_21))){
_20(_24);
}
}
};
DoXmlHttpRequest(url,_22);
}
function DisabledFieldListener(){
g_pageDownFuncs.push(this);
this.ProcessMouseDown=function(el,_26){
var el;
if((el.DisabledClick!=null)&&(el.disabled)){
el.DisabledClick();
return true;
}
return false;
};
}
g_disabledFieldListener=new DisabledFieldListener();
function GetFlashMovie(_27){
if(window.document[_27]){
return window.document[_27];
}
if((!browser.isIE)&&document.embeds&&document.embeds[_27]){
return document.embeds[_27];
}else{
return $(_27);
}
}
function SetPngImageSource(_28,_29){
if((browser.isIE)&&(browser.version<7)){
_28.src="images/fakepng.gif";
_28.runtimeStyle.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_29+"', sizingMethod='scale')";
}else{
_28.src=_29;
}
}
function SetInnerText(el,_2b){
if(document.all){
el.innerText=_2b;
}else{
el.textContent=_2b;
}
}
function GetInnerText(el){
return document.all?el.innerText:el.innerContent;
}
function SwapElementVisibilityEx(_2d,_2e,vis,_30){
_2e.style.visibility="hidden";
_2e.style.display="none";
_2d.style.visibility=vis;
_2d.style.display=_30;
}
function SwapElementVisibility(_31,_32){
SwapElementVisibilityEx(_31,_32,"visible","block");
}
function SetElementDisplay(el,_34,_35){
if(_34){
el.style.visibility="visible";
el.style.display=_35;
}else{
el.style.visibility="hidden";
el.style.display="none";
}
}
function StopBubble(e){
if(browser.isIE){
e=window.event;
}
e.cancelBubble=true;
e.returnValue=false;
if(e.stopPropagation){
e.stopPropagation();
e.preventDefault();
}
}
function BookmarkPage(_37,url){
if(window.sidebar){
window.sidebar.addPanel(_37,url,"");
}else{
if(window.external){
window.external.AddFavorite(url,_37);
}else{
if(window.opera&&window.print){
}
}
}
return true;
}
function BuildXmlFormData(_39){
var _3a=null;
for(var i=0;i<_39.elements.length;++i){
var _3c=_39.elements[i];
var _3d=null;
if(_3c.type){
switch(_3c.type){
case "checkbox":
case "radio":
if(_3c.checked){
_3d=escape(_3c.value);
}
break;
default:
_3d=escape(_3c.value);
break;
}
}else{
if(_3c.options){
_3d=escape(_3c.options[_3c.selectedIndex].value);
}else{
_3d=escape(_3c.value);
}
}
if(_3d!=null){
if(_3a!=null){
_3a+="&"+_3c.name+"="+_3d;
}else{
_3a=_3c.name+"="+_3d;
}
}
}
return (_3a!=null)?_3a:"";
}
function KeepSessionAlive(){
DoXmlHttpRequest(g_xmlBase+"KeepAlive.xml.php",function(req){
});
setTimeout(KeepSessionAlive,30000);
}
function GetStyle(obj,_40,_41){
try{
if(obj.currentStyle){
var _42=eval("obj.currentStyle."+_40);
}else{
if(browser.isSA&&obj.style.display=="none"){
obj.style.display="";
var _43=true;
}
var _42=document.defaultView.getComputedStyle(obj,"").getPropertyValue(_41);
if(browser.isSA&&_43){
obj.style.display="none";
}
}
}
catch(e){
}
return _42;
}
function parsePxWidth(val){
return parseInt(((val!=""&&val.indexOf("px")!==-1)?val.slice(0,val.indexOf("px")):0));
}
function $(_45){
return document.getElementById(_45);
}
function $e(_46){
return browser.isIE?window.event.srcElement:_46.currentTarget;
}
String.prototype._format=function(xml,_48){
var _49=""+this;
var _4a=/[^{]?\{([^}]+)\}/gi;
var _4b,_4c="";
var _4d=0;
while(_4b=_4a.exec(_49)){
var _4e=parseInt(_4b[1]);
var _4f;
if(isNaN(_4e)){
if(!xml){
throw "error";
}
_4f=_48[0].getAttribute(_4b[1]);
}else{
if(xml){
++_4e;
}
if(_4e>=_48.length){
throw "error";
}
_4f=_48[_4e];
}
if(_4b.index!=0){
_4c+=_49.slice(_4d,_4b.index+1);
}
_4c+=_4f;
_4d=_4a.lastIndex;
}
return (_4c+_49.slice(_4d));
};
String.prototype.format=function(){
return this._format(false,arguments);
};
String.prototype.xmlFormat=function(_50){
return this._format(true,arguments);
};
var g_yOnLoad=new Array();
function OnLoadComplete(f){
var _52=function(){
for(var i in g_yOnLoad){
var _54=g_yOnLoad[i];
_54();
}
};
if(document.onload==null){
window.onload=document.onload=_52;
}
g_yOnLoad.push(f);
}
function ProcessCheckedRadio(_55,_56){
for(var i in _56){
var _58=$(_56[i]);
if(_58&&_58.checked){
_55(_58.value);
break;
}
}
}


