function Pod(){
this.temp=SObject;
this.temp();
delete this.temp;
this.timeout=15;
this.tID=0;
this.dom=new DOM;
this.content=new DOM;
this.refreshInt=0;
this.baseUrl="/sp/dispatch.php?target=startpage&";
this.s=new Array;
this.s["shaded"]=false;
this.s["edit"]=false;
this.sProps=new Array("type","tID","pID","eID","s");
this.init=function(){
this.content.setDocument(this.getContentUrl());
this.logAction("req");
this.insert("loadingDiv");
this.showContent();
this.refresh(true);
};
this.refresh=function(_1){
if(this.refreshInt==0){
return;
}
if(_1!=true){
this.reload();
}
setTimeout("SOBS["+this.id+"].refresh()",this.refreshInt*60000);
};
this.reload=function(){
this.halt();
this.reset();
this.init();
};
this.reset=function(){
this.dom=new DOM;
this.content=new DOM;
};
this.set=function(_2,_3,_4){
this.s[_2]=_3;
try{
if(_4==true){
this.content.setDocument(this.getContentUrl());
}
this.logAction("set:"+_2+":"+_3);
this.showContent();
this.manager.save();
}
catch(e){
throw new Error("Failed setting '"+_2+"' to value: "+_3+"; DOM error: "+e.message);
}
};
this.showContent=function(){
this.dom.removeChildNodes();
this.dom.appendDocument(this.content);
this.dom.appendDocument(this.getPodDOM());
this.dom.appendDocument(this.getManagerDOM());
this.dom.appendDocument(this.getEnvDOM());
this.formatContent();
this.queue("updateDisplay");
};
this.updateDisplayCheck=function(){
if(this.dom.idle()){
try{
var _5=document.getElementById(this.eID);
}
catch(e){
return false;
}
if(_5==null){
return false;
}
if(this.getErrors()!=false){
this.insert("errorDiv");
}else{
_5.innerHTML=this.dom.transformed;
}
return true;
}else{
return false;
}
};
this.insert=function(_6){
this.queue("insertContent",_6);
};
this.insertContentCheck=function(){
try{
var _7=document.getElementById(this.eID);
var _8=document.getElementById(this.manager[this.cArgs]);
}
catch(e){
return false;
}
if(_7==null||_8==null){
return false;
}
_7.innerHTML=_8.innerHTML.replace(/(\$self)/g,"SOBS["+this.id+"]");
return true;
};
this.formatContent=function(){
if(this.dom.stylesheet==undefined){
this.dom.setStylesheet(this.baseUrl+"t=s&r="+this.xsl);
}
this.dom.applyStylesheet();
};
this.getPodDOM=function(){
var _9=new DOM("data");
var de=_9.document.documentElement;
de.setAttribute("source","client");
de.setAttribute("scope","pod");
var _b=new Array();
_b["name"]="self";
_b["value"]="SOBS["+this.id+"]";
this.dom.addChildNode(de,"reference",_b);
for(var i=0;i<this.sProps.length;i++){
this.parseProp(this.sProps[i],this[this.sProps[i]],de,_9.document);
}
return _9;
};
this.getManagerDOM=function(){
var _d=new DOM("data");
var de=_d.document.documentElement;
de.setAttribute("source","client");
de.setAttribute("scope","manager");
for(var _f in this.manager.sProps){
this.parseProp(_f,this.manager.sProps[_f],de,_d.document);
}
for(var _10 in this.manager.lp){
this.parseProp(_10,this.manager.lp[_10],de,_d.document);
}
return _d;
};
this.getEnvDOM=function(){
var dom=new DOM("data");
var env=new Array;
var _13=new Date;
var _14=_13.toDateString().split(" ");
env["is_ie"]=sniffer.isIE();
env["domain"]=(smcookie.domain==undefined)?"."+document.domain:smcookie.domain;
env["date"]=_14[0]+", "+_14[1]+" "+_14[2]+" "+_14[3];
var de=dom.document.documentElement;
de.setAttribute("source","env");
for(var key in env){
this.parseProp(key,env[key],de,dom.document);
}
return dom;
};
this.getErrors=function(){
var _17="";
var _18=false;
var _19=false;
if(_18=this.content.getErrors()){
_17+="content: "+_18;
}else{
if(_19=this.dom.getErrors()){
_17+="document: "+_19;
}
}
return (_17=="")?false:"pod error: {"+_17+"}";
};
this.toArray=function(){
var _1a=new Array;
for(var i=0;i<this.sProps.length;i++){
_1a[this.sProps[i]]=this[this.sProps[i]];
}
return _1a;
};
this.parseProp=function(_1c,_1d,_1e,doc){
switch(typeof _1d){
case "function":
return;
case "object":
var _20=doc.createElement("array");
_20.setAttribute("name",_1c);
for(prop in _1d){
this.parseProp(prop,_1d[prop],_20,doc);
}
break;
default:
var _20=doc.createElement("property");
_20.setAttribute("name",_1c);
_20.appendChild(doc.createTextNode(_1d.toString()));
}
_1e.appendChild(_20);
};
this.navigate=function(_21,url,_23,_24){
var _25="nav:"+_21;
if((this.manager.log!=false)&&(this.manager.lMap[this.tID][_25]!=undefined)){
if(url.indexOf(location.protocol)!=0){
if(url.substring(0,1)=="/"){
url=location.protocol+"//"+location.host+url;
}else{
url=location.protocol+"//"+location.host+location.pathname+url;
}
}
this.paCode=this.manager.lMap[this.tID][_25];
url=this.getLoggingPrefix()+url;
}
if(!_24){
_24="";
}
if(_23==undefined){
window.location=url;
}else{
newWindow=window.open(url,_23,_24);
newWindow.focus();
}
};
this.logAction=function(_26){
if(this.manager.log==false){
return "";
}
if(this.manager.lMap[this.tID][_26]==undefined){
return;
}
this.paCode=this.manager.lMap[this.tID][_26];
var i=new Image;
i.src=this.getLoggingPrefix();
this.manager.images.push(i);
};
this.getLoggingPrefix=function(){
var _28=this.manager.getLoggingPrefix();
_28+=(this.tID==undefined)?0:this.tID;
_28+=";"+this.paCode+";";
_28+=(this.pVal1==undefined)?";":this.pVal1+";";
_28+=";;/";
return _28;
};
}
Pod.prototype=new SObject();

