function asynchronousRequest(_1,_2,_3){
var _4;
if(window.XMLHttpRequest!=undefined){
_4=new XMLHttpRequest();
}else{
if(window.ActiveXObject!=undefined){
_4=new ActiveXObject("Microsoft.XMLHTTP");
}else{
alert("Browser not supported, try IE6, Firefox or Mozilla 1.x");
return;
}
}
var _5=objToXml(_3);
var _6="XML="+queryEscape(_5);
var _7="Action="+encodeURI(_2);
var _8=_7+"&"+_6;
_4.open("POST",_1,false);
_4.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
_4.send(_8);
var _9=_4.responseXML;
if(_9==null||_9==undefined){
alert("Warning: Invalid XML Document");
var _a=new Object();
Async_bindFunctions(_a);
return _a;
}
var _b=_9.getElementsByTagName("document").item(0);
var _a=new Object();
_a.node=_b;
Async_bindFunctions(_a);
return _a;
}
function Async_getOneValue(_c){
var _d=this.getOneNode(_c);
if(_d==null){
return null;
}
if(_d.node.firstChild==undefined||_d.node.firstChild==null){
return null;
}
return _d.node.firstChild.nodeValue;
}
function Async_getValueArray(_e){
var _f=new Array();
var _10=this.getNodeArray(_e);
for(var i=0;i<_10.length;i++){
_f.push(_10[i].node.firstChild.nodeValue);
}
return _f;
}
function Async_getOneNode(tag){
if(this.node==undefined){
return null;
}
var _13=this.node.getElementsByTagName(tag);
if(_13.length==0){
return null;
}
var _14=_13.item(0);
var _15=new Object();
Async_bindFunctions(_15);
_15.node=_14;
return _15;
}
function Async_getNodeArray(tag){
var _17=new Array();
if(this.node==undefined){
return new Array();
}
var _18=this.node.getElementsByTagName(tag);
if(_18.length==0){
return new Array();
}
for(var i=0;i<_18.length;i++){
var _1a=_18.item(i);
var _1b=new Object();
Async_bindFunctions(_1b);
_1b.node=_1a;
_17.push(_1b);
}
return _17;
}
function Async_bindFunctions(obj){
obj.getOneValue=Async_getOneValue;
obj.getOneNode=Async_getOneNode;
obj.getValueArray=Async_getValueArray;
obj.getNodeArray=Async_getNodeArray;
}
function objToXml(obj){
var _1e=0;
var _1f="";
if(arguments.length>1){
_1e=arguments[1];
}
if(_1e==0){
_1f+="<?xml version=\"1.0\" ?>\n<document>\n";
}
if(obj==null||obj==undefined){
_1f+="</document>\n";
return _1f;
}
for(var i in obj){
if(obj[i].charAt!=undefined||typeof (obj[i])=="number"){
if(obj[i]==null){
continue;
}
for(var j=0;j<=_1e;j++){
_1f+="\t";
}
_1f+="<"+i+">"+xmlEscape(obj[i])+"</"+i+">\n";
}else{
if(obj[i].sort!=undefined){
for(var j=0;j<obj[i].length;j++){
if(obj[i][j]==null){
continue;
}
for(var k=0;k<=_1e;k++){
_1f+="\t";
}
_1f+="<"+i+">"+xmlEscape(obj[i][j])+"</"+i+">\n";
}
}else{
for(var j=0;j<=_1e;j++){
_1f+="\t";
}
_1f+="<"+i+">\n";
_1f+=objToXml(obj[i],_1e+1);
for(var j=0;j<=_1e;j++){
_1f+="\t";
}
_1f+="</"+i+">\n";
}
}
}
if(_1e==0){
_1f+="</document>\n";
}
return _1f;
}
function queryEscape(str){
str=encodeURI(str);
str=str.replace(new RegExp("/","g"),"%2F");
str=str.replace(/[?]/g,"%3F");
str=str.replace(/[=]/g,"%3D");
str=str.replace(/[&]/g,"%26");
str=str.replace(/[@]/g,"%40");
return str;
}
function xmlEscape(str){
if(typeof (str)=="number"){
str=str.toString();
}
str=str.replace(/&/g,"&amp;");
str=str.replace(/</g,"&lt;");
str=str.replace(/>/g,"&gt;");
return str;
}
window.busyDialog=null;
function showBusy(){
if(!document["body"]){
return;
}
if(busyDialog==null){
busyDialog=document.createElement("div");
busyDialog.style.position="absolute";
busyDialog.style.border="black 1px solid";
busyDialog.style.backgroundColor="white";
busyDialog.style.fontSize="24px";
busyDialog.style.fontWeight="bold";
busyDialog.align="center";
busyDialog.innerHTML="LOADING...";
document.body.appendChild(busyDialog);
busyDialog.style.left=(document.body.clientWidth-busyDialog.clientWidth)/2;
busyDialog.style.top=(document.body.clientHeight-busyDialog.clientHeight)/2;
busyDialog.style.zIndex=5000;
}
busyDialog.style.display="";
}
function hideBusy(){
if(busyDialog!=null){
busyDialog.style.display="none";
}
}
var _wtXMLHttp=function(){
var _25;
if(navigator.userAgent.search("MSIE")!=-1){
_25=new ActiveXObject("Microsoft.XMLHTTP");
}else{
_25=new XMLHttpRequest();
}
return _25;
};
var _wtAsyncRPC_defaultSuccessHandler=function(_26,_27,_28){
alert("Result of "+_28+"\n"+objToXml(_26));
};
var _wtAsyncRPC_defaultFailureHandler=function(_29,_2a,_2b,_2c){
alert(_2c+" failed\n"+"readyState = "+_29+"\n"+"status = "+_2a+"\n");
};
var _wtAsyncRPC_setHandler=function(fn){
this.onSuccess=fn;
};
var _wtAsyncRPC_setFailHandler=function(fn){
this.onFailure=fn;
};
var _wtAsyncRPC_setTimeoutHandler=function(fn){
this.timeout=fn;
};
var _wtAsyncRPC=function(cgi,_31,_32,_33){
var _34={};
_34.requestObj=null;
_34.timeout=(_33?_33:60000);
_34.onSuccess=_wtAsyncRPC_defaultSuccessHandler;
_34.onFailure=_wtAsyncRPC_defaultFailureHandler;
_34.cgiPath=cgi;
_34.procName=_31;
_34.procArgs=_32;
_34.processed=false;
_34.setHandler=_wtAsyncRPC_setHandler;
_34.setFailHandler=_wtAsyncRPC_setFailHandler;
_34.setTimeout=_wtAsyncRPC_setTimeoutHandler;
_34._submit=function(){
_34.processed=false;
var _35=encodePOST(_34.procName,_34.procArgs);
_34.requestObj=_wtXMLHttp();
_34.requestObj.open("POST",_34.cgiPath);
var _36=function(){
if(!_34.processed){
_34.processed=true;
_34.requestObj.abort();
_34.onFailure(_34.requestObj.readyState,0,"",_34.procName);
}
};
_34.requestObj.onreadystatechange=function(){
if(_34.requestObj.readyState==4&&(!_34.processed)&&(String(_34.requestObj.responseText)).length>0){
_34.processed=true;
clearTimeout(_34.tid);
if(_34.requestObj.status==200){
_34.onSuccess(_34.requestObj.responseXML,_34.requestObj.responseText,_34.procName);
}else{
_34.onFailure(_34.requestObj.readyState,_34.requestObj.status,_34.requestObj.responseText,_34.procName);
}
}
};
_34.tid=setTimeout(_36,_34.timeout);
_34.requestObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_34.requestObj.send(_35);
};
return _34;
};
var encodePOST=function(_37,_38){
var _39="Action=";
_39+=encodeURIComponent(_37);
_39+="&XML=";
_39+=encodeURIComponent(objToXml(_38));
return _39;
};
function asynchronousRequest2(url,_3b,obj){
var _3d={"requestURL":url,"requestAction":_3b,"requestArgs":obj,"submitExclude":{},"_successHandler":function(_3e,_3f){
if(_3e.normalize){
_3e.normalize();
}
var _40=_3e.getElementsByTagName("document").item(0);
var _41={"node":_40};
Async_bindFunctions(_41);
for(var i in this.parentObj.submitExclude){
var obj=this.parentObj.submitExclude[i];
if(typeof (obj.setDisabled)=="function"){
obj.setDisabled(false);
}else{
obj.disabled=false;
}
}
this.parentObj.successHandler(this.parentObj.successArgs,_41,this.parentObj);
if(_41.getOneValue("pcms_license_device_count")>0){
var _44=parseInt(_41.getOneValue("pcms_license_device_count"));
var _45=parseInt(_41.getOneValue("pcms_license_device_limit"));
if(_44>=_45&&document.getElementById("license_over_limit")){
document.getElementById("license_over_limit").style.visibility="";
document.getElementById("license_over_90pc").style.visibility="hidden";
}else{
if(_44>=(_45*0.9)&&document.getElementById("license_over_limit")){
document.getElementById("license_over_limit").style.visibility="hidden";
document.getElementById("license_over_90pc").style.visibility="";
}else{
if(document.getElementById("license_over_limit")){
document.getElementById("license_over_limit").style.visibility="hidden";
document.getElementById("license_over_90pc").style.visibility="hidden";
}
}
}
window.pcms_license_device_count=_44;
window.pcms_license_device_limit=_45;
}
},"_failureHandler":function(_46,_47,_48){
for(var i in this.parentObj.submitExclude){
var obj=this.parentObj.submitExclude[i];
if(typeof (obj.setDisabled)=="function"){
obj.setDisabled(false);
}else{
obj.disabled=false;
}
}
this.parentObj.failureHandler(this.parentObj.failureArgs,{"readyState":_46,"status":_47,"text":_48},this.parentObj);
},"setSuccessHandler":ARequest_setSuccessHandler,"setFailureHandler":ARequest_setFailureHandler,"setSubmitValidator":ARequest_setSubmitValidator,"submit":ARequest_submit,"successHandler":function(_4b,_4c,_4d){
},"failureHandler":function(_4e,_4f,_50){
},"validator":function(_51,_52,_53){
return true;
},"successArgs":{},"failureArgs":{},"validateArgs":{}};
return _3d;
}
function ARequest_submit(_54){
var _55=this.validator(this.validateArgs,this.requestArgs,this);
if(!_55){
return;
}
for(var i in this.submitExclude){
var obj=this.submitExclude[i];
if(typeof (obj.setDisabled)=="function"){
obj.setDisabled(true);
}else{
obj.disabled=true;
}
}
var _58=_wtAsyncRPC(this.requestURL,this.requestAction,this.requestArgs,_54);
this.requestObj=_58;
_58.parentObj=this;
_58.setHandler(this._successHandler);
_58.setFailHandler(this._failureHandler);
_58._submit();
}
function ARequest_setSuccessHandler(_59,_5a){
this.successHandler=_59;
this.successArgs=_5a;
}
function ARequest_setFailureHandler(_5b,_5c){
this.failureHandler=_5b;
this.failureArgs=_5c;
}
function ARequest_setSubmitValidator(_5d,_5e){
this.validator=_5d;
this.validateArgs=_5e;
}
(function($){
if($.fn.treeview){
return;
}
var _60=[];
$.treeview_list=function(){
return _60;
};
$.fn.treeview=function(_61,_62,_63){
if(!this.hasClass("treeview")){
$.treeview_list().push(this);
this.toggleClass("treeview",true).data("treeview_data",{"icon":["treeview_img/minus.gif","treeview_img/plus.gif"],"pfx":"treeview"+(10000000+Math.floor(Math.random()*90000000)),"tv_handler":[]}).off(".treeview").on("reload_treeview.treeview",function(e,t){
var me=$(this).empty(),html_escape=function(s){
s=String(s);
return (s.match(/[&<>]/)?s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):s);
},tv_data=me.data("treeview_data"),icon=tv_data["icon"],pfx=tv_data["pfx"],idx=0,t_arr=[],t_handler=[],tree_create=function(t){
var id,i,l;
if(!(t&&t["info"]&&t["child"])){
return;
}
if(t["info"].length>4){
t_handler[idx]=[t["info"][3],t["info"][4]];
id=pfx+"_"+(idx++);
}
t_arr.push(t["info"][2]?"<ul><li class='tv_title'>":"<ul class='tv_close'><li class='tv_title'>");
if(t["child"].length>0){
t_arr.push("<img class='tv_toggle' src='",icon[t["info"][2]?0:1],"'>");
}
if(id){
t_arr.push("<img src='",t["info"][0],"'><span class='tv_action' id='",id,"'>",html_escape(t["info"][1]),"</span></li>");
}else{
t_arr.push("<img src='",t["info"][0],"'>",html_escape(t["info"][1]),"</li>");
}
for(i=0,l=t["child"].length;i<l;i++){
t_arr.push("<li>");
tree_create(t["child"][i]);
t_arr.push("</li>");
}
t_arr.push("</ul>");
return;
};
tree_create(t);
tv_data["tv_handler"]=t_handler;
this.innerHTML=t_arr.join("");
return;
}).on("highlight.treeview",function(e,id){
var me=$(this),tv_data=me.data("treeview_data"),hl_icon=tv_data["icon"][0],sel=["#",tv_data["pfx"],"_",id].join("");
me.find(".tv_highlight").removeClass("tv_highlight").end().find(sel).addClass("tv_highlight").parents("ul.tv_close").removeClass("tv_close").each(function(e){
$(this).find("li:first").find("img.tv_toggle").attr("src",hl_icon);
});
return;
}).on("click.treeview","img.tv_toggle",this,function(e){
var me=$(this),icon=e.data.data("treeview_data")["icon"];
me.attr("src",icon[me.parents("ul:first").toggleClass("tv_close").hasClass("tv_close")?1:0]);
return;
}).on("click.treeview","span.tv_action",this,function(e){
var me=$(this),id=me.attr("id"),h=e.data.data("treeview_data")["tv_handler"][(id.split("_",2))[1]];
if(!(h&&h.length>=2)){
alert("Warning: treeview handler on ["+id+"] does not exist.");
return;
}
h[0](h[1]);
return;
}).on("mouseenter.treeview mouseout.treeview","img.tv_toggle, span.tv_action",function(e){
var _73;
switch(e.type){
case "mouseover":
case "mouseenter":
_73=true;
case "mouseout":
case "mouseleave":
$(this).toggleClass("tv_over",!!_73);
default:
break;
}
return;
});
}
if($.type(_61)=="object"){
if(_61["tree"]){
this.triggerHandler("reload_treeview",[_61["tree"]]);
}
}else{
switch(_61){
case "destroy":
this.empty().off(".treeview").removeData("treeview_data").toggleClass("treeview",false);
return;
default:
break;
}
}
};
})(jQuery);
var Object_call_null=function(){
};
var Object_call_handler_with_args=function(){
this.handler(this.args);
};
function newButtonWidget(_74,_75){
var _76=document.createElement("table");
var _77=document.createElement("tbody");
var tr=document.createElement("tr");
var _79=document.createElement("td");
var _7a=document.createElement("td");
var _7b=document.createElement("td");
_76.className="buttonWidget";
_76.border=_76.cellSpacing=_76.cellPadding=0;
_79.className="button_left";
_7a.className="button_middle";
_7b.className="button_right";
_76.leftcell=_79;
_76.centercell=_7a;
_76.rightcell=_7b;
_76.destruct=Button_destruct;
_76.setLink=Button_setLink;
_76.setHandler=Button_setHandler;
_7a.innerHTML=_74;
tr.appendChild(_79);
tr.appendChild(_7a);
tr.appendChild(_7b);
_77.appendChild(tr);
_76.appendChild(_77);
_76.setDisabled=Button_setDisabled;
_76.setCaption=Button_setCaption;
if(_75){
_76.setLink(_75);
}
return _76;
}
function Button_onclickHandler(){
window.open(this.target,"_self");
}
function Button_destruct(){
this.parentNode.removeChild(this);
}
function Button_setLink(_7c){
this.target=_7c;
this.onclick=Button_onclickHandler;
}
function Button_setDisabled(_7d){
if(_7d){
this.backup_onclick=this.onclick;
this.onclick=Object_call_null;
this.centercell.style.color="#cccccc";
}else{
if(this.backup_onclick){
this.onclick=this.backup_onclick;
this.backup_onclick=undefined;
}
this.centercell.style.color="black";
}
}
function Button_setHandler(_7e,_7f){
this.args=_7f;
this.handler=_7e;
this.onclick=Object_call_handler_with_args;
}
function Button_setCaption(cap){
this.centercell.innerHTML=cap;
}
function newAnchorWidget(_81,_82,_83){
var _84=document.createElement("a");
_84.innerHTML=_81;
if(_82){
_84.handler=_82;
_84.args=_83;
_84.onclick=Object_call_handler_with_args;
}else{
_84.onclick=Object_call_null;
}
return _84;
}
function newContentPage(id,_86){
var _87=document.createElement("table");
_87.border=0;
_87.cellPadding=0;
_87.cellSpacing=0;
_87.id=id;
if((arguments.length>3)&&(arguments[3]!=null)&&arguments[3].className){
_87.className=arguments[3].className;
}else{
_87.className="contentBox";
}
var _88=document.createElement("tbody");
_87.appendChild(_88);
var _89=document.createElement("tr");
_88.appendChild(_89);
var _8a=document.createElement("td");
_89.appendChild(_8a);
var _8b=document.createElement("td");
_8b.className="vShadow";
_89.appendChild(_8b);
var _8c=document.createElement("tr");
_88.appendChild(_8c);
var _8d=document.createElement("td");
_8d.className="hShadow";
_8d.colSpan=2;
_8c.appendChild(_8d);
var _8e=document.createElement("table");
_8a.appendChild(_8e);
_8e.className="contentWidget";
_8e.border=0;
_8e.cellPadding=1;
_8e.cellSpacing=1;
_87.style.filter="alpha(opacity=100)";
var _8f=document.createElement("tbody");
_8e.appendChild(_8f);
var _90=document.createElement("tr");
_90.width="100%";
var _91=document.createElement("td");
_91.width="100%";
_91.className="contentTitle";
_91.unselectable=true;
_91.innerHTML=_86;
_90.appendChild(_91);
var _92=document.createElement("td");
_92.className="contentTitle";
_92.style.display="none";
_90.appendChild(_92);
_87.refreshPanel=_92;
var _93=document.createElement("td");
_93.className="contentTitle";
_93.style.display="none";
_90.appendChild(_93);
_87.closePanel=_93;
_8f.appendChild(_90);
var _94=document.createElement("tr");
_94.width="100%";
var _95=document.createElement("td");
_95.className="contentContainer";
_95.width="100%";
_95.colSpan=3;
_8f.appendChild(_94);
_94.appendChild(_95);
if(arguments.length>2&&arguments[2]!=null){
_87.underling=arguments[2];
_87.underling.cover=_87;
_87.level=_87.underling.level+1;
}else{
_87.underling=null;
_87.level=0;
}
_87.cover=null;
_87.contentcell=_95;
_87.titlecell=_91;
_87.setTitle=ContentPage_setTitle;
_87.addSpacer=ContentPage_addSpacer;
_87.addWidget=ContentPage_addWidget;
_87.clear=ContentPage_clear;
_87.destruct=ContentPage_delete;
_87.disable=ContentPage_disable;
_87.enable=ContentPage_enable;
_87.center=ContentPage_center;
_87.upper=ContentPage_upper;
_87.setUpdating=ContentPage_setUpdating;
_87.clearUpdating=ContentPage_clearUpdating;
_87.setCloseHandler=ContentPage_setCloseHandler;
_87.lastMouseX=0;
_87.lastMouseY=0;
_87.clear();
_87.style.zIndex=_87.level*100;
if(_87.underling!=null){
_87.className="dialogBox";
_8e.className="dialogWidget";
_91.className="dialogTitle";
_91.parentDialog=_87;
_87.refreshPanel.className="dialogTitle";
_87.closePanel.className="dialogTitle";
_95.className="dialogContainer";
jQuery(_87).css({"top":(_87.underling.offsetTop+15)+"px","left":(_87.underling.offsetLeft+10)+"px"});
_87.style.zIndex=_87.level*100;
_87.underling.disable();
_91.onmousedown=ContentPage_onmousedownHandler;
_91.onmouseup=ContentPage_onmouseupHandler;
}
return _87;
}
function ContentPage_disable(){
this.style.opacity=0.2;
if(this.filters!=undefined){
this.filters.alpha.opacity=20;
}
this.blocker=document.createElement("img");
this.blocker.src="images/transparent.gif";
this.blocker.border=0;
this.blocker.style.zIndex=this.level*100+1;
this.blocker.style.position="absolute";
this.blocker.style.top=this.offsetTop;
this.blocker.style.left=this.offsetLeft;
this.blocker.style.width=this.clientWidth;
this.blocker.style.height=this.clientHeight;
var _96=this.getElementsByTagName("select");
for(var i=0;i<_96.length;i++){
if(_96[i].style.display!="none"){
_96[i].style.display="none";
_96[i]._ContentPageHack=true;
}
}
document.body.appendChild(this.blocker);
}
function ContentPage_enable(){
if(this.filters!=undefined){
this.filters.alpha.opacity=100;
}
this.style.opacity=null;
this.blocker.parentNode.removeChild(this.blocker);
var _98=this.getElementsByTagName("select");
for(var i=0;i<_98.length;i++){
if(_98[i]._ContentPageHack){
_98[i].style.display="";
_98[i].removeAttribute("_ContentPageHack");
}
}
}
function ContentPage_setTitle(_9a){
this.titlecell.innerHTML=_9a;
}
function ContentPage_addSpacer(_9b,_9c){
var img=document.createElement("img");
img.border=0;
img.src="images/transparent.gif";
img.width=_9b;
img.height=_9c;
this.addWidget(img);
}
function ContentPage_addWidget(_9e){
this.contentcell.appendChild(_9e);
}
function ContentPage_clear(){
this.contentcell.innerHTML="";
var _9f=document.createElement("div");
var _a0=document.createElement("div");
_a0.innerHTML="Loading...";
_9f.align="center";
_9f.appendChild(_a0);
_9f.appendChild(document.createElement("br"));
this.updating=newRowLayout("");
this.updating.style.display="none";
this.updating.addWidget(_9f);
this.addSpacer(10,20);
this.addWidget(this.updating);
if(this.cover!=null){
this.cover.destruct();
}
}
function ContentPage_delete(){
if(this.cover!=null){
this.cover.destruct();
}
if(this.underling!=null){
this.underling.cover=null;
this.underling.enable();
}
if(this.parentNode!=undefined){
this.parentNode.removeChild(this);
}
return this.underling;
}
function ContentPage_onmousedownHandler(){
this.parentDialog.lastMouseX=mouseX;
this.parentDialog.lastMouseY=mouseY;
TrackingObject=this.parentDialog;
}
function ContentPage_onmouseupHandler(){
TrackingObject=null;
}
function ContentPage_center(){
var _a1=this.clientWidth;
var _a2=this.clientHeight;
var _a3=document.body.clientWidth;
var _a4=document.body.clientHeight;
this.style.left=(_a3-_a1)/2;
this.style.top=(_a4-_a2)/2>0?(_a4-_a2)/2:0;
}
function ContentPage_upper(){
var _a5=this.clientWidth;
var _a6=this.clientHeight;
var _a7=document.body.clientWidth;
var _a8=document.body.clientHeight;
var l=(_a7-_a5)/2;
if(l!=this.style.left){
this.style.left=l;
}
this.style.top=107;
}
function ContentPage_setUpdating(){
if(!this.refreshWidget){
var _aa=document.createElement("img");
_aa.src="images/loading.gif";
_aa.style.width="16px";
_aa.style.height="16px";
this.refreshPanel.appendChild(_aa);
this.refreshWidget=_aa;
}
this.refreshPanel.style.display="";
return;
if(this.updating){
this.updating.style.display="";
}
return;
}
function ContentPage_clearUpdating(){
this.refreshPanel.style.display="none";
return;
if(this.updating){
this.updating.style.display="none";
}
return;
}
function Ajaxtk_clickHandler(){
if(this.handler){
return this.handler(this.args);
}
}
function ContentPage_setCloseHandler(_ab,_ac,_ad){
if(_ab||_ad){
if(!this.closeWidget){
var _ae=document.createElement("img");
_ae.src="images/close.gif";
_ae.style.width="16px";
_ae.style.width="16px";
_ae.style.cursor="pointer";
this.closePanel.appendChild(_ae);
this.closePanel.style.backgroundColor="#FFFFFF";
this.closeWidget=_ae;
}
this.closePanel.style.display="";
}else{
this.closePanel.style.display="none";
}
if(_ab){
this.closePanel.args=_ac;
this.closePanel.handler=_ab;
this.closePanel.onclick=Ajaxtk_clickHandler;
}else{
this.closePanel.handler=null;
}
return;
}
function DynamicForm(cgi,_b0){
this.cgi=cgi;
this.action=_b0;
this.widgets=new Object();
this.setAction=DynamicForm_setAction;
this.setValue=DynamicForm_setValue;
this.bindWidget=DynamicForm_bindWidget;
this.submit=DynamicForm_submit;
this.getValue=DynamicForm_getValue;
this.getWidget=DynamicForm_getWidget;
this.getRequestObject=DynamicForm_getRequestObject;
this.merge=DynamicForm_merge;
this.getResponse=function(){
return this.response;
};
this.response=null;
this.readOnly=0;
this.changeHandlers=new Object();
this.valueChanged=function(id,_b2,_b3){
if(this.changeHandlers[id]!=undefined){
var _b4=this.changeHandlers[id];
_b4(_b2,_b3);
}
};
this.registerHandler=DynamicForm_registerHandler;
this.submitExclude={};
this.asyncSubmit=DynamicForm_asyncSubmit;
this.formSubmit=DynamicForm_formSubmit;
this.asyncSetSuccessHandler=DynamicForm_asyncSetSuccessHandler;
this.asyncSetFailureHandler=DynamicForm_asyncSetFailureHandler;
this.setSuccessHandler=DynamicForm_asyncSetSuccessHandler;
this.setFailureHandler=DynamicForm_asyncSetFailureHandler;
this.setDisabled=DynamicForm_setDisabled;
if(arguments.length>2){
this.readOnly=(!(arguments[2]));
}
}
function DynamicForm_setAction(_b5){
this.action=_b5;
}
function DynamicForm_disableWidget(_b6){
this.disabled=(_b6&&true||false);
}
function DynamicForm_setDisabled(_b7){
for(var i in this.widgets){
if(typeof (this.widgets[i].setDisabled)=="function"){
this.widgets[i].setDisabled(_b7);
}
}
}
function DynamicForm_bindWidget(id,_ba){
this.widgets[id]=_ba;
if(this.readOnly!=0){
_ba.readOnly=1;
}
_ba.parentForm=this;
_ba.setDisabled=DynamicForm_disableWidget;
}
function DynamicForm_getValue(id){
if(this.widgets[id]==undefined||this.widgets[id]==null){
return null;
}
return this.widgets[id].value;
}
function DynamicForm_getWidget(id){
return this.widgets[id];
}
function DynamicForm_setValue(id,_be){
if(this.widgets[id].setValue!=undefined){
this.widgets[id].setValue(_be);
}else{
this.widgets[id].value=_be;
}
}
function DynamicForm_submit(){
var obj=new Object();
for(var i in this.widgets){
obj[i]=this.widgets[i].value;
}
var _c1=asynchronousRequest(this.cgi,this.action,obj);
this.response=_c1;
var _c2=_c1.getOneValue("error");
if(_c2!=null){
alert(_c2);
return false;
}
var _c3=_c1.getOneValue("warning");
if(_c3!=null){
alert(_c3);
}
return true;
}
function DynamicForm_asyncSubmit(_c4,_c5){
var _c6=function(_c7,_c8,_c9){
var _ca=_c8.getOneValue("notice");
if(_ca!=null){
alert(_ca);
}
var _cb=_c8.getOneValue("warning");
if(_cb!=null){
alert(_cb);
return;
}
overlayStack.popPage(2);
if(!(_c7.no_refresh)){
if(window.refreshSideNav){
refreshSideNav();
}
}
};
var _cc=function(_cd,_ce,_cf){
if(_ce==null){
alert("Error communicating with server");
return;
}
var _d0=_ce.getOneValue("error");
if(_d0!=null){
alert(_d0);
return;
}
};
if(this.asyncSuccessHandler==undefined){
this.asyncSuccessHandler=_c6;
this.asyncSuccessArgs={"no_refresh":_c4};
}
if(this.asyncFailureHandler==undefined){
this.asyncFailureHandler=_cc;
this.asyncFailureArgs={};
}
var _d1=function(_d2,_d3,_d4){
if(_d3.getOneValue("error")!=null){
_d2.form.asyncFailureHandler(_d2.form.asyncFailureArgs,_d3,_d4);
}else{
_d2.form.asyncSuccessHandler(_d2.form.asyncSuccessArgs,_d3,_d4);
}
};
var _d5=function(_d6,_d7,_d8){
_d6.form.asyncFailureHandler(_d6.form.asyncFailureHandler,null,_d8);
};
var obj=new Object();
for(var i in this.widgets){
obj[i]=this.widgets[i].value;
}
var _db=asynchronousRequest2(this.cgi,this.action,obj);
_db.setSuccessHandler(_d1,{"form":this});
_db.setFailureHandler(_d5,{"form":this});
_db.submitExclude=this.submitExclude;
this.submitExclude["form"]=this;
_db.submit(_c5);
}
function DynamicForm_asyncSetSuccessHandler(_dc,_dd){
this.asyncSuccessHandler=_dc;
this.asyncSuccessArgs=_dd;
}
function DynamicForm_asyncSetFailureHandler(_de,_df){
this.asyncFailureHandler=_de;
this.asyncFailureArgs=_df;
}
function DynamicForm_getRequestObject(){
var obj=new Object();
for(var i in this.widgets){
obj[i]=this.widgets[i].value;
}
return obj;
}
function DynamicForm_merge(_e2){
if(_e2.widgets==undefined){
alert("DynamicForm::merge(): The programmer fed me something that's not a form!!");
return;
}
for(var i in _e2.widgets){
newHiddenInput(this,i,_e2.widgets[i].value);
}
}
function DynamicForm_registerHandler(id,_e5){
this.changeHandlers[id]=_e5;
}
function DynamicForm_formSubmit(url){
var _e7=document.createElement("form");
var _e8;
_e7.method="post";
if(url!=undefined){
_e7.action=url;
}else{
_e7.action=this.post_url;
}
var obj=new Object();
for(var i in this.widgets){
_e8=document.createElement("input");
_e8.type="hidden";
_e8.name=i;
_e8.value=this.widgets[i].value;
_e7.appendChild(_e8);
}
document.body.appendChild(_e7);
_e7.submit();
document.body.removeChild(_e7);
}
var currentForm=null;
function newTextInput(_eb,id,_ed){
var _ee=document.createElement("input");
_ee.type="text";
_ee.name=id;
_ee.id=id;
_ee.className="texttype";
_eb.bindWidget(id,_ee);
_ee.value=_ed?_ed:"";
_ee.onchange=function(){
this.parentForm.valueChanged(this.name,this.value,this);
};
if(arguments.length>3){
_ee.maxLength=arguments[3];
}
if(arguments.length>4){
_ee.style.width=arguments[4];
}
_ee.setDisplay=TextInput_setDisplay;
_ee.setHandler=TextInput_setHandler;
_ee.unsetHandler=TextInput_unsetHandler;
return _ee;
}
function TextInput_setDisplay(_ef){
this.style.display=(_ef?"inline-block":"none");
}
function TextInput_setHandler(_f0,_f1){
this.enterHandler=_f0;
this.enterArgs=_f1;
this.onkeypress=function(){
var evt;
if(navigator.userAgent.search("MSIE")!=-1){
evt=window.event;
}else{
evt=arguments[0];
}
if(evt.keyCode==13){
this.enterHandler(this.enterArgs);
}
};
}
function TextInput_unsetHandler(){
this.onkeypress=undefined;
}
function newPasswordInput(_f3,id,_f5){
var _f6=document.createElement("input");
_f6.type="password";
_f6.name=id;
_f6.className="texttype";
_f3.bindWidget(id,_f6);
_f6.value=_f5?_f5:"";
_f6.onchange=function(){
this.parentForm.valueChanged(this.name,this.value,this);
};
if(arguments.length>3){
_f6.maxLength=arguments[3];
}
if(arguments.length>4){
_f6.style.width=arguments[4];
}
_f6.setHandler=TextInput_setHandler;
_f6.unsetHandler=TextInput_unsetHandler;
return _f6;
}
function newRadioGroup(_f7,id,_f9,_fa,_fb){
if(_f9.length!=_fa.length){
alert("newRadioGroup(): no. of values not equal to no. of descriptions");
return;
}
var _fc=newRowLayout("");
_fc.align="left";
_fc.value=_fb;
_fc.childButtons=[];
var _fd=randomId();
for(var i=0;i<_f9.length;i++){
if(!std.BrowserInfo.createElement_loose){
var _ff=document.createElement("input");
_ff.type="radio";
_ff.name=_fd;
_ff.realid=id;
if(_f9[i]==_fb){
_ff.checked=1;
}
}else{
var _ff;
if(_f9[i]==_fb){
_ff=document.createElement("<input type=\"radio\" name=\""+_fd+"\" checked/>");
}else{
_ff=document.createElement("<input type=\"radio\" name=\""+_fd+"\"/>");
}
_ff.realid=id;
}
_fc.childButtons.push(_ff);
_ff.parentForm=_f7;
_ff.outputWidget=_fc;
_ff.onclick=function(){
this.outputWidget.value=this.value;
this.parentForm.valueChanged(this.realid,this.value,this);
};
_ff.value=_f9[i];
if(_f7.readOnly){
_ff.disabled=1;
}
_fc.addWidget(_ff);
var span=document.createElement("span");
span.innerHTML=_fa[i];
span.onmouseover=function(){
this.style.backgroundColor="#e0e0e0";
};
span.onmouseout=function(){
this.style.backgroundColor="";
};
span.outputWidget=_fc;
span.radioButton=_ff;
if(!_f7.readOnly){
span.onclick=function(){
this.radioButton.checked=1;
this.outputWidget.value=this.radioButton.value;
this.radioButton.click();
};
}
span.style.cursor="default";
_fc.addWidget(span);
_fc.addSpacer("5px");
}
_f7.bindWidget(id,_fc);
_fc.setDisabled=RadioGroup_setDisabled;
_fc.setValue=RadioGroup_setValue;
return _fc;
}
function RadioGroup_setDisabled(_101){
for(var i=0;i<this.childButtons.length;i++){
this.childButtons[i].disabled=(_101&&true||false);
}
}
function RadioGroup_setValue(val){
for(var i=0;i<this.childButtons.length;i++){
this.childButtons[i].checked=(val==this.childButtons[i].value)?(function(b){
b.onclick();
return true;
})(this.childButtons[i]):false;
}
}
function newCheckBoxGroup(form,id,_108){
var _109=new Object();
_109.value=new Array();
_109.value.parentGroup=_109;
_109.count_action="count_"+form.action;
_109.name=id;
_109.count=CheckBoxGroup_count;
_109.childCheckBoxes=new Array();
_109.checkAllBox=document.createElement("input");
_109.checkAllBox.type="checkbox";
_109.checkAllBox.name=id;
_109.checkAllBox.value=null;
_109.checkAllBox.group=_109;
_109.checkAllBox.onclick=function(){
this.group.groupCheckAllBox.setValue(0);
for(var i=0;i<_109.childCheckBoxes.length;i++){
_109.childCheckBoxes[i].setValue(this.checked);
}
};
_109.checkAllBox.setValue=function(val){
this.checked=val;
for(var i=0;i<_109.childCheckBoxes.length;i++){
_109.childCheckBoxes[i].setValue(this.checked);
}
};
if(true){
if(!std.BrowserInfo.createElement_loose){
_109.groupCheckAllBox=document.createElement("input");
_109.groupCheckAllBox.type="checkbox";
_109.groupCheckAllBox.name="group_"+id;
}else{
var _10d="<input type=\"checkbox\" name=\"group_"+id+"\">";
_109.groupCheckAllBox=document.createElement(_10d);
}
_109.groupCheckAllBox.value="false";
_109.groupCheckAllBox.CABox=_109.checkAllBox;
_109.groupCheckAllBox.checked=false;
_109.groupCheckAllBox.onclick=function(){
this.value=(this.checked?"true":"false");
this.CABox.setValue(this.checked);
};
_109.groupCheckAllBox.setValue=function(val){
this.checked=val?true:false;
this.value=val?"true":"false";
};
form.bindWidget("group_"+id,_109.groupCheckAllBox);
}
form.bindWidget(id,_109);
_109.setDisabled=CheckBoxGroup_setDisabled;
return _109;
}
function CheckBoxGroup_setDisabled(_10f){
for(var i=0;i<this.childCheckBoxes.length;i++){
this.childCheckBoxes[i].disabled=(_10f&&true||false);
}
}
function CheckBoxGroup_count(){
var _111=0;
if(this.groupCheckAllBox.checked){
var _112=asynchronousRequest("getter.php",this.count_action,this.parentForm.getRequestObject());
_111=_112.getOneValue("count");
}else{
var arr=this.value;
for(var i=0;i<arr.length;i++){
if(arr[i]!=null){
_111++;
}
}
}
return _111;
}
function newCheckBox(_115,_116,_117,_118){
var _119="cb_"+_115.name+"_"+_116;
if(overlayStack.topPage){
for(var i in overlayStack.topPage.arguments){
_119+=i+"_"+overlayStack.topPage.arguments[i];
}
}
var _11b;
if(!std.BrowserInfo.createElement_loose){
_11b=document.createElement("input");
_11b.type="checkbox";
_11b.name=_115.name;
}else{
_11b=document.createElement("<input type=\"checkbox\" name=\""+_115.name+"\" "+(globalHash[_119]||_117?"checked":"")+">");
}
_11b.index=_115.value.length;
_11b.value=_116;
_11b.cbgroup=_115;
_11b.saveId=_119;
_11b.id=_119;
if(_115.parentForm.readOnly){
_11b.disabled=1;
}
if(!_118){
if(_117||globalHash[_119]){
_11b.checked=1;
_11b.cbgroup.value.push(_11b.value);
}else{
_11b.checked=0;
_11b.cbgroup.value.push(null);
}
}else{
if(_117){
_11b.checked=1;
_11b.cbgroup.value.push(_11b.value);
}else{
_11b.checked=0;
_11b.cbgroup.value.push(null);
}
}
_11b.onclick=function(){
if(this.checked){
this.cbgroup.value[this.index]=this.value;
}else{
this.cbgroup.value[this.index]=null;
}
this.cbgroup.parentForm.valueChanged(this.cbgroup.name,this.cbgroup.value,this.cbgroup);
this.cbgroup.checkAllBox.checked=0;
this.cbgroup.groupCheckAllBox.setValue(0);
globalHash[this.saveId]=this.checked;
};
_11b.setValue=function(val){
this.cbgroup.value[this.index]=val?this.value:null;
this.cbgroup.parentForm.valueChanged(this.cbgroup.name,this.cbgroup.value,this.cbgroup);
this.checked=val;
globalHash[this.saveId]=val;
};
_11b.cbgroup.childCheckBoxes.push(_11b);
return _11b;
}
function newLabelledCheckBox(_11d,ll,_11f,_120,_121){
var _122=document.createElement("span");
var cb=newCheckBox(_11d,_11f,_120,_121);
_122.cbox=cb;
_122.setValue=function(val){
this.cbox.setValue(val);
};
_122.appendChild(cb);
var _125=document.createElement("label");
_125.htmlFor=cb.id;
_125.style.padding="2px";
_125.style.cursor="pointer";
_125.innerHTML=ll;
_125.onmouseover=function(){
this.style.backgroundColor="#e0e0e0";
};
_125.onmouseout=function(){
this.style.backgroundColor="";
};
_122.appendChild(_125);
return _122;
}
function newHiddenInput(form,id,_128){
var _129=new Object();
_129.value=_128;
form.bindWidget(id,_129);
return _129;
}
function newSingleSelectionInput(form,id,_12c,_12d,_12e){
if(_12c.length!=_12d.length){
alert("newSingleSelectionInput(): no. of values not equal to no. of descriptions");
return;
}
var _12f=document.createElement("select");
for(var i=0;i<_12c.length;i++){
var _131=document.createElement("option");
_131.text=_12d[i];
_131.value=_12c[i];
if(navigator.userAgent.search("MSIE")!=-1){
_12f.add(_131);
}else{
_12f.add(_131,null);
}
}
if(_12e!=null&&_12e!=undefined){
_12f.value=_12e;
}
_12f.name=id;
_12f.onchange=function(){
this.parentForm.valueChanged(this.name,this.value,this);
};
form.bindWidget(id,_12f);
_12f.clearList=Select_clearList;
_12f.appendItem=Select_appendItem;
_12f.appendList=Select_appendList;
_12f.removeValues=Select_removeValues;
_12f.setValue=Select_setValue;
return _12f;
}
function Select_clearList(){
while(this.length){
this.remove(0);
}
}
function Select_appendItem(_132,_133){
var _134=document.createElement("option");
_134.text=_133;
_134.value=_132;
if(navigator.userAgent.search("MSIE")!=-1){
this.add(_134);
}else{
this.add(_134,null);
}
}
function Select_appendList(_135,_136){
var _137={};
var _138=this.value;
for(var i=0;i<_135.length;i++){
_137[_135[i]]=1;
}
for(var i=0;i<this.options.length;i++){
if(_137[this.options[i].value]){
_137[this.options[i].value]=0;
}
}
for(var i=0;i<_135.length;i++){
if(_137[_135[i]]){
this.appendItem(_135[i],_136[i]);
}
}
this.value=_138;
}
function Select_removeValues(_13a,_13b){
var _13c={};
for(var i=0;i<_13a.length;i++){
_13c[_13a[i]]=1;
}
_13b=_13c[this.value]?_13b:this.value;
for(var i=this.options.length-1;i>=0;i--){
if(_13c[this.options[i].value]){
this.removeChild(this.options[i]);
}
}
this.value=_13b;
this.onchange();
}
function Select_setValue(val){
this.value=val;
this.onchange();
}
function newTextAreaInput(form,id,_141,_142,_143){
var _144=document.createElement("textarea");
_144.className="texttype";
_144.style.width=_142;
_144.style.height=_143;
_144.style.overflow="auto";
if(navigator.userAgent.search("MSIE")!=1){
_144.style.wordWrap="normal";
}
_144.value=_141==null?"":_141;
_144.name=id;
_144.id=id;
_144.onchange=function(){
this.parentForm.valueChanged(this.name,this.value,this);
};
form.bindWidget(id,_144);
return _144;
}
function newTitledTextAreaInput(form,id,_147,_148,_149,_14a){
var _14b=document.createElement("table");
_14b.border=0;
_14b.cellSpacing=0;
_14b.cellPadding=3;
_14b.width="100%";
_14b.style.tableLayout="fixed";
var _14c=document.createElement("tbody");
_14b.appendChild(_14c);
var tr1=document.createElement("tr");
_14c.appendChild(tr1);
var _14e=document.createElement("td");
tr1.appendChild(_14e);
_14e.innerHTML=_147;
_14e.className="displayTag";
var tr2=document.createElement("tr");
_14c.appendChild(tr2);
var _150=document.createElement("td");
tr2.appendChild(_150);
_150.appendChild(newTextAreaInput(form,id,_148,_149,_14a));
_150.className="displayContent";
return _14b;
}
function newListInput(form,id,_153,_154,size){
var _156=null;
if(arguments.length>5){
_156=arguments[5];
}
var _157=document.createElement("table");
if(_153==null||_153==undefined){
_157.value=[];
}else{
_157.value=_153;
}
_157.border=0;
_157.cellspacing=0;
_157.cellpadding=0;
var _158=document.createElement("tbody");
_157.appendChild(_158);
var row0=document.createElement("tr");
_158.appendChild(row0);
var _15a=document.createElement("td");
_15a.colSpan=2;
row0.appendChild(_15a);
var _15b=document.createElement("select");
_15a.appendChild(_15b);
_15b.size=size;
_15b.style.width=_154;
for(var i=0;i<_153.length;i++){
var _15d=document.createElement("option");
_15d.value=_153[i];
_15d.text=_153[i];
if(navigator.userAgent.search("MSIE")!=-1){
_15b.add(_15d);
}else{
_15b.add(_15d,null);
}
}
var row1=document.createElement("tr");
_158.appendChild(row1);
var _15f=document.createElement("td");
_15f.style.width="75%";
row1.appendChild(_15f);
var _160=document.createElement("td");
row1.appendChild(_160);
var _161=newRowLayout("");
_161.align="right";
_160.appendChild(_161);
var _162=newTextInput(form,id+"_textinput","");
_15f.appendChild(_162);
_162.style.width="100%";
var _163=newButtonWidget("Add","");
_163.parentWidget=_157;
_163.selectBox=_15b;
_163.textBox=_162;
_163.validFunc=_156;
_163.onclick=function(){
if((_156!=null)&&(!_156(_162))){
this.textBox.value="";
this.textBox.focus();
return;
}
var i;
for(i=0;i<this.parentWidget.value.length;i++){
if(this.textBox.value==this.parentWidget.value[i]){
alert(this.textBox.value+" was already added");
this.textBox.value="";
return;
}
if(this.textBox.value<this.parentWidget.value[i]){
break;
}
}
var _165=document.createElement("option");
_165.value=this.textBox.value;
_165.text=this.textBox.value;
if(i>=this.parentWidget.value.length){
this.parentWidget.value.push(this.textBox.value);
if(navigator.userAgent.search("MSIE")!=-1){
this.selectBox.add(_165);
}else{
this.selectBox.add(_165,null);
}
}else{
for(var k=this.parentWidget.value.length-1;k>=i;k--){
this.parentWidget.value[k+1]=this.parentWidget.value[k];
}
this.parentWidget.value[i]=this.textBox.value;
this.selectBox.insertBefore(_165,this.selectBox.options.item(i));
}
};
var _167=newButtonWidget("Delete","");
_167.parentWidget=_157;
_167.selectBox=_15b;
_167.onclick=function(){
var _168=this.selectBox.selectedIndex;
if(_168<0||_168==null){
alert("Select an item to delete");
return;
}
for(var i=_168;i<this.parentWidget.value.length-1;i++){
this.parentWidget.value[i]=this.parentWidget.value[i+1];
}
this.parentWidget.value.pop();
this.selectBox.remove(_168);
};
var _16a=newButtonWidget("Modify","");
_16a.parentWidget=_157;
_16a.selectBox=_15b;
_16a.textBox=_162;
_16a.onclick=function(){
if((_156!=null)&&(!_156(_162))){
this.textBox.value="";
this.textBox.focus();
return;
}
var _16b=this.selectBox.selectedIndex;
this.parentWidget.value[_16b]=this.textBox.value;
_15b.options.item(_16b).value=_15b.options.item(_16b).text=this.textBox.value;
};
_15b.textBox=_162;
_15b.onchange=function(){
if(this.selectedIndex<0||this.selectedIndex==null){
this.textBox.value="";
return;
}
this.textBox.value=this.options.item(this.selectedIndex).value;
};
_161.addWidget(_163);
_161.addSpacer(10);
_161.addWidget(_167);
form.bindWidget(id,_157);
_157.selectBox=_15b;
_157.setDisabled=ListInput_setDisabled;
return _157;
}
function ListInput_setDisabled(_16c){
this.selectBox.disabled=(_16c&&true||false);
}
function newDateInput(_16d,id,_16f,_170,_171,_172){
if(!_16f||_16f==0){
_16f=parseInt((new Date).getTime()/1000);
}
var _173=newRowLayout("");
_173.value=_16f;
_173.name=id;
_16f=strftime(_16f,"%y-%m-%d");
var _174=newTextInput(_16d,id+"_dtxt",_16f,10,"100px");
_173.align="left";
_173.addWidget(_174);
_173.addSpacer(5);
var _175=document.createElement("img");
_175.src="images/calendar.gif";
_175.border=0;
_175.dateText=_174;
_175.id=randomId();
_175.onclick=function(){
var cal=new CalendarPopup("calendardiv");
if(_170!=undefined){
switch(_170){
case "left":
cal.offsetX=-152;
cal.offsetY=-92;
break;
case "bottom":
cal.offsetX=-10;
cal.offsetY=25;
break;
case "top":
cal.offsetX=-152;
cal.offsetY=-155;
break;
case "right":
cal.offsetX=17;
cal.offsetY=-92;
break;
case "custom":
cal.offsetX=_171;
cal.offsetY=_172;
break;
}
}else{
cal.offsetX=0;
cal.offsetY=20;
}
cal.select(this.dateText,this.id,"yyyy-MM-dd");
};
_175.style.cursor="pointer";
_173.addWidget(_175);
_174.parentInput=_173;
var _177=function(_178,_179){
var _17a=_179.parentInput;
var re=new RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})$");
var _17c=_178.match(re);
if(_17c==null){
alert("Date must be in yyyy-mm-dd format");
_179.value=strftime(_17a.value,"%y-%m-%d");
return;
}
var yyyy=_17c[1];
var mm=parseInt(_17c[2],10)-1;
var dd=_17c[3];
var dobj=new Date(yyyy,mm,dd);
_17a.value=parseInt(dobj.getTime()/1000,10);
_17a.parentForm.valueChanged(_17a.name,_17a.value,_17a);
};
_16d.registerHandler(id+"_dtxt",_177);
_173.calendarImg=_175;
_173.dateText=_174;
_16d.bindWidget(id,_173);
_173.setDisabled=DIn_setDisabled;
return _173;
}
function DIn_setDisabled(_181){
this.dateText.disabled=(_181&&true||false);
this.calendarImg.disabled=(_181&&true||false);
}
function newTimeInput(_182,id,_184){
if(!_184){
_184=0;
}
var _185=newRowLayout("");
_185.align="left";
var _186=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23];
var _187=[];
for(var i=0;i<_186.length;i++){
_187.push(_186[i]<10?"0"+String(_186[i]):String(_186[i]));
}
var _189=[];
var _18a=[];
for(var i=0;i<60;i++){
_189.push(i);
if(i<10){
_18a.push("0"+String(i));
}else{
_18a.push(i);
}
}
var _18b=parseInt(_184/3600);
var _18c=_184%3600;
var _18c=parseInt(_18c/60);
var _18d=newSingleSelectionInput(_182,id+"_hr",_186,_187,_18b);
var _18e=newSingleSelectionInput(_182,id+"_min",_189,_18a,_18c);
_185.addWidget(_18d);
_185.addSpacer(2);
_185.addWidget(document.createTextNode(":"));
_185.addSpacer(2);
_185.addWidget(_18e);
_185.value=_184;
_185.name=id;
_185.hrSelect=_18d;
_185.minSelect=_18e;
_182.bindWidget(id,_185);
_185.setDisabled=TIn_setDisabled;
_18d.parentInput=_18e.parentInput=_185;
var _18f=function(_190,_191){
var _192=_191.parentInput;
_192.value=_192.hrSelect.value*3600+_192.minSelect.value*60;
_192.parentForm.valueChanged(_192.name,_192.value,_192);
};
var _193=function(_194,_195){
var _196=_195.parentInput;
_196.value=_196.hrSelect.value*3600+_196.minSelect.value*60;
_196.parentForm.valueChanged(_196.name,_196.value,_196);
};
_182.registerHandler(id+"_hr",_18f);
_182.registerHandler(id+"_min",_193);
return _185;
}
function TIn_setDisabled(_197){
this.hrSelect.disabled=(_197&&true||false);
this.minSelect.disabled=(_197&&true||false);
}
function newDateTimeInput(_198,id,_19a){
if(!_19a||_19a==0){
_19a=parseInt((new Date).getTime()/1000);
}
var _19b=new Date(_19a*1000);
_19b=new Date(_19b.getFullYear(),_19b.getMonth(),_19b.getDate());
_19b=parseInt(_19b.getTime()/1000);
var _19c=newRowLayout("");
_19c.align="left";
_19c.DIn=newDateInput(_198,id+"_date",_19b);
_19c.DIn.parentInput=_19c;
_19c.addWidget(_19c.DIn);
_19c.addSpacer(20);
var _19d=_19a-_19b;
_19c.TIn=newTimeInput(_198,id+"_time",_19d);
_19c.TIn.parentInput=_19c;
_19c.addWidget(_19c.TIn);
_19c.name=id;
_19c.value=_19a;
_198.bindWidget(id,_19c);
_19c.setDisabled=DTIn_setDisabled;
var _19e=function(_19f,_1a0){
var _1a1=_1a0.parentInput;
_1a1.value=parseInt(_1a1.DIn.value)+parseInt(_1a1.TIn.value);
_1a1.parentForm.valueChanged(_1a1.name,_1a1.value,_1a1);
};
_198.registerHandler(id+"_date",_19e);
_198.registerHandler(id+"_time",_19e);
return _19c;
}
function DTIn_setDisabled(_1a2){
this.DIn.setDisabled(_1a2);
this.TIn.setDisabled(_1a2);
}
function newBlinkingText(str){
var _1a4=document.createElement("div");
_1a4.className="warntext";
_1a4.innerHTML=str;
_1a4.selfId=randomId();
globalHash[_1a4.selfId]=_1a4;
_1a4.off=BlinkingText_off;
_1a4.on=BlinkingText_on;
_1a4.on();
return _1a4;
}
function BlinkingText_off(){
this.style.visibility="hidden";
setTimeout("globalHash[\""+this.selfId+"\"].on();",100);
}
function BlinkingText_on(){
this.style.visibility="";
setTimeout("globalHash[\""+this.selfId+"\"].off();",200);
}
function belongsToDocument(_1a5){
var _1a6=_1a5;
while(_1a6!=null&&_1a6!=document){
_1a6=_1a6.parentNode;
}
return _1a6==document;
}
function strftime(ts,spec,nstr){
ts=parseInt(ts);
if(ts==0||ts==NaN){
return nstr;
}
var t=new Date(ts*1000);
var yyyy=t.getFullYear();
var mm=t.getMonth()+1;
if(mm<10){
mm="0"+mm;
}
var dd=t.getDate();
if(dd<10){
dd="0"+dd;
}
var HH=t.getHours();
if(HH<10){
HH="0"+HH;
}
var MM=t.getMinutes();
if(MM<10){
MM="0"+MM;
}
var SS=t.getSeconds();
if(SS<10){
SS="0"+SS;
}
var bb=t.getMonth();
var ba=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
bb=ba[bb];
spec=spec.replace(/%y/g,yyyy);
spec=spec.replace(/%m/g,mm);
spec=spec.replace(/%d/g,dd);
spec=spec.replace(/%H/g,HH);
spec=spec.replace(/%M/g,MM);
spec=spec.replace(/%S/g,SS);
spec=spec.replace(/%b/g,bb);
return spec;
}
function verifyBrowserCompatibility(){
var bv=navigator.userAgent;
if(/Opera/.test(bv)){
return false;
}
var _1b4=/Safari/.exec(bv);
if(_1b4){
var arr=/Version\/([0-9]*[.][0-9]*)([.][0-9]*)?/.exec(bv);
var _1b6=(arr&&arr.length>1?parseFloat(arr[1]):0);
var _1b7=(arr&&arr.length>2?parseFloat(arr[2]):0);
var _1b8=/AppleWebKit\/([0-9]*)?/.exec(bv);
var _1b9=(_1b8&&_1b8.length>1?parseInt(_1b8[1]):0);
return ((_1b6==3&&_1b7>=0.4)||(_1b6>=3.1)||(_1b9>=523));
}
var _1ba=/Firefox\/([0-9]*[.][0-9]*)/.exec(bv);
if(_1ba){
var _1bb=parseFloat(_1ba[1]);
return (_1bb>=1.5);
}
var _1bc=/MSIE ([0-9]*[.][0-9]*)/.exec(bv);
if(_1bc){
var _1bd=parseFloat(_1bc[1]);
return (_1bd>=6);
}
return false;
}
if(alertBrowserCompatibility_isDone==undefined){
var alertBrowserCompatibility_isDone=false;
}
function alertBrowserCompatibility(){
if(alertBrowserCompatibility_isDone){
return;
}
if(!verifyBrowserCompatibility()){
var _1be="WARNING: Your browser is not compatible with this page\n\nSupported browsers are:\nFirefox 1.5 (or above)\nInternet Explorer 6.0 (or above)\nSafari 3.0.4 (or above)\n\nYOU MAY GET UNEXPECTED RESULT IF YOU PROCEED";
alert(_1be);
}
alertBrowserCompatibility_isDone=true;
return;
}
alertBrowserCompatibility();
function getWindowByName(name){
for(var i=0;i<window.frames.length;i++){
if(window.frames[i].name==name){
return window.frames[i];
}
}
return null;
}
function newRowLayout(_1c1){
var _1c2=document.createElement("table");
var _1c3=document.createElement("tbody");
var tr=document.createElement("tr");
_1c3.appendChild(tr);
_1c2.appendChild(_1c3);
_1c2.border=0;
_1c2.cellSpacing=0;
_1c2.cellPadding=0;
_1c2.style.width=_1c1;
_1c2.align="center";
_1c2.contentrow=tr;
_1c2.addSpacer=RowLayout_addSpacer;
_1c2.addWidget=RowLayout_addWidget;
return _1c2;
}
function RowLayout_addWidget(_1c5,_1c6){
var td=document.createElement("td");
td.appendChild(toWidget(_1c5));
if(_1c6){
this.contentrow.insertBefore(td,this.contentrow.firstChild);
}else{
this.contentrow.appendChild(td);
}
return td;
}
function RowLayout_addSpacer(_1c8){
var td=document.createElement("td");
td.style.width=_1c8;
this.contentrow.appendChild(td);
}
function newSpacer(_1ca,_1cb){
var img=document.createElement("img");
img.border=0;
img.src="images/transparent.gif";
img.width=_1ca;
img.height=_1cb;
return img;
}
function newPageObject(_1cd,_1ce,prev,_1d0,_1d1){
var _1d2=newContentPage("id_"+_1cd,"",prev,_1ce);
if(_1d0&&_1d1){
jQuery(_1d2).css({"top":_1d1+"px","left":_1d0+"px"});
}
_1d2.mode=_1cd;
_1d2.arguments=_1ce;
_1d2.refresh=PageObj_refresh;
if(!prev){
var _1d3=jQuery("#sidenavBox");
if(!(_1d3.length>0)){
jQuery(document.body).append(_1d2);
}else{
_1d3.after(_1d2);
}
}else{
document.body.appendChild(_1d2);
}
return _1d2;
}
var modeFunctions=new Object;
function PageObj_refresh(_1d4){
if(!_1d4){
this.clear();
}
var _1d5=modeFunctions[this.mode];
if(_1d5==undefined){
alert("not implemented");
return false;
}
_1d5(this.mode,this.arguments,this);
if(0){
if(parseInt(this.offsetLeft)+parseInt(this.offsetWidth)>parseInt(document.documentElement.offsetWidth)&&parseInt(document.body.offsetWidth)>900){
this.style.left="";
this.style.right="0px";
}
}
return true;
}
function OverlayStack(){
this.topPage=null;
this.bottomPage=null;
this.newPage=OverlayStack_newPage;
this.popAll=OverlayStack_popAll;
this.popPage=OverlayStack_popPage;
if(arguments.length>0){
this.positionFunc=arguments[0];
}else{
this.positionFunc=function(){
return [null,null];
};
}
this.pageResizeHandler=Object_call_null;
this.setResizeHandler=OverlayStack_setResizeHandler;
window.onresize=function(){
if(window.overlayStack&&window.overlayStack.bottomPage){
var _1d6=window.overlayStack.bottomPage;
while(_1d6){
if(_1d6.resizeHandler){
_1d6.resizeHandler(_1d6);
}
_1d6=_1d6.cover;
}
}
};
}
function OverlayStack_setResizeHandler(func){
this.pageResizeHandler=func;
if(window.overlayStack&&window.overlayStack.bottomPage){
var _1d8=window.overlayStack.bottomPage;
while(_1d8){
_1d8.resizeHandler=func;
_1d8=_1d8.cover;
}
}
}
function OverlayStack_newPage(mode,args,_1db,_1dc){
if(this.topPage==null){
var _1dd=this.positionFunc(mode,args,_1db);
var _1de=newPageObject(mode,args,null,_1dd[0],_1dd[1]);
_1de.resizeHandler=this.pageResizeHandler;
this.topPage=_1de;
this.bottomPage=_1de;
if(!_1de.refresh()){
this.popPage();
}
}else{
if((!_1dc)&&(this.topPage.mode==mode)){
return;
}
if(typeof (hideGlobalCharts)!="undefined"){
hideGlobalCharts();
}
var _1de=newPageObject(mode,args,this.topPage);
_1de.resizeHandler=this.pageResizeHandler;
this.topPage=_1de;
if(!_1de.refresh()){
this.popPage();
}
}
if(this.topPage){
var _1df=this.topPage.getElementsByTagName("input");
for(var i=0;i<_1df.length;i++){
if(_1df[i].type=="text"&&_1df[i].offsetLeft&&!_1df[i].disabled){
_1df[i].focus();
break;
}
}
if(!_1db){
if(window.refreshSideNav!=undefined){
refreshSideNav();
}
lastNewPage=(new Date()).getTime();
}else{
if(_1db==2){
tvLocalRefresh();
}
}
}
scroll(0,0);
}
function OverlayStack_popAll(){
if(this.bottomPage){
this.bottomPage.destruct();
}
this.bottomPage=this.topPage=null;
}
function OverlayStack_popPage(_1e1){
if(this.topPage&&_1e1==1){
this.topPage=this.topPage.destruct();
scroll(0,0);
if(this.topPage==this.bottomPage){
if(typeof (restoreGlobalCharts)!="undefined"){
restoreGlobalCharts();
}
}
return;
}else{
if(this.topPage){
this.topPage=this.topPage.destruct();
this.topPage.refresh();
if(this.topPage==this.bottomPage){
if(typeof (restoreGlobalCharts)!="undefined"){
restoreGlobalCharts();
}
}
}
}
if(window.refreshSideNav!=undefined&&(!window.asynchronousMode)&&_1e1!=2){
function rn(){
if((new Date()).getTime()>lastNewPage+200){
refreshSideNav();
}
if(!this.topPage){
return;
}
var _1e2=this.topPage.getElementsByTagName("input");
for(var i=0;i<_1e2.length;i++){
if(_1e2[i].type=="text"&&_1e2[i].offsetLeft){
_1e2[i].focus();
break;
}
}
}
setTimeout(rn,1);
}
if(_1e1==2){
tvLocalRefresh();
}
scroll(0,0);
}
window.overlayStack=null;
window.lastNewPage=0;
var globalHash=new Object();
function randomId(){
return "id_"+parseInt(Math.random()*(1<<20))+"_"+parseInt(Math.random()*(1<<20));
}
function newTableDisplay(id,_1e5){
var _1e6=document.createElement("table");
_1e6.className="displayWidget";
_1e6.id=id;
_1e6.border=0;
_1e6.cellPadding=1;
_1e6.cellSpacing=1;
_1e6.align="center";
_1e6.width="92%";
var _1e7=document.createElement("tbody");
_1e6.appendChild(_1e7);
var _1e8=document.createElement("tr");
_1e8.width="100%";
var _1e9=document.createElement("td");
_1e9.width="100%";
_1e9.colSpan=10;
_1e9.className="displayTitle";
_1e9.innerHTML=_1e5;
_1e8.appendChild(_1e9);
_1e7.appendChild(_1e8);
_1e6.tbody=_1e7;
_1e6.titlecell=_1e9;
_1e6.setRow=TableDisplay_setRow;
_1e6.setRowMulti=TableDisplay_setRowMulti;
_1e6.setRowMultiSubtitle=TableDisplay_setRowMultiSubtitle;
_1e6.setSortableRowMultiSubtitle=TableDisplay_setSortableRowMultiSubtitle;
_1e6.sortColumn=TableDisplay_SortColumn;
_1e6.addPageRow=TableDisplay_addPageRow;
_1e6.clear=TableDisplay_clear;
_1e6.setUpdating=TableDisplay_setUpdating;
_1e6.clearUpdating=TableDisplay_clearUpdating;
return _1e6;
}
function toWidget(sth){
if(sth==null||sth==undefined){
return document.createElement("span");
}else{
if(sth.charAt!=undefined){
var _1eb=document.createElement("div");
var _1ec=sth.split("\n");
var i=0;
for(;i<_1ec.length;i++){
if(_1ec[i].length==0&&i==_1ec.length-1){
continue;
}
if(_1ec[i].length>65&&_1ec[i].search(" ")==-1){
_1eb.style.width="100%";
_1eb.style.height="60px";
_1eb.style.overflow="auto";
}
_1eb.appendChild(document.createTextNode(_1ec[i]));
_1eb.appendChild(document.createElement("br"));
}
if(i>4){
_1eb.style.width="100%";
_1eb.style.overflow="auto";
}
return _1eb;
}else{
if(sth.toFixed!=undefined){
return toWidget(String(sth));
}else{
return sth;
}
}
}
}
function toText(sth){
return document.createTextNode(sth);
}
function TableDisplay_setRow(tag,_1f0){
_1f0=toWidget(_1f0);
var _1f1=this.id+"_"+tag;
var _1f2=document.createElement("tr");
_1f2.id=_1f1;
this.tbody.appendChild(_1f2);
var _1f3=document.createElement("td");
_1f3.className="displayTag";
_1f3.innerHTML=tag;
_1f3.width="25%";
_1f2.appendChild(_1f3);
var _1f4=document.createElement("td");
_1f4.className="displayContent";
_1f4.width="75%";
if(window.jQuery){
jQuery(_1f4).append(_1f0);
}else{
_1f4.appendChild(_1f0);
}
_1f2.appendChild(_1f4);
_1f2.cellwidget=_1f4;
return _1f2;
}
function TableDisplay_setRowMulti(ary,_1f6){
var _1f7=document.createElement("tr");
this.tbody.appendChild(_1f7);
for(var i=0;i<ary.length;i++){
ary[i]=toWidget(ary[i]);
var _1f9=document.createElement("td");
_1f9.className=(_1f6?_1f6:"displayContent");
_1f9.appendChild(ary[i]);
_1f7.appendChild(_1f9);
}
return _1f7;
}
function TableDisplay_setUpdating(){
this.updatingRow=this.setRowMulti(["Loading..."]);
this.updatingRow.cells.item(0).colSpan=10;
this.updatingRow.cells.item(0).align="center";
}
function TableDisplay_clearUpdating(){
if(this.updatingRow){
this.updatingRow.parentNode.removeChild(this.updatingRow);
}
this.updatingRow=undefined;
}
function TableDisplay_setRowMultiSubtitle(ary){
var _1fb=document.createElement("tr");
this.tbody.appendChild(_1fb);
for(var i=0;i<ary.length;i++){
ary[i]=toWidget(ary[i]);
var _1fd=document.createElement("td");
_1fd.className="displaySubtitle";
_1fd.appendChild(ary[i]);
_1fb.appendChild(_1fd);
}
return _1fb;
}
function TableDisplay_setSortableRowMultiSubtitle(ary){
var _1ff=document.createElement("tr");
this.tbody.appendChild(_1ff);
this.lastsortorder=-1;
this.lastsortcol=-1;
for(var i=0;i<ary.length;i++){
var _201=document.createElement("td");
_201.nowrap=1;
_201.parentTable=this;
_201.colindex=i;
_201.sortorder=-1;
_201.onclick=TableDisplay_SortColumnClick;
_201.style.cursor="pointer";
_201.className="displaySubtitle";
_201.appendChild(document.createTextNode(ary[i]+" "));
var img=document.createElement("IMG");
img.className="sort-arrow-blank";
img.src="images/blankarrow.png";
_201.appendChild(img);
_1ff.appendChild(_201);
}
return _1ff;
}
function TableDisplay_SortColumnClick(){
this.parentTable.sortColumn(this.colindex,-1);
}
function TableDisplay_SortColumn(_203,_204){
var _205=this;
var _206=_205.tBodies[0].rows.length;
var _207=2;
var _208=new Array();
for(var j=_207;j<_206;j++){
_208[j-_207]=_205.tBodies[0].rows[j];
}
if(_205.lastsortcol==_203){
if(_205.lastsortorder==_204){
return;
}
_208.reverse();
_205.lastsortorder=1-_205.lastsortorder;
}else{
var itm="";
var _20b=_207;
while(""==itm&&_20b<_206){
itm=aj_getInnerText(_205.tBodies[0].rows[_20b].cells[_203]);
_20b++;
}
var _20c=determineSortFunction(itm);
aj_sortColIndex=_203;
_208.sort(_20c);
if(_204==1){
_208.reverse();
_205.lastsortorder=1;
}else{
_205.lastsortorder=0;
}
_205.lastsortcol=_203;
}
var _20d=_205.tBodies[0].rows[1].cells;
for(var i=0;i<_20d.length;i++){
var img=_20d[i].lastChild;
if(i==_203){
if(_205.lastsortorder==0){
img.className="sort-arrow-up";
}else{
img.className="sort-arrow-down";
}
}else{
img.className="sort-arrow-blank";
}
}
for(var i=0;i<_208.length;i++){
var _210=_208[i];
_205.tBodies[0].appendChild(_210);
}
}
function TableDisplay_clear(){
this.tbody.innerHTML="";
}
function TableDisplay_setTitle(_211){
this.titlecell.innerHTML=_211;
}
function TableDisplay_addPageRow(_212,_213){
if(!_213){
_213=_212.arguments;
}
var _214=_213.totalItems;
var _215=_213.itemsPerPage;
var _216=parseInt((_214-1)/_215)+1;
if(_216<=0){
_216=1;
}
if(_216<=1){
return;
}
var isIE=((navigator.userAgent.search("MSIE")==-1)?false:true);
var _218=document.createElement("select");
for(var i=1;i<=_216;i++){
var _21a=document.createElement("option");
_21a.text=i;
_21a.value=i;
if(!isIE){
_218.add(_21a,null);
}else{
_218.add(_21a);
}
}
var _21b=_213.currentPage;
_218.value=_21b;
_218.onchange=function(){
_213.currentPage=this.value;
_212.refresh();
};
var _21c=newRowLayout("");
_21c.align="left";
_21c.className="pageRow";
_21c.addSpacer(10);
_21c.addWidget(document.createTextNode("Page"));
_21c.addSpacer(5);
_21c.addWidget(_218);
var _21d=newRowLayout("100%");
_21d.className="pageRow";
_21d.addWidget(_21c);
var row=this.setRowMulti([_21d]);
row.cells[0].colSpan=20;
return;
}
function newFlexTableDisplay(_21f,_220,_221){
var _222=newTableDisplay(randomId,_21f);
if(_221&&_221.charAt){
_222.hashkey=_221;
if(globalHash[_222.hashkey]!=undefined){
_220=globalHash[_222.hashkey];
}else{
globalHash[_222.hashkey]=_220;
}
}
var _223=_222.titlecell;
_223.innerHTML="";
var _224=newRowLayout("100%");
var _225=document.createElement("span");
_225.innerHTML=_21f;
_225.style.fontWeight="bold";
_224.addWidget(_225);
_223.appendChild(_224);
var _226=document.createElement("img");
_226.border=0;
_226.style.border="white 1px solid";
_226.myTable=_222;
_222.opened=!_220;
var _227=function(args){
if(this.myTable.opened){
this.src="images/maximize.gif";
for(var i=1;i<this.myTable.rows.length;i++){
this.myTable.rows.item(i).style.display="none";
}
this.alt="Restore";
this.myTable.opened=false;
if(this.myTable.hashkey&&this.myTable.hashkey.charAt){
globalHash[this.myTable.hashkey]=false;
}
}else{
this.src="images/minimize.gif";
for(var i=1;i<this.myTable.rows.length;i++){
this.myTable.rows.item(i).style.display="";
}
this.alt="Minimize";
this.myTable.opened=true;
if(this.myTable.hashkey&&this.myTable.hashkey.charAt){
globalHash[this.myTable.hashkey]=true;
}
}
};
_226.onclick=_227;
_226.onclick();
_224.addWidget(_226);
_226.parentNode.align="right";
_222.FTD_parent_setRow=_222.setRow;
_222.FTD_parent_setRowMulti=_222.setRowMulti;
_222.FTD_parent_setRowMultiSubtitle=_222.setRowMultiSubtitle;
_222.setRow=FlexTableDisplay_setRow;
_222.setRowMulti=FlexTableDisplay_setRowMulti;
_222.setRowMultiSubtitle=FlexTableDisplay_setRowMultiSubtitle;
return _222;
}
function FlexTableDisplay_setRow(tag,_22b){
var _22c=this.FTD_parent_setRow(tag,_22b);
if(this.opened){
_22c.style.display="";
}else{
_22c.style.display="none";
}
return _22c;
}
function FlexTableDisplay_setRowMulti(ar){
var _22e=this.FTD_parent_setRowMulti(ar);
if(this.opened){
_22e.style.display="";
}else{
_22e.style.display="none";
}
return _22e;
}
function FlexTableDisplay_setRowMultiSubtitle(ar){
var _230=this.FTD_parent_setRowMultiSubtitle(ar);
if(this.opened){
_230.style.display="";
}else{
_230.style.display="none";
}
return _230;
}
window.TreeNodeTemplate=null;
window.TreeNodeStateOpenTemplate=null;
window.TreeNodeStateCloseTemplate=null;
window.TreeNodeRemoveLazyFunc=null;
function TreeNode(icon,desc,_233,_234,args){
var $=jQuery;
if(!window.TreeNodeTemplate){
var _237=$("<td/>").addClass("tree_node_info").append($("<td/>").css({"width":"16px"}).addClass("tree_node_state")).append($("<td/>").css({"width":"16px"}).append($("<img/>").addClass("tree_node_icon"))).append($("<td/>").addClass("tree_node_action tree_node_caption")).wrapInner("<tr/>").wrapInner("<tbody/>").wrapInner($("<table/>",{"cellSpacing":"0","cellPadding":"0","border":"0"}));
var _238=$("<td/>").addClass("tree_node_child").hide();
window.TreeNodeTemplate=$("<table/>",{"cellSpacing":"1","cellPadding":"0","border":"0"}).addClass("tree_node tree_node_lazy").append($("<tbody/>").append($("<tr/>").append(_237)).append($("<tr/>").append(_238)));
window.TreeNodeStateOpenTemplate=$("<img/>",{"src":"treeview_img/minus.gif"}).addClass("tree_toggle_action tree_node_toggle_icon");
window.TreeNodeStateCloseTemplate=$("<img/>",{"src":"treeview_img/plus.gif"}).addClass("tree_toggle_action tree_node_toggle_icon");
}
if(!window.TreeNodeRemoveLazyFunc){
window.TreeNodeRemoveLazyFunc=function(){
var $=jQuery;
var me=$(this);
var cell=me.data("cell");
var ref=cell["info"].find(".tree_node_icon");
switch(typeof cell["img"]){
case "string":
ref.attr("src",cell["img"]);
break;
case "object":
ref.after(cell["img"]).remove();
break;
default:
break;
}
if(cell["name"]){
cell["info"].find("td.tree_node_caption").html(cell["name"]);
}
if(cell["is_opened"]){
if(cell["pending_child"]){
cell["child"].append(cell["pending_child"]);
cell["pending_child"]=null;
}
cell["child"].show();
}
cell["redraw"]=$.noop;
me.removeClass("tree_node_lazy");
return;
};
}
var o=window.TreeNodeTemplate.clone();
var _23e=$.proxy(window.TreeNodeRemoveLazyFunc,o);
o.data("cell",{"is_opened":_233,"img":icon,"name":desc,"info":o.find("td.tree_node_info"),"child":o.find("td.tree_node_child"),"pending_child":document.createDocumentFragment(),"child_list":[],"redraw":_23e});
if(_233){
_23e();
}
var _23f=o.get(0);
_23f.clickHandler=_234;
_23f.clickArgs=args;
_23f.checkHandler=TreeNode_defaultCheckHandler;
_23f.checkArgs={};
_23f.toggle=TreeNode_toggle;
_23f.close=TreeNode_close;
_23f.open=TreeNode_open;
_23f.setHandler=TreeNode_setHandler;
_23f.localRefresh=TreeNode_localRefresh;
_23f.getChildren=TreeNode_getChildren;
_23f.addChild=TreeNode_addChild;
_23f.setStyle=TreeNode_setStyle;
_23f.setActive=TreeNode_setActive;
_23f.disconnect=TreeNode_delete;
return _23f;
}
function TreeNode_defaultCheckHandler(){
if(!(window.overlayStack&&overlayStack.bottomPage&&overlayStack.bottomPage.arguments)){
return false;
}
if(!this.checkArgs){
return false;
}
if(this.checkArgs.mode&&overlayStack.bottomPage.mode!=this.checkArgs.mode){
return false;
}
var cnt=0;
var _241=overlayStack.bottomPage.arguments;
for(var _242 in this.checkArgs){
if(_241[_242]!=this.checkArgs[_242]&&_242!="mode"){
return false;
}
cnt++;
}
return (cnt>0);
}
function TreeNode_toggle(_243){
var $=jQuery;
var me=$(this);
var cell=me.data("cell");
var _247=(typeof _243==="boolean"?_243:!cell["is_opened"]);
if(_247!=cell["is_opened"]){
if(_247){
if(cell["pending_child"]){
cell["child"].append(cell["pending_child"]);
cell["pending_child"]=null;
}
$.each(cell["child"].children("table.tree_node_lazy"),function(){
$(this).data("cell")["redraw"]();
});
}
cell["child"].toggle(_247);
cell["info"].find(".tree_node_toggle_icon").attr("src",_247?"treeview_img/minus.gif":"treeview_img/plus.gif");
cell["is_opened"]=_247;
}
return;
}
function TreeNode_close(){
return this.toggle(false);
}
function TreeNode_open(){
return this.toggle(true);
}
function TreeNode_setHandler(func,args){
this.clickHandler=func;
this.clickArgs=args;
}
function TreeNode_localRefresh(_24a){
var $=jQuery;
var me=$(this);
var cell=me.data("cell");
if(!_24a){
me.find(".tree_node_active").add(me).removeClass("tree_node_active");
if(cell["redraw"]){
cell["redraw"]();
}
}
var _24e=!!this.checkHandler();
if(_24e){
cell["info"].find(".tree_node_caption").add(me).addClass("tree_node_active");
}else{
var list=cell["child_list"];
for(var i=0;i<list.length&&!_24e;i++){
_24e|=list[i].localRefresh(true);
}
if(_24e){
this.open();
}
}
return _24e;
}
function TreeNode_getChildren(){
var $=jQuery;
return $.makeArray($(this).data("cell")["child"].children("table.tree_node"));
}
function TreeNode_addChild(_252){
window.cc++;
var $=jQuery;
var me=$(this);
var cell=me.data("cell");
var _256=cell["info"].find(".tree_node_state");
if(_256.is(":empty")){
(cell["is_opened"]?window.TreeNodeStateOpenTemplate:window.TreeNodeStateCloseTemplate).clone().appendTo(_256);
}
cell["child_list"].push(_252);
if(cell["pending_child"]){
window.frag++;
cell["pending_child"].appendChild(_252);
}else{
window.opp++;
if(cell["is_opened"]){
$(_252).data("cell")["redraw"]();
}
cell["child"].append(_252);
}
return;
}
window.cc=window.frag=window.opp=0;
function TreeNode_setStyle(st){
var $=jQuery;
var me=$(this);
me.data("cell")["info"].find(".tree_node_caption").css(st);
return;
}
function TreeNode_setActive(_25a){
var $=jQuery;
me=$(this);
me.data("cell")["info"].find(".tree_node_caption").add(me).toggleClass("tree_node_active",!!_25a);
return;
}
function TreeNode_delete(){
var p=this.parentNode;
p.removeChild(this);
}
function tvSetUpdating(){
var w=document.getElementById("sidenavWidget");
w.rows.item(0).cells.item(0).innerHTML="<b style='color: #ffffff; background-color: #ff0000'>"+$T.T("{CON#1806}")+"</b>";
}
function tvClear(){
document.getElementById("sidenavContainer").innerHTML="";
tvSetTitle(tvTitle);
tvForest=[];
}
window.tvForest=[];
window.tvTitle="";
function tvAddTree(tn){
if(tn==undefined){
return;
}
if(!document.getElementById("sidenav")){
tn.id="sidenav";
}
var $=jQuery;
var _260=$("#sidenavContainer");
if(!_260.data("initialized")){
_260.data("initialized",true);
_260.delegate(".tree_toggle_action","hover click",function(e){
var me=$(this);
switch(e.type){
case "mouseenter":
case "mouseover":
me.css({"background-color":"#ccc"});
break;
case "mouseleave":
case "mouseout":
me.css({"background-color":""});
break;
case "click":
me.parents(".tree_node:first").trigger("toggle_node");
break;
}
e.stopPropagation();
return;
}).delegate(".tree_node_caption","hover",function(e){
var me=$(this);
switch(e.type){
case "mouseenter":
case "mouseover":
if(me.parents(".tree_node:first").hasClass("tree_node_active")){
return;
}
me.css({"background-color":"#ccc"});
break;
case "mouseleave":
case "mouseout":
me.css({"background-color":""});
break;
}
e.stopPropagation();
return;
}).delegate(".tree_node_action","click",function(e){
var me=$(this);
var _267=me.parents(".tree_node:first").get(0);
if(_267&&_267.clickHandler){
_267.clickHandler(_267.clickArgs);
}
return;
}).delegate(".tree_node","toggle_node",function(e){
if(this==e.target){
e.target.toggle();
e.stopPropagation();
}
return;
});
}
_260.append(tn);
tvForest.push(tn);
}
function tvLocalRefresh(){
var $=jQuery,tree_list=$.treeview_list(),args_order=[],args_order_limit=0,mode,args,_bottomPage,id,i,j,me,handler_list,match_id,id,id_limit,o,field,cnt;
if(tree_list&&tree_list.length){
try{
_bottomPage=window.overlayStack.bottomPage;
mode=_bottomPage["mode"];
args=_bottomPage["arguments"];
for(id in args){
if(id=="mode"){
continue;
}
args_order.push(id);
}
args_order_limit=args_order.length;
}
catch(e){
}
if(!(mode)){
return false;
}
for(i=tree_list.length;i--;){
me=tree_list[i];
handler_list=me.data("treeview_data")["tv_handler"];
match_id=false;
for(id=0,id_limit=handler_list.length;id<id_limit;id++){
o=handler_list[id][1];
if(o["mode"]&&o["mode"]!=mode){
continue;
}
cnt=1;
for(j=args_order_limit;j--;){
field=args_order[j];
if(!o[field]){
continue;
}
if(o[field]!=args[field]){
cnt=0;
break;
}
cnt++;
}
if(cnt){
match_id=id;
break;
}
}
if(match_id!==false){
me.triggerHandler("highlight",[match_id]);
}
}
return;
}
for(var i=0;i<tvForest.length;i++){
tvForest[i].localRefresh();
}
}
function tvSetTitle(t){
var w=document.getElementById("sidenavWidget");
w.rows.item(0).cells.item(0).innerHTML=t;
tvTitle=t;
}
function tvGetNode(_26d){
var q=[];
for(var i=0;i<tvForest.length;i++){
q.push(tvForest[i]);
}
while(q.length>0){
var node=q.shift();
var _271=node.getChildren();
for(var i=0;i<_271.length;i++){
q.push(_271[i]);
}
var _272=0,argsCount=0;
for(var i in _26d){
argsCount++;
if(_26d[i]==node.checkArgs[i]){
_272++;
}
}
if(_272==argsCount){
return node;
}
}
return null;
}
var mouseX=0;
var mouseY=0;
var TrackingObject=null;
function initMouseTracker(){
document.body.style.width=document.body.style.height="100%";
document.body.style.margin="0px 0px 0px 0px";
document.body.onmousemove=updateMouseCoordinate;
}
function updateMouseCoordinate(){
if(!document.body){
return;
}
if(navigator.userAgent.search("Gecko")!=-1){
event=arguments[0];
}
mouseX=event.clientX+document.body.scrollLeft;
mouseY=event.clientY+document.body.scrollTop;
if(TrackingObject){
var obj=TrackingObject;
var _274=parseInt(mouseX-obj.lastMouseX);
var _275=parseInt(mouseY-obj.lastMouseY);
obj.style.left=parseInt(obj.offsetLeft)+_274+"px";
obj.style.top=parseInt(obj.offsetTop)+_275+"px";
obj.lastMouseX=parseInt(mouseX);
obj.lastMouseY=parseInt(mouseY);
}
}
var menuExists=0;
function newPopupMenu(){
var _276=document.createElement("table");
document.body.appendChild(_276);
_276.cellPadding=3;
_276.cellSpacing=1;
_276.border=0;
_276.className="popupMenu";
var _277=document.createElement("tbody");
_276.tbody=_277;
_276.appendChild(_277);
_276.addItem=PopupMenu_addItem;
_276.show=PopupMenu_show;
_276.hide=PopupMenu_hide;
_276.globalId=randomId();
globalHash[_276.globalId]=_276;
_276.pollCoordinates=PopupMenu_pollCoordinates;
_276.bind=PopupMenu_bind;
_276.style.position="absolute";
_276.style.zIndex=50000;
_276.style.display="none";
_276.tid=null;
if(arguments.length==2){
_276.bind(arguments[0],arguments[1]);
}
return _276;
}
function PopupMenu_addItem(desc,func,_27a){
var tr=document.createElement("tr");
this.tbody.appendChild(tr);
var td=document.createElement("td");
td.className="popupItem";
tr.appendChild(td);
td.argobj=_27a;
td.func=func;
td.innerHTML=desc;
td.parentMenu=this;
td.onclick=function(){
this.func(this.argobj);
this.parentMenu.hide();
};
td.onmouseover=function(){
this.className="popupItemHighlight";
};
td.onmouseout=function(){
this.className="popupItem";
};
}
function PopupMenu_show(){
if(menuExists==0){
this.style.display="";
if(this.caller.centercell){
this.caller.centercell.innerHTML="O";
}
var _27d=cTop=0;
var _27e=this.caller;
while(_27e!=document.body){
_27d+=_27e.offsetLeft;
cTop+=_27e.offsetTop;
_27e=_27e.offsetParent;
}
this.style.left=_27d;
this.style.top=cTop+this.caller.clientHeight;
this.cLeft=_27d;
this.cTop=cTop;
this.countUp=0;
this.tid=setInterval("globalHash[\""+this.globalId+"\"].pollCoordinates();",10);
menuExists=1;
}
}
function PopupMenu_hide(){
this.style.display="none";
if(this.caller&&this.caller.centercell){
this.caller.centercell.innerHTML="...";
}
clearInterval(this.tid);
this.tid=null;
menuExists=0;
}
function PopupMenu_pollCoordinates(){
var _27f=this.cLeft;
var _280=this.cLeft+this.caller.clientWidth;
var _281=this.cTop;
var _282=this.cTop+this.caller.clientHeight;
var _283=this.cLeft;
var _284=this.cLeft+this.clientWidth;
var _285=_282;
var _286=_282+this.clientHeight;
var _287=1;
var _288=1;
if(mouseX>_284||mouseX<_283||mouseY>_286||mouseY<_285){
_287=0;
}
if(mouseX>_280||mouseX<_27f||mouseY>_282||mouseY<_281){
_288=0;
}
if((_288||_287)==false){
this.countUp++;
if(this.countUp>60){
this.hide();
}
}else{
this.countUp=0;
}
}
function PopupMenu_bind(_289,_28a){
_289.menu=this;
this.caller=_289;
_289[_28a]=function(){
this.menu.show();
return false;
};
}
function newIconLayout(_28b){
var _28c=newRowLayout(_28b);
_28c.addItem=IconLayout_addItem;
return _28c;
}
function IconLayout_addItem(_28d,desc,func,_290){
var obj=document.createElement("IMG");
obj.src=_28d;
obj.title=desc;
obj.func=func;
obj.argobj=_290;
obj.onclick=function(){
this.func(this.argobj);
};
obj.style.cursor="pointer";
this.addWidget(obj);
this.addSpacer(5);
}
var globalAccessHandler=function(args){
overlayStack.popAll();
overlayStack.newPage(args.mode,args,2);
return;
};
var globalOpenDialogHandler=function(args){
overlayStack.newPage(args.mode,args,true);
return;
};
var globalRefreshHandler=function(){
overlayStack.topPage.refresh();
return;
};
var globalCancelHandler=function(){
overlayStack.popPage(true);
return;
};
function aj_getInnerText(el){
if("string"==typeof el||"undefined"==typeof el){
return el;
}
if(el.innerText){
return el.innerText;
}
var str=el.getAttribute("SortingInnerText");
if(null!=str&&""!=str){
return str;
}
str="";
var cs=el.childNodes;
var l=cs.length;
for(var i=0;i<l;i++){
if(1==cs[i].nodeType){
str+=aj_getInnerText(cs[i]);
break;
}else{
if(3==cs[i].nodeType){
str+=cs[i].nodeValue;
break;
}
}
}
el.setAttribute("SortingInnerText",str);
return str;
}
function determineSortFunction(itm){
var _29a=ajsortCaseInsensitive;
if(itm==undefined){
return _29a;
}
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)){
_29a=ajsortDate;
}
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)){
_29a=ajsortDate;
}
if(itm.match(/^[$]/)){
_29a=ajsortCurrency;
}
if(itm.match(/^\d?\.?\d+$/)){
_29a=ajsortNumeric;
}
if(itm.match(/^[+-]?\d*\.?\d+([eE]-?\d+)?$/)){
_29a=ajsortNumeric;
}
if(itm.match(/^[\d]+\s\([\d\s\.%]+\)/)){
_29a=ajsortNumeric;
}
if(itm.match(/^\d+\.\d+\.\d+$/)){
_29a=ajsortFirmwareVersion;
}
if(itm.match(/^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$/)){
_29a=ajsortIP;
}
return _29a;
}
function ajsortCaseInsensitive(a,b){
var aa=aj_getInnerText(a.cells[aj_sortColIndex]);
var bb=aj_getInnerText(b.cells[aj_sortColIndex]);
if(aa==bb){
return 0;
}else{
if(aa<bb){
return -1;
}else{
return 1;
}
}
}
function ajsortDate(a,b){
var aa=aj_getInnerText(a.cells[aj_sortColIndex]);
var bb=aj_getInnerText(b.cells[aj_sortColIndex]);
var dt1,dt2,yr=-1;
if(aa.length==10){
dt1=aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
}else{
yr=aa.substr(6,2);
if(parseInt(yr)<50){
yr="20"+yr;
}else{
yr="19"+yr;
}
dt1=yr+aa.substr(3,2)+aa.substr(0,2);
}
if(bb.length==10){
dt2=bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
}else{
yr=bb.substr(6,2);
if(parseInt(yr)<50){
yr="20"+yr;
}else{
yr="19"+yr;
}
dt2=yr+bb.substr(3,2)+bb.substr(0,2);
}
if(dt1==dt2){
return 0;
}else{
if(dt1<dt2){
return -1;
}
}
return 1;
}
function ajsortCurrency(a,b){
var aa=aj_getInnerText(a.cells[aj_sortColIndex]).replace(/[^0-9.]/g,"");
var bb=aj_getInnerText(b.cells[aj_sortColIndex]).replace(/[^0-9.]/g,"");
return parseFloat(aa)-parseFloat(bb);
}
function ajsortNumeric(a,b){
var aa=parseFloat(aj_getInnerText(a.cells[aj_sortColIndex]));
if(isNaN(aa)){
aa=0;
}
var bb=parseFloat(aj_getInnerText(b.cells[aj_sortColIndex]));
if(isNaN(bb)){
bb=0;
}
return aa-bb;
}
function ajsortFirmwareVersion(a,b){
var aS=aj_getInnerText(a.cells[aj_sortColIndex]).split(".");
var bS=aj_getInnerText(b.cells[aj_sortColIndex]).split(".");
var aa=aS[0]*10000+aS[1]*100+aS[2];
var bb=bS[0]*10000+bS[1]*100+bS[2];
if(isNaN(aa)){
aa=100000000;
}
if(isNaN(bb)){
bb=100000000;
}
return aa-bb;
}
function ajmakeStandardIPAddress(val){
var vals=val.split(".");
for(x in vals){
val=vals[x];
while(3>val.length){
val="0"+val;
}
vals[x]=val;
}
val=vals.join(".");
return val;
}
function ajsortIP(a,b){
var aa=ajmakeStandardIPAddress(aj_getInnerText(a.cells[aj_sortColIndex]).toLowerCase());
var bb=ajmakeStandardIPAddress(aj_getInnerText(b.cells[aj_sortColIndex]).toLowerCase());
if(aa==bb){
return 0;
}else{
if(aa<bb){
return -1;
}else{
return 1;
}
}
}
std={};
std.$=function(id){
return document.getElementById(id);
};
std.Object={};
std.Object.extend=function(_2b9,_2ba){
for(property in _2ba){
_2b9[property]=_2ba[property];
}
return _2b9;
};
std.Array={"each":function(a,_2bc){
for(var i=0;i<a.length;i++){
_2bc(a[i]);
}
},"indexOf":function(a,item){
return this.indexOfMatch(a,function(i){
return i==item;
});
},"indexOfMatch":function(a,func){
for(var i=0;i<a.length;i++){
if(func(a[i])){
return i;
}
}
return -1;
},"multiply":function(list,_2c5){
if(typeof (list.pop)!="function"){
list=[list];
}
var _2c6=[];
for(var i=0;i<_2c5;i++){
std.Array.each(list,function(item){
_2c6.push(item);
});
}
return _2c6;
}};
std.ClassNames=function(_2c9){
this._element=_2c9;
};
std.ClassNames.prototype={"add":function(name){
var t=this.getList();
t.push(name);
this._element.className=t.join(" ");
return this._element.className;
},"remove":function(name){
var t=[];
std.Array.each(this.getList(),function(item){
if(item!=name){
t.push(item);
}
});
this._element.className=t.join(" ");
return this._element.className;
},"getList":function(){
return this._element.className.replace(/\s+/g," ").replace(/(^\s+|\s+$)/g,"").split(" ");
}};
std.Element={"setStyle":function(_2cf,_2d0){
for(name in _2d0){
_2cf.style[name]=_2d0[name];
}
},"getStyle":function(_2d1,_2d2){
var val=_2d1.style[_2d2];
if(!val){
if(document.defaultValue&&document.defaultView.getComputedStyle){
var css=document.defaultView.getComputedStyle(_2d1,null);
val=css?css.getPropertyValue(_2d2):null;
}else{
if(_2d1.currentStyle){
val=_2d1.currentStyle[_2d2];
}
}
}
return val=="auto"?null:val;
},"moveTo":function(_2d5,x,y){
this.setStyle(_2d5,{"position":"absolute","left":x+"px","top":y+"px"});
},"setSize":function(_2d8,_2d9,_2da){
this.setStyle(_2d8,{"width":_2d9+"px","height":_2da+"px"});
},"removeJSAttribute":function(_2db,name){
if(std.BrowserInfo.isIE){
_2db.removeAttribute(name);
}else{
delete _2db[name];
}
},"setOpacity":function(_2dd,_2de){
if(std.BrowserInfo.isIE){
var _2df=this.getStyle(_2dd,"filter");
var _2e0=_2df.replace(/\s+/g," ").replace(/(^\s+|\s+$)/g,"").split(" ");
for(var i=0;i<_2e0.length;i++){
if(_2e0[i].search(/Alpha[^A-Za-z]/)!=-1){
_2e0.splice(i,1);
break;
}
}
if(1-_2de>1e-7){
_2e0.push("progid:DXImageTransform.Microsoft.Alpha(opacity="+parseInt(_2de*100)+")");
}
_2dd.style.filter=_2e0.join(" ");
}else{
_2dd.style.opacity=Number(_2de).toFixed(3);
}
},"clear":function(_2e2){
while(_2e2.firstChild){
_2e2.removeChild(_2e2.firstChild);
}
}};
std.Event={"addEventListener":function(_2e3,name,_2e5){
if(_2e3.addEventListener){
_2e3.addEventListener(name,_2e5,false);
}else{
_2e3.attachEvent("on"+name,_2e5);
}
},"removeEventListener":function(_2e6,name,_2e8){
if(_2e6.removeEventListener){
_2e6.removeEventListener(name,_2e8,false);
}else{
_2e6.detachEvent("on"+name,_2e8);
}
}};
std.Position={"realOffset":function(_2e9){
var _2ea=0,valueL=0;
do{
_2ea+=_2e9.scrollTop||0;
valueL+=_2e9.scrollLeft||0;
_2e9=_2e9.parentNode;
}while(_2e9);
return [valueL,_2ea];
},"cumulativeOffset":function(_2eb){
var _2ec=0,valueL=0;
do{
_2ec+=_2eb.offsetTop||0;
valueL+=_2eb.offsetLeft||0;
_2eb=_2eb.offsetParent;
}while(_2eb);
return {"x":valueL,"y":_2ec};
}};
std.Debug={"init":function(){
if(this._window&&!this._window.closed){
return;
}
this._window=window.open("","DebugWindow","dialog,width=900,height=500,scrollbars=1");
if(!this._window){
return;
}
this._window.document.designMode="on";
this._window.document.body.contentEditable=true;
this._window.document.title="Debug messages";
},"_printf":function(){
this.init();
if(!this._window){
return;
}
var args=[];
std.Array.each(arguments,function(item){
args.push(item);
});
var _2ef=args.shift();
while(args.length>0){
_2ef=_2ef.replace("%%",args.shift());
}
var el=this._window.document.createElement("pre");
el.appendChild(this._window.document.createTextNode(_2ef));
this._window.document.body.appendChild(el);
el.scrollIntoView(false);
},"printf":function(){
var args=[];
std.Array.each(arguments,function(item){
args.push(item);
});
var _2f3=args.shift();
_2f3="%%-%%-%% %%:%%:%% : "+_2f3;
var d=new Date();
var args=[d.getFullYear(),d.getMonth()+1,d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds()].concat(args);
this._printf.apply(this,[_2f3].concat(args));
}};
std.BrowserInfo={"createElement_loose":(function(){
var _2f5=false;
try{
document.createElement("<br/>");
_2f5=true;
}
catch(e){
}
return _2f5;
})(),"isIE":navigator.userAgent.search("MSIE")!=-1,"isOpera":!!window.opera,"isKHTML":navigator.userAgent.search("KHTML")!=-1,"isMac":navigator.userAgent.search(/Macintosh/i)!=-1};
std.Function={"bindSubject":function(_2f6,_2f7){
var _2f8=function(){
if(!_2f6){
return null;
}
var args=[];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return _2f6.apply(_2f7,args);
};
return _2f8;
}};
std.isNumber=function(data){
return isFinite(parseFloat(data));
};
std.isString=function(str){
return (typeof (str)=="string")||(str instanceof String);
};
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
PubSub=function(_2fd,name){
if(arguments.length<1){
return;
}
this._listeners={};
this.name=name;
this.thisArg=_2fd;
if(_2fd instanceof Observable){
_2fd.addObserverHub(this);
}
};
PubSub.prototype={"addListener":function(_2ff){
var id=_2ff._eventListenerId||Math.random();
_2ff._eventListenerId=id;
this._listeners[id]=_2ff;
},"removeListener":function(_301){
delete this._listeners[_301._eventListenerId];
},"removeAllListeners":function(){
this._listeners={};
},"fireEvent":function(){
var args=[];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
for(var i in this._listeners){
this._listeners[i].apply(this.thisArg,[this].concat(args));
}
}};
var Observable=function(){
this._observerHubs={};
};
Observable.prototype={"addListener":function(_304,_305){
return this._observerHubs[_304].addListener(_305);
},"removeListener":function(_306,_307){
return this._observerHubs[_306].removeListener(_307);
},"removeObserverHub":function(_308){
this._observerHubs[_308].removeAllListeners();
delete this._observerHubs[_308];
},"addObserverHub":function(_309){
return this._observerHubs[_309.name]=_309;
},"hasEvent":function(_30a){
return (_30a in this._observerHubs);
},"fireEvent":function(_30b){
var args=[];
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
return this._observerHubs[_30b].fireEvent.apply(this._observerHubs[_30b],args);
},"bridgeEvent":function(_30e,_30f,_310){
var me=this;
_30f.addListener(_310,function(_312){
var args=[];
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
me.fireEvent.apply(me,[_30e].concat(args));
});
}};
HideShowController=(function(){
var _315=function(_316,func){
std.Array.each(_316,function(item){
var obj=item[0];
var _31a=item[1];
if(obj instanceof Observable){
obj.addListener(_31a,func);
}else{
if(obj.pcmsEvents&&obj.pcmsEvents.hasEvent(_31a)){
obj.pcmsEvents.addListener(_31a,func);
}else{
if(std.isNumber(obj.nodeType)){
std.Event.addEventListener(obj,_31a,func);
}
}
}
});
};
return {"addWidget":function(_31b,_31c,_31d){
if(_31b.hideShowHooks&&_31b.hideShowHandler){
std.Array.each(_31b.hideShowHooks,function(item){
var obj=item[0];
var _320=item[1];
if(obj instanceof Observable){
obj.removeListener(_320,_31b.hideShowHandler);
}else{
if(obj.pcmsEvents&&obj.pcmsEvents.hasEvent(_320)){
obj.pcmsEvents.removeListener(_320,_31b.hideShowHandler);
}else{
if(std.isNumber(obj.nodeType)){
std.Event.removeEventListener(obj,_320,_31b.hideShowHandler);
}
}
}
});
}
var func=function(evt){
_31b.style.display=_31b.hideShowPredicate(evt)?"":"none";
};
_31b.hideShowPredicate=_31c;
_31b.hideShowHandler=func;
_31b.hideShowHooks=_31d;
_315(_31d,func);
func();
},"addWidgetVsCheckbox":function(_323,_324){
return this.addWidget(_323,predCheckbox(_324),[[_324,"click"],[_324,"keypress"]]);
},"newContainer":function(_325,_326){
var div=document.createElement("div");
this.addWidget(div,_325,_326);
return div;
},"union":function(_328,_329,_32a){
var _32b=_328.hideShowPredicate;
_328.hideShowPredicate=function(){
return _32b()||_329();
};
if(_32a){
_315(_32a,_328.hideShowHandler);
}
}};
})();
predCheckbox=function(_32c){
return function(){
return !!_32c.checked;
};
};
predCheckValue=function(_32d,_32e){
return function(){
return _32d.getHideShowCheckboxValue()&&_32d.getValue()==_32e;
};
};
ConfigFormTab=function(_32f,name,_331){
if(arguments.length<2){
return;
}
this._element=document.createElement("div");
this._contents=document.createElement("div");
this._contents.className="configcontent";
this._isLeftMost=_331;
std.Object.extend(this._element,{"name":name});
this._title=this._element.appendChild(newAnchorWidget("&nbsp;"));
_32f._tabBlock.insertBefore(this._element,_32f._tabFiller);
_32f._contentBlock.appendChild(this._contents);
this._expandableDivs={};
this.setTitle(name);
this.select(false);
};
ConfigFormTab.prototype={"setTitle":function(_332){
this._title.firstChild.nodeValue=_332;
},"select":function(_333){
if(_333===this._isSelected){
return;
}
this._element.className=_333?"configtabselected":"configtab";
this._contents.style.display=_333?"":"none";
if(_333&&std.BrowserInfo.isIE){
var divs=this._contents.getElementsByTagName("div");
std.Array.each(divs,function(item){
if(/SlidingTable( |$)+/.test(item.className)){
item.style.position="absolute";
item.offsetWidth;
item.style.position="relative";
item.offsetWidth;
}
});
}
if(this._isLeftMost){
this._element.style.borderLeftColor=_333?"":"#FFFFFF";
}
this._isSelected=_333;
},"getTabElement":function(){
return this._element;
},"addWidget":function(_336){
if(_336 instanceof ExpandableDiv){
this._expandableDivs[_336.name]=_336;
}
this._contents.appendChild(_336.getElement());
return _336;
}};
ConfigForm=function(_337,_338,id,_33a){
if(arguments.length<4){
return;
}
Observable.apply(this);
this._element=document.createElement("div");
this._element.innerHTML="<div></div><div></div>";
this._tabBlock=this._element.firstChild;
this._contentBlock=this._element.lastChild;
this._innerForm=new DynamicForm("nowhere","noaction");
this._dynamicForm=_337||this._innerForm;
this._configId=id;
this._hiddenInput=newTitledTextAreaInput(this._dynamicForm,id,"Configuration","","100%","400px");
var _33b=_338.setRowMulti([this._hiddenInput]);
_33b.cells.item(0).colSpan=10;
_33b.style.display="none";
var _33c=this._hiddenInput.rows[0].cells[0];
_33c.innerHTML="<div style=\"float:left;\">Configuration</div><div style=\"text-align: right;\"><input type=\"button\" value=\"Update\" /></div>";
var _33d=_33c.lastChild.firstChild;
std.Event.addEventListener(_33d,"click",std.Function.bindSubject(function(evt){
this._dynamicForm.setValue(this._configId,this.getConfigString());
},this));
this._element.className="configcontainer";
this._tabBlock.className="configtabblock";
this._contentBlock.className="configcontentblock";
_338.setRowMulti([this._element]).cells[0].colSpan=10;
this._tabFiller=this._tabBlock.appendChild(document.createElement("div"));
this._tabFiller.className="configtabfiller";
var tabs=this._tabs={};
for(var i=0;i<_33a.length;i++){
tabs[_33a[i]]=new ConfigFormTab(this,_33a[i],i==0);
}
tabs[_33a[0]].select(true);
std.Event.addEventListener(this._tabBlock,"click",function(evt){
var _342=evt.target||evt.srcElement;
if(_342.nodeName.toLowerCase()=="a"){
_342=_342.parentNode;
}
var _343=null;
if(/^configtab(selected)?$/.test(_342.className)){
for(var i in tabs){
if(i==_342.name){
_343=tabs[i];
}else{
tabs[i].select(false);
}
}
_343.select(true);
}
});
};
ConfigForm.prototype=std.Object.extend(new Observable(),{"addWidget":function(_345,_346){
return this._tabs[_345].addWidget(_346);
},"getElement":function(){
return this._element;
},"getConfigDict":function(){
var _347={};
this.mapInputs(function(item){
var x=item._converter();
for(var i in x){
_347[i]=x[i];
}
});
return _347;
},"getConfigString":function(){
var _34b=this.getConfigDict();
var _34c=[];
for(var i in _34b){
_34c.push(i+"=\""+_34b[i]+"\"");
}
return _34c.join("\n");
},"validate":function(){
var ok=true;
this.mapInputs(function(item){
ok=ok&&item._validator();
});
return ok;
},"prepareFormSubmit":function(){
if(!this.validate()){
return false;
}
if(!this._hiddenInput.clientWidth){
this._dynamicForm.setValue(this._configId,this.getConfigString());
}else{
alert("Debugging area is opened, submitting the text inside debugging area instead...");
}
return true;
},"loadFromString":function(_350){
this._dynamicForm.setValue(this._configId,_350);
var _351=(_350||"").split("\n");
var _352={};
std.Array.each(_351,function(item){
var _354=item.match(/^([^=]+)="(.*)"$/);
if(_354){
_352[_354[1]]=_354[2];
}
});
this.loadFromDict(_352);
},"loadFromDict":function(_355){
this.mapInputs(function(item){
item._loader(_355);
},true);
},"getDynamicForm":function(){
return this._dynamicForm;
},"q":function(str){
var l=str.split("/");
for(var i=0;i<l.length;i++){
l[i]=l[i].replace(/%[0-9A-F]{2}/ig,function(str){
return String.fromCharCode(parseInt(str.substr(1),16));
});
}
if(l.length>2){
return this._tabs[l[0]]._expandableDivs[l[1]]._inputs[l[2]];
}else{
if(l.length>1){
return this._tabs[l[0]]._expandableDivs[l[1]];
}else{
return this._tabs[l[0]];
}
}
},"f":function(){
return this._innerForm;
},"mapInputs":function(func,_35c){
for(var i in this._tabs){
for(var j in this._tabs[i]._expandableDivs){
var div=this._tabs[i]._expandableDivs[j];
if(!(div.getHideShowCheckboxValue()&&div.getElement().style.display!="none")&&!_35c){
continue;
}
for(var k in div._inputs){
var _361=div._inputs[k];
if(!(_361.getHideShowCheckboxValue()&&_361.getElement().style.display!="none")&&!_35c){
continue;
}
func(_361);
}
}
}
}});
ConfigInputWidget=function(_362,_363,_364,_365,_366,_367,_368,_369){
if(arguments.length<5){
return;
}
Observable.apply(this);
new PubSub(this,"OnChange");
new PubSub(this,"OnHideShow");
this._parentContainer=_362;
this._optionName=_364;
this._titleText=_363;
if(_367){
this._validator=_367;
}
if(_368){
this._converter=_368;
}
this._element=document.createElement("tr");
this._element.className="configinputwidget";
this._header=this._element.appendChild(document.createElement("td"));
this._header.className="configinputwidgetheader";
var _36a=_369?"configinputwidgettitlefree":"configinputwidgettitle";
this._header.innerHTML="<div class=\""+_36a+"\">&nbsp;</div><input type=\"checkbox\" />";
this._title=this._header.firstChild;
var _36b=this._hideShowCheckbox=this._header.lastChild;
_36b.style.display=_369?"none":"";
_36b.checked=_369;
this._contents=this._element.appendChild(document.createElement("td"));
this._contents.className="configinputwidgetcontents";
this.setTitle(_363);
if(typeof (_365)=="string"||(_365 instanceof String)){
var _36c=this._innerWidget=/^new/.test(_365)?window[_365].apply(window,_366):(function(){
var cons=function(){
window[_365].apply(this,_366);
};
cons.prototype=new window[_365]();
return new cons();
})();
}else{
var _36c=this._innerWidget=(function(){
var cons=function(){
_365.apply(this,_366);
};
cons.prototype=new _365();
return new cons();
})();
}
this._contents.appendChild(_36c.getElement?_36c.getElement():_36c);
HideShowController.addWidget(this._contents,std.Function.bindSubject(function(){
this.fireEvent("OnHideShow",_36b.value);
return _36b.checked;
},this),[[_36b,"click"],[_36b,"keypress"]]);
var id=_366[1];
_362.parentForm.f().registerHandler(id,std.Function.bindSubject(function(_370,_371){
this.fireEvent("OnChange",_370);
},this));
_362.addWidget(this);
};
ConfigInputWidget.prototype=std.Object.extend(new Observable(),{"setTitle":function(_372){
this._title.firstChild.nodeValue=_372;
},"getInnerInput":function(){
return this._innerWidget;
},"getValue":function(){
return this._innerWidget.getValue?this._innerWidget.getValue():this._innerWidget.value;
},"setValue":function(val){
this._innerWidget.setValue?this._innerWidget.setValue(val):(this._innerWidget.value=val);
this.fireEvent("OnChange",val);
return val;
},"_validator":function(){
return true;
},"_converter":function(){
if(this._optionName){
var _374={};
_374[this._optionName]=this.getValue();
return _374;
}else{
return {};
}
},"_loader":function(_375){
if(this._optionName in _375){
this.setValue(_375[this._optionName]);
this.fireEvent("OnChange",this.getValue());
this._hideShowCheckbox.checked=true;
this._contents.hideShowHandler();
this._parentContainer.setExpanded(true);
}
},"setValidator":function(func){
this._validator=func;
},"setConverter":function(func){
this._converter=func;
},"setSourceConverter":function(func){
this._sourceConverter=func;
},"getHideShowCheckboxValue":function(){
return this._hideShowCheckbox.checked;
},"addInnerLabel":function(_379,text){
return this._contents.insertBefore(document.createTextNode(text),_379?this._innerWidget:this._innerWidget.nextSibling);
},"getElement":function(){
return this._element;
},"setHideShowParameters":function(_37b,_37c){
HideShowController.addWidget(this.getElement(),_37b,_37c);
},"unionHideShowParameters":function(_37d,_37e){
HideShowController.union(this.getElement(),_37d,_37e);
},"unionContent":function(_37f){
var _380=[];
var _381=function(evt){
var _383=false;
if(evt){
var _384=evt.target||evt.srcElement;
_383=_384.checked;
}else{
std.Array.each(_37f._hideShowContentUnion,function(item){
_383=_383||item.getHideShowCheckboxValue();
});
}
std.Array.each(_37f._hideShowContentUnion,function(item){
item._hideShowCheckbox.checked=_383;
item._contents.style.display=_383?"":"none";
item.fireEvent("OnHideShow",_383);
});
return _383;
};
if(this._hideShowContentUnion){
_380=this._hideShowContentUnion;
}else{
_380.push(this);
}
if(_37f._hideShowContentUnion){
_380=_380.concat(_37f._hideShowContentUnion);
}else{
_380.push(_37f);
}
this._hideShowContentUnion=_37f._hideShowContentUnion=_380;
std.Array.each(_380,function(item){
var _388=[];
std.Array.each(_380,function(item){
_388.push([item._hideShowCheckbox,"click"],[item._hideShowCheckbox,"keypress"]);
});
HideShowController.addWidget(item._contents,_381,_388);
});
},"subordinateTo":function(_38a,_38b){
var _38c=function(){
var val=_38b();
if(val){
this._element.style.display=this._contents.style.display="";
this._hideShowCheckbox.checked=true;
}else{
this._element.style.display="none";
}
this.fireEvent("OnHideShow",val);
};
_38c=std.Function.bindSubject(_38c,this);
_38a.addListener("OnChange",_38c);
_38a.addListener("OnHideShow",_38c);
_38c();
}});
valGeneric=function(func,_38f){
return function(){
if(!func(this.getValue())){
alert(_38f.replace(/%s/g,this.getValue()));
if(this._innerWidget.nodeName&&/(input|textarea)/i.test(this._innerWidget.nodeName)){
try{
this._innerWidget.focus();
}
catch(e){
}
}
return false;
}
return true;
};
};
valNonEmpty=function(_390){
return valGeneric(function(val){
return String(val)!="";
},_390);
};
valInteger=function(_392){
return valGeneric(checkInteger,_392);
};
valPositiveInteger=function(_393){
return valGeneric(function(val){
return checkInteger(val)&&val>=0;
},_393);
};
valRange=function(low,high,_397){
return valGeneric(function(val){
return checkInteger(val)&&low<=val&&high>=val;
},_397);
};
valDomainName=function(_399){
return valGeneric(checkDomainFormat,_399);
};
valAlphanumeric=function(_39a){
return valGeneric(checkAlphanumeric,_39a);
};
valRegex=function(_39b,_39c){
return valGeneric(function(val){
return _39b.test(val);
},_39c);
};
valIpMask=function(_39e){
return valGeneric(validate_ipa_mask,_39e);
};
valMac=function(_39f){
return valGeneric(validate_mac,_39f);
};
valMatchInput=function(_3a0,_3a1){
return valGeneric(function(val){
return val==_3a0.getValue();
},_3a1);
};
ExpandableDiv=function(_3a3,_3a4,_3a5,_3a6){
if(arguments.length<3){
return;
}
this._element=document.createElement("div");
this._element.className="expandablediv";
this._header=this._element.appendChild(document.createElement("div"));
this._header.className="expandabledivheader";
this._title=this._header.appendChild(document.createElement("div"));
this._title.className="expandabledivheadertitle";
this._title.innerHTML="&nbsp;";
this._contents=this._element.appendChild(document.createElement("div"));
this._contents.className="expandabledivcontent";
this._contents.innerHTML="<table cellpadding=\"0\" border=\"0\" cellspacing=\"0\"><tbody></tbody></table>";
this._inputs={};
this.parentForm=_3a3;
this.name=_3a5;
if(std.BrowserInfo.createElement_loose){
var _3a7=document.createElement("<input type=\"checkbox\">");
}else{
var _3a7=document.createElement("input");
_3a7.type="checkbox";
}
this._checkbox=this._header.appendChild(_3a7);
if(_3a6){
_3a7.checked=true;
_3a7.style.display="none";
}
HideShowController.addWidgetVsCheckbox(this._contents,_3a7);
this.setTitle(_3a5);
_3a3.addWidget(_3a4,this);
};
ExpandableDiv.prototype={"setTitle":function(_3a8){
this._title.firstChild.nodeValue=_3a8;
},"getElement":function(){
return this._element;
},"addWidget":function(_3a9){
this._inputs[_3a9._titleText]=_3a9;
this._contents.firstChild.firstChild.appendChild(_3a9.getElement());
},"getHideShowCheckboxValue":function(){
return this._checkbox.checked;
},"setExpanded":function(_3aa){
this._checkbox.checked=_3aa;
this._contents.hideShowHandler();
}};
ConfigTextbox=function(_3ab,_3ac,_3ad,_3ae,_3af,_3b0,_3b1){
if(arguments.length<4){
return;
}
ConfigInputWidget.apply(this,[_3ab,_3ac,_3ad,"newTextInput",[_3ab.parentForm.f(),Math.random(),_3ae],_3af,_3b0,_3b1]);
};
ConfigTextbox.prototype=new ConfigInputWidget();
ConfigPassword=function(_3b2,_3b3,_3b4,_3b5,_3b6,_3b7,_3b8){
if(arguments.length<4){
return;
}
ConfigInputWidget.apply(this,[_3b2,_3b3,_3b4,"newPasswordInput",[_3b2.parentForm.f(),Math.random(),_3b5],_3b6,_3b7,_3b8]);
};
ConfigPassword.prototype=new ConfigInputWidget();
ConfigRadioGroup=function(_3b9,_3ba,_3bb,_3bc,_3bd,_3be,_3bf,_3c0,_3c1){
if(arguments.length<6){
return;
}
ConfigInputWidget.apply(this,[_3b9,_3ba,_3bb,"newRadioGroup",[_3b9.parentForm.f(),Math.random(),_3bc,_3bd,_3be],_3bf,_3c0,_3c1]);
};
ConfigRadioGroup.prototype=std.Object.extend(new ConfigInputWidget(),{"setValue":function(val){
std.Array.each(this._innerWidget.childButtons,function(item){
item.checked=(item.value==val);
});
this._innerWidget.value=val;
this.fireEvent("OnChange",val);
}});
ConfigEnableDisable=function(_3c4,_3c5,_3c6,_3c7,_3c8,_3c9,_3ca){
if(arguments.length<4){
return;
}
ConfigRadioGroup.apply(this,[_3c4,_3c5,_3c6,["enable","disable"],["Enable","Disable"],_3c7?"enable":"disable",_3c8,_3c9,_3ca]);
};
ConfigEnableDisable.prototype=std.Object.extend(new ConfigRadioGroup(),{"getValue":function(){
return this._innerWidget.value=="enable";
},"setValue":function(_3cb){
std.Array.each(this._innerWidget.childButtons,function(item){
item.checked=((item.value=="disable")^_3cb);
});
this._innerWidget.value=_3cb?"enable":"disable";
this.fireEvent("OnChange",_3cb);
},"_converter":function(){
var _3cd={};
_3cd[this._optionName]=this._innerWidget.value;
return _3cd;
},"_loader":function(_3ce){
if(this._optionName in _3ce){
this.setValue(_3ce[this._optionName]=="enable");
this.fireEvent("OnChange",this.getValue());
this._hideShowCheckbox.checked=true;
this._contents.hideShowHandler();
this._parentContainer.setExpanded(true);
}
}});
ConfigSingleSelection=function(_3cf,_3d0,_3d1,_3d2,_3d3,_3d4,_3d5,_3d6,_3d7){
if(arguments.length<6){
return;
}
ConfigInputWidget.apply(this,[_3cf,_3d0,_3d1,"newSingleSelectionInput",[_3cf.parentForm.f(),Math.random(),_3d2,_3d3,_3d4],_3d5,_3d6,_3d7]);
};
ConfigSingleSelection.prototype=std.Object.extend(new ConfigInputWidget(),{"addOptions":function(_3d8,_3d9){
this._innerWidget.appendList(_3d8,_3d9);
},"removeOptions":function(_3da,_3db){
this._innerWidget.removeValues(_3da,_3db);
}});
ConfigSubnetMask=function(_3dc,_3dd,_3de,_3df,_3e0,_3e1,_3e2){
if(arguments.length<4){
return;
}
var nm=0;
var _3e4=[];
for(var i=0;i<=31;i++){
_3e4.push(ipv4_ntoa(nm));
nm=nm>>1;
nm|=2147483648;
}
_3e4.push(ipv4_ntoa(nm));
ConfigSingleSelection.apply(this,[_3dc,_3dd,_3de,_3e4,_3e4,_3df,_3e0,_3e1,_3e2]);
};
ConfigSubnetMask.prototype=new ConfigSingleSelection();


