opera_nav=(navigator.userAgent.indexOf('Opera')!=-1)?true:false;ie_nav=(navigator.userAgent.indexOf('MSIE')!=-1&&!opera_nav)?true:false;mozilla_nav=(navigator.userAgent.indexOf('Gecko')!=-1)?true:false;function preloadImg(imgEl,src){var img=document.createElement("img");img.setAttribute("src",src);img.onload=function(){imgEl.setAttribute("src",img.src);imgEl.onload=null;};imgEl.style.display='inline';}
function loadImg(src){var img=new Image();img.src=src;}
function deleteEl(el){if(el&&el.parentNode){el.parentNode.removeChild(el);}}
function clone(obj){if((typeof(obj)!='object')||(obj==null)){return obj;}
if(obj.length==undefined){var newObj={}
for(var i in obj){newObj[i]=clone(obj[i]);}}else{var newObj=[]
for(var i=0;i<obj.length;i++){newObj[i]=clone(obj[i]);}}
return newObj;}
function swap(a,b){var tmp=a;a=b;b=tmp;}
function elById(id){return document.getElementById(id);}
function showEl(el){el.style.display='block';}
function hideEl(el){el.style.display='none';}
function clearEl(el){el.innerHTML='';}
function info(txt){document.getElementById("info").innerHTML=txt;}
function px2int(px){return parseInt(px.substring(0,px.length-2));}
function getMousePos(e){var px;var py;if(mozilla_nav){px=e.pageX;py=e.pageY;}else{px=event.clientX+document.body.scrollLeft;py=event.clientY+document.body.scrollTop;}
return{left:px,top:py};}
function isPosInObj(pos,obj){var left=getLeft(obj);var top=getTop(obj);if((pos.left>left)&&(pos.left<obj.offsetWidth+left)&&(pos.top>top)&&(pos.top<obj.offsetHeight+top)){return true;}
return false;}
function getLeft(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x)curleft+=obj.x;return curleft;}
function getTop(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y)curtop+=obj.y;return curtop;}
function getElPos(el){var left=0;var top=0;if(el.offsetParent){while(el.offsetParent){left+=el.offsetLeft;top+=el.offsetTop;el=el.offsetParent;}}else
if(el.y){left+=el.x;top+=el.y;}
return{left:left,top:top};}
function setElPos(el,pos){el.style.left=pos.left+"px";el.style.top=pos.top+"px";}
function trim(s){if(s&&s.replace){return s.replace(/^\s*(.+?)\s*$/,"$1").replace(/'/g,"").replace(/"/g,"");}else{return"";}}
function arraySearch(needle,data){for(var i=0;i<data.length;i++){if(data[i]==needle){return i;}}
return undefined;}
function arrayFirstFree(data){var id=arraySearch(undefined,data);if(id!=undefined){return id;}else{return data.length;}}
function getDir(url){if(url){return url.substring(0,url.lastIndexOf("/"));}else{return"";}}
function getDomain(url){if(url){var tmp=url.split("//");return(tmp[1]!=undefined)?tmp[1].split("/")[0]:tmp[0].split("/")[0];}else{return"";}}
function wordWrap(txt){var w=txt.split(" ");var r=[];for(var i=0;i<w.length;i++){if(w[i].length>40){var stops=Math.ceil(w[i].length/40)+1;for(var j=0;j<stops;j++){r[i]+=w[i].substr(stops,40)+"&shy;";}}else{r[i]=w[i];}}
return r.join(" ");}
function loadIcon(v_img,v_urls){var el=new Image();var img=v_img;var urls=v_urls;var f=function(){if(urls.length>0){el.urls=urls;el.onload=function(){this.onerror=null;img.setAttribute("src",this.src);}
el.onerror=function(){if(this.urls.length>0){var url="";while(!url&&(this.urls.length>0)&&(trim(url)=="")){url=urls.shift();}
if(url){if(url.indexOf("http://")==-1){url="http://"+url;}
this.setAttribute("src",url);}}else{this.onerror=null;}}
el.onerror();}}
setTimeout(f,100);}
function fix_event(event){if(!event){event=window.event;}
if(event.target){if(event.target.nodeType==3)event.target=event.target.parentNode;}else if(event.srcElement){event.target=event.srcElement;}
var tg=event.target;while((tg.entityInfo==undefined)&&(tg!=document.body)){tg=tg.parentNode;}
event.target.entityInfo=tg.entityInfo;return event;}
function varp(v){alert(Dump(v));}
function varpw(v){win=open("","varp","width=900,toolbar=no,status=no,titlebar=no,scroollbars=yes");win.document.write("<html><body><pre style='font-family: Tahoma, Verdana, Arial; font-size: 11px;'>"+Dump(v)+"</pre></body></html>");}
function info(v){var s='';for(var i in v){s+=i+'; ';}
alert(s);}
function Dump(d,l){if(l==null)l=1;var s='';if(typeof(d)=="object"){s+=" {\n";for(var k in d){for(var i=0;i<l;i++)s+="  ";s+=k+": "+Dump(d[k],l+1);}
for(var i=0;i<l-1;i++)s+="  ";s+="}\n"}else{s+=""+d+"\n";}
return s;}
function toCode(d,l){if(l==null)l=1;var s='';if(typeof(d)=="object"){var items=[];var i=0;if(d){var isList=d.length!=undefined;}else{var isList=false;}
for(var k in d){switch(typeof(d[k])){case"integet":var v=parseInt(d[k]);break;case"string":var v="'"+d[k]+"'";break;default:var v=toCode(d[k],l+1);break;}
items[i]=isList?v:(k+":"+v);i++;}
if(isList){s+="["+items.join(",")+"]";}else{s+="{"+items.join(",")+"}";}}else{s+=""+d;}
return s;}
function toValue(str){if(str){eval("var r = "+str);return r;}else{return{}}}
function getCookie(name){var cookie=" "+document.cookie;var search=" "+name+"=";var setStr="";var offset=0;var end=0;if(cookie.length>0){offset=cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=cookie.indexOf(";",offset)
if(end==-1){end=cookie.length;}
setStr=unescape(cookie.substring(offset,end));}}
return(setStr);}
function setCookie(name,value){var today=new Date();today.setTime(today.getTime());var expires_date=new Date(today.getTime()+31536000000);document.cookie=name+"="+escape(value)+";expires="+expires_date.toGMTString();}
function delCookie(name){if(getCookie(name)){document.cookie=name+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT";}}
function text2html(txt){txt=txt.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>");return txt;}
function html2text(html){html=html.replace(/<br>/g,"\n").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">");return html;}
String.prototype.addSlashes=function(){return this.replace(/\\/g,'\\\\').replace(/\"/g,"\\\"").replace(/\'/g,"\\\'");}
String.prototype.stripSlashes=function(){return this.replace(/\\'/g,'\'').replace(/\\"/g,'"').replace(/\\\\/g,'\\');}
String.prototype.wordWrap=function(w){var i,j,s,r=this.split("\n");if(w>0)for(i in r){for(s=r[i],r[i]="";s.length>w;r[i]+=s.substr(0,w)+((s=s.substr(w)).length?"&shy;":""));r[i]+=s;}
return r.join("\n");}
String.prototype.jsEscape=function(){return this.replace(/\%/g,"%jcp").replace(/\n/g,"%jcn").replace(/\r/g,"%jcr").replace(/"/g,"%jcqq").replace(/'/g,"%jcq").replace(/\\/g,"%jcbs");}
String.prototype.jsUnescape=function(){return this.replace(/\%jcr/g," ").replace(/\%jcn/g,"\n").replace(/\%jcqq/g,"\"").replace(/\%jcq/g,"'").replace(/\%jcbs/g,"\\").replace(/\%jcp/g,"%");}
String.prototype.parseUrl=function(){var lines=this.split("<br>");for(var z=0;z<lines.length;z++){var tmp=lines[z].split(" ");for(var i=0;i<tmp.length;i++){if(tmp[i].indexOf("www.")!=-1&&tmp[i].indexOf("http://")==-1){tmp[i]="<a href='http://"+tmp[i]+"' target='_blank'>"+tmp[i]+"</a>";}else if(tmp[i].indexOf("http://")!=-1||tmp[i].indexOf("ftp://")!=-1||tmp[i].indexOf("https://")!=-1){tmp[i]="<a href='"+tmp[i]+"' target='_blank'>"+tmp[i]+"</a>";}else if(tmp[i].indexOf("@")!=-1&&tmp[i].charAt(0)!="@"&&tmp[i].charAt(tmp[i].length-1)!="@"){tmp[i]="<a href='mailto:"+tmp[i]+"'>"+tmp[i]+"</a>";}}
lines[z]=tmp.join(" ");}
return lines.join("<br>");}
requests_counter = 0;
function updateLoadingIcon(ofs) {
requests_counter += ofs;
if(requests_counter <= 0) {
hideEl(elById("loading_spinner"));
} else {
showEl(elById("loading_spinner"));
}
//    elById("dbg").innerHTML = requests_counter;
}
function Request() {
this.controllerURL = "controller.php";
this.convertParams = function(hash) {
var res = [];
for(k in hash) {
res.push(k + "=" + encodeURIComponent(hash[k]));
}
return res.join("&");
}
this.d194 = function() {
return ("" + Math.random()).slice(2, 8);
}
this.d195 = function() {
var req;
if (window.XMLHttpRequest) {
try { req = new XMLHttpRequest() } catch(e) {}
} else if (window.ActiveXObject) {
try { req = new ActiveXObject("Microsoft.XMLHTTP") } catch(e) {}
if (!req) {
try { req = new ActiveXObject("Msxml2.XMLHTTP") } catch (e) {}
}
}
return req;
}
this.send = function(params, widget, method) {
var req = this.d195();
if(!req) {
return false;
}
var d375 = widget.id;
params.module = widget.cfg.module;
//        if(!mozilla_nav) {
var date = new Date();
params["_nc"] = this.d194();
//        }
req.onreadystatechange = function() {
if (req.readyState == 4) {
if ((req.status < 400) && req.responseText) {
updateLoadingIcon(-1);
try {
eval("if(kernel.getWidget(d375)) { kernel.getWidget(d375).d227("+req.responseText+")}");
} catch(e) {
//                        alert("Error in \n"+e.fileName+"\nat line: "+e.lineNumber+"\n"+e.message);
}
} else {
//    				alert(req.statusText);
}
}
}
if (method == "POST") {
req.open("POST", this.controllerURL, false);
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8;');
req.send(this.convertParams(params));
} else {
req.open("GET", this.controllerURL + "?" + this.convertParams(params), true);
req.send(null);
}
updateLoadingIcon(1);
return req;
}
this.d196 = function(url, obj, callback) {
var req = this.d195();
var o = obj
var cb = callback;
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status < 400) {
updateLoadingIcon(-1);
if(req.responseXML) {
o[cb](req.responseXML.documentElement);
}
} else {
o[cb](null);
}
}
}
if(url.indexOf("http:") != -1) {
req.open("GET", "xmlproxy.php?url=" + escape(url) + "&_nc=" + this.d194(), true);
} else {
req.open("GET", url + "?_nc=" + this.d194(), true);
}
updateLoadingIcon(1);
req.send(null);
return req;
}
}
function XMLRequest() {
this.send = function(url, widget, callback, params, noProxy) {
var req;
if (window.XMLHttpRequest) {
try { req = new XMLHttpRequest() } catch(e) {}
} else if (window.ActiveXObject) {
try { req = new ActiveXObject("MSXML2.XMLHttp") } catch (e) {}
if (!req) {
try { req = new ActiveXObject("Microsoft.XMLHTTP") } catch(e) {}
}
}
if(!req) {
return false;
}
//        if(!mozilla_nav) {
var date = new Date();
noCache = '&_nc='+ request.d194();
//        } else {
//            noCache = '';
//        }
var paramStr = "";
if(params) {
for(var i in params) {
paramStr += "&"+i+"="+escape(params[i]);
}
}
var d375 = widget.id;
var cf = callback;
req.onreadystatechange = function() {
updateLoadingIcon(-1);
if (req.readyState == 4) {
if (req.status == 200) {
updateLoadingIcon(-1);
try {
if(kernel.getWidget(d375)) {
kernel.getWidget(d375)[cf](req);
}
} catch(e) {
//                        alert("Error in \n"+e.fileName+"\nat line: "+e.lineNumber+"\n"+e.message);
}
} else {
//    				alert(req.statusText);
}
}
}
if(noProxy == true) {
req.open("GET", url+"?"+noCache, true);
} else {
req.open("GET", "xmlproxy.php?url="+escape(url)+paramStr+noCache, true);
}
req.send(null);
updateLoadingIcon(1);
return req;
}
}
var XMLParser={xml2hash:function(xmlDocElem,tagItemName){var self=XMLParser;var xmlElemArray=new Array;var xmlElemRow;var objArray=[];if(!tagItemName){tagItemName='item';}
if(xmlDocElem.hasChildNodes()){xmlElemArray=xmlDocElem.getElementsByTagName(tagItemName);if(xmlElemArray&&xmlElemArray.length==0){xmlElemArray=xmlDocElem.getElementsByTagName('entry');}
xmlElemRow=xmlElemArray[0];for(var j=0;j<xmlElemArray.length;j++){xmlElemRow=xmlElemArray[j];objArray[j]=self.xmlElem2Obj(xmlElemArray[j]);}}
var linkEl=xmlDocElem.getElementsByTagName("link")[0];if(linkEl){if(linkEl.firstChild){var siteUrl=linkEl.firstChild.nodeValue;}else if(linkEl.attributes["href"]){var siteUrl=linkEl.attributes["href"].nodeValue;}}
var title="";if(xmlDocElem.getElementsByTagName("title")[0]){title=xmlDocElem.getElementsByTagName("title")[0].firstChild.nodeValue;}
var updated="";if(xmlDocElem.getElementsByTagName("updated")[0]){updated=xmlDocElem.getElementsByTagName("updated")[0].firstChild.nodeValue;}else if(xmlDocElem.getElementsByTagName("pubDate")[0]){updated=xmlDocElem.getElementsByTagName("pubDate")[0].firstChild.nodeValue;}
return title?{title:title,siteUrl:siteUrl,items:objArray,updated:updated}:null;},d408:function(node){var self=XMLParser;var res=[];var tags=[];self.d408Node(res,tags,node.getElementsByTagName("DL")[0]);return res?res:null;},d408Node:function(res,tags,node){var self=XMLParser;switch(node.tagName){case"A":var curTags=clone(tags);res.push({title:node.firstChild.nodeValue,url:node.getAttribute("HREF"),tags:curTags.length>0?curTags:null});break;case"H3":tags.push(node.firstChild.nodeValue);break;case"DL":for(var i=0;i<node.childNodes.length;i++){if(node.childNodes[i].nodeType==1&&node.childNodes[i].firstChild){self.d408Node(res,tags,node.childNodes[i]);}}
tags.pop();break;}
return res;},xmlElem2Obj:function(xmlElem){var self=XMLParser;var ret=new Object();self.setPropertiesRecursive(ret,xmlElem);return ret;},setPropertiesRecursive:function(obj,node){var self=XMLParser;if(node.childNodes.length>0){for(var i=0;i<node.childNodes.length;i++){if(node.childNodes[i].nodeName=="content"){obj["content"]=self.toHTML(node.childNodes[i].firstChild.nodeValue);}else if(node.childNodes[i].nodeName=="content:encoded"){obj["content"]=node.childNodes[i].firstChild.nodeValue;}else if(node.childNodes[i].nodeType==1){if(node.childNodes[i].firstChild){if(node.childNodes[i].childNodes.length==1){obj[node.childNodes[i].tagName]=node.childNodes[i].firstChild.nodeValue;}
else{obj[node.childNodes[i].tagName]=[];self.setPropertiesRecursive(obj[node.childNodes[i].tagName],node.childNodes[i]);}}else if(node.childNodes[i].attributes.length>0){var attrs={};for(var a=0;a<node.childNodes[i].attributes.length;a++){attrs[node.childNodes[i].attributes[a].nodeName]=node.childNodes[i].attributes[a].nodeValue;}
obj[node.childNodes[i].tagName]=attrs;}}}}},cleanXMLObjText:function(xmlObj){var self=XMLParser;var cleanObj=xmlObj;for(var prop in cleanObj){cleanObj[prop]=cleanText(cleanObj[prop]);}
return cleanObj;},cleanText:function(str){var self=XMLParser;var ret=str;ret=ret.replace(/\n/g,'');ret=ret.replace(/\r/g,'');ret=ret.replace(/\'/g,"\\'");ret=ret.replace(/\[CDATA\[/g,'');ret=ret.replace(/\]]/g,'');return ret;},toHTML:function(str){var html=str;html=html.replace(/\&lt\;/,'<');html=html.replace(/\&gt\;/,'>');return html;},rendered2Source:function(str){var self=XMLParser;var proc=str;proc=proc.replace(/</g,'&lt;');proc=proc.replace(/>/g,'&gt;');return'<pre>'+proc+'</pre>';},d196DocElem:function(xmlDivId,xmlNodeName){var self=XMLParser;var xmlElemArray=[];var xmlDocElem=null;if(document.all){var xmlStr=document.getElementById(xmlDivId).innerHTML;var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.loadXML(xmlStr);xmlDocElem=xmlDoc.documentElement;}
else{xmlElemArray=window.document.body.getElementsByTagName(xmlNodeName);xmlDocElem=xmlElemArray[0];;}
return xmlDocElem;}}
function plog(info){if(DEBUG){desktop.d200.debug_info.innerHTML=info+"<br>"+desktop.d200.debug_info.innerHTML;}}
colorsChart=[["#FFEEEE","#FFCCCC","#FFAAAA","#FF8888","#FF6666","#FF4444","#FF2222","#FF0000","#EE0000","#CC0000","#AA0000","#880000","#770000","#660000","#550000","#440000","#330000"],["#EEFFEE","#CCFFCC","#AAFFAA","#88FF88","#66FF66","#44FF44","#22FF22","#00FF00","#00EE00","#00CC00","#00AA00","#008800","#007700","#006600","#005500","#004400","#003300"],["#EEEEFF","#CCCCFF","#AAAAFF","#8888FF","#6666FF","#4444FF","#2222FF","#0000FF","#0000EE","#0000CC","#0000AA","#000088","#000077","#000066","#000055","#000044","#000033"],["#FFFFEE","#FFFFCC","#FFFFAA","#FFFF88","#FFFF66","#FFFF44","#FFFF22","#FFFF00","#EEEE00","#CCCC00","#AAAA00","#888800","#777700","#666600","#555500","#444400","#333300"],["#FFEEFF","#FFCCFF","#FFAAFF","#FF88FF","#FF66FF","#FF44FF","#FF22FF","#FF00FF","#EE00EE","#CC00CC","#AA00AA","#880088","#770077","#660066","#550055","#440044","#330033"],["#FFF0D0","#FFEECC","#FFEEBB","#FFDDAA","#FFCC99","#FFC090","#EEBB88","#DDAA77","#CC9966","#BB8855","#AA7744","#886633","#775522","#664411","#553300","#442200","#331100"],["#EEFFFF","#CCFFFF","#AAFFFF","#88FFFF","#66FFFF","#44FFFF","#22FFFF","#00FFFF","#00EEEE","#00CCCC","#00AAAA","#008888","#007777","#006666","#005555","#004444","#003333"],["#FFFFFF","#EEEEEE","#DDDDDD","#CCCCCC","#BBBBBB","#AAAAAA","#A0A0A0","#999999","#888888","#777777","#666666","#555555","#444444","#333333","#222222","#111111","#000000"]];function createColorSelectDom(title,target,id){var colorsTable={tag:"table",cellSpacing:"0",cellPadding:"0",style:{borderLeft:"1px solid gray",borderTop:"1px solid gray"},childs:[]}
for(var i=0;i<colorsChart.length;i++){var tds=[];for(var j=0;j<colorsChart[i].length;j++){tds.push({tag:"td",childs:[{tag:"div",style:{borderRight:"1px solid gray",borderBottom:"1px solid gray",background:colorsChart[i][j],width:"16px",height:"16px",cursor:"pointer"},events:{onclick:"d339(\""+id+"_popup\",\""+target+"\", \""+colorsChart[i][j]+"\")"}}]});}
colorsTable.childs.push({tag:"tr",childs:tds});}
return[createButtonDom(title,"d337(\""+id+"\",\""+id+"_popup\")","static/client/select_color.gif",id),{tag:"div",className:"panel",id:id+"_popup",display:false,style:{position:"absolute",width:"298px"},childs:[{tag:"div",className:"caption",childs:[createTableDom([{content:"<b>Select color</b>",width:"100%"},{content:createButtonDom(false,"d338(\""+id+"_popup\")","static/client/close.gif"),width:"1%"}])]},{tag:"div",className:"content",childs:[colorsTable]}]}]}
function createButtonDom(title,action,icon,id,img_id){if((icon!=false)&&(icon!=null)&&(icon!=undefined)){if(title){var button={tag:"span",childs:[{tag:"img",id:img_id,src:icon,style:{margin:"0px 4px 0px 0px",verticalAlign:"middle"}},{tag:"a",href:"void",events:{onclick:action},innerHTML:title}]}
if(id)button.childs[1].id=id;}else{var button={tag:"a",href:"void",events:{onclick:action},childs:[{tag:"img",id:img_id,src:icon}]};if(id)button.id=id;}}else{var button={tag:"a",href:"void",events:{onclick:action},innerHTML:title};if(id)button.id=id;}
return button;}
function createTableDom(tds,width){var table={tag:"table",width:(width?width:"95%"),childs:{tr:{tag:"tr",childs:{}}}};for(var i=0;i<tds.length;i++){if(typeof(tds[i].content)=="string"){table.childs.tr.childs[i]={tag:"td",width:tds[i].width,innerHTML:tds[i].content};}else{table.childs.tr.childs[i]={tag:"td",width:tds[i].width,childs:[tds[i].content]};}}
return table;}
function createPanelDom(name,title,content){var m={tag:"div",className:"panel",display:false,id:"panel_"+name,childs:[{tag:"div",className:"panel_header",childs:[{tag:"div",className:"panel_title",innerHTML:title},{tag:"div",className:"panel_close_icon",events:{onclick:"d228('panel_"+name+"')"}}]}]}
for(var i in content){m.childs.push({tag:"div",className:"panel_section",childs:content[i]});}
return m;}
(function(){var table="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";crc32=function(str,crc){if(crc==window.undefined)crc=0;var n=0;var x=0;crc=crc^(-1);for(var i=0,iTop=str.length;i<iTop;i++){n=(crc^str.charCodeAt(i))&0xFF;x="0x"+table.substr(n*9,8);crc=(crc>>>8)^x;}
return crc^(-1);};})();
function Widget() {
this.d197 = {
title: ""
}
this.d198 =
{ tag: "div", className: "window", id: "window",
childs: [
{ tag: "div",
childs: [
{ tag: "table", className: "plan_table", style: { width: "100%"},
childs: [
{ tag: "tr",
childs: [
{ tag: "td", className: "window_caption_left" },
{ tag: "td", className: "window_caption_middle",
childs: [
{ tag: "div", className: "window_caption",
id: "caption" }
]},
{ tag: "td", className: "window_caption_right" }
]}
]}
]},
{ tag: "div", className: "window_setting", id: "settings"},
{ tag: "div", className: "window_content",
id: "content" },
{ tag: "div", className: "window_footer", id: "footer",
childs: [
{ tag: "table", className: "plan_table", style: {width: "100%"},
childs: [
{ tag: "tr",
childs: [
{ tag: "td", className: "window_footer_left" },
{ tag: "td", className: "window_footer_middle", innerHTML: "&nbsp;"},
{ tag: "td", className: "window_footer_right" }
]}
]}
]}
]}// d198
this.init = function() {
this.d200 = {};
this.id = null;
this.d201 = false;
this.d202 = true;
this.d203 = {};
this.d204 = false;
}
this.init();
this.open = function(parent, id, d203) {
this.d205(parent);
this.d206();
if(this.d200.window) {
this.d200.window.wid = this.id;
}
this.d207();
}
this.setParent = function(parentEl) {
this.d200.window.parentNode.removeChild(this.d200.window);
parentEl.appendChild(this.d200.window);
}
this.d205 = function(parent) {
this.d198.display = !this.cfg.isOpenHidden;
if(this.cfg.hasDrag) {
this.d198.events = { onmouseover: "d213(1)", onmouseout: "d213(0)"}
}
this.d208(parent, this.d198);
var m = [];
if(this.cfg.hasSizeBtn) {
m.push(
{ tag: "div",
className: "caption_left_element",
display: false,
id: "showhide_div",
childs: [
{ tag: "div", id: "btn_hide", className: "btn_hide",
title: loc.text("wbtn_hide"),
events: {onclick: "d214()"} },
{ tag: "div", id: "btn_show", className: "btn_show",
title: loc.text("wbtn_show"),
events: {onclick: "d214()"},
display: false}
]}
);
}
if(this.cfg.hasIcon) {
m.push(
{ tag: "div", id: "icon_div",
className: "caption_left_element",
childs: [
{ tag: "img", id: "icon", src: "widgets/"+this.cfg.module.toLowerCase()+"/ico.gif",
style: { width: "16px", height: "16px"}}
]}
);
}
m.push(
{ tag: "div", id: "title", className: "caption_title" }
);
if(this.cfg.hasCloseBtn) {
m.push(
{ tag: "a", href: "void",
title: loc.text("wbtn_close"),
className: "btn_close",
display: !this.cfg.hasDrag,
events: {onclick: "close()"},
id: "btn_close" }
);
}
if(this.cfg.hasSettingsBtn) {
m.push(
{ tag: "a", href: "void",
title: loc.text("wbtn_settings"),
className: "btn_settings",
display: !this.cfg.hasDrag,
events: {onclick: "d218()"},
id: "btn_settings" }
);
}
if(this.cfg.hasRefreshBtn) {
m.push(
{ tag: "a", href: "void",
title: loc.text("wbtn_refresh"),
className: "btn_refresh",
display: !this.cfg.hasDrag,
events: {onclick: "refresh()"},
id: "btn_refresh" }
);
}
this.d208(this.d200["caption"], m);
}
this.initDtagAndDrop = function() {
if(this.cfg.hasDrag) {
this.d200.caption.style.cursor = 'move';
this.d200.window.drag = new Drag(this.d200.window, this.d200.caption);
}
}
this.d206 = function() {
if(!this.d204) {
this.initDtagAndDrop();
}
this.d208(this.d200.settings,
{ tag: "div", className: "settings_section",
childs: [
{tag: "span", innerHTML: loc.text("inp_title"), className: "settings_label"},
{tag: "input", id: "input_title", type: "text", size: "15", className: "settings_control"},
{tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "d221()"}, className: "settings_control"}
]}
);
this.d209();
}
this.disableOnClosePrompt = false;
this.d210 = false;
this.d211 = function() {
this.d210 = true;
this.disableOnClosePrompt = true;
this.close();
}
this.close = function() {
var flag = (this.cfg.hasOnCloseConfirm && !this.disableOnClosePrompt) ?
confirm(loc.text("desktop_confirm_widget_remove"))
:
true;
if(flag) {
this.onClose();
kernel.d232(this.id);
if(this.d200.window) {
deleteEl(this.d200.window);
this.d200.window.innerHTML = '';
this.d200.window = null;
}
this.d203 = false;
this.save();
if(this.cfg.hasDrag && !this.d210) {
desktop.d272();
}
}
}
this.d212 = function(html) {
this.d200.title.innerHTML = html;
}
this.d213 = function(mouse_in) {
if (mouse_in==1 || this.d202==false) {
if(this.cfg.hasCloseBtn && !this.d204)    this.d200.btn_close.style.display = 'block';
if(this.cfg.hasSettingsBtn) this.d200.btn_settings.style.display = 'block';
if(this.cfg.hasRefreshBtn)  this.d200.btn_refresh.style.display = 'block';
if(this.cfg.hasSizeBtn){
this.d200.showhide_div.style.display = 'block';
if(this.cfg.hasIcon) this.d200.icon_div.style.display = 'none';
}
}
else {
if(this.cfg.hasCloseBtn)    this.d200.btn_close.style.display = 'none';
if(this.cfg.hasSettingsBtn) this.d200.btn_settings.style.display = 'none';
if(this.cfg.hasRefreshBtn)  this.d200.btn_refresh.style.display = 'none';
if(this.cfg.hasSizeBtn){
this.d200.showhide_div.style.display = 'none';
if(this.cfg.hasIcon) this.d200.icon_div.style.display = 'block';
}
}
}
this.d214 = function() {
if(this.d201) {
this.show();
} else {
this.hide();
}
}
this.show = function() {
hideEl(this.d200.btn_show);
showEl(this.d200.btn_hide);
if(this.d200.content) {
showEl(this.d200.content);
}
this.d215();
this.d201 = false;
}
this.hide = function() {
hideEl(this.d200.btn_hide);
showEl(this.d200.btn_show);
if(this.d200.content) {
hideEl(this.d200.content);
}
this.d216();
this.d217();
this.d201 = true;
}
this.d218 = function() {
if(this.d202) {
this.d219();
} else {
this.d216();
}
}
this.d219 = function() {
this.d215Settings();
showEl(this.d200.settings);
this.d202 = !this.d202;
}
this.d216 = function() {
if(this.d200.settings) {
hideEl(this.d200.settings);
this.d202 = !this.d202;
}
}
this.attachEvent = function(el, e, cmd) {
var wid = this.id;
if(mozilla_nav) {
el.setAttribute(e, "kernel.getWidget("+wid+")."+cmd+";");
} else {
el[e] = new Function("kernel.getWidget("+wid+")."+cmd+";");
}
}
this.d208 = function(parentEl, data) {
if(data['tag']) {
var el = document.createElement(data.tag);
for (p in data) {
switch(p) {
case null, "tag", "childs": break;
case "id":
this.d200[data.id] = el;
break;
case "style":
for(var s in data.style) {
el.style[s] = data.style[s];
}
break;
case "options":
for(var i in data.options) {
el.options.add(new Option(data.options[i].text, data.options[i].value));
if(data.options[i].isBold) {
el.options[el.options.length - 1].style.fontWeight = "bold";
}
}
break;
case "src":
var src = data.src;
if(src.indexOf("http") == -1) {
src = "http://"+baseUrl+src;
}
if(ie_nav) {
var setSrc = function() { el.src = src }
setTimeout(setSrc, 200);
} else {
el.src = src;
}
break;
case "display":
if(!data[p]) {
el.style.display = 'none';
}
break;
case "href":
if(data.href == "void") {
el.href = "javascript:void(0);";
} else if(data.tag == "a") {
this.attachEvent(el, "onclick", data.href);
el.href = "javascript:void(0);";
} else {
el.href = data.href;
}
break;
case "html":
el.innerHTML = data.html;
break;
case "sysHref":
el.href = data.sysHref;
break;
case "events":
var wid = this.id;
if(typeof(data.events) == "object") {
for(var e in data.events) {
this.attachEvent(el, e, data.events[e]);
}
}
break;
case "sysEvents":
if(typeof(data.sysEvents) == "object") {
for(var e in data.sysEvents) {
el.setAttribute(e, data.sysEvents[e]+";");
}
}
break;
default:
el[p] = data[p];
break;
}
}
parentEl.appendChild(el);
if(data.tag == "table") {
parentEl = el;
var el = document.createElement("tbody");
if(data.id) {
this.d200[data.id+"_tbody"] = el;
}
parentEl.appendChild(el);
}
if(data.childs) {
this.d208(el, data.childs);
}
} else {
for(var e in data) {
this.d208(parentEl, data[e]);
}
}
}
this.d221 = function() {
var t = trim(this.d200.input_title.value);
if(t != this.d203.title) {
this.d203.title = t
this.d212(t);
this.save();
}
}
this.save = function() {
d203r.d296(this);
}
this.d207 = function() {}
this.d209 = function() {}
this.onClose = function() {}
this.d215 = function() {}
this.d217 = function() {}
this.d215Settings = function() {}
this.d222 = function() {}
this.d226 = function() {}
this.refresh = function() {}
this.d227 = function() {}
// SYS
this.d228 = function(id) {
if(this.d200[id]) {
this.d200[id].style.display = 'none';
}
}
this.d229 = function(id, display) {
if(this.d200[id]) {
this.d200[id].style.display = display ? display : 'block';
}
}
}
DRAG_NONE=0;DRAG_MOVE=1;DRAG_ANIM=1;Drag=function(win,caption){var div=win;var action=DRAG_NONE;var dragging=false;var targetPos={left:0,top:0};var animSteps=5;var animFrame=0;var offset={left:0,top:0};var tid=null;function calcOffset(event){event=fix_event(event);var pos=getElPos(div);offset.left=event.clientX-pos.left;offset.top=event.clientY-pos.top;}
function drag(event){event=fix_event(event);if(action==DRAG_MOVE){var l=event.clientX-offset.left;var h=event.clientY-offset.top;div.style.left=l+"px";div.style.top=h+"px";desktop.d277({left:l+Math.ceil(div.offsetWidth/2),top:h+16});}}
function processAnimation(){var f=function(){clearTimeout(tid);animFrame++;if(animFrame<animSteps){var dPos={left:div.offsetLeft,top:div.offsetTop}
var newPos={left:Math.floor(dPos.left+(targetPos.left-dPos.left)/animSteps),top:Math.floor(dPos.top+(targetPos.top-dPos.top)/animSteps)}
div.style.left=newPos.left+"px";div.style.top=newPos.top+"px";tid=setTimeout(f,50);}else{placeWindow();}}
tid=setTimeout(f,50);}
function stopDrag(event){event=fix_event(event);document.onmousemove=null;document.onmouseup=null;document.ondrag=null;document.body.onselectstart=null;document.onselectstart=null;targetPos=getElPos(desktop.d200.area);targetPos.top-=14;animFrame=0;action=DRAG_ANIM;processAnimation();}
function placeWindow(){clearTimeout(tid);div.style.position='static';desktop.d200.area.parentNode.insertBefore(div,desktop.d200.area);div.style.width='auto';desktop.d276();desktop.d272();action=DRAG_NONE;}
function startDrag(event){event=fix_event(event);if(action!=DRAG_NONE){return false;}
document.ondrag=function(){return false;}
document.body.ondrag=function(){return false;}
document.onselectstart=function(){return false;}
document.body.onselectstart=function(){return false;}
action=DRAG_MOVE;calcOffset(event);document.onmousemove=function(event){drag(event)}
document.onmouseup=function(event){stopDrag(event)}
putEl(div);}
function putEl(el){var left=getLeft(el);var top=getTop(el);var width=el.offsetWidth;desktop.d275(el);el.parentNode.removeChild(el);document.body.appendChild(el);el.style.position='absolute';el.style.left=left+"px";el.style.top=top+"px";el.style.width=width+"px";}
caption.onmousedown=function(event){event=fix_event(event);if(action==DRAG_MOVE){stopDrag(event);}else{var e=event.target;while(e.onclick==null&&e!=this){e=e.parentNode;}
if(e==this)startDrag(event);}}
function fix_event(event){if(!event){event=window.event;}
if(event.target){if(event.target.nodeType==3)event.target=event.target.parentNode}else if(event.srcElement){event.target=event.srcElement}
return event}}
EntityHandler=function(el,mode,events){var div=el;var divClone=null;var dragging=false;var offset={left:0,top:0};var startPos={left:0,top:0};var events=events?events:{};var belongElement=null;function waitForDrag(event){event=fix_event(event);if((Math.abs(event.clientX-startPos.left)>4)||(Math.abs(event.clientY-startPos.top)>4)){dragging=true;offset={left:div.offsetWidth+2,top:div.offsetHeight+2};document.onmousemove=function(e){drag(e)}
document.onmouseup=function(e){stopDrag(e)}
divClone=div.cloneNode(true);divClone.style.cssText=divClone.style.cssText+";opacity: 0.75; -moz-opacity: 0.75; -khtml-opacity: 0.75; filter: alpha(opacity=75);";document.body.appendChild(divClone);divClone.style.position='absolute';divClone.style.width=div.offsetWidth+"px";divClone.style.height=div.offsetHeight+"px";if(events.d222Start){events.d222Start(div.entityInfo);}
if(event.target.entityInfo&&events.onElementOver){events.onElementOver(event.target.entityInfo);}}}
function drag(event){if(dragging){event=fix_event(event);divClone.style.left=event.clientX+2+"px";divClone.style.top=event.clientY+2+"px";if(event.target.entityInfo&&events.onElementOver){events.onElementOver(event.target.entityInfo);}}}
function startDrag(event){event=fix_event(event);document.ondrag=function(){return false;}
document.body.ondrag=function(){return false;}
document.onselectstart=function(){return false;}
document.body.onselectstart=function(){return false;}
document.onmousemove=function(e){waitForDrag(event)}
document.onmouseup=function(e){stopDrag(event)}
startPos={left:event.clientX,top:event.clientY};return false;}
function stopDrag(event){event=fix_event(event);document.onmousemove=null;document.onmouseup=null;document.ondrag=null;document.body.onselectstart=null;document.onselectstart=null;desktop.isFileDrag=false;if(div.onmouseout){div.onmouseout();}
if(divClone){deleteEl(divClone);}
if(events.d222Stop&&dragging){events.d222Stop(div.entityInfo);}
dragging=false;}
switch(mode){case"tabs_drag":div.onmousedown=function(event){desktop.d260Options();event=fix_event(event);if(dragging){stopDrag(event);}else{startDrag(event);}
if(event.stopPropagation){event.stopPropagation();event.preventDefault();}else if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}
return false;}}}
function startPage() {
request = new Request();
xmlRequest = new XMLRequest();
kernel = new Kernel();
loc = new Loc();
loc.onLoad = function() {
auth = new Auth();
auth.id = kernel.getUniqueId(auth);
kernel.d231(auth);
auth.onLoad = function() {
d203r = new Profiler();
d203r.id = kernel.getUniqueId(d203r);
kernel.d231(d203r);
d203r.onLoad = function() {
desktop = kernel.d233("Desktop", elById("desktop_body"));
//auth.open(desktop.addPage("auth"));
//settings = kernel.d233("Settings", desktop.addPage("settings"));
menu = kernel.d233("Menu", document.body);
feedback = kernel.d233("Feedback", desktop.addPage("feedback"));
custompage = kernel.d233("Custompage", desktop.addPage("custompage"));
sendtofriend = kernel.d233("SendToFriend", desktop.addPage("sendtofriend"));
rssreader = kernel.d233("RssReader", desktop.addPage("rssreader"));
flashPlayer = kernel.d233("FlashPlayer", desktop.addPage("flashplayer"));
desktop.d281();
}
d203r.d297();
}
auth.start();
}
loc.start();
}
SYS_WIDGETS_ID = 1;
USER_WIDGETS_ID = 100;
cfgWidget = {
hasIcon: true,
hasSizeBtn: true,
hasCloseBtn: true,
hasRefreshBtn: true,
hasSettingsBtn: true,
hasDrag: true,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "base",
uniqueId: false,
saveMethod: "GET"
}
function Kernel() {
this.widgets = [];
this.getUniqueId = function(w) {
if(w.cfg.uniqueId) {
return w.cfg.uniqueId;
} else {
var newId = USER_WIDGETS_ID;
while(this.widgets[newId]) newId++;
return newId;
}
}
this.getWidget = function(id) {
return this.widgets[id];
}
this.d231 = function(widget) {
this.widgets[widget.id] = widget;
}
this.d232 = function(id) {
this.widgets[id] = null;
}
this.d233 = function(className, parent, id, d203, objvars) {
var code = 'var w = new ' + className + '();';
try {
eval(code);
} catch(e) {
// Debug info
//alert("Can't run '" + className + "' widget.\n" + e.message);
}
if(w) {
d203 = d203 || false;
w.id = id ? id : this.getUniqueId(w);
if(typeof(objvars) == "object") {
for(var i in objvars) {
w[i] = objvars[i];
}
}
kernel.d231(w);
for(var c in cfgWidget) {
if(typeof(w.cfg[c]) == "undefined") {
w.cfg[c] = cfgWidget[c];
}
}
if(w.cfg.hasProfile) {
d203r.d295(w);
if(d203) {
for(var p in d203) {
w.d203[p] = d203[p];
}
}
}
w.open(parent, false, d203);
return w;
}
}
this.d234 = [];
this.d235 = function(d375, period, noAction) {
if(kernel.widgets[d375]) {
if(noAction != true) {
kernel.getWidget(d375).d226();
}
kernel.d234[d375] = setTimeout("kernel.d235("+d375+","+period+")", period);
}
}
this.d236 = function(d375) {
if(this.d234[d375] != undefined) {
clearTimeout(this.d234[d375]);
this.d234[d375] = undefined;
}
}
}
/*******************************************
*
*   Languages data
*
*******************************************/
function Loc() {
this.data = {};
this.start = function() {
this.lang = getCookie("lng");
if(this.lang == "") {
this.lang = "EN";
}
request.d196("lang/" + this.lang.toLowerCase() + ".xml", this, "d237");
}
this.swapLang = function(lang) {
setCookie('lng', lang);
window.location.reload(true);
}
this.d237 = function(xml) {
this.data = this.d238(xml, "string", "id");
this.onLoad();
}
this.text = function(id, param) {
var text = this.data[id] ? this.data[id] : "loc:" + id;
if(param && text != '') {
if(typeof(param) == "object") {
for(var i in param) {
var mask = new RegExp("%"+i+"%", "ig");
text = text.replace(mask, param[i]);
}
return text;
} else {
return text.replace(/(%\w*%)/ig, param);
}
}
return text;
}
this.d238 = function(node, tagName, key) {
var hash = {};
if(node) {
var nodes = node.getElementsByTagName(tagName);
for(var i=0; i<nodes.length; i++) {
hash[nodes[i].getAttribute(key)] = nodes[i].firstChild ? nodes[i].firstChild.nodeValue : "";
}
}
return hash;
}
this.onLoad = function() {}
}
function Desktop() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: false,
isSystem: true,
title: "",
module: "desktop",
uniqueId: SYS_WIDGETS_ID + 1,
saveMethod: "POST"
}
this.d197["title"] = "";
this.d197["theme"] = "default";
this.d197["tabs"] = []; // [ {t: title, c: columner_id, i }, ...]
this.d197["order"] = []; // array of tab indexes
this.d198 = [
{ tag: "div", display: false, id: "tmp" },
{ tag: "div", id: "content", display: false,
childs: [
{ tag: "div", className: "destop_header",
childs: [
{ tag: "div", id: "banner_div", innerHTML: "ISOAdx", className: "centerImg"},
{ tag: "div", id: "top_line", className: "desktop_title",
childs:[
{ tag: "span", id: "title_box", className: "desktop_title_box"},
{ tag: "input", id: "title_input", className: "desktop_title_input", display: false}
]},
{ tag: "div", className: "section", style: {height: "1px", overflow: "hidden"},
childs:[
{ tag: "span", id: "title_box_tmp", className: "desktop_title_box"}
]},
{ tag: "div", className: "float_panel", id: "tray",
childs: [
{ tag: "div", className: "float_left",
childs: [
createButtonDom(loc.text("menu_title"), "d242()", "widgets/menu/ico.gif")
]},
{ tag: "div", className: "float_right",
childs: [
createButtonDom(loc.text("desktop_show_all"), "d279()"),
{ tag: "span", innerHTML: "&nbsp;&nbsp;|&nbsp;&nbsp;" },
createButtonDom(loc.text("desktop_hide_all"), "d280()"),
{ tag: "span", innerHTML: "&nbsp;&nbsp;|&nbsp;&nbsp;" },
createButtonDom(loc.text("desktop_setup_intructions"), "showSetupInstructions()"),
{ tag: "span", innerHTML: "&nbsp;&nbsp;" }/*,
{ tag: "span", innerHTML: "<a href='http://www.2tillprofit.com/contents/?pg=Conference.html' target='_blank'>Click here for our Online Training Schedule</a>" }
/*{ tag: "span", innerHTML: "&nbsp;&nbsp;|&nbsp;&nbsp;" },
createButtonDom(loc.text("desktop_lnk_settings"), "showPage(\"settings\")", "static/client/settings.gif")
/*{ tag: "span", innerHTML: "&nbsp;&nbsp;|&nbsp;&nbsp;" },
{ tag: "span", id: "authButton" }*/
]}
]}
]},
{ tag: "div", id: "pager",
childs: [
{ tag: "div", id: "page_panels" }
]},
{ tag: "div", id: "pages", style: { width: "auto", margin: "0 14% 0 16%" } },
{ tag: "div", align: "center",
style: { marginTop: "22px"},
childs: [
//{ tag: "span", className: "footer", align: "center", innerHTML: desktopLangsHTML},
//{ tag: "br"},{ tag: "br"},
{ tag: "span", id: "bottom_links_0", align: "center",
childs: [
/*{ tag: "a", href: "showPage('feedback')",
html: loc.text('desktop_lnk_user_feedback') },
{ tag: "span", html: "&nbsp;&nbsp;|&nbsp;&nbsp;" },
{ tag: "a", href: "showPage('sendtofriend')",
html: loc.text('desktop_lnk_sendtofriend') },
{ tag: "span", html: "&nbsp;&nbsp;|&nbsp;&nbsp;",
display: (mozilla_nav || ie_nav)
},
{ tag: "a", href: "d283('feedback')",
display: (mozilla_nav || ie_nav) ,
html: loc.text('desktop_lnk_favorites') }*/
{ tag: "a", href: "showSetupInstructions()",
display: (mozilla_nav || ie_nav) ,
html: loc.text('desktop_setup_intructions') }
]},
{ tag: "span", id: "custom_pages_links", align: "center" },
{ tag: "span", innerHTML: "&nbsp;<br>"}
]}
]},
{ tag: "div", id: "area", className: "area", name: "area", display: false},
{ tag: "div", id: "tab_area", className: "tab_area", name: "area", display: false},
]
this.d239 = null;
this.d207 = function() {
this.d208(document.body, { tag: "link", id: "themes_loader", rel: "stylesheet", media: "screen"});
this.d240();
this.d208(this.d200["page_panels"],
createPanelDom("tab", loc.text("desktop_tab_options"), [
[ { tag: "span", innerHTML: "Title: "},
{ tag: "input", type: "text", id: "input_tab_title" },
{ tag: "input", type: "button", value: loc.text("btn_set"),
events: { onclick: "d264()" }} ],
[ { tag: "div", innerHTML: loc.text("desktop_select_tab_icon")},
{ tag: "div", id: "tab_icons_box" },
{ tag: "div",
childs: [
{ tag: "a", href: "void",
innerHTML: loc.text("desktop_delete_tab_icon"),
events: { onclick: "d266()"}}
]}],
[ { tag: "span", innerHTML: loc.text("desktop_panels_count") },
{ tag: "input", type: "button", value: " 1 ",
events: { onclick: "d268(1)" }},
{ tag: "input", type: "button", value: " 2 ",
events: { onclick: "d268(2)" }},
{ tag: "input", type: "button", value: " 3 ",
events: { onclick: "d268(3)" }},
{ tag: "input", type: "button", value: " 4 ",
events: { onclick: "d268(4)" }} ]
]))
this.d200["panel_tab"].style.position = "absolute";
this.d200["panel_tab"].style.width = "250px";
if (customPagesHTML != '') {
this.d200["custom_pages_links"].innerHTML += "&nbsp;|&nbsp;"+customPagesHTML;
}
document.dsObj = this;
this.bannerTimer = setInterval("document.dsObj.displayBanner()",5000);
}
/*
//This is for the buyads Ad.
this.displayBanner = function() {
xmlRequest.send(ISOR_VROOT_DIR+'/buyads/serveads/banner.php?m='+session_user.member_code+'&size=728x90&sp=1&nojs=0', this, "parseBanner");
}
*/
//This is for the buyads Ad.
this.displayBanner = function() {
xmlRequest.send(ISOR_VROOT_DIR+'/iso_banner/displayBanner.php?size=728x90&mode=html', this, "parseBanner");
}
this.parseBanner = function(response) {
this.d200['banner_div'].innerHTML = response.responseText;
}
////////////////////////////
// Main menu
this.d241 = false;
this.d242 = function() {
if(this.d241) {
menu.hide();
} else {
menu.show();
}
}
// Pages
this.d243 = "panels";
this.addPage = function(name) {
//        this.d208(document.body,
this.d208(this.d200["pages"],
{ tag: "div", id: "page_" + name, display: false });
return this.d200["page_" + name];
}
this.showPage = function(name) {
this.d228("page_" + this.d243);
this.d229("page_" + name);
this.d243 = name;
}
this.d244 = function() {
this.d228("page_" + this.d243);
this.d229("page_panels");
this.d243 = "panels";
}
///////////////////////////
// System
this.d205 = function(parent) {
this.d208(parent, this.d198);
}
this.d206 = function() {
//title
if(this.d203["title"] == "") {
this.d203["title"] = loc.text("desktop_title_prompt");
}
with(this.d200) {
var t = this.d203["title"].jsUnescape();
if(t == "") {
t = this.d197.title;
}
document.title = t;
title_box.innerHTML = text2html(t);
title_box.onclick = function() { desktop.d245(); };
title_box_tmp.innerHTML = text2html(t);
title_input.value = t;
}
this.d208(this.d200["page_panels"],
{ tag: "div", className: "tab_panel",
id: "tabs",
childs: [
{ tag: "div", id: "add_page_button",
className: "tab_box",
events: {onclick: "d249()"},
childs: [
{ tag: "div" }
/*                    { tag: "div", className: "tab_left" },
{ tag: "div", className: "tab_middle",
childs: [
{ tag: "div", className: "tab_add_icon" }
]},
{ tag: "div", className: "tab_right" }*/
]}
]});
this.showPage('panels');
}
// TITLE EDITING
this.d245 = function() {
with(this.d200) {
var w = title_box_tmp.offsetWidth;
title_box.style.display = 'none';
title_input.style.display = 'inline';
title_input.style.width = (w+4)+"px";
title_input.focus();
title_input.select();
title_input.onkeyup = function(e) {
e = fix_event(e);
if(e.keyCode == 13) {
this.onblur();
} else {
document.title = this.value;
desktop.d200.title_box_tmp.innerHTML = this.value;
this.style.width = (desktop.d200.title_box_tmp.offsetWidth+4) + "px";
}
}
title_input.onblur = function() {
text = trim(this.value.replace(/\\/g, ""));
if(text == "") {
text = desktop.d197["title"];
}
this.onblur = null;
this.style.display = 'none';
with(desktop.d200) {
title_box.innerHTML = text2html(text);
title_box.style.display = 'inline';
title_box.onclick =  function() { desktop.d245(); };
}
document.title = text;
//                var t = escape(text);
if(text != desktop.d203["title"]) {
desktop.d203["title"] = text.jsEscape();
desktop.save();
}
}
}
}
// TABS
this.d246 = [];
this.d247 = false;
this.d248 = function() {
return this.d203["order"].length + 1;
}
this.d249 = function() {
var title = loc.text("desktop_tab_title") + this.d248();
var idx = arrayFirstFree(this.d203.tabs);
this.d246[idx] = kernel.d233("Columner", document.body);
this.d246[idx].d203["pcount"] = this.d250;
this.d246[idx].save();
this.d203.tabs[idx] = {
t: title,
i: "",
cid: this.d246[idx].id
}
this.d203["order"][idx] = idx;
this.save();
this.d208(this.d200["page_panels"],
this.d251(idx, this.d250));
this.d252(idx, title);
this.d253(idx);
//        this.showDebug();
}
this.d254 = function(icon) {
return "static/tab_icons/" + icon + ".gif";
}
this.d252 = function(n, title, icon) {
var icon_src = icon ? this.d254(icon) : "";
this.d208(this.d200.tmp,
{ tag: "div", id: "tab_"+n,
className: "tab_box",
entityInfo: { type: "tab", idx: n},
events: {onclick: "d253('"+n+"')"},
childs: [
{ tag: "div", className: "tab_left" },
{ tag: "div", className: "tab_middle",
childs: [
{ tag: "div", className: "tab_icon",
childs: [
{ tag: "img", id: "tab_icon_" + n,
src: icon_src,
display: (icon_src != "") }
]},
{ tag: "div", className: "tab_title",
id: "tab_title_" + n,
innerHTML: title },
{ tag: "div", className: "tab_controls",
childs: [
/*{ tag: "div", className: "tab_close_btn",
events: { onclick: "d267('" + n + "')" }},*/
{ tag: "div", className: "tab_options_btn",
events: { onclick: "d253Options('" + n + "')" }}
]}
]},
{ tag: "div", className: "tab_right" }
]});
this.d200["tabs"].insertBefore(this.d200["tab_"+n], this.d200["add_page_button"]);
var eh = new EntityHandler(this.d200["tab_"+n], "tabs_drag",
{ d222Start: desktop.d256,
onElementOver: desktop.d257,
d222Stop: desktop.d258});
}
// Drag&drop tabs
this.d255 = null;
this.d256 = function(info) {
}
this.d257 = function(info) {
if(info.type == "tab") {
desktop.d255 = info;
desktop.d229("tab_area");
//dimk
desktop.d200["tab_" + info.idx].parentNode.insertBefore(desktop.d200["tab_area"], desktop.d200["tab_" + info.idx]);
}
}
this.d258 = function(info) {
if((desktop.d255 != null) &&
(desktop.d255.type == "tab") &&
(desktop.d255.idx != info.idx)) {
desktop.d200["tab_" + info.idx].parentNode.insertBefore(
desktop.d200["tab_" + info.idx],
desktop.d200["tab_area"]);
for(var i=0; i< desktop.d203["order"].length; i++) {
if(desktop.d203["order"][i] == desktop.d255.idx) {
var belongIdx = i;
}
if(desktop.d203["order"][i] == info.idx) {
var dragIdx = i;
}
}
desktop.d203["order"].splice(
belongIdx - (belongIdx > dragIdx ? 1 : 0),
0,
desktop.d203["order"].splice(dragIdx, 1)[0]);
desktop.save();
}
this.d255 = null;
desktop.d228("tab_area");
}
// show/hide tabs
this.d259 = null;
this.d260 = function(idx) {
this.d260Options();
this.d200["tab_" + idx].className = "tab_box";
}
this.d253 = function(idx) {
if(this.d259 != null && this.d259 != idx) {
this.d260(this.d259);
this.d228("tab_container_" + this.d259);
}
this.d259 = idx;
this.d200["tab_" + idx].className = "tab_box_selected";
this.d229("tab_container_" + idx);
}
// tab options
this.d253Options = function(idx) {
this.d200["input_tab_title"].value = this.d203.tabs[idx].t;
var pos = getElPos(this.d200["tab_" + idx]);
this.d229("panel_tab");
this.d200["panel_tab"].style.left = Math.min(pos.left, (document.body.clientWidth - 255)) + "px";
this.d200["panel_tab"].style.top = (pos.top + this.d200["tab_" + idx].offsetHeight + 4) + "px";
this.d200["panel_tab"].style.zIndex = 1000000;
if(!this.d247) {
this.d247 = true;
for(var i=0; i< this.d263.length; i++) {
this.d208(this.d200["tab_icons_box"],
{ tag: "a", href: "void",
events: { onclick: "d265('" + this.d263[i] + "')"},
innerHTML: "<img src='" + this.d254(this.d263[i]) + "' style='margin: 1px;'>"});
}
}
}
this.d260Options = function() {
this.d228("panel_tab");
}
// tab managment
this.d264 = function() {
var t = trim(this.d200["input_tab_title"].value);
this.d203.tabs[this.d259].t = t;
this.d200["tab_title_" + this.d259].innerHTML = t;
//        this.showDebug();
this.save();
}
this.d265 = function(icon) {
this.d229("tab_icon_" + this.d259);
this.d200["tab_icon_" + this.d259].src = this.d254(icon);
this.d203.tabs[this.d259].i = icon;
//        this.showDebug();
this.save();
}
this.d266 = function() {
this.d228("tab_icon_" + this.d259);
this.d203.tabs[this.d259].i = "";
//        this.showDebug();
this.save();
}
this.d267 = function() {
if(confirm(loc.text("desktop_close_page_prompt"))) {
this.d260Options();
var widgets = this.d246[this.d259].d203["widgets"];
for(var i in widgets) {
var w = kernel.getWidget(widgets[i].id);
if(w) {
w.d211();
}
}
this.d246[this.d259].close();
deleteEl(this.d200["tab_" + this.d259]);
deleteEl(this.d200["tab_container_" + this.d259]);
delete this.d203["tabs"][this.d259];
for(var o in this.d203["order"]) {
if(this.d203["order"][o] > this.d259) {
this.d203["order"][o] --;
}
}
for(var o in this.d203["order"]) {
if(this.d203["order"][o] == this.d259) {
this.d203["order"].splice(o, 1);
break;
}
}
//            this.showDebug();
this.save();
this.d259 = null;
for(var i=0; i<this.d203.tabs.length; i++) {
if(this.d203.tabs[i] != undefined) {
this.d259 = i;
continue;
}
}
if(this.d259 != null) {
this.d253(this.d259);
}
}
}
/* PANELS */
this.d250 = 3;
//dimk
this.d268 = function(n) {
if(n == this.d246[this.d259].d203["pcount"]) {
return;
}
for(var p=0; p<this.d269(); p++) {
var panel = this.d270(p);
for(; panel.childNodes.length>0; ) {
var wid = panel.childNodes[0].wid;
this.d200["tmp"].appendChild(kernel.getWidget(wid).d200.window);
}
}
for(var i=0; i<this.d269(); i++) {
deleteEl(this.d200["panel_" + this.d259 + "_" + i]);
}
deleteEl(this.d200["tab_container_" + this.d259]);
this.d208(this.d200["page_panels"], this.d251(this.d259, n));
this.d246[this.d259].d203["pcount"] = n;
this.d246[this.d259].save();
for(;this.d200["tmp"].childNodes.length > 0;) {
this.d271().appendChild(this.d200["tmp"].childNodes[0]);
}
this.d272();
}
this.d251 = function(tab_idx, count) {
var p = [];
var pwidth = Math.round(100 / count) + "%";
for(var i=0; i<count; i++) {
p.push(
{ tag: "td",
width: pwidth,
style: { paddingBottom: "50px", width: pwidth, verticalAlign: "top"},
id: "panel_" + tab_idx + "_" + i });
}
var m =
{ tag: "div", id: "tab_container_" + tab_idx,
childs: [
{ tag: "table",
className: "panels_table",
width: "100%",
childs: [
{ tag: "tr", childs: p }
]}
]}
return m;
}
// Panels managment
this.d270 = function(n) {
if(n > this.d269()-1) {
n = this.d269()-1;
}
return this.d200["panel_" + this.d259 + "_" + n];
}
this.d269 = function() {
return this.d246[this.d259] ? this.d246[this.d259].d203["pcount"] : -1;
}
this.d271 = function() {
if(this.d259 == null) {
this.d249();
}
var p = 0;
var minh = 100000;
for(var i = this.d269()-1; i>=0; i--) {
var h = 0;
panel = this.d270(i);
for(var j=0; j<panel.childNodes.length; j++) {
h += panel.childNodes[j].offsetHeight;
}
if(h <= minh) {
minh = h;
p = i;
}
}
return this.d270(p);
}
////////////////////////////////
// Drag and drop
this.d273 = function(pos) {
for(var i=0; i<this.d269(); i++) {
if(isPosInObj(pos, this.d270(i))) {
return this.d270(i);
}
}
return null;
}
this.d274 = function(panel, pos) {
for(var i=0; i<panel.childNodes.length; i++) {
if(isPosInObj(pos, panel.childNodes[i])) {
return panel.childNodes[i];
}
}
return null;
}
this.d275 = function(el) {
with(this.d200) {
area.style.position = 'relative';
el.parentNode.insertBefore(area, el);
area.style.height = el.offsetHeight + "px";
area.style.display = 'block';
}
}
this.d276 = function() {
with(this.d200) {
area.style.height = 0;
area.style.display = 'none';
area.parentNode.removeChild(area);
}
}
this.d277 = function(pos) {
p = this.d273(pos);
if(p) {
if(p.hasChildNodes()) {
w = this.d274(p, pos);
if(w) {
if(w.name != 'area') {
w = this.d274(p, pos);
p.insertBefore(this.d200.area, w);
}
} else {
this.d200.area.parentNode.removeChild(this.d200.area);
p.appendChild(this.d200.area);
}
} else {
this.d200.area.parentNode.removeChild(this.d200.area);
p.appendChild(this.d200.area);
}
}
}
this.d278 = function(pos) {
if(this.d259 == null) {
this.d249();
}
panel = this.d273(mpos);
if(panel) {
drag.el.parentNode.removeChild(drag.el);
panel.insertBefore(drag.el, this.d200.area);
}
}
this.d279 = function() {
for(var p=0; p<this.d269(); p++) {
for(var i=0; i<this.d270(p).childNodes.length; i++) {
var wid = this.d270(p).childNodes[i].wid;
if(wid) {
kernel.getWidget(wid).show();
}
}
}
}
this.d280 = function() {
for(var p=0; p<this.d269(); p++) {
for(var i=0; i<this.d270(p).childNodes.length; i++) {
var wid = this.d270(p).childNodes[i].wid;
if(wid) {
kernel.getWidget(wid).hide();
}
}
}
}
this.showSetupInstructions = function() {
if(ISOR_VROOT_DIR)
{
window.open(ISOR_VROOT_DIR+'/contents/?sp_setup','sp_setup');
}
}
// SAVE/LOAD DESKTOP
this.d272 = function() {
var n = 0;
var panelsCount = this.d269();
if(this.d246[this.d259]) {
this.d246[this.d259].d203["widgets"] = [];
for(var p=0; p<panelsCount; p++) {
for(var i=0; i<this.d270(p).childNodes.length; i++) {
var wid = this.d270(p).childNodes[i].wid;
if(wid) {
this.d246[this.d259].d203["widgets"].push(
{ m: kernel.getWidget(wid).cfg.module,
id:wid,
p: p});
}
}
}
this.d246[this.d259].save();
}
}
this.d281 = function() {
var widgets = null;
for(var o in this.d203["order"]) {
var i = this.d203["order"][o];
if(this.d203.tabs[i] == undefined) {
continue;
}
this.d252(i, this.d203.tabs[i].t, this.d203.tabs[i].i);
this.d246[i] = kernel.d233("Columner", document.body, this.d203.tabs[i].cid);
this.d208(this.d200["page_panels"],
this.d251(i, this.d246[i].d203["pcount"]));
this.d253(i);
var widgets = this.d246[i].d203["widgets"];
for(var j in widgets) {
kernel.d233(widgets[j].m,
this.d270(widgets[j].p),
widgets[j].id);
}
}
if (this.d203['order'].length == 0)
{
this.d249();
kernel.d233("isor", desktop.d270(1));
kernel.d233("soloads", desktop.d270(1));
kernel.d233("trafficexchanges", desktop.d270(2));
kernel.d233("siteofmonth", desktop.d270(2));
kernel.d233("smartpagead", desktop.d270(2));
kernel.d233("adoptions", desktop.d270(0));
kernel.d233("latestupdates", desktop.d270(0));
kernel.d233("bncc", desktop.d270(2));
this.d272();
}
if (widgets && !this.widgetLoaded(widgets, 'latestupdates')) {
kernel.d233("latestupdates", desktop.d270(0));
this.d272();
}
if (widgets && !this.widgetLoaded(widgets, 'bncc')) {
kernel.d233("bncc", desktop.d270(2));
this.d272();
}
for(var o in this.d203["order"]) {
var i = this.d203["order"][o];
if(this.d203.tabs[i] != undefined) {
this.d253(i);
break;
}
}
if(_GET["add_url"]) {
url = _GET["add_url"];
if(url.indexOf("http://") == -1) {
url = "http://"+url;
}
if(_GET["type"] == "api")  {
var w = kernel.d233("Browser", this.d271(), false, {home_page: url});
w.save();
this.d272();
} else {
this.d239 = url;
xmlRequest.send(url, this, "d282");
}
}
this.d229("content");
hideEl(elById("loading_note"));
showEl(elById("page_header"));
showEl(elById("page_footer"));
}
this.widgetLoaded = function(widget, moduleName)
{
for (var w in widget) {
if (widget[w].m == moduleName) {
return true;
}
}
return false;
}
this.d282 = function(response) {
if(response.responseXML.documentElement) {
var channel = XMLParser.xml2hash(response.responseXML.documentElement);
if(channel) {
menu.d318(channel.title, this.d239);
var w = kernel.d233("Rss", this.d271(), false, {url: this.d239});
w.save();
this.d272();
return;
}
}
}
this.showDebug = function() {
elById("DEBUG").innerHTML = "<pre>" + Dump(this.d203.tabs) + "</pre>";
}
/* THEMES */
this.d240 = function() {
this.d200["themes_loader"].href = "themes/" + this.d203["theme"] + "/theme.css?v=" + (Math.random() * 1000000);
}
this.d283 = function() {
var url = "http://" + baseUrl;
if(mozilla_nav) {
window.sidebar.addPanel(this.d203["title"], url, "");
} else if(ie_nav) {
window.external.AddFavorite(url, this.d203["title"]);
}
}
}
Desktop.prototype = new Widget();
/* columner */
function Columner() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: false,
isSystem: true,
title: "",
module: "columner"
}
this.d197["widgets"] = [];
this.d197["pcount"] = 3;
this.d197["config"] = "";
this.d205 = function(parent) {}
this.d206 = function() {}
}
Columner.prototype = new Widget();
Desktop.prototype.d263 = [
"anchor",
"attach",
"basket",
"bomb",
"book",
"book_addresses",
"book_open",
"brick",
"briefcase",
"bug",
"cake",
"calendar_view_day",
"calendar_view_month",
"camera",
"car",
"cd",
"chart_bar",
"chart_curve",
"chart_organisation",
"chart_pie",
"clock",
"clock_red",
"cog",
"coins",
"color_swatch",
"comment",
"computer",
"connect",
"creditcards",
"door",
"door_open",
"drink",
"drink_empty",
"email",
"email_open",
"email_open_image",
"emoticon_evilgrin",
"emoticon_grin",
"emoticon_happy",
"emoticon_smile",
"emoticon_surprised",
"emoticon_tongue",
"emoticon_unhappy",
"emoticon_waii",
"emoticon_wink",
"exclamation",
"eye",
"feed",
"flag_blue",
"flag_green",
"flag_orange",
"flag_pink",
"flag_purple",
"flag_red",
"flag_yellow",
"folder",
"heart",
"hideMod",
"house",
"image",
"info",
"information",
"ipod",
"keyboard",
"layout",
"lightbulb",
"lightbulb_off",
"lock",
"lock_open",
"lorry",
"lorry_flatbed",
"magnifier",
"money",
"money_dollar",
"money_euro",
"money_pound",
"money_yen",
"monitor",
"mouse",
"music",
"new",
"note",
"note_002",
"page",
"page_copy",
"page_white",
"page_white_acrobat",
"page_white_code",
"page_white_compressed",
"page_white_excel",
"page_white_flash",
"page_white_php",
"page_white_picture",
"page_white_powerpoint",
"page_white_text",
"page_white_word",
"page_white_world",
"palette",
"paste_plain",
"pencil",
"phone",
"photo",
"picture",
"printer",
"printer_empty",
"rainbow",
"rosette",
"server",
"shield",
"sport_8ball",
"sport_basketball",
"sport_football",
"sport_golf",
"sport_raquet",
"sport_shuttlecock",
"sport_soccer",
"sport_tennis",
"star",
"stop",
"tag_blue",
"tag_green",
"tag_orange",
"tag_pink",
"tag_purple",
"tag_red",
"tag_yellow",
"telephone",
"television",
"thumb_down",
"thumb_up",
"trash",
"tux",
"user",
"user_female",
"user_gray",
"user_green",
"user_orange",
"user_red",
"user_suit",
"vcard",
"weather_clouds",
"weather_cloudy",
"weather_lightning",
"weather_rain",
"weather_snow",
"weather_sun",
"world",
"zoom"
]
function Auth() {
this.init();
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: true,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: false,
isOpenHidden: false,
isSystem: true,
title: loc.text("auth_title"),
module: "Auth",
uniqueId: SYS_WIDGETS_ID + 2
}
this.user = { id: null,
email: null,
password: null}
this.d284 = [
{ tag: "div", className: "float_panel",
id: "login_form",
childs: [
{ tag: "div", className: "float_left",
style: { width: "45%", padding: "8px" },
childs: [
// login exist user
{ tag: "h1", html: loc.text("auth_exist_user") },
{ tag: "div", html: loc.text("inp_email") },
{ tag: "div",
childs: [
{ tag: "input", id: "login_email", size: "30",
type: "text" }
]},
{ tag: "div", html: loc.text("inp_pwd") },
{ tag: "div",
childs: [
{ tag: "input", id: "login_pwd", size: "30",
type: "password" }
]},
{ tag: "div", style: { textAlign: "center", marginTop: "12px"},
childs: [
{ tag: "input", id: "login_btn",
events: { onclick: "d287()"},
type: "button", value: loc.text("auth_load_my_page") }
]},
{ tag: "div", id: "login_msg",
style: { marginTop: "12px", textAlign: "justify"}},
// pwd remind
{ tag: "div",
style: { marginTop: "12px"},
childs: [
{ tag: "div",
id: "pwd_remind_link",
childs: [
{ tag: "a", href: "showRemindForm()",
html: loc.text("auth_lnk_forget_pwd") }
]},
{ tag: "div",
display: false,
id: "pwd_remind_form",
childs: [
{ tag: "h1", html: loc.text("auth_remind_title")},
{ tag: "div", html: loc.text("inp_email") },
{ tag: "div",
childs: [
{ tag: "input", size: "30",
id: "inp_reminder_email",
type: "text" },
{ tag: "input", type: "button",
value: loc.text("btn_send"),
events: { onclick: "remindPwd()"} }
]}
]},
{ tag: "div", id: "pwd_remind_msg",
html: loc.text("msg_sending"),
display: false }
]}
]},
// new user explanation
{ tag: "div", className: "float_right",
style: { width: "45%", padding: "8px" },
childs: [
{ tag: "h1", html: loc.text("auth_new_user") },
{ tag: "div", style: { textAlign: "justify"},
html: loc.text("auth_reg_msg") },
{ tag: "div", style: { textAlign: "center", marginTop: "12px"},
childs: [
{ tag: "input", id: "goreg_btn",
events: { onclick: "d285()"},
type: "button", value: loc.text("auth_registration") }
]}
]}
]},
{ tag: "div", id: "reg_form", className: "float_panel",
display: false,
childs: [
{ tag: "div", className: "float_left",
style: { width: "45%", padding: "8px" },
childs: [
{ tag: "h1", html: loc.text("auth_new_user") },
{ tag: "div", style: { textAlign: "justify"},
html: loc.text("auth_reg_msg") }
]},
{ tag: "div", className: "float_right",
style: { width: "45%", padding: "8px" },
childs: [
{ tag: "h1", html: "&nbsp;" },
{ tag: "div", html: loc.text("inp_email") },
{ tag: "div",
childs: [
{ tag: "input", id: "reg_email", size: "30",
type: "text" }
]},
{ tag: "div", html: loc.text("inp_email2") },
{ tag: "div",
childs: [
{ tag: "input", id: "reg_email2", size: "30",
type: "text" }
]},
{ tag: "div", html: loc.text("inp_pwd") },
{ tag: "div",
childs: [
{ tag: "input", id: "reg_pwd", size: "30",
type: "password" }
]},
{ tag: "div", html: loc.text("inp_pwd2") },
{ tag: "div",
childs: [
{ tag: "input", id: "reg_pwd2", size: "30",
type: "password" }
]},
{ tag: "div", style: { textAlign: "center", marginTop: "12px"},
childs: [
{ tag: "input", id: "reg_btn",
events: { onclick: "d288()"},
type: "button", value: loc.text("auth_process_reg_btn") }
]},
{ tag: "div", id: "reg_msg",
style: { marginTop: "12px", textAlign: "justify"}}
]}
]},
{ tag: "div", id: "reg_ok", className: "float_panel",
display: false,
childs: [
{ tag: "div", className: "float_left",
style: { width: "45%", padding: "8px" },
childs: [
{ tag: "h1", html: loc.text("auth_new_user") },
{ tag: "div", style: { textAlign: "justify"},
html: loc.text("auth_registration_ok") },
{ tag: "div", style: { textAlign: "center", marginTop: "12px"},
childs: [
{ tag: "input", type: "button",
events: { onclick: "regFinish()"},
value: loc.text("btn_ok")}
]}
]}
]}
]
this.d209 = function() {
this.d208(this.d200.content, this.d284);
this.d208(desktop.d200.authButton,
[{ tag: "span", id:"signinBtn",
childs: [createButtonDom(loc.text("auth_lnk_sign_in"), "d291()", "widgets/auth/img/sign_in.gif")]  },
{ tag: "span", id:"signoutBtn",
childs: [createButtonDom(loc.text("auth_lnk_sign_out"), "logout()", "widgets/auth/img/sign_out.gif")]  }]);
if(this.isLogged()) {
hideEl(this.d200.signinBtn);
} else {
hideEl(this.d200.signoutBtn);
}
this.d212(loc.text("auth_title"));
}
this.showRemindForm = function() {
this.d229("pwd_remind_form");
this.d228("pwd_remind_link");
this.d228("pwd_remind_msg");
this.d200["inp_reminder_email"].value = "";
this.d200["inp_reminder_email"].focus();
}
this.regFinish = function() {
this.close();
}
this.remindPwd = function() {
var email = trim(this.d200["inp_reminder_email"].value);
if(this.d289(email)) {
request.send( { act: "remind_pwd", email: email }, this);
this.d228("pwd_remind_form");
this.d229("pwd_remind_msg");
}
}
this.d285 = function() {
this.d229("reg_form");
this.d228("login_form");
}
this.d286 = function() {
this.d228("reg_form");
this.d229("login_form");
}
this.d287 = function() {
var e = trim(this.d200["login_email"].value);
var pwd = trim(this.d200["login_pwd"].value);
if(e != "" && pwd != "") {
request.send({ act: "login_user",
email: e,
password: pwd }, this);
this.d228("login_btn");
this.d228("goreg_btn");
this.d200["login_msg"].innerHTML = loc.text("msg_processing");
}
}
this.d288 = function() {
var e = trim(this.d200["reg_email"].value);
var e2 = trim(this.d200["reg_email2"].value);
var pwd = trim(this.d200["reg_pwd"].value);
var pwd2 = trim(this.d200["reg_pwd2"].value);
if(e != e2 || !this.d289(e)) {
this.d200["reg_msg"].innerHTML = loc.text("auth_email_error");
} else if(pwd != pwd2 || !this.d290(pwd)) {
this.d200["reg_msg"].innerHTML = loc.text("auth_pwd_error");
} else if(e != "" && pwd !="") {
request.send({ act: "register_user",
email: e,
password: pwd }, this);
this.d228("reg_btn");
this.d200["reg_msg"].innerHTML = loc.text("msg_processing");
}
}
this.close = function() {
this.d286();
desktop.d244();
}
this.d291 = function() {
desktop.showPage('auth');
}
this.isLogged = function() {
return this.user.email != '';
}
this.logout = function() {
request.send({act: "logout"}, this);
}
this.d292 = function() {
this.anonymusId = getCookie("anonymusid");
this.user.id = getCookie("userid");
this.user.email = getCookie("useremail");
this.user.password = getCookie("userpassword");
}
this.d293 = function() {
setCookie("userid", this.user.id);
setCookie("useremail", this.user.email);
setCookie("userpassword", this.user.password);
}
this.start = function() {
if(session_user) {
this.user = session_user;
//            this.d293();
this.onLoad();
} else {
this.d292();
if(this.user.email && this.user.password) {
request.send({act: "start_user", user_id: this.user.id, email: this.user.email, password: this.user.password}, this);
} else {
request.send({act: "start_anonymus", user_id: this.user.id}, this);
}
}
}
this.d227 = function(msg) {
switch(msg.status) {
case "":
break;
case "start_result":
this.user = msg.user;
this.d293();
this.onLoad();
break;
case "register_ok":
this.d229("reg_ok");
this.d228("reg_form");
this.d200["signinBtn"].style.display = "none";
this.d200["signoutBtn"].style.display = "inline";
this.user = msg.user;
this.d293();
//dimk
break;
case "register_error":
this.d200["reg_msg"].innerHTML = loc.text("auth_msg_reg_error");
this.d200["reg_email"].value = "";
this.d200["reg_email2"].value = "";
this.d229("reg_btn");
break;
case "login_ok":
setCookie("anonymusid", this.user.id);
this.user = msg.user;
this.d293();
location.reload();
break;
case "login_error":
this.d200["login_msg"].innerHTML = loc.text("auth_login_error");
this.d229("login_btn");
this.d229("goreg_btn");
break;
case "logout_ok":
var anonymusId = getCookie("anonymusid");
if(anonymusId) {
this.user = {id: anonymusId, email: "", password: ""};
this.d293();
delCookie("anonymusid");
} else {
delCookie("userid");
delCookie("useremail");
delCookie("userpassword");
}
location.reload();
break;
case 'user_ok':
if(!this.user.email) {
setCookie("anonymusid", this.user.id);
}
this.user = msg.user;
this.d293();
location.reload();
break;
case "pwd_sent":
this.d200["inp_reminder_email"].value = "";
this.d228("pwd_remind_form");
this.d229("pwd_remind_link");
this.d228("pwd_remind_msg");
break;
}
}
this.onLoad = function() {}
this.d294 = function() {
var errors = [];
email = trim(this.d200.selectEmail.value);
password = trim(this.d200.selectPassword.value);
if(!this.d289(email)) {
errors[errors.length] = "<b>" + loc.text("auth_msg_email_invalid") + "</b>";
}
if(!this.d290(password)) {
errors[errors.length]= "<b>" + loc.text("auth_msg_pwd_invalid") + "</b>";
}
if(errors.length > 0) {
this.d200.messages.innerHTML = errors.join("<BR>");
} else {
hideEl(this.d200.submitButton);
this.d200.messages.innerHTML = loc.text("msg_processing");
request.send({act: "register_user", email: email, password: password}, this);
}
}
this.d289 = function(str) {
return /^[a-zA-Z][a-z0-9\-\_]{1,20}@[a-z0-9\-\_\.]{5,30}$/.test(str);
}
this.d290 = function(str) {
return (str.length > 5);
}
}
Auth.prototype = new Widget();
function Profiler() {
this.data = {};
this.cfg = {
module: "Profiler",
hasProfile: false
}
this.d295 = function(widget) {
var d203 = clone(widget.d197);
if(this.data[widget.id]) {
for(var i in this.data[widget.id]) {
if(d203[i] != undefined) {
d203[i] = this.data[widget.id][i];
}
}
}
widget.d203 = d203;
}
this.d296 = function(widget) {
var wkey = widget.id;//getSignature();
if(widget.d203) {
act = this.data[wkey] ? "update" : "create";
request.send({w: widget.cfg.module, act: act, wkey: wkey, data: escape(toCode(widget.d203))}, this, widget.cfg.saveMethod);
} else {
request.send({act: "delete", wkey: wkey}, this);
}
this.data[wkey] = widget.d203;
}
this.d297 = function() {
request.send({act: "load_data"}, this);
}
this.onLoad = function() {}
this.d227 = function(msg) {
if(msg.status == "loaded") {
d203r.data = {};
for(var i in msg.data) {
try {
d203r.data[i] = toValue(unescape(msg.data[i]));
} catch(e) {
d203r.data[i] = {}
}
}
d203r.onLoad();
}
}
}
CCIDS = 10000;
function Menu() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
isOpenHidden: true,
isSystem: true,
title: loc.text("menu_title"),
module: "Menu",
uniqueId: SYS_WIDGETS_ID + 3
}
this.d197["catalog"] = [];
this.widget = null;
this.catalog = [];
this.catalog[CCIDS] = {categories: [{id: CCIDS+1, name: loc.text("menu_cutom_channels")}], items: []};
this.catalog[CCIDS+1] = {categories: [], items: []};
this.d198Content = [
{ tag: "div", className: "menu_panel", id: "d317MenuItem",
childs: [createButtonDom(loc.text("menu_add_feed"), "d316()", "widgets/menu/img/plus.gif")] },
{ tag: "div", className: "menu_hr"},
{ tag: "div", className: "menu_panel", id: "cat_content"+CCIDS, display: false },
{ tag: "div", className: "menu_hr"},
{ tag: "div", className: "menu_panel", id: "cat_content0", display: false },
{ tag: "div", className: "menu_hr"}
]
this.d198Additional = [
{ tag: "div", className: "panel", id: "preview", display: false, style: {position: "absolute", left: "0px", top: "0px", width: "300px"},
childs: [
{ tag: "div", className: "panel_section",
childs: [createTableDom([{content: createButtonDom("<b>" + loc.text("menu_add2desktop") + "</b>", "d311()", "widgets/menu/img/plus.gif"), width: "99%"},
{content: {tag: "a", href: "void", events: {onclick: "d306()"}, innerHTML: "<img src='static/client/close.gif'>"}, width: "1%"}
]),
{ tag: "div", id: "preview_panel", style: {width: "100%", height: "auto", padding: "0", margin: "0"} }
]
}
]
},
{ tag: "div", className: "panel", id: "d317Panel", display: false, style: {position: "absolute", left: "0px", top: "0px", width: "340px"},
childs: [
{ tag: "div", className: "caption",
childs: [ createTableDom([{content: "<img src='widgets/menu/img/item.gif' style='vertical-align: middle'> &nbsp;<b>" + loc.text("menu_add_feed") + "</b>", width: "99%"},
{content: createButtonDom(false, "d307()", "static/client/close.gif"), width: "1%"}
]),
createTableDom([{content: { tag: "div", innerHTML: loc.text("menu_inp_url"), style: {paddingTop: "15px", paddingBottom: "15px"}}, width: "1%"},
{content: { tag: "input", type: "text", size: "40", id: "selectFeedUrl"}, width: "100%"},
{content: { tag: "input", type: "button", id: "d317Button", events: {onclick: "d317()"}, value: loc.text("btn_add")}, width: "1%"}
]),
{ tag: "div", display: false, id: "d317Status", className: "menu_panel", style: {paddingBottom: "15px"}, align: "center"}
]
}
]
},
{ tag: "div", className: "panel", id: "item_menu", display: false, style: {padding: "6px", position: "absolute", left: "0px", top: "0px", verticalAlign: "middle"},
childs: [
{ tag: "span", id: "item_menu_actions",
childs: [
createButtonDom("<b>"+loc.text("menu_rename")+"</b>", "d323()", "static/client/edit.gif"),
{ tag: "br"},
createButtonDom("<b>"+loc.text("menu_delete")+"</b>", "d325()", "static/client/delete_link.gif")
]},
{ tag: "span", id: "item_menu_rename",
display: false,
innerHTML: "<b>" +loc.text("menu_rename_to")+"</b> &nbsp;",
childs: [
{ tag: "input", type: "text", id: "new_item_title", style: {width: "190px"}},
{ tag: "input", type: "button", value: loc.text("btn_ok"), events: {onclick: "d326()"}},
{ tag: "input", type: "button", value: loc.text("btn_cancel"), events: {onclick: "d305()"} }
]},
{ tag: "span", id: "item_menu_delete",
display: false,
innerHTML: "<b>"+loc.text("menu_delete_prompt")+"</b> &nbsp;",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_yes"), events: {onclick: "d327()"} },
{ tag: "input", type: "button", value: loc.text("btn_no"), events: {onclick: "d305()"} }
]}
]
}
]
this.d300 = 0;
this.d301 = function(id) {
var res = "menu_item_";
if(id) {
res = res + id;
} else {
this.d300 ++;
res = res + this.d300;
}
return res;
}
this.folder_o = new Image();
this.folder_o.src = "static/client/folder-o.gif";
this.folder_s = new Image();
this.folder_s.src = "static/client/folder-s.gif";
this.d209 = function() {
this.d200.window.style.position = "absolute";
this.d200.window.style.margin = "2px";
this.d200.window.style.top = "0px";
this.d200.window.style.left = "0px";
this.d200.window.style.width = "235px";
this.d208(this.d200.content, this.d198Content);
this.d208(document.body, this.d198Additional);
this.d212(this.cfg.title);
for(w in menuWidgets) {
if(menuWidgets[w] == "-") {
this.d208(this.d200["content"], { tag: "div", className: "menu_hr"});
} else {
var mid = this.d301();
var wname = menuWidgets[w].className.toLowerCase();
this.d208(document.body,
{ tag: "div", className: "hint", id: "hint_"+wname, display: false,
style: {position: "absolute", left: "0px", top: "0px", width: "280px", padding: "8px"},
innerHTML: loc.text(wname + "_hint").replace(/\n/g, "<br>") } );
var m = { tag: "div", className: "menu_panel",
events: {
onmouseover: "d313('" + wname + "', '"+mid+"')",
onmouseout: "d309('" + wname + "')"},
childs: [
createButtonDom(loc.text(wname + "_title"), "d308('" + menuWidgets[w].className + "', '"+mid+"')", "widgets/" + wname + "/ico.gif", mid)
]
}
this.d208(this.d200["content"], m);
}
}
// HTML Widgets
this.d208(this.d200["content"], [
{ tag: "div", className: "menu_hr"}/*,
{ tag: "div", id: "html_widgets",
html: loc.text("msg_loading") }*/
]);
request.send({ act: "get_html_widgets" }, this);
// Load feeds catalog
this.d302(0);
// Custom feeds
var tmp = [];
for(var i=0; i<this.d203.catalog.length; i++) {
if(this.d203.catalog[i] != -1) {
tmp.push(this.d203.catalog[i]);
}
}
this.d203.catalog = null;
this.d203.catalog = tmp;
for(var i in this.d203.catalog) {
this.catalog[CCIDS+1].items[i] = clone(this.d203.catalog[i]);
this.catalog[CCIDS+1].items[i].id = CCIDS + 2 + parseInt(i);
}
this.d303(CCIDS);
}
// open/close sub menus
this.d304 = function(name) {
with (this.d200[name].style) {
display = (display == 'none' ? 'block' : 'none');
}
}
this.show = function() {
if(!desktop.d241) {
showEl(this.d200.window);
desktop.d200.pager.style.marginLeft = this.d200.window.offsetWidth + 2 + "px";
desktop.d200.pager.style.width = "auto";
desktop.d241 = true;
}
}
this.hide = function() {
if(desktop.d241) {
hideEl(this.d200.window);
desktop.d200.pager.style.marginLeft = 0;
desktop.d241 = false;
}
}
this.close = function() {
//        hideEl(desktop.d200.menu);
this.d305();
this.d306();
this.d307();
this.hide();
}
//---------------------------------------------
// PREVIEW
//---------------------------------------------
//dimk
this.d308 = function(widgetClass, mid, params) {
this.d305();
this.d309();
desktop.showPage("panels");
this.d306();
showEl(this.d200.preview);
var pos = {left: getLeft(this.d200.window) + this.d200.window.offsetWidth + 12,
top:  getTop(this.d200[mid])};
setElPos(this.d200.preview, pos);
this.widget = kernel.d233(widgetClass, this.d200["preview_panel"], false, params, { d204: true});
this.d310 = this.widget.disableOnClosePrompt;
this.widget.disableOnClosePrompt = true;
pos.top = pos.top - Math.round(this.d200.preview.offsetHeight / 2);
setElPos(this.d200.preview, pos);
}
this.d306 = function() {
if(this.widget) {
this.widget.close();
}
this.widget = null;
hideEl(this.d200.preview);
this.d200.preview_panel.innerHTML = '';
}
this.d311 = function() {
if(this.widget) {
this.widget.setParent(desktop.d271());
this.widget.save();
this.widget.d204 = false;
this.widget.initDtagAndDrop();
this.widget.disableOnClosePrompt = this.d310;
this.widget = null;
this.d306();
desktop.d272();
}
}
//---------------------------------------------
// HINTS
//---------------------------------------------
this.d312 = null;
this.d313 = function(wname, mid) {
if(!this.widget) {
var pos = {left: getLeft(this.d200.window) + this.d200.window.offsetWidth + 12,
top:  getTop(this.d200[mid])};
setElPos(this.d200["hint_"+wname], pos);
showEl(this.d200["hint_"+wname]);
this.d312 = wname;
this.d305();
}
}
this.d309 = function(wname) {
if(wname) {
hideEl(this.d200["hint_"+wname]);
} else if (this.d312) {
hideEl(this.d200["hint_"+this.d312]);
}
}
//---------------------------------------------
// ADD CHANNELS
//---------------------------------------------
this.d314 = function(html) {
if(html) {
showEl(this.d200.d317Status);
this.d200.d317Status.innerHTML = html;
} else {
clearEl(this.d200.d317Status);
hideEl(this.d200.d317Status);
}
}
this.d315 = false;
this.d316 = function() {
this.d305();
if(!this.d315) {
desktop.showPage("panels");
this.d314(null);
showEl(this.d200.d317Panel);
showEl(this.d200.d317Button);
var pos = {left: getLeft(this.d200.window) + this.d200.window.offsetWidth + 12,
top:  getTop(this.d200.d317MenuItem)};
setElPos(this.d200.d317Panel, pos);
this.d200.selectFeedUrl.focus();
this.d315 = true;
}
}
this.d307 = function() {
if(this.d315) {
hideEl(this.d200.d317Panel);
this.d315 = false;
}
}
this.d317 = function() {
var url = trim(this.d200.selectFeedUrl.value);
if(url!="") {
hideEl(this.d200.d317Button);
this.d314("<b>"+loc.text("menu_msg_cc")+"</b>");
if(url.indexOf("http://") == -1) {
url = "http://"+url;
}
this.d239 = url;
xmlRequest.send(url, this, "d282");
}
}
this.d318 = function(title, url) {
var cn = this.catalog[CCIDS+1].items.length;
this.d203.catalog[cn] = {title: title, url: url};
var newItem = {id: CCIDS+cn+2, title: title.substr(0,25), url: url, icon: ''};
this.catalog[CCIDS+1].items[cn] = newItem;
this.d303(CCIDS+1, true);
this.save();
}
this.d282 = function(response) {
if(response.responseXML.documentElement) {
var channel = XMLParser.xml2hash(response.responseXML.documentElement);
if(channel) {
this.d314("<b>"+loc.text("menu_msg_added", channel.title)+"</b>");
this.d200.selectFeedUrl.value = '';
//        this.d203.catalog[cn] = {title: channel.title, url: this.d239};
this.d318(channel.title, this.d239);
showEl(this.d200.d317Button);
var w = kernel.d233("Rss", desktop.d271(), false, {url: this.d239});
w.save();
desktop.d272();
this.d307();
return;
}
}
this.d314("<b>"+loc.text("menu_msg_no_responce")+ "</b>");
showEl(this.d200.d317Button);
}
//---------------------------------------------
// ITEM MENU
//---------------------------------------------
this.d319 = null;
this.d320 = function(id) {
this.d321();
showEl(this.d200["item_control"+id]);
this.d319 = id;
}
this.d321 = function() {
if(this.d319 != null) {
hideEl(this.d200["item_control"+this.d319]);
}
}
this.d322 = function(mid) {
if(!this.widget && !this.d315) {
hideEl(this.d200.item_menu_rename);
hideEl(this.d200.item_menu_delete);
showEl(this.d200.item_menu_actions);
showEl(this.d200.item_menu);
var pos = {left: getLeft(this.d200.window) + this.d200.window.offsetWidth + 2,
top:  getTop(this.d200[mid]) - 10};
setElPos(this.d200.item_menu, pos);
}
}
this.d305 = function() {
hideEl(this.d200.item_menu);
}
this.d323 = function() {
var n = this.d324(this.d319);
this.d200.new_item_title.value = this.d203.catalog[n].title;
hideEl(this.d200.item_menu_actions);
showEl(this.d200.item_menu_rename);
}
this.d325 = function() {
hideEl(this.d200.item_menu_actions);
showEl(this.d200.item_menu_delete);
}
this.d324 = function(itemId) {
for(var i=0; i<this.catalog[CCIDS+1].items.length; i++) {
if(this.catalog[CCIDS+1].items[i] != -1 && this.catalog[CCIDS+1].items[i].id == itemId) {
return i;
}
}
}
this.d326 = function() {
var title = trim(this.d200.new_item_title.value);
if(title != "") {
var n = this.d324(this.d319);
this.d203.catalog[n].title = title;
this.catalog[CCIDS+1].items[n].title = title;
this.d200["cat_item_title"+this.d319].innerHTML = title;
this.save();
this.d305();
}
}
this.d327 = function() {
var n = this.d324(this.d319);
this.d203.catalog[n] = -1;
this.catalog[CCIDS+1].items[n] = -1;
this.d200["cat_item"+this.d319].parentNode.removeChild(this.d200["cat_item"+this.d319]);
this.d200["cat_item"+this.d319] = null;
this.save();
this.d305();
}
//---------------------------------------------
// CATALOGS
//---------------------------------------------
this.d302 = function(catId) {
this.d305();
var el = this.d200["cat_content"+catId];
if(el.style.display == 'none') {
if(this.catalog[catId]) {
if(this.catalog[catId].rendered) {
showEl(el);
} else {
this.d303(catId);
}
} else {
if(catId < CCIDS) {
el.innerHTML = loc.text("msg_loading");
showEl(el);
request.send({act: "get_category", cat_id: catId}, this);
}
}
if(catId != "0") {
this.d200["fico_" + catId].setAttribute("src", this.folder_o.src);
}
} else {
if(catId != "0") {
this.d200["fico_" + catId].setAttribute("src", this.folder_s.src);
}
hideEl(el);
}
}
this.d328 = {};
this.d303 = function(catId, silent) {
el = this.d200["cat_content"+catId];
el.innerHTML = '';
with(this.catalog[catId]) {
if(categories) {
for(var i in categories) {
this.d208(el,
{ tag: "div", className: "menu_panel", id: "cat"+categories[i].id,
childs: [
createButtonDom(categories[i].name,
"d302("+categories[i].id+")",
this.folder_s.src,
false,
"fico_" + categories[i].id
),
{ tag: "div", id: "cat_content"+categories[i].id, className: "menu_sub_panel", display: false }
]
});
}
}
if(items) {
var m = null;
for(var i in items) {
if(items[i] == -1) {
continue;
}
var ico_id = "item_icon_"+items[i].id;
m = { tag: "div", id: "cat_item"+items[i].id,
style: {width: "100%", padding: "0px"},
childs: []}
var cells = [
{content: createButtonDom(items[i].title,
"d308('Rss', 'cat_item"+items[i].id+"', {url: '"+items[i].url + "'" + (items[i].icon ? ", icon: '"+items[i].icon+"'" : "") + "})",
"widgets/menu/img/item.gif",
"cat_item_title"+items[i].id,
ico_id),
width: "99%"}];
if(items[i].id > CCIDS) {
m.events = {onmouseover: "d320('"+items[i].id+"')", onmouseout: "d321()"};
cells.push({content:
{ tag: "img", src: "static/client/right_arrow.gif",
id: "item_control"+items[i].id,
style: {verticalAlign: "middle", cursor: "pointer"},
display: false,
events: {onmouseover: "d322('cat_item"+items[i].id+"')"}
},
width: "99%"});
}
m.childs.push(createTableDom(cells));
this.d208(el, m);
var icons = [
items[i].icon,
getDomain(items[i].url) + "/favicon.ico",
getDir(items[i].url) + "/favicon.ico"
];
with(this.d200[ico_id].style) {
width = "16px";
heigth = "16px";
}
loadIcon(this.d200[ico_id], icons);
}
}
if(!items  &&  !categories) {
el.innerHTML = loc.text("msg_empty");
}
rendered = true;
}
if(!silent) {
el.style.display = 'block';
}
this.catalog[catId].rendered = true;
}
//---------------------------------------------
// HTML WIDGETS
//---------------------------------------------
this.renderHTMLWidgetsList = function(data) {
if(data) {
this.d200["html_widgets"].innerHTML = "";
for(var i in data) {
var mid = this.d301();
var m = { tag: "div", className: "menu_panel",
childs: [
createButtonDom(data[i].title,
"openHTMLWidget('" + data[i].id + "', '"+mid+"')", "var/hwicons/" + data[i].icon, mid)
]}
this.d208(this.d200["html_widgets"], m);
}
}
}
this.openHTMLWidget = function(hwId, mid) {
//    this.d308 = function(widgetClass, mid, params) {
this.d308("HTMLWidget", mid, { id: hwId });
}
//---------------------------------------------
// DISPATCHER
//---------------------------------------------
this.d227 = function(msg) {
switch (msg.status) {
case "category_data":
this.catalog[msg.cat_id] = { categories: msg.categories, items: msg.items};
this.d303(msg.cat_id);
break;
case "html_widgets":
this.renderHTMLWidgetsList(msg.data);
break;
}
}
}
Menu.prototype = new Widget();
function Settings() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
title: loc.text("settings_title"),
module: "Settings",
uniqueId: SYS_WIDGETS_ID + 4
}
this.d284 = [
// select background
{ tag: "div", className: "menu_panel", style: {textAlign: "center"},
innerHTML: "<h1>"+loc.text("settings_page_bg")+"</h1>",
childs: [
createColorSelectDom(loc.text("settings_page_bg_color"), "background", "select_page_color"),
{ tag: "div", className: "menu_panel", innerHTML: loc.text("settings_page_bg_img"), style: {textAlign: "center"}},
{ tag: "div", className: "menu_panel", style: {textAlign: "center"},
innerHTML: "URL: ",
childs: [
{ tag: "input", type: "text", size: "60", id: "select_background", value: "http://"},
{ tag: "input", type: "button", value: " Test ",
events: { onclick: "d332()" }
}
]},
{ tag: "div", className: "menu_panel", style: {textAlign: "center"},
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"),
events: { onclick: "d334()" } },
{ tag: "input", type: "button", value: loc.text("btn_delete"),
events: { onclick: "d335()" } }
]}
]},
{ tag: "hr" },
// change password
{ tag: "div", className: "menu_panel", style: {textAlign: "center"},
innerHTML: "<h1>"+loc.text("settings_change_pwd")+"</h1>",
childs: [
{ tag: "div", className: "float_panel",
childs: [
{ tag: "div", className: "float_left",
style: { width: "45%", padding: "2px" },
childs: [
{ tag: "div", html: loc.text("settings_inp_old_pwd")},
{ tag: "div",
childs: [
{ tag: "input", id: "inp_old_pwd", size: "30",
type: "password" }
]},
{ tag: "div", id: "change_pwd_msg",
style: { marginTop: "12px"}}
]},
{ tag: "div", className: "float_right",
style: { width: "45%", padding: "2px" },
childs: [
{ tag: "div", html: loc.text("settings_inp_new_pwd")},
{ tag: "div",
childs: [
{ tag: "input", id: "inp_new_pwd", size: "30",
type: "password" }
]},
{ tag: "div", html: loc.text("settings_inp_new_pwd2")},
{ tag: "div",
childs: [
{ tag: "input", id: "inp_new_pwd2", size: "30",
type: "password" }
]}
]}
]},
{ tag: "div", style: { textAlign: "center", marginTop: "6px", height: "25px"},
childs: [
{ tag: "input", id: "btn_change_pwd",
events: { onclick: "changePwd()"},
type: "button", value: loc.text("settings_btn_change_pwd") }
]}
]},
{ tag: "hr" },
// themes
{ tag: "div", className: "menu_panel", style: { textAlign: "center" },
innerHTML: "<h1>"+loc.text("settings_themes")+"</h1>",
childs: [
{ tag: "div", id: "page_themes", className: "section",
innerHTML: loc.text("msg_loading"),
style: { height: "210px", border: "1px solid #999999", overflow: "auto", textAlign: "left", padding: "4px"} }
]}
]
this.d197["background"] = "";
// Changing password
this.changePwd = function() {
if(auth.isLogged()) {
var p1 = trim(this.d200["inp_new_pwd"].value);
var p2 = trim(this.d200["inp_new_pwd2"].value);
var opwd = trim(this.d200["inp_old_pwd"].value);
if(opwd == auth.user.password) {
if((p1 == p2) && (p1 != "")) {
var opwd = trim(this.d200["inp_old_pwd"].value);
request.send({ act: "change_pwd", npwd: p1}, this);
this.d200["change_pwd_msg"].innerHTML = loc.text("msg_processing");
this.d200["btn_change_pwd"].disabled = true;
} else {
this.d200["change_pwd_msg"].innerHTML = loc.text("settings_new_pwd_wrong");
}
} else {
this.d200["change_pwd_msg"].innerHTML = loc.text("settings_old_pwd_wrong");
}
} else {
alert(loc.text("settings_msg_sign_in"));
}
}
this.d209 = function() {
this.d200["content"].style.height = "540px";
this.d212(this.cfg.title);
this.d208(this.d200.content, this.d284);
this.d329 = document.body.style.background;
this.d330();
}
this.d207 = function() {
request.send({ act: "get_themes" }, this);
}
this.d331 = false;
this.d332 = function() {
this.d331 = "url(" + trim(this.d200["select_background"].value) + ") repeat fixed";
document.body.style.background = this.d331;
}
this.d333 = function(color) {
this.d331 = color;
document.body.style.background = color;
}
this.d334 = function() {
this.d203["background"] = this.d331;
this.save();
desktop.d244();
}
this.d335 = function() {
document.body.style.background = "";
this.d203["background"] = "";
this.save();
}
this.close = function() {
desktop.d244();
}
this.d223 = function(target, color) {
switch(target) {
case "background":
this.d333(color);
break;
}
}
this.d330 = function() {
if(this.d203.background == "") {
return;
}
document.body.style.background = this.d203.background;
}
this.d336 = false;
this.d337 = function(btnEl, popupEl) {
if(this.d336) {
if(this.d336 == popupEl) return;
this.d338(this.d336);
}
this.d336 = popupEl;
var pos = {left: getLeft(this.d200[btnEl]) + 16,
top:  getTop(this.d200[btnEl]) + 16};
showEl(this.d200[popupEl]);
setElPos(this.d200[popupEl], pos);
}
this.d338 = function(popupEl) {
hideEl(this.d200[popupEl]);
this.d336 = false;
}
this.d339 = function(popupEl, target, color) {
this.d338(popupEl);
this.d223(target, color);
}
this.d340 = function(popupEl, target, font) {
this.d338(popupEl);
this.d224(target, font);
}
this.d340Size = function(popupEl, target, fontSize) {
this.d338(popupEl);
this.d224Size(target, fontSize);
}
/* THEMES */
this.d342 = function(list) {
if(list == null) {
this.d200["page_themes"].innerHTML = "No themes found :(";
} else {
this.d200["page_themes"].innerHTML = "";
for(var i=0; i< list.length; i++) {
var cn = (list[i].name == desktop.d203["theme"]) ? "theme_box_selected" : "theme_box";
this.d208(this.d200["page_themes"],
{ tag: "div", className: cn,
id: "theme_box_" + list[i].name,
events: { onclick: "d344('" + list[i].name + "')" },
childs: [
{ tag: "div", className: "theme_thumbnail_box",
childs: [
{ tag: "img", className: "theme_thumbnail",
src: "themes/" + list[i].name + "/thumbnail.jpg" }
]},
{ tag: "div", className: "theme_description_box",
innerHTML: list[i].description }
]}
);
}
}
}
this.d343 = function(name) {
if(this.d200["theme_box_" + name]) {
this.d200["theme_box_" + name].className = "theme_box_selected";
}
}
this.d344 = function(name) {
if(desktop.d203["theme"] != name) {
if(this.d200["theme_box_" + desktop.d203["theme"]]) {
this.d200["theme_box_" + desktop.d203["theme"]].className = "theme_box";
}
this.d200["theme_box_" + name].className = "theme_box_selected";
desktop.d203["theme"] = name;
desktop.d240();
desktop.save();
}
}
this.d227 = function(msg) {
switch (msg.status) {
case "themes_list":
this.d342(msg.data);
break;
case "pwd_changed":
this.d200["change_pwd_msg"].innerHTML = loc.text("settings_pwd_changed");
this.d200["btn_change_pwd"].disabled = false;
this.d200["inp_old_pwd"].value = "";
this.d200["inp_new_pwd"].value = "";
this.d200["inp_new_pwd2"].value = "";
auth.user.password = msg.npwd;
auth.d293();
break;
}
}
}
Settings.prototype = new Widget();
function Feedback() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasProfile: false,
title: loc.text('feedback_user_feedback'),
module: "Feedback",
uniqueId: SYS_WIDGETS_ID + 7
}
this.d209 = function() {
this.d212(this.cfg.title);
this.d208(this.d200.content, [
{ tag: "div", align: "center", id: "feedback_status",
html: "<B>" + loc.text("feedback_status") + "</B>"},
{ tag: "hr"},
{ tag: "div", className: "menu_panel",
id: "feedback_sending",
display: false,
innerHTML: "<p><b>"+loc.text('feedback_sending')+"</b></p>" },
{ tag: "table", width: "95%",
id: "feedback_input",
childs: [
{ tag: "tr",
childs: [
{ tag: "td", width: "30%", align: "right",
childs: [{ tag: "div", innerHTML: loc.text('sendtofriend_your_email')}]},
{ tag: "td",
childs: [{ tag: "input", type: "text", id: "inp_email", size: "30"}]}
]
},
{ tag: "tr",
childs: [
{ tag: "td", width: "30%", align: "right", valign: "top",
childs: [{ tag: "div", innerHTML: loc.text('feedback_feedback_text')}]},
{ tag: "td",
childs: [{ tag: "textarea", id: "inp_message", rows: 16, cols: 50, style: {width: "90%"} }]}
]},
{ tag: "tr",
childs: [
{ tag: "td"},
{ tag: "td",
childs: [
{ tag: "input", type: "button", align: "center",
value: loc.text('btn_send'),
events: {onclick: "d347()"}}
]}
]}
]}
]);
this.d200["content"].style.height = "300px";
this.d200["inp_email"].value = auth.user.email;
}
this.close = function() {
desktop.d244();
}
this.d345 = function() {}
this.d346 = function() {}
//-------------------------------------
// SEND
//-------------------------------------
this.d347 = function() {
var str = this.d200["inp_message"].value;
if(str!="") {
hideEl(this.d200.feedback_input);
showEl(this.d200.feedback_sending);
request.send({ act: "feedback",
text: str,
email: this.d200["inp_email"].value},
this, "POST");
}
else {
alert(loc.text('feedback_text_empty'));
}
}
this.d227 = function(msg) {
switch (msg.status) {
case "feedback_saved":
this.d200.feedback_status.innerHTML = "<b>"+loc.text('feedback_msg_saved')+"</b>";
this.d200["inp_message"].value = "";
showEl(this.d200.feedback_input);
hideEl(this.d200.feedback_sending);
break;
case "empty_text":
this.d200.feedback_status.innerHTML = loc.text('feedback_msg_empty');
showEl(this.d200.feedback_input);
hideEl(this.d200.feedback_sending);
break;
}
}
}
Feedback.prototype = new Widget();
function Custompage() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasProfile: false,
title: loc.text("custompage_title"),
module: "Custompage",
uniqueId: SYS_WIDGETS_ID + 8
}
this.d209 = function() {
this.d212(loc.text("custompage_title"));
this.d200["content"].style.height = "300px";
this.d200["content"].style.overflow = "auto";
}
this.close = function() {
desktop.d244();
}
this.setData = function(title, content) {
this.d212(title);
this.d200["content"].innerHTML = content.parseUrl();
}
}
Custompage.prototype = new Widget();
function SendToFriend() {
this.init();
this.d348 = {
tag: "div", className: "menu_panel",
childs: [
{ tag: "div", align: "center", id: "send_status",
style: { fontWeight: "bold" },
html: loc.text("sendtofriend_status") },
{tag: "hr"},
{tag: "table", width: "95%",
childs: [
{ tag: "tr",
childs: [
{ tag: "td", width: "30%", align: "right",
childs: [{ tag: "div", innerHTML: loc.text('sendtofriend_your_name')}]
},
{ tag: "td",
childs: [{ tag: "input", type: "text", id: "ed_name", size: "30"}]
}
]
},
{ tag: "tr", childs: [{ tag: "td"},{ tag: "td"}]},
{ tag: "tr",
childs: [
{ tag: "td", width: "30%", align: "right",
childs: [{ tag: "div", innerHTML: loc.text('sendtofriend_your_email')}]
},
{ tag: "td",
childs: [{ tag: "input", type: "text", id: "ed_email", size: "30" }]
}
]
},
{ tag: "tr", childs: [{ tag: "td"},{ tag: "td"}]},
{ tag: "tr",
childs: [
{ tag: "td", width: "30%", align: "right",
childs: [{ tag: "div", innerHTML: loc.text('sendtofriend_friend_email')}]
},
{ tag: "td",
childs: [{ tag: "input", type: "text", id: "ed_friend_email", size: "30" }]
}
]
},
{ tag: "tr", childs: [{ tag: "td"},{ tag: "td"}]},
{ tag: "tr",
childs: [
{ tag: "td", width: "30%", align: "right", valign: "top",
childs: [{ tag: "div", innerHTML: loc.text('sendtofriend_message')}]
},
{ tag: "td",
childs: [{ tag: "textarea", id: "ed_message", rows: "9", cols: "50", style: {width: "90%"} }]
}
]
},
{ tag: "tr", childs: [{ tag: "td", innerHTML: "&nbsp;"},{ tag: "td"}]},
]
},
{ tag: "div", align: "center", id: "btn_send",
childs: [
{ tag: "input",
type: "button", value: loc.text('sendtofriend_send'),
events: {onclick: "d349()"}}
]}
]}
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasProfile: false,
title: "",
module: "SendToFriend",
uniqueId: SYS_WIDGETS_ID + 9
}
this.d209 = function() {
this.d212(loc.text('sendtofriend_title'));
this.d200["content"].style.height = "300px";
this.d208(this.d200.content, this.d348);
this.d200["ed_email"].value = auth.user.email;
this.d200["ed_message"].value = "http://" + baseUrl;
}
this.close = function() {
desktop.d244();
}
this.d227 = function(msg) {
//alert(msg.status);
switch(msg.status) {
case 'ok':
this.d229("btn_send");
this.d200.send_status.innerHTML = '<font color=green>'+loc.text('sendtofriend_send_ok')+'</font>';
break;
case 'failed':
this.d200.send_status.innerHTML = '<font color=red>'+loc.text('sendtofriend_send_failed')+'</font>';
this.d229("btn_send");
break;
}
}
this.d349 = function() {
var name_val   = this.d200.ed_name.value;
var email_val  = this.d200.ed_email.value;
var femail_val = this.d200.ed_friend_email.value;
var msg_val    = this.d200.ed_message.value;
//todo: e-mail check
if (email_val=="") {
alert(loc.text('sendtofriend_email_empty'));
this.d200.ed_email.focus();
return;
}
if (d289Address(email_val)==false) {
alert(loc.text('sendtofriend_email_invalid'));
this.d200.ed_email.focus();
return;
}
if (femail_val=="") {
alert(loc.text('sendtofriend_femail_empty'));
this.d200.ed_friend_email.focus();
return;
}
if (d289Address(femail_val)==false) {
alert(loc.text('sendtofriend_femail_invalid'));
this.d200.ed_friend_email.focus();
return;
}
this.d200["send_status"].innerHTML = loc.text("msg_processing");
this.d228("btn_send");
request.send({
act    : "send_to_friend",
name   : name_val,
email  : email_val,
femail : femail_val,
msg    : msg_val
},
this);
}
}
SendToFriend.prototype = new Widget();
// E-MAIL
function d289Address(value)
{
//trim(field);
var goodEmail = value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail)
return true;
else
return false;
}
function Rss() {
this.init();
this.cfg = {
title: loc.text("rss_title"),
module: "Rss"
}
this.d197["cnt"] = 10;
this.d197["opend"] = 0;
this.d197["url"] = "";
this.d197["icon"] = "";
this.d197["period"] = 600;
this.d197["md5"] = [];
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("rss_inp_ncount")},
{ tag: "select", id: "news_count", className: "settings_control",
options: [
{ value:"3", text: "3"},
{ value:"5", text: "5"},
{ value:"8", text: "8"},
{ value:"10", text: "10"},
{ value:"12", text: "12"},
{ value:"15", text: "15"},
{ value:"9999", text: loc.text("rss_all")}
]
},
{ tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "d356()"}}
]
},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("rss_inp_refresh")},
{ tag: "select", id: "period", className: "settings_control",
options: [
{ value:"120", text: loc.text("rss_p120")},
{ value:"300", text: loc.text("rss_p300")},
{ value:"600", text: loc.text("rss_p600")},
{ value:"1200", text: loc.text("rss_p1200")},
{ value:"1800", text: loc.text("rss_p1800")},
{ value:"3600", text: loc.text("rss_p3600")},
{ value:"10800", text: loc.text("rss_p10800")}
]
},
{ tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "d359()"}}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("rss_inp_open_to")},
{ tag: "input", type: "checkbox", id: "opend",
events: { onclick: "d355()"}
}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("rss_inp_url"), className: "settings_label"},
{ tag: "input", id: "select_url", type: "text", size: "15", className: "settings_control"},
{ tag: "input", type: "button", value: loc.text("btn_go"), events: {onclick: "d354()"}}
]}
]
this.d351 = null
this.d352 = false;
this.d353 = false;
this.d209 = function() {
this.d200["settings"].innerHTML = "";
this.d208(this.d200.settings, this.d350);
this.d200.period.value = this.d203.period;
this.d200.news_count.value = this.d203.cnt;
this.d200.opend.checked = this.d203.opend == 1;
this.d200.content.style.padding = "6px";
this.d200["select_url"].value = this.d203["url"];
}
this.d354 = function() {
var url = trim(this.d200["select_url"].value);
if(url != "") {
if(url.indexOf("http://") == -1) {
url = "http://" + url;
}
if(this.d203["url"] != url) {
this.d203["url"] = url;
this.save();
this.iconLoaded = false;
kernel.d236(this.id);
kernel.d235(this.id, this.d203.period * 1000, true);
this.refresh();
}
}
this.d216();
}
this.d355 = function() {
this.d203.opend = this.d200.opend.checked ? 1 : 0;
this.save();
}
this.d356 = function() {
this.d203.cnt = this.d200.news_count.value;
this.save();
this.d357();
this.d358();
}
this.d359 = function() {
this.d203.period = this.d200.period.value;
kernel.d236(this.id);
kernel.d235(this.id, this.d203.period * 1000, true);
this.save();
}
this.d207 = function() {
kernel.d235(this.id, this.d203.period * 1000);
}
this.d226 = function() {
if(!this.d353) {
this.refresh();
}
}
this.refresh = function() {
var date = new Date();
this.d351 = date.getSeconds();
this.d212(loc.text("msg_loading"));
var wid = this.id;
var iconEl = this.d200.icon;
xmlRequest.send(this.d203.url, this, "d367");
this.d352 == true;
}
this.d360 = function(wid, feedId) {
if(this.d203.opend == 1) {
window.open(this.data.items[feedId]["link"]);
} else {
this.d353 = true;
rssreader.d373 = this.d351;
rssreader.d200["icon"].src = this.d200["icon"].src;
rssreader.d360(wid, feedId);
}
}
this.d361 = function() {
return Math.min(this.data.items.length, this.d203.cnt);
}
this.d362 = function(itemIdx) {
this.data.items[itemIdx].isRead = 1;
this.d203["readed"][itemIdx] = 1;
this.d357();
this.d200["item_" + itemIdx].className = "rss_box_item_visited";
}
this.d363 = function(itemIdx) {
this.data.items[itemIdx].isRead = 0;
this.d203["readed"][itemIdx] = 0;
this.d357();
this.d200["item_" + itemIdx].className = "rss_box_item";
}
this.d364 = function() {
var count = this.d361();
var res = 0;
for(var i=0; i<count; i++) {
if(this.data.items[i].isRead == 1) {
res ++;
}
}
return res;
}
this.d357 = function() {
if(this.data) {
var count = this.d361();
var readed = this.d364();
this.d200.title.innerHTML = '';
this.d208(this.d200.title,
{ tag: "a", href: "void",
innerHTML: this.data.title.substr(0,25),
events: { onclick: "d370()" } });
if(count > readed) {
this.d208(this.d200.title,
{ tag: "span",
innerHTML: " &nbsp;(" + (count - readed) + ")" });
}
}
}
this.d365 = {
url: null,
time: null
}
this.d366 = function(idx) {
var content = this.data.items[idx]["content"] ? this.data.items[idx]["content"] : this.data.items[idx]["description"];
var str = this.data.items[idx].title + content;
return crc32(str);
}
this.d367 = function(response) {
this.d352 == false;
if(response.responseXML && response.responseXML.documentElement) {
this.data = XMLParser.xml2hash(response.responseXML.documentElement);
var newMd5 = [];
if(this.data) {
var count = this.data.items.length;
var l = this.d203["md5"].length;
for(var i=0; i<count; i++) {
var md5 = this.data.items[i]["md5"] = this.d366(i);
var j = this.d368(md5);
if(j != null) {
this.data.items[i].isRead = 1;
newMd5.push(md5);
l--;
}
}
this.d203["md5"] = newMd5;
if(l != 0) {
this.save();
}
}else{
this.informAdmin(this.d203.url, response.responseText);
}
this.d358();
this.d357();
} else {
this.informAdmin(this.d203.url, response.responseText);
this.d369();
}
}
this.informAdmin = function(rssUrl, responseText) {
request.send({ act: "inform_admin",
text: responseText,
rssUrl: rssUrl},
this, "POST");
}
this.iconLoaded = false;
this.d358 = function() {
if(this.data) {
if(!this.iconLoaded) {
var icons = [
this.d203.icon,
getDir(this.data.siteUrl) + "/favicon.ico",
getDomain(this.data.siteUrl) + "/favicon.ico",
getDir(this.d203.url) + "/favicon.ico",
getDomain(this.d203.url) + "/favicon.ico"
];
loadIcon(this.d200["icon"], icons);
this.iconLoaded = true;
}
var count = this.d361();
this.d200.content.innerHTML = '';
for(var i=0; i<count; i++) {
this.d208(this.d200.content,
{ tag: "div", className: "rss_box_item" + ( (this.data.items[i].isRead == 1) ? "_visited" : ""),
innerHTML: this.data.items[i].title.wordWrap(38),
events: { onclick: "d360("+this.id+","+i+")" },
id: "item_" + i });
}
} else if (!this.d352) {
this.d369();
}
}
this.d369 = function() {
this.d200.title.innerHTML = loc.text("rss_msg_error");
}
this.d370 = function() {
if(this.data) {
window.open(this.data.siteUrl);
}
}
this.onClose = function() {
if(rssreader.d375 && rssreader.d375 == this.id) {
rssreader.close();
}
}
// Read/unread hash
this.d368 = function(md5) {
for(var i=0; i<this.d203["md5"].length; i++) {
if(this.d203["md5"][i] == md5) {
return i;
}
}
return null;
}
this.d371 = function(idx) {
var md5 = this.data.items[idx].md5;
var i = this.d368(md5);
if(i == null) {
this.d203["md5"].push(md5);
}
}
this.und371 = function(idx) {
var md5 = this.data.items[idx].md5;
var i = this.d368(md5);
if(i != null) {
delete(this.d203["md5"][i]);
}
}
this.d362 = function(itemIdx) {
this.data.items[itemIdx].isRead = 1;
this.d371(itemIdx);
this.d357();
this.d200["item_" + itemIdx].className = "rss_box_item_visited";
}
this.d363 = function(itemIdx) {
this.data.items[itemIdx].isRead = 0;
this.und371(itemIdx);
this.d357();
this.d200["item_" + itemIdx].className = "rss_box_item";
}
this.d364 = function() {
var count = this.d361();
var res = 0;
for(var i=0; i<count; i++) {
if(this.data.items[i].isRead == 1) {
res ++;
}
}
return res;
}
}
Rss.prototype = new Widget();
function RssReader() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasProfile: false,
title: loc.text("rssreader_title"),
module: "RssReader",
uniqueId: SYS_WIDGETS_ID + 5
}
this.d284 = {
tag: "table",
style: { width: "100%" },
childs: [
{ tag: "tr",
childs: [
{ tag: "td", width: "35%",
childs: [
createButtonDom(loc.text("rssreader_read_all"), "d378()", "widgets/rssreader/img/folder_open.gif"),
{ tag: "span", html: " &nbsp; &nbsp; &nbsp; "},
createButtonDom(loc.text("rssreader_unread_all"), "d379()", "widgets/rssreader/img/folder_close.gif")
]},
{ tag: "td",
childs: [{ tag: "div", id: "channelTitle"}]}
]},
{ tag: "tr",
childs: [
{ tag: "td", width: "35%",
childs: [
{ tag: "div", id: "menu", className: "listBox", style: {width: "auto", height: "340px"}}
]},
{ tag: "td",
childs: [
{ tag: "div", id: "view", className: "listBox", style: {width: "auto", height: "340px"}}
]}
]}
]}
this.d373 = null;
this.d209 = function() {
this.d200["content"].style.height = "390px";
this.d208(this.d200.content, this.d284);
this.d212(this.cfg.title);
}
this.d374 = function() {
//        this.d200.channelTitle.innerHTML = "<h1><a target=\"_blank\" href=\""+this.data.LINK+"\">"+this.data.title+"</a></h1>";
this.d200.channelTitle.innerHTML = "<h1>"+this.data.title+"</h1>";
this.d200.menu.innerHTML = "";
this.d200.view.innerHTML = "";
var count = kernel.getWidget(this.d375).d361();
for(var i=0; i< count; i++) {
this.d208(this.d200.menu,
[{ tag: "div", className: "menu_panel",
childs: [
{ tag: "a",
innerHTML: this.data.items[i].title.wordWrap(38),
id: "menuItem"+i,
href: "void",
events: {onclick: "d376("+i+")"},
className: "listItem" + (this.data.items[i].isRead == 1 ? "Visited" : "") }
]
},
{ tag: "hr", width: "100%"}
]);
}
}
this.d376 = function(feedId) {
this.d200.view.innerHTML = "";
var content = this.data.items[feedId]["content"] ? this.data.items[feedId]["content"] : this.data.items[feedId]["description"];
var url = this.data.items[feedId]["link"]["href"] ? this.data.items[feedId]["link"]["href"] : this.data.items[feedId]["link"];
this.d208(this.d200.view, [
{ tag: "div", className: "float_panel",
childs: [
{ tag: "div", className: "float_left",
display: (feedId > 0),
childs: [
createButtonDom(false, "d376("+(feedId-1)+")", "widgets/rssreader/img/previous.gif", "readPrev")
]},
{ tag: "div", className: "float_right",
display: (feedId < kernel.getWidget(this.d375).d361() - 1),
childs: [
createButtonDom(false, "d376("+(feedId+1)+")", "widgets/rssreader/img/next.gif", "readNext")
]}
]},
{ tag: "hr", width: "100%"},
{ tag: "div", className: "menu_panel",
innerHTML: "<p><a href='" + url + "' class='rssreader_item_title' target=_blank>" + this.data.items[feedId].title + "</a>"+
"<p>"+(content ? content : "")
}
]);
if(kernel.getWidget(this.d375)) {
kernel.getWidget(this.d375).d362(feedId);
kernel.getWidget(this.d375).save();
}
this.d200['menuItem'+feedId].className = "listItemVisited";
this.d377();
}
this.d378 = function() {
var count = kernel.getWidget(this.d375).d361();
for(var i=0; i<count; i++) {
kernel.getWidget(this.d375).d362(i);
}
this.d374();
var w = kernel.getWidget(this.d375);
if(w) {
w.save();
}
this.d377();
}
this.d379 = function() {
var count = kernel.getWidget(this.d375).d361();
for(var i=0; i<count; i++) {
kernel.getWidget(this.d375).d363(i);
}
this.d374();
var w = kernel.getWidget(this.d375);
if(w) {
w.save();
}
this.d377();
}
this.d377 = function() {
if(this.data) {
var count = kernel.getWidget(this.d375).d361();
var readed = kernel.getWidget(this.d375).d364()
this.d200.title.innerHTML = '';
this.d208(this.d200.title,
{ tag: "a", href: "void",
innerHTML: this.data.title.substr(0,25),
events: { onclick: "d370()" } });
if(count > readed) {
this.d208(this.d200.title,
{ tag: "span",
innerHTML: " &nbsp;(" + (count - readed) + ")" });
}
}
}
this.d360 = function(d375, feedId) {
menu.hide();
this.data = kernel.getWidget(d375).data;
this.d375 = d375;
this.d374();
this.d200.icon.src = kernel.getWidget(d375).d200.icon.src;
desktop.showPage('rssreader');
this.d376(feedId);
}
this.close = function() {
if(this.d375 && kernel.getWidget(this.d375)) {
if(this.d373 == kernel.getWidget(this.d375).d351) {
kernel.getWidget(this.d375).d353 = false;
//                kernel.getWidget(this.d375).data = this.data;
}
}
desktop.d244();
}
}
RssReader.prototype = new Widget();
function FlashPlayer() {
this.init();
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasDrag: false,
hasProfile: false,
title: loc.text("flash_title"),
module: "FlashPlayer",
uniqueId: SYS_WIDGETS_ID + 6
}
this.d209 = function() {
this.d200.content.style.height = "400px";
}
this.d380 = function(d375) {
this.d375 = d375;
var widget = kernel.getWidget(d375);
this.d212(this.cfg.title + ": " + widget.d203.title);
widget.d200.flash_container.parentNode.removeChild(widget.d200.flash_container);
this.d200.content.appendChild(widget.d200.flash_container);
desktop.showPage('flashplayer');
}
this.close = function() {
if(this.d375) {
var widget = kernel.getWidget(this.d375);
widget.d200.flash_container.parentNode.removeChild(widget.d200.flash_container);
widget.d200.flash_content.appendChild(widget.d200.flash_container);
}
desktop.d244();
}
}
FlashPlayer.prototype = new Widget();
function Messenger() {
this.init();
this.cfg = {
hasSettingsBtn: false,
title: loc.text("messenger_title"),
module: "Messenger"
}
this.d284 = [
{ tag: "div", className: "bevel_section", innerHTML: loc.text("messenger_clist"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_contact_list')"}
},
{ tag: "div", className: "menu_panel", id: "section_contact_list", display: false,
childs: [
{ tag: "div", className: "menu_panel", id: "contact_list"},
{ tag: "hr", width: "100%"},
{ tag: "div", className: "menu_panel",
childs: [
{ tag: "span", innerHTML: loc.text("messenger_cadd") },
{ tag: "input", type: "text", style: {width: "120px"}, id: "edit_user_id"},
{ tag: "input", type: "button", value: " Add ", events: {onclick: "d384()"}}
]}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("messenger_compose"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_compose')"}
},
{ tag: "div", className: "menu_panel", id: "section_compose", display: false,
childs: [
{ tag: "div", className: "menu_panel", innerHTML: loc.text("messenger_recipient"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_recipient"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("messenger_text") + "<br>",
childs: [
{ tag: "textarea", style: {width: "95%", height: "80"}, id: "edit_body"}
]
},
{ tag: "input", type: "button", value: loc.text("btn_send"), id: "send_btn", events: {onclick: "d388()"}},
{ tag: "div", id: "send_status"}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("messenger_inbox"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_new_messages')"}
},
{ tag: "div", className: "menu_panel", id: "section_new_messages", display: false,
childs: [
{ tag: "div", id: "new_messages", className:"listBox", style: {width: "auto", height: "300px"}, innerHTML: loc.text("msg_loading") },
{ tag: "div", id: "clear_new_messages", display: false, align: "right",
childs: [
createButtonDom(loc.text("messenger_clear"), "d391()", "widgets/messenger/img/clear.gif")
]
}
]
},
{ tag: "div", id: "tmp", display: false}
]
this.d197["contact_list"] = [];
this.messages = [];
this.d381 = false;
this.d382 = function(sid) {
if(this.d200[sid].style.display == 'none') {
showEl(this.d200[sid]);
} else {
hideEl(this.d200[sid]);
}
}
this.d209 = function() {
this.d208(this.d200.content, this.d284);
this.d383();
this.d212(this.cfg.title);
}
this.d207 = function() {
kernel.d235(this.id, 30000);
}
this.d226 = function() {
this.refresh();
}
this.d384 = function() {
var id = trim(this.d200.edit_user_id.value);
if(id != "") {
this.d203.contact_list[arrayFirstFree(this.d203.contact_list)] = id;
this.save();
this.d383();
this.d200.edit_user_id.value = '';
}
}
this.d385 = function(num) {
if(confirm(  loc.text("messenger_delete_confirm", "\"" + this.d203.contact_list[num] + "\"")  )) {
this.d203.contact_list[num] = undefined;
this.d383();
this.save();
}
}
this.d383 = function() {
var fl = true;
this.d200.contact_list.innerHTML = "";
for(var i=0; i<this.d203.contact_list.length; i++) {
if(this.d203.contact_list[i] != undefined) {
var itemDom = { tag: "div", className: "menu_panel", id: "contact"+i,
childs: [
createTableDom([ {content: createButtonDom(this.d203.contact_list[i], "d386("+i+")", "widgets/messenger/img/user.gif"), width: "90%"},
{content: createButtonDom(false, "d385("+i+")", "static/client/delete_link.gif"), width: "1%"}
])
]
}
this.d208(this.d200.contact_list, itemDom);
fl = false;
}
}
if(fl) {
this.d200.contact_list.innerHTML = loc.text("msg_empty");
}
}
this.d386 = function(contactNum) {
hideEl(this.d200.section_contact_list);
showEl(this.d200.section_compose);
this.d200.edit_recipient.value = this.d203.contact_list[contactNum];
//        this.d200.edit_body.value = '';
this.d200.edit_body.focus();
}
this.d387 = function(email) {
showEl(this.d200.section_compose);
this.d200.edit_recipient.value = email;
this.d200.edit_body.value = '';
this.d200.edit_body.focus();
}
this.refresh = function() {
if(!this.d381) {
request.send({act: "get_new_messages", user_id: auth.user.id}, this);
this.d381 = true;
}
}
this.d388 = function() {
if((trim(this.d200.edit_recipient.value) == "") ||
(trim(this.d200.edit_body.value) == "")) {
this.d200.send_status.innerHTML = "<b>" + loc.text("messenger_send_error")+ "</b>";
return;
}
hideEl(this.d200.send_btn);
showEl(this.d200.send_status);
this.d200.send_status.innerHTML = loc.text("msg_sending");
request.send({act: "send",
user_id: auth.user.id,
to: trim(this.d200.edit_recipient.value),
body: this.d200.edit_body.value}, this);
}
this.d389 = true;
this.d390 = function() {
if(this.messages.length > 0) {
var time = new Date();
if(this.d389) {
this.d200.new_messages.innerHTML = '';
}
this.d389 = false;
var isNewMessages = false;
for(var i=0; i<this.messages.length; i++) {
if(this.messages[i].rendered) {
continue;
}
this.messages[i].rendered = true;
isNewMessages = true;
var from = (this.messages[i].from_email == "") ?
{ tag: "div", innerHTML: "<b>"+loc.text("messenger_anonym")+"</b>" }
:
createButtonDom("<b>"+this.messages[i].from_email+"</b>", "d387('"+this.messages[i].from_email+"')", "widgets/messenger/img/user.gif");
this.d208(this.d200.tmp,
{ tag: "div", className: "menu_panel", id: "last_msg",
childs: [
from ,
{ tag: "div", class_name: "menu_panel", innerHTML: '[' + time.toLocaleString() + ']'},
{ tag: "div", className: "note", innerHTML: text2html(unescape(this.messages[i].body)) }
]
});
if(this.d200.new_messages.firstChild) {
this.d200.new_messages.insertBefore(this.d200.last_msg, this.d200.new_messages.firstChild);
} else {
this.d200.new_messages.appendChild(this.d200.last_msg);
}
}
if(isNewMessages) {
showEl(this.d200.section_new_messages);
}
showEl(this.d200.clear_new_messages);
} else {
this.d200.new_messages.innerHTML = loc.text("messenger_no_messages");
}
}
this.d391 = function() {
this.d389 = true;
this.messages = [];
this.d390();
hideEl(this.d200.clear_new_messages);
}
this.d227 = function(msg) {
this.d381 = false;
if(msg.status) {
switch(msg.status) {
case "new_messages":
if(msg.list.length > 0) {
var ids = [];
for(var i=0; i<msg.list.length; i++) {
this.messages.push(msg.list[i]);
ids.push(msg.list[i].id);
}
request.send({act: "set_received", user_id: auth.user.id, ids: ids.join("_")}, this);
}
this.d390();
break;
case "send_ok":
this.d200.edit_body.value = '';
showEl(this.d200.send_btn);
this.d200.send_status.innerHTML = "Message sent.";
break;
case "send_error":
this.d200.send_status.innerHTML = "<b>Error:</b> Recipient not found...";
showEl(this.d200.send_btn);
break;
}
}
}
}
Messenger.prototype = new Widget();
function PopMail() {
this.init();
this.cfg = {
hasSettingsBtn: true,
title: loc.text("popmail_title"),
module: "PopMail"
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_mcount")},
{ tag: "select", id: "inp_count", className: "settings_control",
options: [
{ value:"3", text: "3"},
{ value:"5", text: "5"},
{ value:"8", text: "8"},
{ value:"10", text: "10"},
{ value:"12", text: "12"},
{ value:"15", text: "15"},
{ value:"20", text: "20"}
]
},
{ tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "setItemsCount()"}, className: "settings_control"}
]
},
{ tag: "div", className: "settings_section", align: "center",
innerHTML: "<b>"+ loc.text("popmail_asettings") + "</b>"},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_login")},
{ tag: "input", id: "select_login", type: "text", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_pwd")},
{ tag: "input", id: "select_password", type: "password", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_protocol")},
{ tag: "select", id: "select_protocol", className: "settings_control",
events: {onchange: "updatePort()"},
options: [
{ value: "pop3", text: "POP3" },
{ value: "imap", text: "IMAP4" },
]
}
]
},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_secure")},
{ tag: "input", type: "checkbox", id: "select_secure",
events: {onchange: "updatePort()"},
className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_server")},
{ tag: "input", id: "select_server", type: "text", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_port")},
{ tag: "input", id: "select_port", type: "text", size: "5", value: "110"}
]},
{ tag: "div", className: "settings_section", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d296()"}}
]}
]
this.d284 = [
{ tag: "div",
style: { width: "100%", zoom: "1", overflow: "hidden" },
childs: [
{ tag: "div", className: "menu_panel", id: "messages", display: false,
childs: [
{ tag: "div", className: "menu_panel",
style: { paddingLeft: "30px", background: "url(widgets/aolmail/ico.gif) no-repeat 0 0"},
childs: [
{ tag: "b", html: loc.text("popmail_total") },
{ tag: "span", id: "total_messages"}
]},
{ tag: "div", id: "mail_list"}
]}
]},
{ tag: "div", className: "menu_panel", id: "loading_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/popmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("msg_loading")},
{ tag: "div", className: "menu_panel", id: "config_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/popmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("popmail_msg_not_configured")},
{ tag: "div", className: "menu_panel", id: "no_messages_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/popmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("popmail_msg_no_mails")}
]
this.d197["login"] = "";
this.d197["password"] = "";
this.d197["protocol"] = "pop3";
this.d197["secure"] = "0";
this.d197["server"] = "";
this.d197["port"] = "110";
this.d197["title"] = loc.text("popmail_title");
this.d197["mcount"] = "8";
this.d352 = false;
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d200.select_login.value = this.d203.login;
this.d200.select_password.value = this.d203.password;
this.d200.select_protocol.value = this.d203.protocol;
this.d200.select_secure.checked = this.d203.secure == 1;
this.d200.select_server.value = this.d203.server;
this.d200.select_port.value = this.d203.port;
this.d200.inp_count.value = this.d203.mcount;
this.d212(this.d203.title);
}
this.d207 = function() {
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
//        kernel.d235(this.id, 30000);
}
this.updatePort = function() {
this.d200["select_port"].value =
(this.d200["select_protocol"].value == "pop3")
?
(this.d200["select_secure"].checked ? "995" : "110")
:
(this.d200["select_secure"].checked ? "993" : "143")
}
this.d398 = function() {
return this.d203.login == "" || this.d203.password == "" || this.d203.server == "";
}
this.d399 = function(section) {
var sections = ["config_note", "loading_note", "messages", "no_messages_note"];
for(var i = 0; i<sections.length; i++) {
if(section == sections[i]) {
this.d229(sections[i]);
} else {
this.d228(sections[i]);
}
}
}
this.d296 = function() {
this.d203.login = trim(this.d200.select_login.value);
this.d203.password = trim(this.d200.select_password.value);
this.d203.protocol = this.d200.select_protocol.value;
this.d203.secure = this.d200.select_secure.checked ? 1 : 0;
this.d203.server = trim(this.d200.select_server.value);
this.d203.port = trim(this.d200.select_port.value);
if(this.d398()) {
this.d399("config_note");
} else {
this.save();
this.refresh();
}
}
this.setItemsCount = function() {
var c = this.d200["inp_count"].value;
if(this.d203.mcount != c) {
this.d203.mcount = c;
this.save();
this.d390();
}
}
this.d226 = function() {
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.req = null;
this.timerId = null;
this.refresh = function() {
if(!this.d398() && !this.d352) {
this.d352 = true;
this.d399("loading_note");
var protocol = "/" + this.d203.protocol +
((this.d203.secure == 1) ? "/ssl" : "") +
"/novalidate-cert";
this.req = request.send({ login: this.d203.login,
password: this.d203.password,
protocol: protocol,
server: this.d203.server,
port: this.d203.port }, this);
var self = this;
var f = function() {
updateLoadingIcon(-1);
self.req.onreadystatechange = function() {};
self.d352 = false;
self.d399("config_note");
}
this.timerId = setTimeout(f, 30000);
}
}
this.d390 = function() {
if(this.data) {
this.d399("messages");
this.d200.total_messages.innerHTML = "<B>" + this.d400 + "<B>";
this.d200.mail_list.innerHTML = '';
var cnt = Math.min(this.data.length, this.d203.mcount);
for(var i=0; i<cnt; i++) {
try {
this.d208(this.d200.mail_list,
{ tag: "div", className: "menu_panel",
innerHTML: "<B>" + this.data[i].from + "</B>",
childs: [
{ tag: "div", className: "note", innerHTML: this.data[i].subj.wordWrap(20) }
]
});
} catch(e) {}
}
}
}
this.d227 = function(msg) {
clearTimeout(this.timerId);
this.d352 = false;
switch(msg.status) {
case "empty":
this.d399("no_messages_note");
break;
case "data":
this.data = msg.data;
this.d400 = msg.total;
this.d390();
break;
case "error":
this.d399("config_note");
break;
}
}
}
PopMail.prototype = new Widget();
function Gmail() {
this.init();
this.cfg = {
hasSettingsBtn: true,
title: "",
module: "Gmail"
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("gmail_inp_mcount"), className: "settings_label"},
{ tag: "select", id: "news_count", className: "settings_control",
options: [
{ value:"3", text: "3"},
{ value:"5", text: "5"},
{ value:"8", text: "8"},
{ value:"10", text: "10"},
{ value:"12", text: "12"},
{ value:"15", text: "15"},
{ value:"20", text: "20"}
]
},
{ tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "d356()"}, className: "settings_control"}
]
},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("gmail_inp_account"), className: "settings_label"},
{ tag: "input", id: "select_email", type: "text", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("gmail_inp_pwd"), className: "settings_label"},
{ tag: "input", id: "select_password", type: "password", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d296()"}} ]}
]
this.d284 = [
{ tag: "div", id: "messages_area",
display: false,
childs: [
{ tag: "div",
style: { padding: "0 0 0 30px", height: "24px", background: "url(widgets/gmail/ico.gif) no-repeat 0 0"},
childs: [
{ tag: "span", id: "mail_total" },
{ tag: "input", type: "checkbox",
style: { margin: "0 0 0 16px"},
events: {onclick: "d395()"}, id: "switcher"}
]},
{ tag: "div", id: "mail_list"}
]
},
{ tag: "div", id: "config_note",
style: { paddingLeft: "30px", background: "url(widgets/gmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("gmail_msg_not_configured")},
{ tag: "div", className: "menu_panel", id: "msg_no_new_mails", innerHTML: loc.text("gmail_msg_no_mails"), display: false}
]
this.d197["title"] = "";
this.d197["email"] = "";
this.d197["password"] = "";
this.d197["newsCount"] = "8";
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d200.news_count.value = this.d203.newsCount;
this.d200.select_email.value = this.d203.email;
this.d200.select_password.value = this.d203.password;
if(this.d203["email"] != "" && this.d203["password"] != "") {
this.d228("config_note");
}
}
this.d207 = function() {
if(trim(this.d203.title) == "") {
this.d203.title = loc.text("gmail_title");
}
this.d212(this.d203.title);
kernel.d235(this.id, 600*1000);
}
this.d226 = function() {
this.refresh();
}
this.d296 = function() {
this.d203.email = "" + trim(this.d200.select_email.value).split("@gmail.com")[0];
this.d203.password = trim(this.d200.select_password.value);
this.save();
this.d228("messages_area");
this.refresh();
}
this.d356 = function() {
this.d203.newsCount = this.d200.news_count.value;
this.save();
this.d390();
}
var d352 = false;
this.refresh = function() {
this.d228("msg_no_new_mails");
if(this.d203["email"] != "" && this.d203["password"] != "") {
if(!d352) {
d352 = true;
this.d212(loc.text("msg_loading"));
this.d228("config_note");
xmlRequest.send("https://mail.google.com/mail/feed/atom/", this, "d392", {login: this.d203.email, password: this.d203.password});
}
} else {
this.d229("config_note");
}
}
this.d392 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
var te = response.responseXML.documentElement.getElementsByTagName("TITLE");
if(!(te[0] && te[0].firstChild.nodeValue == "Unauthorized")) {
try {
this.data = XMLParser.xml2hash(response.responseXML.documentElement, "entry");
this.d393 = response.responseXML.documentElement.getElementsByTagName("fullcount")[0].firstChild.nodeValue;
if(this.data) {
this.d390();
return true;
}
} catch(e) {}
}
}
this.d394();
}
this.d394 = function() {
this.d212(this.d203.title);
this.d229("config_note");
this.d228("messages_area");
}
this.d395 = function() {
if(this.data.items) {
var count = Math.min(this.data.items.length, this.d203.newsCount);
for(var i=0; i<count; i++) {
if(this.d200.switcher.checked) {
this.d229("mail_content" + i);
} else {
this.d228("mail_content" + i);
}
}
}
}
this.d390 = function() {
this.d200.title.innerHTML = '';
this.d208(this.d200.title,
createButtonDom(this.d203.title, "d396()"));
if(this.data && this.data.items.length > 0) {
this.d228("msg_no_new_mails");
this.d228("config_note");
this.d229("messages_area");
this.d200.mail_list.innerHTML = '';
this.d200.mail_total.innerHTML = '<b>' + loc.text("gmail_msg_total", this.d393) + '</b>';
this.d200.switcher.checked = false;
var count = Math.min(this.data.items.length, this.d203.newsCount);
for(var i=0; i<count; i++) {
try {
if(this.data.items[i].author) {
var from = this.data.items[i].author["name"] ? this.data.items[i].author["name"] : this.data.items[i].author["email"];
} else {
var from = "[...]";
}
var subj = this.data.items[i].title ? this.data.items[i].title : "[...]";
var content = this.data.items[i].summary ? this.data.items[i].summary : "[...]";
this.d208(this.d200.mail_list,
{ tag: "div", className: "menu_panel",
childs: [
{ tag: "a", sysHref: this.data.items[i].link.href, target: "_blank",
innerHTML: "<b>" + from + "</b> - " + subj },
{ tag: "div", id: "mail_content"+i, className: "note", display: false,
innerHTML: content }
]
});
} catch(e) {}
}
} else {
this.d229("msg_no_new_mails");
}
}
this.d396 = function() {
window.open("http://mail.google.com/mail");
}
}
Gmail.prototype = new Widget();
function AolMail() {
this.init();
this.cfg = {
hasSettingsBtn: true,
title: "",
module: "AolMail"
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_mcount")},
{ tag: "select", id: "inp_count", className: "settings_control",
options: [
{ value:"3", text: "3"},
{ value:"5", text: "5"},
{ value:"8", text: "8"},
{ value:"10", text: "10"},
{ value:"12", text: "12"},
{ value:"15", text: "15"},
{ value:"20", text: "20"}
]
},
{ tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "setItemsCount()"}, className: "settings_control"}
]
},
{ tag: "div", className: "settings_section", align: "center",
innerHTML: "<b>"+ loc.text("popmail_asettings") + "</b>"},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_login")},
{ tag: "input", id: "select_login", type: "text", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_pwd")},
{ tag: "input", id: "select_password", type: "password", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d296()"}}
]}
]
this.d284 = [
{ tag: "div", className: "menu_panel", id: "messages", display: false,
childs: [
{ tag: "div", className: "menu_panel",
style: { paddingLeft: "30px", background: "url(widgets/aolmail/ico.gif) no-repeat 0 0"},
childs: [
{ tag: "b", html: loc.text("popmail_total") },
{ tag: "span", id: "total_messages"}
]},
{ tag: "div", id: "mail_list"}
]},
{ tag: "div", className: "menu_panel", id: "loading_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/aolmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("msg_loading")},
{ tag: "div", className: "menu_panel", id: "config_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/aolmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("popmail_msg_not_configured")},
{ tag: "div", className: "menu_panel", id: "no_messages_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/aolmail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("popmail_msg_no_mails")}
]
this.d197["login"] = "";
this.d197["password"] = "";
this.d197["title"] = "";
this.d197["mcount"] = "8";
var d352 = false;
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d200.select_login.value = this.d203.login;
this.d200.select_password.value = this.d203.password;
this.d200.inp_count.value = this.d203.mcount;
var t = this.d203.title != "" ? this.d203.title : loc.text("aolmail_title");
this.d212(t);
}
this.d207 = function() {
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.d398 = function() {
return this.d203.login == "" || this.d203.password == "";
}
this.d399 = function(section) {
var sections = ["config_note", "loading_note", "messages", "no_messages_note"];
for(var i = 0; i<sections.length; i++) {
if(section == sections[i]) {
showEl(this.d200[sections[i]]);
} else {
hideEl(this.d200[sections[i]]);
}
}
}
this.d296 = function() {
var l = trim(this.d200.select_login.value);
if(l.indexOf("@") != -1) {
l = l.substr(0, l.indexOf("@"));
this.d200.select_login.value = l;
}
var p = trim(this.d200.select_password.value);
if(this.d203.login != l || this.d203.password != p) {
this.d203.login = l;
this.d203.password = p;
this.save();
}
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.setItemsCount = function() {
var c = this.d200["inp_count"].value;
if(this.d203.mcount != c) {
this.d203.mcount = c;
this.save();
this.d390();
}
}
this.d226 = function() {
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.req = null;
this.timerId = null;
this.refresh = function() {
if(!this.d398() && !d352) {
d352 = true;
this.d399("loading_note");
var protocol = "/imap/ssl/novalidate-cert";
this.req = request.send({ login: this.d203.login,
password: this.d203.password,
protocol: protocol,
server: "imap.aol.com",
port: 993 }, this);
var self = this;
var f = function() {
updateLoadingIcon(-1);
self.req.onreadystatechange = function() {};
self.d352 = false;
self.d399("config_note");
}
this.timerId = setTimeout(f, 30000);
}
}
this.d390 = function() {
if(this.data) {
this.d399("messages");
this.d200.total_messages.innerHTML = "<B>" + this.d400 + "<B>";
this.d200.mail_list.innerHTML = '';
var cnt = Math.min(this.data.length, this.d203.mcount);
for(var i=0; i<cnt; i++) {
try {
this.d208(this.d200.mail_list,
{ tag: "div", className: "menu_panel",
innerHTML: "<B>" + this.data[i].from + "</B>",
childs: [
{ tag: "div", className: "note", innerHTML: this.data[i].subj }
]
});
} catch(e) {}
}
}
}
this.d227 = function(msg) {
clearTimeout(this.timerId);
d352 = false;
switch(msg.status) {
case "empty":
this.d399("no_messages_note");
break;
case "data":
this.data = msg.data;
this.d400 = msg.total;
this.d390();
break;
case "error":
this.d399("config_note");
break;
}
}
}
AolMail.prototype = new Widget();
function YahooMail() {
this.init();
this.cfg = {
hasSettingsBtn: true,
title: "",
module: "YahooMail"
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_mcount")},
{ tag: "select", id: "inp_count", className: "settings_control",
options: [
{ value:"3", text: "3"},
{ value:"5", text: "5"},
{ value:"8", text: "8"},
{ value:"10", text: "10"},
{ value:"12", text: "12"},
{ value:"15", text: "15"},
{ value:"20", text: "20"}
]
},
{ tag: "input", type: "button", value: loc.text("btn_set"), events: {onclick: "setItemsCount()"}, className: "settings_control"}
]
},
{ tag: "div", className: "settings_section", align: "center",
innerHTML: "<b>"+ loc.text("popmail_asettings") + "</b>"},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "a", sysHref: "http://help.yahoo.com/help/us/mail/pop/pop-40.html",
target: "_blank",
html: loc.text("yahoomail_info") }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_login")},
{ tag: "input", id: "select_login", type: "text", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label", innerHTML: loc.text("popmail_inp_pwd")},
{ tag: "input", id: "select_password", type: "password", size: "15", className: "settings_control"}
]},
{ tag: "div", className: "settings_section", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d296()"}}
]}
]
this.d284 = [
{ tag: "div", className: "menu_panel", id: "messages", display: false,
childs: [
{ tag: "div", className: "menu_panel",
style: { paddingLeft: "30px", background: "url(widgets/aolmail/ico.gif) no-repeat 0 0"},
childs: [
{ tag: "b", html: loc.text("popmail_total") },
{ tag: "span", id: "total_messages"}
]},
{ tag: "div", id: "mail_list"}
]},
{ tag: "div", className: "menu_panel", id: "loading_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/yahoomail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("msg_loading")},
{ tag: "div", className: "menu_panel", id: "config_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/yahoomail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("popmail_msg_not_configured")},
{ tag: "div", className: "menu_panel", id: "no_messages_note", display: false,
style: { paddingLeft: "30px", background: "url(widgets/yahoomail/ico.gif) no-repeat 0 0"},
innerHTML: loc.text("popmail_msg_no_mails")}
]
this.d197["login"] = "";
this.d197["password"] = "";
this.d197["title"] = "";
this.d197["mcount"] = "8";
var d352 = false;
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d200.select_login.value = this.d203.login;
this.d200.select_password.value = this.d203.password;
this.d200.inp_count.value = this.d203.mcount;
var t = this.d203.title != "" ? this.d203.title : loc.text("yahoomail_title");
this.d212(t);
}
this.d207 = function() {
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.d398 = function() {
return this.d203.login == "" || this.d203.password == "";
}
this.d399 = function(section) {
var sections = ["config_note", "loading_note", "messages", "no_messages_note"];
for(var i = 0; i<sections.length; i++) {
if(section == sections[i]) {
showEl(this.d200[sections[i]]);
} else {
hideEl(this.d200[sections[i]]);
}
}
}
this.d296 = function() {
var l = trim(this.d200.select_login.value);
if(l.indexOf("@") != -1) {
l = l.substr(0, l.indexOf("@"));
this.d200.select_login.value = l;
}
var p = trim(this.d200.select_password.value);
if(this.d203.login != l || this.d203.password != p) {
this.d203.login = l;
this.d203.password = p;
this.save();
}
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.setItemsCount = function() {
var c = this.d200["inp_count"].value;
if(this.d203.mcount != c) {
this.d203.mcount = c;
this.save();
this.d390();
}
}
this.d226 = function() {
if(this.d398()) {
this.d399("config_note");
} else {
this.refresh();
}
}
this.req = null;
this.timerId = null;
this.refresh = function() {
if(!this.d398() && !d352) {
d352 = true;
this.d399("loading_note");
var protocol = "/pop3/ssl/novalidate-cert";
this.req = request.send({ login: this.d203.login,
password: this.d203.password,
protocol: protocol,
server: "pop.mail.yahoo.com",
port: 995 }, this);
var self = this;
var f = function() {
updateLoadingIcon(-1);
self.req.onreadystatechange = function() {};
self.d352 = false;
self.d399("config_note");
}
this.timerId = setTimeout(f, 30000);
}
}
this.d390 = function() {
if(this.data) {
this.d399("messages");
this.d200.total_messages.innerHTML = "<B>" + this.d400 + "<B>";
this.d200.mail_list.innerHTML = '';
var cnt = Math.min(this.data.length, this.d203.mcount);
for(var i=0; i<cnt; i++) {
try {
this.d208(this.d200.mail_list,
{ tag: "div", className: "menu_panel",
innerHTML: "<B>" + this.data[i].from + "</B>",
childs: [
{ tag: "div", className: "note", innerHTML: this.data[i].subj }
]
});
} catch(e) {}
}
}
}
this.d227 = function(msg) {
clearTimeout(this.timerId);
d352 = false;
switch(msg.status) {
case "empty":
this.d399("no_messages_note");
break;
case "data":
this.data = msg.data;
this.d400 = msg.total;
this.d390();
break;
case "error":
this.d399("config_note");
break;
}
}
}
YahooMail.prototype = new Widget();
function Bookmarks() {
this.init();
this.cfg = {
hasRefreshBtn: false,
title: loc.text("bookmarks_title"),
module: "Bookmarks",
saveMethod: "POST"
}
this.d350 = [
{ tag: "div", className: "bevel_section", innerHTML: loc.text("bookmarks_import"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_import')"}
},
{ tag: "div", className: "menu_panel", id: "section_import", display: false, align: "center",
innerHTML: "<iframe name='upload_frame' style='width: 0px; height: 0px; border: 0px'></iframe>",
childs: [
{ tag: "form", method: "post", enctype: "multipart/form-data", action:"bookmarks.php",
target: "upload_frame",
id: "upload_form",
style: {padding: "0px", margin: "0px"},
childs: [
{ tag: "input", type: "hidden", name: "MAX_FILE_SIZE", value:"500000"},
{ tag: "input", type: "hidden", id: "form_wid", name: "wid"},
{ tag: "input", type: "hidden", id: "form_user_id", name: "user_id"},
{ tag: "input", type: "file", name:"user_file", id: "user_file"},
{ tag: "input", type: "button", value: loc.text("bookmarks_btn_import"), id: "upload_submit_btn", events: {onclick: "d404()"}}
]},
{ tag: "div", id: "import_msg", style: {width: "100%", display: "block"}, display: false}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("bookmarks_sec_delete"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_delete')"}
},
{ tag: "div", className: "menu_panel", id: "section_delete", display: false, align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("bookmarks_btn_delete_all"), events: {onclick: "d416()"}}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("bookmarks_sec_add"), id: "add_bookmark",
style: {cursor: "pointer"},
events: {onclick: "d382('section_add')"}
},
{ tag: "div", className: "menu_panel", id: "section_add", display: false,
childs: [
{ tag: "div", className: "menu_panel", innerHTML: loc.text("bookmarks_inp_title"),
childs: [
{ tag: "input", type: "text", size: "30", id: "select_title"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("bookmarks_inp_url"),
childs: [
{ tag: "input", type: "text", size: "30", id: "select_url"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("bookmarks_inp_tags"),
childs: [
{ tag: "input", type: "text", size: "30", id: "select_tags"}
]
},
{ tag: "div", className: "menu_panel", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d417()"}}
]
}
]
}
];
this.d284 = [
{ tag: "div", className: "bevel_section", innerHTML: loc.text("bookmarks_sec_edit"), id: "edit_bookmark", display: false,
style: {cursor: "pointer"},
events: {onclick: "d382('section_edit')"}
},
{ tag: "div", className: "menu_panel", id: "section_edit", display: false,
childs: [
{ tag: "div", className: "menu_panel", innerHTML: loc.text("bookmarks_inp_title"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_title"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("bookmarks_inp_url"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_url"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("bookmarks_inp_tags"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_tags"}
]
},
{ tag: "div", className: "menu_panel", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d414()"}}
]
}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("bookmark_sec_tags"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_tags')"}},
{ tag: "div", className: "menu_panel", id: "section_tags", display: false, align: "left"},
{ tag: "hr", width: "100%"},
{ tag: "div", className: "menu_panel", id: "bookmarks", align: "left"}
]
this.d197["title"] = loc.text("bookmarks_title");
this.d197["tags"] = ['default'];
this.d197["bookmarks"] = [];
this.d401 = 0;
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d402(0);
this.d200.form_wid.value = this.id;
this.d200.form_user_id.value = auth.user.id;
}
this.d215Settings = function() {
this.d403();
}
this.d221 = function() {
this.d203.title = trim(this.d200.input_title.value);
this.d212(this.d203.title + ": "+ this.d203.tags[this.d401]);
this.save();
}
this.d382 = function(sid) {
if(this.d200[sid].style.display == 'none') {
showEl(this.d200[sid]);
} else {
hideEl(this.d200[sid]);
}
}
// importing
this.d404 = function() {
if(trim(this.d200.user_file.value)!="") {
showEl(this.d200.import_msg);
this.d200.import_msg.innerHTML = loc.text("bookmarks_msg_import");
hideEl(this.d200.upload_submit_btn);
this.d200.upload_form.submit();
}
}
this.d405 = function() {
showEl(this.d200.upload_submit_btn);
this.d200.import_msg.innerHTML = loc.text("bookmarks_msg_import_error");
}
this.d406 = function(file) {
if(file) {
xmlRequest.send("var/tmp/"+file, this, "d408");
this.d407 = file;
} else {
showEl(this.d200.upload_submit_btn);
this.d200.import_msg.innerHTML = loc.text("bookmarks_msg_import_error");
}
}
this.d408 = function(response) {
showEl(this.d200.upload_submit_btn);
if(response.responseText) {
var tmp = document.createElement("span");
tmp.innerHTML = response.responseText.replace(/\<p\>/g, '').replace(/\r\n/g, '').replace(/>\s*</g, '><').replace(/<DT>/g, "").replace(/<DD>/g, '');
var data = XMLParser.d408(tmp);
for(var i=0; i<data.length; i++) {
this.d409(data[i].title, data[i].url, data[i].tags);
}
this.d410();
showEl(this.d200.section_tags);
this.d402(this.d401);
this.save();
if(this.d407) {
request.send({act: "delete", file: this.d407}, this);
}
hideEl(this.d200.import_msg);
hideEl(this.d200.section_import);
this.d216();
return;
}
this.d200.import_msg.innerHTML = loc.text("bookmarks_msg_import_error");
}
this.d411 = null;
this.d403 = function() {
if(this.d411 != null) {
hideEl(this.d200.section_edit);
hideEl(this.d200.edit_bookmark);
this.d412 = null;
}
}
this.d413 = function(id) {
this.d411 = id;
var tags = [];
for(var i = 0; i < this.d203.bookmarks[id].tags.length; i++) {
tags.push(this.d203.tags[this.d203.bookmarks[id].tags[i]])
}
this.d200.edit_title.value = this.d203.bookmarks[id].title;
this.d200.edit_url.value = this.d203.bookmarks[id].url;
this.d200.edit_tags.value = tags.join(", ");
showEl(this.d200.section_edit);
showEl(this.d200.edit_bookmark);
hideEl(this.d200.settings);
}
this.d414 = function() {
if(this.d411 != null) {
var title = trim(this.d200.edit_title.value);
var url = trim(this.d200.edit_url.value);
if(title != "" && url != "") {
this.d415(this.d411, title, url, trim(this.d200.edit_tags.value));
this.d402(this.d401);
this.save();
}
}
this.d403();
}
this.d416 = function() {
this.d203.bookmarks = this.d197["bookmarks"];
this.d203.tags = this.d197["tags"];
this.d402(0);
}
this.d417 = function() {
var title = trim(this.d200.select_title.value);
var url = trim(this.d200.select_url.value);
if(title != "" && url != "") {
this.d403();
this.d409(title, url, trim(this.d200.select_tags.value));
this.save();
this.d402(this.d401);
this.d200.select_title.value = '';
this.d200.select_url.value = '';
this.d200.select_tags.value = '';
}
}
this.d410 = function() {
this.d200.section_tags.innerHTML = '';
for(var t=0; t<this.d203.tags.length; t++) {
if(this.d203.tags[t] != undefined) {
if(this.d401 != t) {
this.d208(this.d200.section_tags,
{ tag: "a",
href: "void", events: { onclick: "d402("+t+")"},
innerHTML: this.d203.tags[t],
style: { margin: "4px"}
});
} else {
this.d208(this.d200.section_tags,
{ tag: "span", innerHTML: this.d203.tags[t],
style: { margin: "4px"}
});
}
}
}
}
this.d402 = function(tagId) {
this.d403();
this.d401 = tagId;
this.d212(this.d203.title + ": "+ this.d203.tags[tagId]);
var list = this.d418(tagId);
this.d200.bookmarks.innerHTML = '';
for(var i = 0; i<list.length; i++) {
var itemDom = { tag: "div", className: "menu_panel", id: "item"+list[i],
childs: [
createTableDom([ {content: {tag: "a", id: "item_title"+list[i], sysHref: this.d203.bookmarks[list[i]].url, target: "_blank", innerHTML: this.d203.bookmarks[list[i]].title}, width: "95%"},
{content: createButtonDom(false, "d413("+list[i]+")", "static/client/edit.gif"), width: "1%"},
{content: createButtonDom(false, "d327("+list[i]+")", "static/client/delete_link.gif"), width: "1%"}
], "95%")
]
}
this.d208(this.d200.bookmarks, itemDom);
}
this.d410();
}
this.d327 = function(id) {
if(confirm(loc.text("bookmarks_delete_prompt", this.d203.bookmarks[id].title))) {
this.d403();
this.d419(id);
if(this.d203.tags[this.d401]) {
this.d402(this.d401);
} else {
this.d402(0);
}
this.save();
}
}
this.d415 = function(id, title, url, tags) {
this.d419(id);
this.d409(title, url, tags);
}
this.d409 = function(title, url, tagsData) {
var newBookmark = { title: title,
url: url,
tags: [] };
if(typeof(tagsData) == "string") {
var tags = tagsData!= "" ? tagsData.split(",") : false;
} else {
var tags = tagsData;
}
if(tags) {
for(var i = 0; i<tags.length; i++) {
tags[i] = trim(tags[i]);
var tn = arraySearch(tags[i], this.d203.tags)
if(tn != undefined) {
newBookmark.tags.push(tn);
} else {
var idx = arrayFirstFree(this.d203.tags);
this.d203.tags[idx] = tags[i];
newBookmark.tags.push(idx);
}
}
} else {
newBookmark.tags = [0];
}
this.d401 = newBookmark.tags[0];
this.d203.bookmarks[arrayFirstFree(this.d203.bookmarks)] = newBookmark;
}
this.d419 = function(id) {
var tags = this.d203.bookmarks[id].tags;
for(var i=0; i<tags.length; i++) {
if(tags[i] != 0) {
var count = 0;
for(var j=0; j<this.d203.bookmarks.length; j++) {
if(this.d203.bookmarks[j] && arraySearch(tags[i], this.d203.bookmarks[j].tags) != undefined) {
count++;
}
}
if(count<2) {
this.d203.tags[tags[i]] = undefined;
}
}
}
this.d203.bookmarks[id] = undefined;
}
this.d418 = function(tagId) {
var res = [];
for(var i=0; i<this.d203.bookmarks.length; i++) {
if(this.d203.bookmarks[i] &&
this.d203.bookmarks[i].tags != undefined &&
arraySearch(tagId, this.d203.bookmarks[i].tags) != undefined) {
res.push(i);
}
}
return res;
}
}
Bookmarks.prototype = new Widget();
function ToDoList() {
this.init();
this.cfg = {
hasRefreshBtn: false,
title_prefix: loc.text("todolist_title_prefix"),
title: "",
module: "ToDoList"
}
this.d197["items"] = [];
this.d197["title"] = "";
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("todolist_inp_todo"), className: "settings_label"},
{tag: "input", id: "todo_title", type: "text", size: "15", className: "settings_control"},
{tag: "input", type: "button", value: " Add ", events: {onclick: "d422()"}, className: "settings_control"}
]}
]
this.d284 = { tag: "table", className: "sys_table", id: "items_table",
width: "100%",
childs: [] }
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d420();
}
this.d207 = function() {
this.d212(this.d203.title);
}
this.d212 = function(html) {
this.d200.title.innerHTML = this.cfg.title_prefix + html;
}
this.d420 = function() {
this.d200.content.innerHTML = "";
this.d208(this.d200.content, this.d284);
for(var i=0; i<this.d203.items.length; i++) {
this.d421(i);
}
}
this.d421 = function(n) {
this.d208(this.d200.items_table_tbody,
{ tag: "tr", id: "item"+n,
childs: [
{ tag: "td", width: "1%",
childs: [
{ tag: "input", id: "item_checkbox"+n, type: "checkbox", events: {onclick: "d423("+n+")"}, checked: this.d203.items[n].completed}
]},
{ tag: "td", width: "95%",
childs: [
{ tag: "div",
style: {textDecoration: this.d203.items[n].completed ? "line-through" : "", overflow: "hidden"},
id: "item_title"+n, innerHTML: this.d203.items[n].title.wordWrap(10) }
]},
{ tag: "td", width: "1%",
childs: [ createButtonDom(false, "d424("+n+")", "static/client/move_up.gif") ]},
{ tag: "td", width: "1%",
childs: [ createButtonDom(false, "d426("+n+")", "static/client/move_down.gif") ]},
{ tag: "td", width: "1%",
childs: [ createButtonDom(false, "d427("+n+")", "static/client/edit.gif") ]},
{ tag: "td", width: "1%",
childs: [ createButtonDom(false, "d327("+n+")", "static/client/delete_link.gif") ]}
]
});
}
this.d422 = function() {
var title = trim(this.d200.todo_title.value);
if(!title) {
return;
}
var newId = this.d203.items.length;
var newItem = {title: title, completed: false};
this.d203.items[newId] = newItem;
this.d421(newId);
this.save();
this.d200.todo_title.value = '';
}
this.d423 = function(id) {
this.d203.items[id].completed = !this.d203.items[id].completed;
this.d200['item_title'+id].style.textDecoration = this.d203.items[id].completed ? "line-through" : "" ;
this.save();
}
this.d424 = function(id) {
if(id > 0) {
this.d425(id, id-1);
this.d420();
this.save();
}
}
this.d426 = function(id) {
if(id < this.d203.items.length - 1) {
this.d425(id, id+1);
this.d420();
this.save();
}
}
this.d427 = function(id) {
var res = trim(prompt(loc.text("todolist_todo_edit"), this.d203.items[id].title));
if(res) {
this.d203.items[id].title = res;
this.d200['item_title'+id].innerHTML = res.wordWrap(10);
}
this.save();
}
this.d327 = function(id) {
if(confirm(  loc.text("todolist_delete_confirm", this.d203.items[id].title)  )) {
var tmp = [];
for(var i=0; i<this.d203.items.length; i++) {
if(i != id) {
tmp.push(this.d203.items[i]);
}
}
this.d203.items = tmp;
tmp = null;
this.d420();
this.save();
}
}
this.d425 = function(a,b) {
var tmp = this.d203.items[a];
this.d203.items[a] = this.d203.items[b];
this.d203.items[b] = tmp;
}
}
ToDoList.prototype = new Widget();
function Webnote() {
this.init();
this.cfg = {
hasRefreshBtn: false,
title: loc.text("webnote_title"),
module: "Webnote"
}
this.d197["title"] = this.cfg.title;
this.d197["text"] = loc.text("webnote_text");
this.d428 = [
{ tag: "div", id: "text_show",
className: "webnote_text"},
{ tag: "textarea", id: "text_edit",
display: false,
className: "webnote_textarea",
events: {onclick: "d346()", onblur: "d345()"}}
]
this.d209 = function() {
this.d208(this.d200.content, this.d428);
var text_show = this.d200.text_show;
var text_edit = this.d200.text_edit;
var widget = this;
this.d200.text_show["onclick"] = function() { widget.d429(widget, text_show, text_edit); };
var t = this.d203.text.jsUnescape();
this.d200.text_show.innerHTML = text2html(t).parseUrl();
this.d200.text_edit.value = t;
this.d212(this.d203.title);
}
this.d429 = function(widget, text_show, text_edit) {
var h = text_show.offsetHeight;
hideEl(text_show);
showEl(text_edit);
text_edit.style.height = (h+16)+"px";
text_edit.focus();
text_edit.onkeyup = function() {
text_show.innerHTML = text2html(this.value);
showEl(text_show);
this.style.height = (text_show.offsetHeight+16) + "px";
hideEl(text_show);
}
text_edit.onblur = function() {
text = this.value.replace(/\\/g, "");
this.onblur = null;
hideEl(this);
htmlText = text2html(text);
text_show.innerHTML = htmlText.jsUnescape().parseUrl();
text_show.style.display = "block";
text_show.onclick =  function() { widget.d429(widget, text_show, text_edit); };
widget.d203.text = text.jsEscape();
widget.save();
}
}
this.d345 = function() {}
this.d346 = function() {}
}
Webnote.prototype = new Widget();
function Flash() {
this.init();
this.cfg = {
hasRefreshBtn: false,
hasSettingsBtn: false,
itemsDir: 'var/flash/',
title: loc.text("flash_title"),
module: "Flash"
}
this.flash_catalog = [];
this.d284 = [
{ tag: "div", className: "menu_panel", id: "controls", display: false,
childs: [
createTableDom([{content: createButtonDom(loc.text("flash_open"), "d432()", "widgets/flash/img/full_screen.gif"), width: "70%"},
{content: createButtonDom(loc.text("flash_stop"), "d433()", "widgets/flash/img/stop.gif"), width: "30%"}]),
]
},
{ tag: "div", style: {padding: "0px", margin: "0px"}, id: "flash_content",
childs: [
{ tag: "div", id: "flash_container", style: {width: "100%", height: "100%"} }
]
},
{ tag: "div", className: "menu_panel", id: "flash_cat_content0", display: false }
];
this.d197["file"] = "";
this.d197["title"] = loc.text("flash_title");
this.d209 = function() {
this.d208(this.d200.content, this.d284);
this.d430(0);
this.d212(this.d203.title);
if(this.d203.file != "") {
this.d431();
}
}
this.d432 = function() {
flashPlayer.d380(this.id);
}
this.d433 = function() {
this.d200.flash_container.innerHTML = '';
hideEl(this.d200.flash_content);
hideEl(this.d200.controls);
this.d203.title = this.cfg.title;
this.d203.file = "";
this.d212(this.d203.title);
this.save();
}
this.d430 = function(catId) {
var el = this.d200["flash_cat_content"+catId];
if(el.style.display == 'none') {
if(this.flash_catalog[catId]) {
if(this.flash_catalog[catId].rendered) {
el.style.display = 'block';
} else {
this.d434(catId);
}
} else {
el.innerHTML = loc.text("msg_loading");
el.style.display = 'block';
request.send({act: "get_flash_category", cat_id: catId}, this);
}
if(catId != "0") {
this.d200["fico_" + catId].setAttribute("src", menu.folder_o.src);
}
} else {
if(catId != "0") {
this.d200["fico_" + catId].setAttribute("src", menu.folder_s.src);
}
el.style.display = 'none';
}
}
this.d434 = function(catId, silent) {
el = this.d200["flash_cat_content"+catId];
el.innerHTML = '';
with(this.flash_catalog[catId]) {
if(categories) {
for(var i in categories) {
this.d208(el,
{ tag: "div", className: "menu_panel", id: "flash_cat"+categories[i].id,
childs: [
createButtonDom(categories[i].name,
"d430("+categories[i].id+")",
menu.folder_s.src,
null,
"fico_" + categories[i].id),
{ tag: "div", id: "flash_cat_content"+categories[i].id, className: "menu_sub_panel", display: false }
]
});
}
}
if(items) {
for(var i in items) {
this.d208(el,
{ tag: "div", className: "menu_panel", id: "flash_cat_item"+items[i].id,
childs: [
createButtonDom(items[i].title,
"d380('"+items[i].file+"', '"+items[i].title.addSlashes()+"')",
"widgets/flash/img/item.gif",
"flash_cat_item"+items[i].id)
]
});
}
}
if(!items  &&  !categories) {
el.innerHTML = loc.text("msg_empty");
}
rendered = true;
}
if(!silent) {
el.style.display = 'block';
}
this.flash_catalog[catId].rendered = true;
}
this.d380 = function(file, title) {
this.d203.title = title;
this.d203.file = file;
this.d431(file, title);
this.save();
}
this.d431 = function() {
if(this.d203.file) {
showEl(this.d200.controls);
this.d212(this.d203.title);
showEl(this.d200.flash_content);
this.d200.flash_content.style.height = "200px";
this.d200.flash_container.style.height = "100%";
this.d200.flash_container.align = "center";
this.d200.flash_container.innerHTML = '';
var h = (mozilla_nav ? "90%" : "100%");
this.d200.flash_container.innerHTML =
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
'        codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" '+
'        height='+h+' width=100%>'+
'<param name=movie '+
'       value="'+this.cfg.itemsDir+this.d203.file+'">'+
'<param name=quality value=high>'+
'<param name=bgcolor value=#ffffff>'+
'<embed src="'+this.cfg.itemsDir+this.d203.file+'" '+
'       quality=high bgcolor=#FFFFFF '+
'       height='+h+' width=100%'+
'       type="application/x-shockwave-flash" '+
'       pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>'+
'</object>';
}
}
this.d227 = function(msg) {
switch (msg.status) {
case "flash_category_data":
this.flash_catalog[msg.cat_id] = { categories: msg.categories, items: msg.items};
this.d434(msg.cat_id);
break;
}
}
}
Flash.prototype = new Widget();
function Flickr() {
this.init();
this.cfg = {
title: loc.text("flickr_title_postfix"),
module: "Flickr"
}
this.d197["tags"] = "";
this.d197["layout"] = "s"; // s|t
this.d197["target"] = "s"; // s|f
this.d435 = "http://www.flickr.com/services/feeds/photos_public.gne?format=rss_200";
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("flickr_inp_tags"), className: "settings_label"},
{ tag: "input", type: "text", size: "15", id: "selectTags", className: "settings_control"},
{ tag: "input", type: "button", events: {onclick: "d439()"}, value: " Set ", className: "settings_control"},
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("flickr_inp_layout"), className: "settings_label"},
{ tag: "select", id: "selectLayout", events: {onclick: "d436()"}, className: "settings_control",
options: [
{ value:"s", text: loc.text("flickr_slides")},
{ value:"t", text: loc.text("flickr_thumbs")}
]
}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("flickr_open_to"), className: "settings_label"},
{ tag: "select", id: "selectTarget", events: {onclick: "d438()"}, className: "settings_control",
options: [
{ value:"s", text: loc.text("flickr_to_site")},
{ value:"f", text: loc.text("flickr_to_full")}
]
}
]}
]
this.d284 = [ { tag: "div", className: "menu_panel", id: "head", display: false,
style: { textAlign: "center"},
childs: [
createButtonDom(false, "d443()", "widgets/flickr/img/previous.gif"),
{ tag: "span", innerHTML: "&nbsp;"},
createButtonDom(false, "d444()", "widgets/flickr/img/next.gif")
]
},
{ tag: "div", className: "menu_panel", id: "view_big", style: {textAlign: "center"}, display: false,
childs: [
{ tag: "a", href: "void", events: {onclick: "d445()"},
childs: [
{ tag: "img", id: "big_photo" }
]}
]},
{ tag: "div", className: "menu_panel", id: "view_thumbs", style: {textAlign: "center"}, display: false }];
this.d209 = function() {
this.d200["settings"].innerHTML = "";
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d200.selectTags.value = this.d203.tags;
this.d200.selectLayout.value = this.d203.layout;
this.d200.selectTarget.value = this.d203.target;
}
this.d436 = function() {
this.d203.layout = this.d200.selectLayout.value;
this.save();
this.d437();
}
this.d438 = function() {
this.d203.target = this.d200.selectTarget.value;
this.save();
}
this.d439 = function() {
var tags = trim(this.d200.selectTags.value);
if(tags != "") {
this.d203.tags = tags;
this.save();
this.refresh();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
this.d212(loc.text("msg_loading"));
xmlRequest.send(this.d435 + (this.d203.tags=="" ? "" :  "&tags="+escape(this.d203.tags)), this, "d447");
}
this.d437 = function() {
if(this.data) {
if(this.d203.layout == "s") {
if(this.data.items.length > 1) {
showEl(this.d200.head);
} else {
hideEl(this.d200.head);
}
this.d440 = 0;
this.d441(this.d440);
} else {
this.d279Photos();
}
}
}
/// photo rotate
this.d440 = 0;
this.d443 = function() {
this.d440--;
if(this.d440<0) {
this.d440 = this.data.items.length-1;
}
this.d441(this.d440);
}
this.d444 = function() {
this.d440++;
if(this.d440 >= this.data.items.length) {
this.d440 = 0;
}
this.d441(this.d440);
}
// show photos
this.d441 = function(n) {
hideEl(this.d200.view_thumbs);
showEl(this.d200.view_big);
var src = this.data.items[n]["media:thumbnail"]["url"];
src = src.substr(0, src.length-5) + 'm.jpg';
if(ie_nav) {
preloadImg(this.d200.big_photo, src);
} else {
this.d200.big_photo.src = src;
}
showEl(this.d200.head);
}
this.d279Photos = function() {
showEl(this.d200.view_thumbs);
hideEl(this.d200.view_big);
hideEl(this.d200.head);
var photosDom = [];
for(var i=0; i<this.data.items.length; i++) {
photosDom[photosDom.length] = { tag: "a", href: "void", events: {onclick: "d446("+i+")"},
innerHTML: "<img width=75 src='"+this.data.items[i]["media:thumbnail"].url+"'> "};
}
this.d200.view_thumbs.innerHTML = '';
this.d208(this.d200.view_thumbs, photosDom);
}
this.d445 = function() {
this.d446(this.d440);
}
this.d446 = function(n) {
open((this.d203.target == "s") ? this.data.items[n].link : this.data.items[n]["media:content"].url);
}
this.d447 = function(response) {
if(response.responseXML.documentElement) {
this.data = XMLParser.xml2hash(response.responseXML.documentElement);
if(this.data) {
this.d212(this.data.title);
this.d437();
}
}
}
}
Flickr.prototype = new Widget();
function FoxVideo() {
this.init();
this.cfg = {
title: "",
module: "FoxVideo"
};
this.channels = [
{text:"Top News", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=Top%20News&title=Fox%20Sports%20video%20-%20Top%20news&p=33"},
{text:"Most Watched", value:"http://rss.video.msn.com/s/us/rss.aspx?t=hotVideo&c=topsports&title=%20MSN%20Video%20-%20sports&p=05"},
{text:"MLB", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=Baseball%20News&title=Fox%20Sports%20video%20-%20Baseball%20News&p=33"},
{text:"NFL", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=NFL%20News&title=Fox%20Sports%20video%20-%20NFL%20news&p=33"},
{text:"NCAA FB", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=College%20FB%20News&title=Fox%20Sports%20video%20-%20College%20FB%20News&p=33"},
{text:"NBA", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=NBA%20News&title=Fox%20Sports%20video%20-%20NBA%20news&p=33"},
{text:"NHL", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=Hockey%20News&title=Fox%20Sports%20video%20-%20Hockey%20news&p=33"},
{text:"NCAA BK", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=College%20BK%20News&title=Fox%20Sports%20video%20-%20College%20BK%20News&p=33"},
{text:"NASCAR", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=More%20Fox%20Sports&title=Fox%20Sports%20video%20-%20More%20Fox%20Sports%25&p=33"},
{text:"GOLF", value:"http://rss.video.msn.com/s/us/rss.aspx?t=Fox%20Sports&c=More%20Fox%20Sports&title=Fox%20Sports%20video%20-%20More%20Fox%20Sports%25&p=33"}
];
this.d197["title"] = "";
this.d197["channel"] = "0";
this.d197["count"] = "6";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 25;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("foxvideo_inp_channel"), className: "settings_label"},
{ tag: "select", id: "inp_channel", events: {onchange: "d448()"}, className: "settings_control",
options: this.channels }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("foxvideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_channel"].selectedIndex = this.d203.channel;
this.d200["inp_count"].value = this.d203.count;
}
this.d448 = function() {
if(d352) {
this.d200["inp_channel"].selectedIndex = this.d203.channel;
} else {
var c = this.d200["inp_channel"].selectedIndex;
if(c != this.d203.channel) {
this.d203.channel = this.d200["inp_channel"].selectedIndex;
this.save();
req = null;
d352 = false;
this.refresh();
}
}
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!d352) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channels[this.d203.channel].value, this, "d451");
d352 = true;
}
}
this.d451 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
content = XMLParser.xml2hash(response.responseXML.documentElement);
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(content.title);
}
var l = Math.min(content.items.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 ? "background: #F0F0F0;" : "";
var lnk = content.items[i]["link"];
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;'><a href='"+lnk+"' target=_blank><img style='border: 0' src='"+ content.items[i].enclosure.url +"'/></a></td>"+
"<td style='padding: 4px;'><a href='"+lnk+"' target=_blank><b>"+content.items[i].title+"</b></a>"+
"<p>" +content.items[i].description + "</td>" +
"</tr>";
}
this.d200["content"].innerHTML = "<table class='plan_table'>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
FoxVideo.prototype = new Widget();
function AolVideo() {
this.init();
this.cfg = {
title: "",
module: "AolVideo"
};
this.channel = "http://spinner.aol.com/musicsessions/sessions_archive.adp";
this.d197["title"] = "";
this.d197["count"] = "6";
var loading = false;
var req = null;
var content = null;
var itemsCount = 25;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("aolvideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_count"].value = this.d203.count;
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!loading) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channel, this, "d451");
loading = true;
}
}
this.d451 = function(response) {
loading = false;
if(response.responseXML && response.responseXML.documentElement) {
try {
var doc = response.responseXML.documentElement;
var items = doc.getElementsByTagName("session");
content = [];
var last = items.length - Math.min(itemsCount, items.length);
if(last <0) {
last = 0;
}
for(var i=items.length-1; i>last; i--) {
if(!items[i].getElementsByTagName("artistThumb")[0].firstChild) {
if(last > 0) last--;
} else {
content.push({
id: items[i].getAttribute("id"),
name: items[i].getElementsByTagName("artistName")[0].firstChild.nodeValue,
thumb: items[i].getElementsByTagName("artistThumb")[0].firstChild.nodeValue
});
}
}
} catch(e) {
content = null;
}
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(loc.text("aolvideo_title"));
}
var l = Math.min(content.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 ? "background: #F0F0F0;" : "";
var lnk = "http://music.aol.com/videos/sessions/sessions_flash.adp?ncid=AOLMUS00050000000052&defaultShow=" + content[i].id;
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;' width=10%><a href='"+lnk+"' target=_blank><img style='border: 0' src='"+ content[i].thumb +"'/></a></td>"+
"<td style='padding: 4px;' valign=top>" + content[i].name + "<br>" + loc.text("aolvideo_session") + content[i].id + "<br>" +
"<a href='"+lnk+"' target=_blank>"+
"<img src='widgets/aolvideo/cam.gif' style='margin-right: 4px; height: 8px; border: 0; vertical-align: middle;'>"+
"<b>"+loc.text("aolvideo_lnk_watch")+"</b></a>"+"</td>" +
"</tr>";
}
this.d200["content"].innerHTML = "<table class='plan_table' width=99%>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
AolVideo.prototype = new Widget();
function GoogleVideo() {
this.init();
this.cfg = {
title: "",
module: "GoogleVideo"
};
this.channels = [
{text:"Popular", value:"http://video.google.com/videofeed?type=top100new&num=10"},
{text:"Featured", value:"http://video.google.com/videofeed?type=search&q=is:forsale&so=1&num=10"},
{text:"Comedy", value:"http://video.google.com/videofeed?type=search&q=genre:comedy&so=1&num=10"},
{text:"Music", value:"http://video.google.com/videofeed?type=search&q=type:music_video&so=1&num=10"},
{text:"TV Shows", value:"http://video.google.com/videofeed?type=search&q=type:tvshow&so=1&num=10"},
{text:"Sports", value:"http://video.google.com/videofeed?type=search&q=type:sports%20OR%20genre:sports&so=1&num=10"},
{text:"Education", value:"http://video.google.com/videofeed?type=search&q=genre:educational&so=1&num=10"}
];
this.d197["title"] = "";
this.d197["channel"] = "0";
this.d197["count"] = "6";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 10;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_channel"), className: "settings_label"},
{ tag: "select", id: "inp_channel", events: {onchange: "d448()"}, className: "settings_control",
options: this.channels }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_channel"].selectedIndex = this.d203.channel;
this.d200["inp_count"].value = this.d203.count;
}
this.d448 = function() {
if(d352) {
this.d200["inp_channel"].selectedIndex = this.d203.channel;
} else {
var c = this.d200["inp_channel"].selectedIndex;
if(c != this.d203.channel) {
this.d203.channel = this.d200["inp_channel"].selectedIndex;
this.save();
req = null;
d352 = false;
this.refresh();
}
}
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!d352) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channels[this.d203.channel].value, this, "d451");
d352 = true;
}
}
this.d451 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
content = XMLParser.xml2hash(response.responseXML.documentElement);
//            varpw(content);
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(content.title);
}
var l = Math.min(content.items.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 == "1" ? "background: #F0F0F0;" : "";
var lnk = content.items[i]["link"];
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;'><a href='"+lnk+"' target=_blank><img border=0 width=80 src='"+ content.items[i]["media:group"]["media:thumbnail"].url +"'/></a></td>"+
"<td valign=top style='padding: 4px;'><a href='"+lnk+"' target=_blank><b>"+content.items[i]["media:group"]["media:title"]+"</b></a>"+
"<p>" +content.items[i]["media:group"]["media:description"] + "</td>" +
"</tr>";
}
this.d200["content"].innerHTML = "<table class='plan_table'>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
GoogleVideo.prototype = new Widget();
function YoutubeVideo() {
this.init();
this.cfg = {
title: "",
module: "YoutubeVideo"
};
this.channels = [
{text:"- Video -", value: "", isBold: true},
{text:"Recently Added", value: "http://youtube.com/rss/global/recently_added.rss"},
{text:"Recently Featured", value: "http://youtube.com/rss/global/recently_featured.rss"},
{text:"Top Favorites", value: "http://youtube.com/rss/global/top_favorites.rss"},
{text:"Top Rated", value: "http://youtube.com/rss/global/top_rated.rss"},
{text:"- Most Viewed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/top_viewed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/top_viewed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/top_viewed_month.rss"},
{text:"All Time", value: "http://youtube.com/rss/global/top_viewed.rss"},
{text:"- Most Discussed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/most_discussed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/most_discussed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/most_discussed_month.rss"}
];
this.d197["title"] = "";
this.d197["channel"] = "1";
this.d197["count"] = "6";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 15;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_channel"), className: "settings_label"},
{ tag: "select", id: "inp_channel", events: {onchange: "d448()"}, className: "settings_control",
options: this.channels }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_channel"].selectedIndex = this.d203.channel;
this.d200["inp_count"].value = this.d203.count;
}
this.d448 = function() {
if(d352) {
this.d200["inp_channel"].selectedIndex = this.d203.channel;
} else {
var c = this.d200["inp_channel"].selectedIndex;
if(c != this.d203.channel && this.channels[c].value != "") {
this.d203.channel = c;
this.save();
req = null;
d352 = false;
this.refresh();
}
}
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!d352) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channels[this.d203.channel].value, this, "d451");
d352 = true;
}
}
this.d451 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
content = XMLParser.xml2hash(response.responseXML.documentElement);
//            varpw(content);
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(content.title);
}
var l = Math.min(content.items.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 == "1" ? "background: #F0F0F0;" : "";
var lnk = content.items[i]["link"];
var lnk2 = content.items[i]["enclosure"].url;
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;'>"+
"<a href='"+lnk+"' target=_blank><img border=0 width=120 src='"+ content.items[i]["media:thumbnail"].url +"'/></a>"+
"</td><td valign=top style='padding: 4px;'>"+
"<a href='"+lnk+"' target=_blank><b>"+content.items[i].title+"</b></a>" +
"<br><br><a href='"+lnk2+"' target=_blank>"+
"<img src='widgets/youtubevideo/cam.gif' style='margin-right: 4px; height: 8px; border: 0; vertical-align: middle;'>"+
loc.text("youtubevideo_lnk_watch")+"</a>"
"</td>"+
"</tr>";
}
this.d200["content"].innerHTML = "<table class='plan_table' width=100%>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
YoutubeVideo.prototype = new Widget();
function Weather() {
this.init();
this.cfg = {
title: loc.text("weather_title"),
module: "Weather"
};
this.d197["city"] = "RSXX0199";
this.d197["unit"] = "c";
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("weather_inp_unit"), className: "settings_label"},
{ tag: "select", id: "d452", events: {onclick: "d452()"}, className: "settings_control",
options: [
{ value:"c", text: loc.text("weather_celsius")},
{ value:"f", text: loc.text("weather_fahrenheit")},
]
}
]
},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("weather_inp_town"), className: "settings_label"},
{ tag: "input", type: "text", size: 15, id: "d456", className: "settings_control"},
{ tag: "input", type: "button", events: {onclick: "d454()"}, value: loc.text("btn_set"), className: "settings_control"},
]},
{ tag: "div", className: "settings_section", id: "citiesList", display: false}
]
this.d209 = function() {
this.d200["settings"].innerHTML = "";
this.d208(this.d200.settings, this.d350);
this.d200.d452.value = this.d203.unit;
}
this.d207 = function() {
this.refresh();
}
var loading = false;
this.refresh = function() {
if(!loading) {
loading = true;
this.d212(loc.text("msg_loading"));
xmlRequest.send("http://xoap.weather.com/weather/local/"+this.d203.city+"?cc=*&unit=d&dayf=4", this, "d459");
}
}
this.d452 = function() {
this.d203.unit = this.d200.d452.value;
this.d453();
this.save();
}
this.d454 = function() {
xmlRequest.send("http://xoap.weather.com/search/search?where="+this.d200.d456.value, this, "d455");
}
this.d455 = function(response) {
this.d200.citiesList.innerHTML = '';
showEl(this.d200.citiesList);
var doc = response.responseXML.documentElement;
var r = doc.getElementsByTagName("loc");
if(r.length == 1) {
this.d456(r[0].getAttribute("id"))
} else if (r.length == 0) {
this.d200.citiesList.innerHTML = "<b>" + loc.text("weather_no_cities") + "</b>";
} else {
var clistDom = [];
for(var i=0; i<r.length; i++) {
clistDom[i] = { tag: "li",
childs: [
{ tag: "a", href: "void", events: {onclick: "d456('"+r[i].getAttribute("id")+"')"},
innerHTML: r[i].firstChild.nodeValue}
]
}
}
this.d208(this.d200.citiesList, { tag: "ul", childs: clistDom });
}
}
this.d456 = function(id) {
this.d203.city = id;
hideEl(this.d200.citiesList);
this.save();
this.refresh();
}
this.d457 = function(n) {
var calc = Math.round((n-32)*5/9);
return (isNaN(calc)) ? loc.text("weather_na") : calc + "&#176;";
}
this.d458 = function(node) {
var hi = node.getElementsByTagName("hi")[0].firstChild.nodeValue;
var low = node.getElementsByTagName("low")[0].firstChild.nodeValue;
if(this.d203.unit == "c") {
hi = this.d457(hi);
low = this.d457(low);
}
return low+" / "+hi+"";
}
this.d453 = function() {
if(!this.data) {
return false;
}
var days = this.data.getElementsByTagName("day");
var mDays = [];
var pic;
for(var i=0; i<days.length; i++) {
pic = parseInt(days[i].getElementsByTagName("icon")[0].firstChild.nodeValue);
pic = ((pic < 10) ? "0" : "") + pic + ".gif";
mDays.push({ tag: "td", style: {textAlign: "center"},
childs: [
{ tag: "div", innerHTML: days[i].getAttribute("t") },
{ tag: "img", src: 'static/weather/' + pic },
{ tag: "div", innerHTML: this.d458(days[i]) }
]});
}
var m = { tag: "table", className: "sys_table", style: {width: "100%"},
childs: [
{ tag: "tr",
childs: mDays }
]};
this.d200["content"].innerHTML = '';
this.d208(this.d200["content"], m);
if(this.data.getElementsByTagName("dnam").length>0) {
this.d212(this.cfg.title + " : " + this.data.getElementsByTagName("dnam")[0].firstChild.nodeValue);
}
}
this.d459 = function(response) {
this.data = response.responseXML.documentElement;
this.d453();
loading = false;
}
}
Weather.prototype = new Widget();
function Websearch() {
this.init();
this.cfg = {
hasRefreshBtn: false,
title: loc.text("websearch_title"),
module: "Websearch"
}
this.d197["openHere"] = "0";
this.d197["serverId"] = 1;
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("websearch_results_target"), className: "settings_label"},
{ tag: "input", id: "set_target", type: "checkbox", events: {onclick: "d438()"}, className: "settings_control"}
]}
]
this.d284 = [
{ tag: "div", className: "menu_panel", style: {marginTop: "4px", padding: "0px"}, id: "servers_tabs", innerHTML: " "},
{ tag: "div", className: "menu_panel", style: {background: "#EAEAFF", padding: "6px", marginTop: "6px"},
childs: [
createTableDom([{content: { tag: "img", id: "server_logo", border: "0", display: false, style: {marginRight: "10px"} }, width: "1%"},
{content: { tag: "input", id: "search_text", type: "text", style: {width: "95%", align: "center"}}, width: "98%"},
{content: { tag: "input", type: "button", value: loc.text("btn_go"), events: {onclick: "d462()"}}, width: "1%"}], "90%")
]}
]
this.d209 = function() {
this.d200["settings"].innerHTML = "";
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
for(var i=0; i<websearch_servers.length; i++) {
this.d208(this.d200.servers_tabs,
{ tag: "span", className: "bevel_section",
style: {cursor: "pointer", fontWeight: "normal"},
id: "tab_"+i, align: "center",
innerHTML: websearch_servers[i].title,
events: {onclick: "d461('"+i+"')"}});
}
if(this.d203.serverId > websearch_servers.length - 1) {
this.d203.serverId = websearch_servers.length - 1;
} else if (!websearch_servers[this.d203.serverId]) {
this.d203.serverId = 0;
}
this.d200.set_target.checked = (this.d203.openHere == 1);
this.d460(this.d203.serverId);
//        this.d212(this.d203.title);
var widget = this;
this.d200["search_text"]["onkeyup"] = function(event) { if (!event) { event = window.event } if(event.keyCode == 13) { widget.d462() } };
}
this.d438 = function() {
this.d203.openHere = (this.d200.set_target.checked ? "1" : "0");
this.save();
}
this.d461 = function(serverId) {
this.d203.serverId = serverId;
this.d460(serverId);
this.save();
}
this.d259 = null;
this.d460 = function(serverId) {
if(this.d259) {
this.d200["tab_"+this.d259].style.backgroundColor = "#EAEAFF";
this.d200["tab_"+this.d259].style.fontWeight = "normal";
}
this.d200["tab_"+serverId].style.backgroundColor = "#FFFFFF";
this.d200["tab_"+serverId].style.fontWeight = "bold";
this.d259 = serverId;
if(websearch_servers[serverId].logo != "") {
showEl(this.d200.server_logo);
this.d200.server_logo.src = 'var/img/'+websearch_servers[serverId].logo;
} else {
hideEl(this.d200.server_logo);
}
this.d212(websearch_servers[serverId].title);
}
this.d462 = function() {
var str = this.d200.search_text.value;
if(str == "") {
return;
}
var url = websearch_servers[this.d203.serverId].url+escape(str);
if(this.d203.openHere == 1) {
document.location = url;
} else {
window.open(url);
}
}
}
Websearch.prototype = new Widget();
function Browser() {
this.init();
this.cfg = {
hasRefreshBtn: false,
hasProfile: true,
title: loc.text("browser_title"),
module: "Browser"
};
this.d197["home_page"] = "";
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("browser_inp_url"), className: "settings_label"},
{ tag: "input", type: "text", size: 15, id: "inp_home_page", className: "settings_control"},
{ tag: "input", type: "button", events: {onclick: "d464()"}, value: loc.text("btn_go"), className: "settings_control"}
]}
]
this.d284 = [
{ tag: "iframe",
id: "browser",
vspace: "0",
hspace: "0",
marginwidth: "0",
marginheight: "0",
frameBorder: "0",
style: { width: "100%", height: "340px", border: "0" }}
]
this.d209 = function() {
this.d212(loc.text("browser_title"));
this.d200.settings.innerHTML = "";
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d200["inp_home_page"].value = this.d203["home_page"];
}
this.d207 = function() {
this.d463();
}
this.d464 = function() {
this.d203["home_page"] = this.d465(this.d200["inp_home_page"].value);
this.d200["inp_home_page"].value = this.d203["home_page"];
this.d463();
this.save();
this.d218();
}
this.d463 = function() {
this.d200["browser"].src = this.d203["home_page"];
}
this.d465 = function(str) {
var url = trim(str);
if(url.indexOf("http://") == -1) {
url = "http://"+url;
}
return url;
}
}
Browser.prototype = new Widget();
function Calculator() {
this.init();
this.cfg = {
hasProfile: false,
title: "",
hasSettingsBtn: false,
hasRefreshBtn: false,
module: "Calculator"
}
this.numpadButtons = [
[ {type: "sys1", numkey: "sys", action: "memoryClear()", text: "MC"},
{type: "sys1", numkey: "sys", action: "memoryRestore()", text: "MR"},
{type: "sys1", numkey: "sys", action: "memoryStore()", text: "MS"},
{type: "sys1", numkey: "sys", action: "memoryAdd()", text: "M+"},
{type: "sys2", numkey: "sys", action: "clear()", text: "C"},
{type: "sys2", numkey: "sys", action: "clearE()", text: "CE"} ],
[ {type: "std", numkey: "num", action: "addNumber(7)", text: "7"},
{type: "std", numkey: "num", action: "addNumber(8)", text: "8"},
{type: "std", numkey: "num", action: "addNumber(9)", text: "9"},
{type: "std", numkey: "op", action: "setOperation('/')", text: "/"},
{type: "std", numkey: "op", action: "evalSqrt()", text: "sqrt"} ],
[ {type: "std", numkey: "num", action: "addNumber(4)", text: "4"},
{type: "std", numkey: "num", action: "addNumber(5)", text: "5"},
{type: "std", numkey: "num", action: "addNumber(6)", text: "6"},
{type: "std", numkey: "op", action: "setOperation('*')", text: "*"},
{type: "std", numkey: "op", action: "evalPercent()", text: "%"} ],
[ {type: "std", numkey: "num", action: "addNumber(1)", text: "1"},
{type: "std", numkey: "num", action: "addNumber(2)", text: "2"},
{type: "std", numkey: "num", action: "addNumber(3)", text: "3"},
{type: "std", numkey: "op", action: "setOperation('-')", text: "-"},
{type: "std", numkey: "op", action: "eval1x()", text: "1/x"} ],
[ {type: "std", numkey: "op", action: "changeSign()", text: "+/-"},
{type: "std", numkey: "num", action: "addNumber(0)", text: "0"},
{type: "std", numkey: "num", action: "addPoint()", text: ","},
{type: "std", numkey: "op", action: "setOperation('+')", text: "+"},
{type: "std", numkey: "op", action: "evalute()", text: "="} ]
]
this.d209 = function() {
var numpadModel = [];
for(var r in this.numpadButtons) {
var rowModel = [];
for(var b in this.numpadButtons[r]) {
rowModel.push(
{ tag: "div", className: "calc_btn_" + this.numpadButtons[r][b].type,
childs: [
{ tag: "button", innerHTML: this.numpadButtons[r][b].text, className: "calc_padkey_"+ this.numpadButtons[r][b].numkey,
events: { onclick: this.numpadButtons[r][b].action }}
]});
}
numpadModel.push(
{ tag: "div", className: "calc_numpad_row",
childs: rowModel });
}
this.d208(this.d200["content"], [
{ tag: "div", className: "calc_display", innerHTML: "0",
id: "display"},
{ tag: "div", className: "calc_numpad",
childs: numpadModel }
]);
}
this.d207 = function() {
this.d212(loc.text("calculator_title"));
}
this.addPointFlag = false;
this.memory = null;
this.operation = null;
this.activeNumber = 0;
this.needClear = false;
this.isError = false;
this.getValue = function() {
var v = trim(this.d200["display"].innerHTML);
if(v == "E") {
this.setValue(0);
v = "0";
}
return v;
}
this.setValue = function(v) {
this.d200["display"].innerHTML = v;
}
this.addNumber = function(n) {
if(this.isError) {
this.setValue(0);
this.isError = false;
}
if(this.needClear) {
this.setValue(0);
this.needClear = false;
}
if((this.getValue() == "0") && !this.addPointFlag) {
this.setValue(n);
} else {
if(this.addPointFlag) {
this.d200["display"].innerHTML += ".";
}
this.d200["display"].innerHTML += n;
}
this.addPointFlag = false;
}
this.addPoint = function() {
if(this.needClear) {
this.setValue(0);
this.needClear = false;
}
if(this.getValue().indexOf(".") == -1) {
this.addPointFlag = true;
}
}
this.setOperation = function(op) {
if(this.operation != null) {
this.evalute();
}
this.addPointFlag = false;
this.activeNumber = parseFloat(this.getValue());
this.operation = op;
this.needClear = true;
}
this.evalute = function() {
if(this.operation != null) {
var v = parseFloat(this.getValue());
switch(this.operation) {
case "*":
this.setValue(v * this.activeNumber);
break;
case "+":
this.setValue(v + this.activeNumber);
break;
case "-":
this.setValue(this.activeNumber - v);
break;
case "/":
if(v != 0) {
this.setValue(this.activeNumber / v);
} else {
this.setValue("E");
}
break;
}
this.operation = false;
this.addPointFlag = false;
this.needClear = true;
}
}
this.evalPercent = function() {
if(this.activeNumber != null && this.operation != null) {
this.addPointFlag = false;
var v = parseFloat(this.getValue());
this.setValue(v*this.activeNumber/100);
}
}
this.evalSqrt = function() {
this.addPointFlag = false;
var v = parseFloat(this.getValue());
this.setValue(Math.sqrt(v));
}
this.eval1x = function() {
this.addPointFlag = false;
var v = parseFloat(this.getValue());
if(v != 0) {
this.setValue(1/v);
} else {
this.setValue("E");
}
}
this.changeSign = function() {
var v = parseFloat(this.getValue());
if(v != 0) {
this.setValue(-v);
}
}
this.memoryClear = function() {
this.memory = null;
}
this.memoryRestore = function() {
if(this.memory != null) {
this.setValue(this.memory);
this.needClear = true;
}
}
this.memoryStore = function() {
this.memory = parseFloat(this.getValue());
}
this.memoryAdd = function() {
if(this.memory == null) {
this.memory = 0;
}
this.memory += parseFloat(this.getValue());
}
this.clear = function() {
this.addPointFlag = false;
this.operation = null;
this.activeNumber = 0;
this.setValue(0);
}
this.clearE = function() {
this.addPointFlag = false;
this.setValue(0);
}
}
Calculator.prototype = new Widget();
function HTMLBox() {
this.init();
this.cfg = {
hasRefreshBtn: false,
title: loc.text("htmlbox_title"),
module: "HTMLBox"
}
this.d197["title"] = loc.text("htmlbox_title");
this.d197["html"] = "";
this.d209 = function() {
this.d208(this.d200["settings"], [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("htmlbox_inp_source"), className: "settings_label"},
{ tag: "br"},
{ tag: "textarea", id: "inp_source",
style: { overflow: "auto", width: "98%", height: "120px"} }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_ok"),
events: { onclick: "onChangeSource()" }, className: "settings_control"}
]}
]);
}
this.onChangeSource = function() {
var t = this.d200["inp_source"].value;
this.renderHTML(t);
this.d203["html"] = t.jsEscape();
this.save();
this.d216();
}
this.d207 = function() {
this.d212(this.d203["title"]);
this.d200["input_title"].value = this.d203["title"];
this.d200["content"].style.textAlign = "center";
var html = this.d203["html"].jsUnescape();
this.d200["inp_source"].value = html;
this.d200["inp_source"].onfocus = function() {
this.select();
}
this.renderHTML(html);
}
this.setIcon = function(html) {
var url = html.substring(html.indexOf('http://'));
var favIcon = url.substring(0, url.indexOf('/', 8));
if(favIcon == "") {
favIcon = "http://" + baseUrl + "widgets/htmlbox/ico.gif";
} else {
favIcon += "/favicon.ico";
}
this.d200["icon"].setAttribute("src", favIcon);
}
this.renderHTML = function(html) {
this.setIcon(html);
if(!(html && html.length)) {
this.d200["content"].innerHTML = "<div style='text-align: left'>" + loc.text("htmlbox_help") + "</div>";
} else {
if(html.indexOf('<script') != -1) {
this.d200["content"].innerHTML = "";
this.d208(this.d200["content"],
{ tag: "iframe",
id: "iframe",
scrolling: "no",
border: "0",
frameBorder: "0" });
this.d200["iframe"].src = "ewloader.php?wid=" + this.id + "&code=" + encodeURIComponent(html);
} else {
if (html.match(/^http:\/\/.*\.(jpg|png|gif|bmp)$/)) {
html = '&nbsp;<img src="' + html + '" />';
}
this.d200["content"].innerHTML = html;
}
}
}
this.updateIframeSize = function(w, h) {
this.d200["iframe"].style.width = w + "px";
this.d200["iframe"].style.height = w + "px";
}
}
HTMLBox.prototype = new Widget();
function HTMLWidget() {
this.init();
this.cfg = {
hasRefreshBtn: false,
hasSettingsBtn: false,
title: "",
module: "HTMLWidget"
}
this.d197["id"] = "";
this.d207 = function() {
this.d212(loc.text("msg_loading"));
request.send({ act: "get_data", id: this.d203["id"]}, this);
}
this.renderHTML = function(html) {
if(html.indexOf('<script') != -1) {
this.d200["content"].innerHTML = "";
this.d208(this.d200["content"],
{ tag: "iframe",
id: "iframe",
scrolling: "no",
border: "0",
frameBorder: "0" });
this.d200["iframe"].src = "ewloader.php?wid=" + this.id + "&code=" + encodeURIComponent(html);
} else {
this.d200["content"].innerHTML = html;
}
}
this.updateIframeSize = function(w, h) {
this.d200["iframe"].style.width = w + "px";
this.d200["iframe"].style.height = w + "px";
}
this.d227 = function(msg) {
switch(msg.status) {
case "data":
this.d200["content"].style.textAlign = "center";
this.d212(msg.data.title);
this.renderHTML(msg.data.source);
this.d200["icon"].setAttribute("src", "var/hwicons/" + msg.data.icon);
break;
case "error":
this.d200["content"].innerHTML = loc.text("msg_error");
this.d212(loc.text("msg_error"));
break;
}
}
}
HTMLWidget.prototype = new Widget();
//
// Widget class definition. Class name must be unique for each widget.
//
function KDemo() {
//
// Calling of init() function must be placed at begining of widget.
//
this.init();
//
// Widget config - definition of widget parametrs.
//
// Note: you does't need to overload default values,
// for example:
//
//    this.cfg = {
//        module: "Demo"
//    }
//
this.cfg = {
// Caption icon image.
// Default value: true
hasIcon: true,
// Caption size button (show/hide widget content).
// Default value: true
hasSizeBtn: true,
// Caption close button (close widget and remove it from page).
// Default value: true
hasCloseBtn: true,
// Caption refresh button (this.refresh() method will be called on click).
// Default value: true
hasRefreshBtn: true,
// Caption settings button (show/hide widget settings panel).
// Default value: true
hasSettingsBtn: true,
// Drag&drop (widget window will be dragable).
// Default value: true
hasDrag: true,
// Show confirmation prompt to user before closing widget.
// Default value: true
hasOnCloseConfirm: true,
// Widget will has d203 or not.
// Default value: true
hasProfile: true,
// Widget name (name of widget class)
// Important: always must be filled and be unique for each widget
module: "KDemo",
// Method of sending widget d203 to server. Must be "GET" or "POST"
// Default value: "GET"
saveMethod: "GET"
};
//
// Widget d203 default values.
// That values will stored to d203 on first start(when user add widget to page)
//
this.d197["title"] = loc.text("demo_title");
this.d197["text"] = "abc";
//
// Hash HTML model for Demo widget settings panel
//
// About multylanguage support:
// loc.text(label) is system function that return text string for label corresponding current user language,
// all text strings must be added to language .xml files in format:
// <string id="label">string</string>
//
this.modelSettings = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label",
innerHTML: loc.text("demo_inp_combobox") },
{ tag: "select", className: "settings_control",
id: "inp_combobox",
events: {onchange: "onComboboxChange()"},
//
// options for combobox element must be in array with element:
// { value: "..", text: ".." || , isBold}
// value - option value,
// text - option text that visible for user
// isBold - option will be bolded
//
options: [
{ value: "1", text: "1" },
{ value: "2", text: "2" },
{ value: "3", text: "3" }
]}
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", className: "settings_label",
innerHTML: loc.text("demo_inp_text")},
{ tag: "input", type: "text", calssName: "settings_control",
id: "inp_text" },
{ tag: "input", type: "button",
events: { onClick: "onButtonClick()" },
//
// You can user loc labels for default strings:
// btn_set - "Set"
// btn_ok - "Ok"
// btn_cancel - "Cancel"
// btn_yes - "Yes"
// btn_no - "No"
// btn_go - "Go"
// btn_save - "Save"
// btn_delete - "Delete"
// btn_add - "Add"
// btn_send - "Send"
//
value: loc.text("btn_ok") }
]}
]
//
// Callback for settings panel combobox onChange event
//
this.onComboboxChange = function() {
//
// this.d200 contain pointes to all d200 that builded
//   with "id" property by this.d208() function.
// Be sure that you has't duplicate id's.
//
alert(this.d200["inp_combobox"].value);
}
//
// Callback for settings panel Ok button onClick event
//
this.onButtonClick = function() {
var t = this.d200["inp_text"].value;
if(t != this.d203["text"]) {
this.d203["text"] = t;
this.d200["text"].innerHTML = t;
//
// this.save() method saving all data from widget d203 to server.
// All saved data will be restored on next site reload.
//
this.save();
}
}
//
// Hash HTML model for Demo widget content area
//
this.modelContent = [
{ tag: "div", id: "text" }
]
//
// Build all static interface d200 for widget here
//
this.d209 = function() {
//
// Building HTML from models,
// to get more information have a look to document.createElement() function specification for browsers
// and DOM specifications.
//
// properties that extended:
//
// id - will add pointer to d200 in this.d200 hash
// events - hash with events and callbacks that will be attached to element
// html - alias to innerHTML
//
// Default d200 in this.d200 hash:
// "settings" - settings panel
// "content" - content element inside widget window
// "title" - title element in widget window caption
//
this.d208(this.d200["settings"], this.modelSettings);
this.d208(this.d200["content"], this.modelContent);
// call function this.d212() to set title in widget caption
this.d212(this.d203["title"]);
// title control present in settings panle by default.
// use this.d200["settings"].innerHTML = "" to delete it
this.d200["input_title"].value = this.d203["title"];
this.d200["inp_text"].value = this.d203["text"];
this.d200["text"].innerHTML = this.d203["text"];
}
//
// this.d207() function will called when widget added to page.
//
this.d207 = function() {
// Any code
//alert("Open button pressed.");
}
//
// Caption refresh button call back
//
this.refresh = function() {
alert("Refresh button pressed.");
}
}
//
// Definition of class prototype. Prototype always must be Widget object.
//
KDemo.prototype = new Widget();
function isor() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "isor",
uniqueId: false,
saveMethod: "GET"
}
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("isor_title"),
uniqueId: SYS_WIDGETS_ID + 10,
module: "isor"
}
this.show = function() {}
this.hide = function() {}
var member_code = '';
if (session_user.member_code)
{
member_code = session_user.member_code;
}
this.channels = [
{text:"- Video -", value: "", isBold: true},
{text:"ISOR Sites", value: ISOR_VROOT_DIR+"/isor_user_sites.php?member_code="+member_code}/*,
{text:"Recently Added", value: "http://youtube.com/rss/global/recently_added.rss"},
{text:"Recently Featured", value: "http://youtube.com/rss/global/recently_featured.rss"},
{text:"Top Favorites", value: "http://youtube.com/rss/global/top_favorites.rss"},
{text:"Top Rated", value: "http://youtube.com/rss/global/top_rated.rss"},
{text:"- Most Viewed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/top_viewed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/top_viewed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/top_viewed_month.rss"},
{text:"All Time", value: "http://youtube.com/rss/global/top_viewed.rss"},
{text:"- Most Discussed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/most_discussed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/most_discussed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/most_discussed_month.rss"}*/
];
this.d197["title"] = "";
this.d197["channel"] = "1";
this.d197["count"] = "100";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 100;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_channel"), className: "settings_label"},
{ tag: "select", id: "inp_channel", events: {onchange: "d448()"}, className: "settings_control",
options: this.channels }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_channel"].selectedIndex = this.d203.channel;
this.d200["inp_count"].value = this.d203.count;
}
this.d448 = function() {
if(d352) {
this.d200["inp_channel"].selectedIndex = this.d203.channel;
} else {
var c = this.d200["inp_channel"].selectedIndex;
if(c != this.d203.channel && this.channels[c].value != "") {
this.d203.channel = c;
this.save();
req = null;
d352 = false;
this.refresh();
}
}
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!d352) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channels[this.d203.channel].value, this, "d451");
d352 = true;
}
}
this.d451 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
content = XMLParser.xml2hash(response.responseXML.documentElement);
//            varpw(content);
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(content.title);
}
var l = Math.min(content.items.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 == "1" ? "background: #F0F0F0;" : "";
var site = content.items[i]["site"];
var url = content.items[i]["url"];
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;'>"+
"<a href='"+url+"' target=_blank>"+ site +"</a>"+
"</td>"+
"</tr>";
}
this.d200["content"].innerHTML = "<table class='plan_table' width=100%>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
isor.prototype = new Widget();
function soloads() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "soloads",
uniqueId: false,
saveMethod: "GET"
};
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("isor_title"),
uniqueId: SYS_WIDGETS_ID + 11,
module: "soloads"
};
this.show = function() {}
this.hide = function() {}
var member_code = '';
if (session_user.member_code)
{
member_code = session_user.member_code;
}
this.channels = [
{text:"- Solo Ads -", value: "", isBold: true},
{text:"Solo Ads", value: ISOR_VROOT_DIR+"/buyads/serveSoloSP.php?member_code="+member_code+"&nos=2&isorin="+ISORIN}/*,
{text:"Solo Ads", value: ISOR_VROOT_DIR+"/soloads.php"}/*,
{text:"Recently Added", value: "http://youtube.com/rss/global/recently_added.rss"},
{text:"Recently Featured", value: "http://youtube.com/rss/global/recently_featured.rss"},
{text:"Top Favorites", value: "http://youtube.com/rss/global/top_favorites.rss"},
{text:"Top Rated", value: "http://youtube.com/rss/global/top_rated.rss"},
{text:"- Most Viewed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/top_viewed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/top_viewed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/top_viewed_month.rss"},
{text:"All Time", value: "http://youtube.com/rss/global/top_viewed.rss"},
{text:"- Most Discussed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/most_discussed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/most_discussed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/most_discussed_month.rss"}*/
];
this.d197["title"] = "";
this.d197["channel"] = "1";
this.d197["count"] = "6";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 15;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_channel"), className: "settings_label"},
{ tag: "select", id: "inp_channel", events: {onchange: "d448()"}, className: "settings_control",
options: this.channels }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_channel"].selectedIndex = this.d203.channel;
this.d200["inp_count"].value = this.d203.count;
}
this.d448 = function() {
if(d352) {
this.d200["inp_channel"].selectedIndex = this.d203.channel;
} else {
var c = this.d200["inp_channel"].selectedIndex;
if(c != this.d203.channel && this.channels[c].value != "") {
this.d203.channel = c;
this.save();
req = null;
d352 = false;
this.refresh();
}
}
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!d352) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channels[this.d203.channel].value, this, "d451");
d352 = true;
}
}
this.d451 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
content = XMLParser.xml2hash(response.responseXML.documentElement);
//            varpw(content);
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(content.title);
}
var l = Math.min(content.items.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 == "1" ? "background: #F0F0F0;" : "";
var ad_id = content.items[i]["ad_id"];
var pkg_code = content.items[i]["pkg_code"];
var subject = content.items[i]["subject"];
var SHORT_DESC = content.items[i]["SHORT_DESC"];
c += "<tr style='"+st+"'>"
+"<td valign=top style='padding: 4px;'>"
+'<form method="post" action="'+ISOR_VROOT_DIR+'/buyads/saveAd.php" target="_blank">'
+'<p><a href="'+ISOR_VROOT_DIR+'/buyads/viewSoloAd.php?ad_id='+ad_id+'&pkg_code='+pkg_code+'&member_code='+member_code+'" target="_blank" title="Click here to read this ad and generate credits.">'+subject+'</a></p>'
+'<p>'+SHORT_DESC+'</p>'
+'<center><p><input type="hidden" id="pkg_code'+ad_id+'" name="pkg_code" value="'+pkg_code+'" />'
+'<input type="hidden" id="user_id'+ad_id+'" name="member_code" value="'+member_code+'" />'
+'<input type="hidden" id="title'+ad_id+'" name="title" value="'+subject+'" />'
+'<input type="hidden" id="ad_id'+ad_id+'" name="ad_id" value="'+ad_id+'" />'
+'<input type="hidden" id="submit'+ad_id+'" name="SAVE_AD" value="Save Ad" />'
+'<a title="Click here to read this ad and generate credits." href="'+ISOR_VROOT_DIR+'/buyads/viewSoloAd.php?ad_id='+ad_id+'&pkg_code='+pkg_code+'&member_code='+member_code+'" target="_blank"><img src="'+ISOR_VROOT_DIR+'/images/read_button.png" border="0" /></a>'
+'<input type="image" id="add'+ad_id+'" name="SAVE_AD" src="'+ISOR_VROOT_DIR+'/images/save_button.png" alt="Click here to save this ad to your Ad Review Area so you can read it and generate credits later." title="Click here to save this ad to your Ad Review Area so you can read it and generate credits later." />'
+'</p></center>'
+'</form>'
+'</td>'
+'</tr>';
/*
st = i % 2 == "1" ? "background: #F0F0F0;" : "";
var CONTENT = content.items[i]["CONTENT"];
//var url = content.items[i]["url"];
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;'>"+
+CONTENT+
//"<a href='"+url+"' target=_blank>"+ site +"</a>"+
//"<b>Coming Soon</b>"+
"</td>"+
"</tr>";
*/
}
this.d200["content"].innerHTML = "<table class='plan_table' width=100%>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
soloads.prototype = new Widget();
function trafficexchanges() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: true,
hasDrag: true,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: loc.text("trafficexchanges_title"),
module: "trafficexchanges",
uniqueId: false,
saveMethod: "POST"
}
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: true,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("trafficexchanges_title"),
uniqueId: SYS_WIDGETS_ID + 12,
module: "trafficexchanges",
saveMethod: "POST"
};
this.show = function() {}
this.hide = function() {}
this.d350 = [
/*        { tag: "div", className: "bevel_section", innerHTML: loc.text("trafficexchanges_import"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_import')"}
},*/
{ tag: "div", className: "menu_panel", id: "section_import", display: false, align: "center",
innerHTML: "<iframe name='upload_frame' style='width: 0px; height: 0px; border: 0px'></iframe>",
childs: [
{ tag: "form", method: "post", enctype: "multipart/form-data", action:"bookmarks.php",
target: "upload_frame",
id: "upload_form",
style: {padding: "0px", margin: "0px"},
childs: [
{ tag: "input", type: "hidden", name: "MAX_FILE_SIZE", value:"500000"},
{ tag: "input", type: "hidden", id: "form_wid", name: "wid"},
{ tag: "input", type: "hidden", id: "form_user_id", name: "user_id"},
{ tag: "input", type: "file", name:"user_file", id: "user_file"},
{ tag: "input", type: "button", value: loc.text("bookmarks_btn_import"), id: "upload_submit_btn", events: {onclick: "d404()"}}
]},
{ tag: "div", id: "import_msg", style: {width: "100%", display: "block"}, display: false}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("trafficexchanges_sec_delete"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_delete')"}
},
{ tag: "div", className: "menu_panel", id: "section_delete", display: false, align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("trafficexchanges_btn_delete_all"), events: {onclick: "d416()"}}
]
},
{ tag: "div", className: "bevel_section", innerHTML: loc.text("trafficexchanges_sec_add"), id: "add_bookmark",
style: {cursor: "pointer"},
events: {onclick: "d382('section_add')"}
},
{ tag: "div", className: "menu_panel", id: "section_add", display: false,
childs: [
{ tag: "div", className: "menu_panel", innerHTML: loc.text("trafficexchanges_inp_title"),
childs: [
{ tag: "input", type: "text", size: "30", id: "select_title"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("trafficexchanges_inp_url"),
childs: [
{ tag: "input", type: "text", size: "30", id: "select_url"}
]
},
/*{ tag: "div", className: "menu_panel", innerHTML: loc.text("trafficexchanges_inp_tags"),
childs: [
{ tag: "input", type: "text", size: "30", id: "select_tags"}
]
},*/
{ tag: "div", className: "menu_panel", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d417()"}}
]
}
]
}
];
this.d284 = [
{ tag: "div", className: "bevel_section", innerHTML: loc.text("trafficexchanges_sec_edit"), id: "edit_bookmark", display: false,
style: {cursor: "pointer"},
events: {onclick: "d382('section_edit')"}
},
{ tag: "div", className: "menu_panel", id: "section_edit", display: false,
childs: [
{ tag: "div", className: "menu_panel", innerHTML: loc.text("trafficexchanges_inp_title"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_title"}
]
},
{ tag: "div", className: "menu_panel", innerHTML: loc.text("trafficexchanges_inp_url"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_url"}
]
},
/*{ tag: "div", className: "menu_panel", innerHTML: loc.text("trafficexchanges_inp_tags"),
childs: [
{ tag: "input", type: "text", size: "30", id: "edit_tags"}
]
},*/
{ tag: "div", className: "menu_panel", align: "center",
childs: [
{ tag: "input", type: "button", value: loc.text("btn_save"), events: {onclick: "d414()"}}
]
}
]
},
/* { tag: "div", className: "bevel_section", innerHTML: loc.text("trafficexchanges_sec_tags"),
style: {cursor: "pointer"},
events: {onclick: "d382('section_tags')"}},*/
{ tag: "div", className: "menu_panel", id: "section_tags", display: false, align: "left"},
/*{ tag: "hr", width: "100%"},*/
{ tag: "div", className: "menu_panel", id: "bookmarks", align: "left"}
]
this.d197["title"] = loc.text("trafficexchanges_title");
this.d197["tags"] = ['default'];
this.d197["bookmarks"] = [];
this.d401 = 0;
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d208(this.d200.content, this.d284);
this.d402(0);
this.d200.form_wid.value = this.id;
this.d200.form_user_id.value = auth.user.id;
}
this.d215Settings = function() {
this.d403();
}
this.d221 = function() {
this.d203.title = trim(this.d200.input_title.value);
this.d212(this.d203.title /*+ ": "+ this.d203.tags[this.d401]*/);
this.save();
}
this.d382 = function(sid) {
if(this.d200[sid].style.display == 'none') {
showEl(this.d200[sid]);
} else {
hideEl(this.d200[sid]);
}
}
// importing
this.d404 = function() {
if(trim(this.d200.user_file.value)!="") {
showEl(this.d200.import_msg);
this.d200.import_msg.innerHTML = loc.text("trafficexchanges_msg_import");
hideEl(this.d200.upload_submit_btn);
this.d200.upload_form.submit();
}
}
this.d405 = function() {
showEl(this.d200.upload_submit_btn);
this.d200.import_msg.innerHTML = loc.text("trafficexchanges_msg_import_error");
}
this.d406 = function(file) {
if(file) {
xmlRequest.send("var/tmp/"+file, this, "d408");
this.d407 = file;
} else {
showEl(this.d200.upload_submit_btn);
this.d200.import_msg.innerHTML = loc.text("trafficexchanges_msg_import_error");
}
}
this.d408 = function(response) {
showEl(this.d200.upload_submit_btn);
if(response.responseText) {
var tmp = document.createElement("span");
tmp.innerHTML = response.responseText.replace(/\<p\>/g, '').replace(/\r\n/g, '').replace(/>\s*</g, '><').replace(/<DT>/g, "").replace(/<DD>/g, '');
var data = XMLParser.d408(tmp);
for(var i=0; i<data.length; i++) {
this.d409(data[i].title, data[i].url);
}
this.d410();
showEl(this.d200.section_tags);
this.d402(0);
this.save();
if(this.d407) {
request.send({act: "delete", file: this.d407}, this);
}
hideEl(this.d200.import_msg);
//hideEl(this.d200.section_import);
this.d216();
return;
}
this.d200.import_msg.innerHTML = loc.text("trafficexchanges_msg_import_error");
}
this.d411 = null;
this.d403 = function() {
if(this.d411 != null) {
hideEl(this.d200.section_edit);
hideEl(this.d200.edit_bookmark);
this.d412 = null;
}
}
this.d413 = function(id) {
this.d411 = id;
var tags = [];
for(var i = 0; i < this.d203.bookmarks[id].tags.length; i++) {
tags.push(this.d203.tags[this.d203.bookmarks[id].tags[i]])
}
this.d200.edit_title.value = this.d203.bookmarks[id].title;
this.d200.edit_url.value = this.d203.bookmarks[id].url;
/*this.d200.edit_tags.value = tags.join(", ");*/
showEl(this.d200.section_edit);
showEl(this.d200.edit_bookmark);
hideEl(this.d200.settings);
}
this.d414 = function() {
if(this.d411 != null) {
var title = trim(this.d200.edit_title.value);
var url = trim(this.d200.edit_url.value);
if(title != "" && url != "") {
this.d415(this.d411, title, url);
this.d402(0);
this.save();
}
}
this.d403();
}
this.d416 = function() {
this.d203.bookmarks = this.d197["bookmarks"];
this.d203.tags = this.d197["tags"];
this.d402(0);
this.save();
}
this.d417 = function() {
var title = trim(this.d200.select_title.value);
var url = trim(this.d200.select_url.value);
if(title != "" && url != "") {
this.d403();
this.d409(title, url);
this.save();
this.d402(0);
this.d200.select_title.value = '';
this.d200.select_url.value = '';
//this.d200.select_tags.value = '';
}
}
this.d410 = function() {
this.d200.section_tags.innerHTML = '';
for(var t=0; t<this.d203.tags.length; t++) {
if(this.d203.tags[t] != undefined) {
if(this.d401 != t) {
this.d208(this.d200.section_tags,
{ tag: "a",
href: "void", events: { onclick: "d402("+t+")"},
innerHTML: this.d203.tags[t],
style: { margin: "4px"}
});
} else {
this.d208(this.d200.section_tags,
{ tag: "span", innerHTML: this.d203.tags[t],
style: { margin: "4px"}
});
}
}
}
}
this.d402 = function(tagId) {
this.d403();
this.d401 = tagId;
this.d212(this.d203.title /*+ ": "+ this.d203.tags[tagId]*/);
var list = this.d418(tagId);
this.d200.bookmarks.innerHTML = '';
for(var i = 0; i<list.length; i++) {
var itemDom = { tag: "div", className: "menu_panel", id: "item"+list[i],
childs: [
createTableDom([ {content: {tag: "a", id: "item_title"+list[i], sysHref: this.d203.bookmarks[list[i]].url, target: "_blank", innerHTML: this.d203.bookmarks[list[i]].title}, width: "95%"},
{content: createButtonDom(false, "d413("+list[i]+")", "static/client/edit.gif"), width: "1%"},
{content: createButtonDom(false, "d327("+list[i]+")", "static/client/delete_link.gif"), width: "1%"}
], "95%")
]
}
this.d208(this.d200.bookmarks, itemDom);
}
this.d410();
}
this.d327 = function(id) {
if(confirm(loc.text("trafficexchanges_delete_prompt", this.d203.bookmarks[id].title))) {
this.d403();
this.d419(id);
if(this.d203.tags[0]) {
this.d402(0);
} else {
this.d402(0);
}
this.save();
}
}
this.d415 = function(id, title, url) {
this.d419(id);
this.d409(title, url);
}
this.d409 = function(title, url) {
var newBookmark = { title: title,
url: url};
/*        if(typeof(tagsData) == "string") {
var tags = tagsData!= "" ? tagsData.split(",") : false;
} else {
var tags = tagsData;
}
if(tags) {
for(var i = 0; i<tags.length; i++) {
tags[i] = trim(tags[i]);
var tn = arraySearch(tags[i], this.d203.tags)
if(tn != undefined) {
newBookmark.tags.push(tn);
} else {
var idx = arrayFirstFree(this.d203.tags);
this.d203.tags[idx] = tags[i];
newBookmark.tags.push(idx);
}
}
} else {*/
newBookmark.tags = [0];
/*        }
*/
//        this.d401 = newBookmark.tags[0];
this.d203.bookmarks[arrayFirstFree(this.d203.bookmarks)] = newBookmark;
}
this.d419 = function(id) {
var tags = this.d203.bookmarks[id].tags;
for(var i=0; i<tags.length; i++) {
if(tags[i] != 0) {
var count = 0;
for(var j=0; j<this.d203.bookmarks.length; j++) {
if(this.d203.bookmarks[j] && arraySearch(tags[i], this.d203.bookmarks[j].tags) != undefined) {
count++;
}
}
if(count<2) {
this.d203.tags[tags[i]] = undefined;
}
}
}
this.d203.bookmarks[id] = undefined;
}
this.d418 = function(tagId) {
var res = [];
for(var i=0; i<this.d203.bookmarks.length; i++) {
if(this.d203.bookmarks[i] &&
this.d203.bookmarks[i].tags != undefined &&
arraySearch(tagId, this.d203.bookmarks[i].tags) != undefined) {
res.push(i);
}
}
return res;
}
this.d206 = function() {
this.d209();
}
}
trafficexchanges.prototype = new Widget();
function siteofmonth() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "soloads",
uniqueId: false,
saveMethod: "GET"
};
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("siteofmonth_title"),
uniqueId: SYS_WIDGETS_ID + 13,
module: "siteofmonth"
};
this.show = function() {}
this.hide = function() {}
this.d197["title"] = "";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 15;
this.d209 = function() {
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
this.d212(this.cfg.title);
this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td align='center'><a href=\"/se/site_of_month_allsites.php?member_code="+session_user.member_code+"\" target=\"_blank\"><img src=\"/images/site_of_month.gif\" border=\"0\" alt=\"Site Of The Month\" /></a><br /><a href=\"/se/site_of_month_allsites.php?member_code="+session_user.member_code+"\" target=\"_blank\"><b>Site Of The Month</b></a></td></tr></table></center>";
//this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td><a href=\"/buyads/serveadsSOTM.php?member_code="+session_user.member_code+"\" target=\"_blank\"><img src=\"/images/site_of_month.gif\" border=\"0\" alt=\"Site Of The Month\" /></a><br /><a href=\"/buyads/serveadsSOTM.php?member_code="+session_user.member_code+"\" target=\"_blank\"><b>Site Of The Month</b></a></td></tr></table></center>";
//this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td><img src=\"/images/site_of_month.gif\" border=\"0\" alt=\"Site Of The Month\" /><br /><b>Coming Soon</b></td></tr></table></center>";
}
}
siteofmonth.prototype = new Widget();
function smartpagead() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "isor",
uniqueId: false,
saveMethod: "GET"
}
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("smartpagead_title"),
uniqueId: SYS_WIDGETS_ID + 14,
module: "smartpagead"
}
this.show = function() {}
this.hide = function() {}
var member_code = '';
if (session_user.member_code)
{
member_code = session_user.member_code;
}
this.channels = [
{text:"- Video -", value: "", isBold: true},
{text:"Smart Page Ads", value: ISOR_VROOT_DIR+"/buyads/serveTextAds.php?member_code="+member_code+"&nos=5&isorin="+ISORIN}/*,
{text:"Recently Added", value: "http://youtube.com/rss/global/recently_added.rss"},
{text:"Recently Featured", value: "http://youtube.com/rss/global/recently_featured.rss"},
{text:"Top Favorites", value: "http://youtube.com/rss/global/top_favorites.rss"},
{text:"Top Rated", value: "http://youtube.com/rss/global/top_rated.rss"},
{text:"- Most Viewed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/top_viewed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/top_viewed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/top_viewed_month.rss"},
{text:"All Time", value: "http://youtube.com/rss/global/top_viewed.rss"},
{text:"- Most Discussed Videos -", value: "", isBold: true},
{text:"Today", value: "http://youtube.com/rss/global/most_discussed_today.rss"},
{text:"This Week", value: "http://youtube.com/rss/global/most_discussed_week.rss"},
{text:"This Month", value: "http://youtube.com/rss/global/most_discussed_month.rss"}*/
];
this.d197["title"] = "";
this.d197["channel"] = "1";
this.d197["count"] = "100";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 100;
var sel_count_options = [];
for(var i=1; i<=itemsCount; i++) {
sel_count_options.push({value: i, text: " " + i + " "});
}
this.d350 = [
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_channel"), className: "settings_label"},
{ tag: "select", id: "inp_channel", events: {onchange: "d448()"}, className: "settings_control",
options: this.channels }
]},
{ tag: "div", className: "settings_section",
childs: [
{ tag: "span", innerHTML: loc.text("googlevideo_inp_count"), className: "settings_label"},
{ tag: "select", id: "inp_count", events: {onchange: "d449()"}, className: "settings_control",
options: sel_count_options }
]}
]
this.d209 = function() {
this.d208(this.d200.settings, this.d350);
this.d200["inp_channel"].selectedIndex = this.d203.channel;
this.d200["inp_count"].value = this.d203.count;
}
this.d448 = function() {
if(d352) {
this.d200["inp_channel"].selectedIndex = this.d203.channel;
} else {
var c = this.d200["inp_channel"].selectedIndex;
if(c != this.d203.channel && this.channels[c].value != "") {
this.d203.channel = c;
this.save();
req = null;
d352 = false;
this.refresh();
}
}
}
this.d449 = function() {
var c = this.d200["inp_count"].value;
if(c != this.d203.count) {
this.d203.count = c;
this.save();
this.d450();
}
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
if(!d352) {
this.d212(loc.text("msg_loading"));
req = xmlRequest.send(this.channels[this.d203.channel].value, this, "d451");
d352 = true;
}
}
this.d451 = function(response) {
d352 = false;
if(response.responseXML && response.responseXML.documentElement) {
content = XMLParser.xml2hash(response.responseXML.documentElement);
//            varpw(content);
} else {
content = null;
}
this.d450();
}
this.d450 = function() {
if(content) {
if(this.d203.title != "") {
this.d212(this.d203.title);
} else {
this.d212(content.title);
}
var l = Math.min(content.items.length, this.d203.count);
var c = "";
var st = "";
for(var i=0; i<l; i++) {
st = i % 2 == "1" ? "background: #F0F0F0;" : "";
var t = content.items[i]["title"];
var u = content.items[i]["url"];
c += "<tr style='"+st+"'>"+
"<td valign=top style='padding: 4px;'>"+
"<a href='"+u+"' target='_blank'>"+ t +"</a>"+
"</td>"+
"</tr>";
}
this.d200["content"].innerHTML = "<table class='plan_table' width=100%>" + c + "</table>";
} else {
this.d212(loc.text("msg_error"));
}
}
}
smartpagead.prototype = new Widget();
function adoptions() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "soloads",
uniqueId: false,
saveMethod: "GET"
};
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("adoptions_title"),
uniqueId: SYS_WIDGETS_ID + 15,
module: "adoptions"
};
this.show = function() {}
this.hide = function() {}
this.d197["title"] = "";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 15;
this.d209 = function() {
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
this.d212(this.cfg.title);
//this.d200["content"].innerHTML = "<table class='plan_table' width=100%><tr><td><b>Coming Soon</b></td></tr></table>";
this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td align='center'><a href=\"/switchads.php?1\" target=\"_blank\" ><img src=\"/images/icon_advertising3.gif\" border=\"0\" alt=\"Get Advertising\" /></a><br /><a href=\"/switchads.php?1\" target=\"_blank\"><b>Get Advertising</b></a></td></tr></table></center>";
}
}
adoptions.prototype = new Widget();
function latestupdates() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "soloads",
uniqueId: false,
saveMethod: "GET"
};
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("latestupdates_title"),
uniqueId: SYS_WIDGETS_ID + 16,
module: "latestupdates"
};
this.show = function() {}
this.hide = function() {}
this.d197["title"] = "";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 15;
this.d209 = function() {
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
this.d212(this.cfg.title);
this.d200["content"].innerHTML = "<table class='plan_table' width=100%><tr><td> <a href='"+ISOR_VROOT_DIR+"/contents/?LatestUpdates' target='_blank'>Latest Updates On ISO Register</a></td></tr></table>";
}
}
latestupdates.prototype = new Widget();
function bncc() {
this.init();
/*
this.cfg = {
hasIcon: true,
hasSizeBtn: false,
hasCloseBtn: false,
hasRefreshBtn: true,
hasSettingsBtn: false,
hasDrag: false,
hasOnCloseConfirm: true,
hasProfile: true,
isOpenHidden: false,
isSystem: false,
title: "",
module: "soloads",
uniqueId: false,
saveMethod: "GET"
};
*/
this.cfg = {
hasSizeBtn: false,
hasRefreshBtn: false,
hasSettingsBtn: false,
hasCloseBtn: false,
isOpenHidden: false,
hasDrag: false,
isSystem: true,
title: loc.text("bncc_title"),
uniqueId: SYS_WIDGETS_ID + 17,
module: "bncc"
};
this.show = function() {}
this.hide = function() {}
this.d197["title"] = "";
var d352 = false;
var req = null;
var content = null;
var itemsCount = 15;
this.d209 = function() {
}
this.d207 = function() {
this.refresh();
}
this.refresh = function() {
this.d212(this.cfg.title);
this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td align='center'><a href=\"/members/bncc.php\" target=\"_blank\"><img src=\"/images/bncc_icon.jpg\" border=\"0\" alt=\"Business Network &amp; Conference Center\" /></a><br /><a href=\"/members/bncc.php\" target=\"_blank\"><b>Business Network &amp; Conference Center</b></a></td></tr></table></center>";
//this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td><a href=\"/buyads/serveadsSOTM.php?member_code="+session_user.member_code+"\" target=\"_blank\"><img src=\"/images/site_of_month.gif\" border=\"0\" alt=\"Site Of The Month\" /></a><br /><a href=\"/buyads/serveadsSOTM.php?member_code="+session_user.member_code+"\" target=\"_blank\"><b>Site Of The Month</b></a></td></tr></table></center>";
//this.d200["content"].innerHTML = "<center><table class='plan_table' width=100%><tr><td><img src=\"/images/site_of_month.gif\" border=\"0\" alt=\"Site Of The Month\" /><br /><b>Coming Soon</b></td></tr></table></center>";
}
}
bncc.prototype = new Widget();
