FastInit.addOnLoad(function(){
logging.debug("** DOM READY **");
});
function logError(_1,_2,_3){
try{
var _4=_2+"@"+_3+":"+_1;
if(_4.indexOf("log.js")==-1){
logging.error("javascript: "+_4);
}
try{
if(!window.jsErrors){
window.jsErrors=new Array();
}
window.jsErrors.push(_4);
}
catch(e){
}
}
catch(e){
}
return window.suppressSiteErrors;
}
window.onerror=logError;
isIE=(navigator.userAgent.indexOf("MSIE")!=-1);
isSafari=(navigator.userAgent.indexOf("Safari")!=-1);
isWindows=(navigator.userAgent.indexOf("Windows")!=-1);
isFF=(navigator.userAgent.toLowerCase().indexOf("firefox")!=-1);
if(typeof DOMParser=="undefined"){
DOMParser=function(){
};
DOMParser.prototype.parseFromString=function(_5,_6){
if(typeof ActiveXObject!="undefined"){
var d=new ActiveXObject("MSXML.DomDocument");
d.loadXML(_5);
return d;
}else{
if(window.XMLHttpRequest){
var _8=new XMLHttpRequest;
_8.open("GET","data:"+(_6||"application/xml")+";charset=utf-8,"+encodeURIComponent(_5),false);
if(_8.overrideMimeType){
_8.overrideMimeType(_6);
}
_8.send(null);
return _8.responseXML;
}else{
var _9=document.createElement("div");
_9.innerHTML=xml;
return _9;
}
}
};
}
function getDomElementById(_a){
var _b=document.getElementById(_a);
return _b;
}
function hideDomElementById(_c){
getDomElementById(_c).style.display="none";
}
function showDomElementById(_d){
getDomElementById(_d).style.display="block";
}
function hideDomElement(_e){
_e.style.display="none";
}
function showDomElement(_f){
_f.style.display="block";
}
function RemoveChildsFromDom(_10){
while(_10.hasChildNodes()){
_10.removeChild(_10.firstChild);
}
}
function translateStringToDom(_11){
var _12=new DOMParser();
doc=_12.parseFromString(_11,"text/xml");
if(doc){
return doc;
}else{
alert("Operation not supported by browser.");
}
}
function setStyleCursor(_13,_14){
if(isIE&&_14=="pointer"){
_13.style.cursor="hand";
}else{
_13.style.cursor=_14;
}
}
function popUp(URL){
width=700;
height=450;
for(var i=0;i<arguments.length;i++){
if(i==1){
width=arguments[i];
}
if(i==2){
height=arguments[i];
}
}
window.open(URL,"Hyves","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+width+",height="+height+",screenX=0,screenY=0,top=0,left=0");
}
function popUpText(_17,_18){
var w=window.open("",_18,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=500,height=450,screenX=0,screenY=0,top=0,left=0");
w.document.write(_17);
w.document.close();
}
function newTDWindow(URL){
var _1b="toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=450";
var _1c=(self.screen.width/2)-(550/2);
var _1d=(self.screen.height/2)-(450/2);
popup=window.open(URL,"Hyves",_1b);
}
function setActiveTab(_1e,_1f,_20){
var _21=document.all?true:false;
var _22=_21?document.all.tags("DIV"):null;
var _23=new Array();
for(var i=0;i<_22.length;i++){
var _25=_22[i].id;
if(_25.indexOf("utility")>=0){
_23.push(_22[i]);
}
}
for(var i=0;i<_23.length;i++){
var _26=_20+_1e+i;
var tab=document.getElementById(_26);
if(i==_1e){
_23[i].style.display="block";
tab.className="MiniMenuActive";
}else{
_23[i].style.display="none";
tab.className="MiniMenuPassive";
}
}
return false;
}
function checkToAddMoreFileUploadFields(_28,_29){
needonemore=true;
for(i=0;i<_28.elements.length;i++){
if(_28.elements[i].type=="file"){
if(_28.elements[i].value==""){
needonemore=false;
}
}
}
if(needonemore){
row=_29.insertRow(_29.rows.length-1);
td1=row.insertCell(0);
td2=row.insertCell(1);
td1.innerHTML="<input type=\"file\" name=\"file[]\" onchange=\"checkToAddMoreFileUploadFields(this.form,document.getElementById('fileuploadtable'))\">";
td2.innerHTML="<input type=\"text\" name=\"comment[]\"></td>\n";
}
}
function htmlspecialchars(s){
s=s.replace(/&/g,"&amp;");
s=s.replace(/>/g,"&gt;");
s=s.replace(/</g,"&lt;");
s=s.replace(/"/g,"&quot;");
return s;
}
function escapePlus(s){
return escape(s).replace(/\+/g,"%2B");
}
function stripUnicodeCharacters(_2c){
_2c=_2c.replace(/&#[0-9a-f]{4};/gi,"");
for(var i=0;i<_2c.length;i++){
if(_2c.charCodeAt(i)>127){
_2c=_2c.substr(0,i)+_2c.substr(i+1);
i--;
}
}
return _2c;
}
debug_dump_run=-1;
debug_dump_variable=[];
function Debug_dump(v,_2f){
debug_dump_run++;
debug_dump_variable[debug_dump_run]=v;
if(typeof v=="object"||""+v=="[object HTMLEmbedElement]"){
html="<table border=1>";
for(i in v){
if(i=="SelectAll"){
v[i]();
}
try{
if(typeof v[i]=="function"){
html+="<tr><td style=\"font: 12px Arial,Helvetica; cursor: pointer;\" onclick=\"if (this.nextSibling.innerHTML =='') {opener.Debug_dump(opener.debug_dump_variable["+debug_dump_run+"]['"+i+"'],this.nextSibling); this.style.fontStyle='italic';}else{this.nextSibling.innerHTML=''; this.style.fontStyle='normal';}\" valign=\"top\">"+i+"()</td><td></td></tr>";
}else{
html+="<tr><td style=\"font: 12px Arial,Helvetica; cursor: pointer;\" onclick=\"if (this.nextSibling.innerHTML =='') {opener.Debug_dump(opener.debug_dump_variable["+debug_dump_run+"]['"+i+"'],this.nextSibling); this.style.fontStyle='italic';}else{this.nextSibling.innerHTML=''; this.style.fontStyle='normal';}\" valign=\"top\">"+i+"</td><td></td></tr>";
}
}
catch(e){
}
}
html+="</table>";
}else{
html="[type: "+(typeof v)+"]"+escape_html(v);
}
if(_2f){
if(_2f=="return"){
return html;
}else{
_2f.innerHTML=html;
}
}else{
var w=window.open("","Hyves","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=500,height=450,screenX=0,screenY=0,top=0,left=0");
w.document.open;
w.document.write(html);
w.document.close();
}
}
function escapeHyves(s){
newstring="";
strlen=s.length;
for(i=0;i<strlen;i++){
c=s.charAt(i);
if(c.match(/[a-zA-Z]/)){
newstring+=c;
}else{
int_c=c.charCodeAt(0);
string_c=(1000+int_c).toString().substring(1);
newstring+=string_c;
}
}
return newstring;
}
function unescapeHyves(s){
newstring="";
strlen=s.length;
for(i=0;i<strlen;i++){
c=s.charAt(i);
if(c.match(/[^0-9]/)){
newstring+=c;
}else{
int_c=s.substr(i,3);
i+=2;
newstring+=String.fromCharCode(int_c);
}
}
return newstring;
}
function checkdate(_33,day,_35){
var _36=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
if(_35%4==0&&(_35%100!=0||_35%400==0)){
_36[1]=29;
}
return (day>0&&_33>0&&_33<=12&&day<=_36[_33-1]);
}
function createInputDo(_37,_38){
if(isIE){
var dob=document.createElement("<input type=\""+_37+"\" name=\""+_38+"\">");
}else{
var dob=document.createElement("input");
dob.name=_38;
dob.type=_37;
}
return dob;
}
function changeLanguage(_3a){
url="/a2a.php?method=setlanguage&languageId="+_3a;
var _3b=new Ajax.Request(url,{method:"get",onComplete:function(_3c){
document.location.reload();
}});
}
function getWindowizableTagNames(){
var _3d=new Array("embed","object","iframe");
if(ie6){
_3d.push("select");
}
return _3d;
}
aFloatingElements=new Array();
modalElement=null;
aVisibleWindowizableElements=new Array();
aHiddenWindowizableElements=new Array();
function hideWindowizableComponentsUnder(_3e){
if(aFloatingElements.indexOf(_3e)!=-1){
return;
}
aFloatingElements.push(_3e);
findWindowizableElements();
if(aVisibleWindowizableElements.length==0){
return;
}
doUpdateWindowizableComponentsHiddenStatus();
}
function showWindowizableComponentsUnder(_3f){
aFloatingElements=aFloatingElements.without(_3f);
findWindowizableElements();
doUpdateWindowizableComponentsHiddenStatus();
}
function hideWindowizableComponentsNotIn(_40){
modalElement=_40;
findWindowizableElements();
if(aVisibleWindowizableElements.length==0){
return;
}
doUpdateWindowizableComponentsHiddenStatus();
}
function showWindowizableComponentsNotIn(_41){
modalElement=null;
findWindowizableElements();
doUpdateWindowizableComponentsHiddenStatus();
}
function findWindowizableElements(){
var _42=getWindowizableTagNames();
aVisibleWindowizableElements=new Array();
for(var i=0;i<_42.length;i++){
var _44=$A(document.getElementsByTagName(_42[i]));
for(var j=0;j<_44.length;j++){
var _46=_44[j];
if(_46.style.visibility==""||_46.style.visibility=="visible"){
if(isWindows&&(_46.tagName=="EMBED"&&_46.getAttribute("wmode")=="transparent")){
continue;
}
aVisibleWindowizableElements.push(_46);
}
}
}
}
function doUpdateWindowizableComponentsHiddenStatus(){
for(var i=0;i<aVisibleWindowizableElements.length;i++){
var _48=aVisibleWindowizableElements[i];
if(!isInFloatingElements(_48)&&intersectsWithFloatingElements(_48)){
_48.style.visibility="hidden";
aHiddenWindowizableElements.push(_48);
aVisibleWindowizableElements=aVisibleWindowizableElements.without(_48);
i--;
}
}
for(var i=0;i<aHiddenWindowizableElements.length;i++){
var _48=aHiddenWindowizableElements[i];
if(!intersectsWithFloatingElements(_48)){
_48.style.visibility="visible";
aHiddenWindowizableElements=aHiddenWindowizableElements.without(_48);
aVisibleWindowizableElements.push(_48);
i--;
}
}
}
function intersectsWithFloatingElements(_49){
if(modalElement){
return true;
}
for(var i=0;i<aFloatingElements.length;i++){
if(elementsIntersect(_49,aFloatingElements[i])){
return true;
}
}
return false;
}
function isInFloatingElements(_4b){
if(modalElement){
var _4c=_4b.parentNode;
while(_4c){
if(_4c==modalElement){
return true;
}
_4c=_4c.parentNode;
}
return false;
}
for(var i=0;i<aFloatingElements.length;i++){
var _4e=aFloatingElements[i];
var _4c=_4b.parentNode;
while(_4c){
if(_4c==_4e){
return true;
}
_4c=_4c.parentNode;
}
}
return false;
}
function elementsIntersect(_4f,_50){
var s1=getBorderCoordinates(_4f);
var s2=getBorderCoordinates(_50);
return (s1.right>=s2.left&&s1.left<=s2.right&&s1.bottom>=s2.top&&s1.top<=s2.bottom);
}
function getBorderCoordinates(_53){
var _54=Position.cumulativeOffset(_53);
return {left:_54[0],top:_54[1],right:_54[0]+_53.offsetWidth,bottom:_54[1]+_53.offsetHeight};
}
function quoteElement(s){
s=s.replace(/&/g,"&amp;");
s=s.replace(/</g,"&lt;");
s=s.replace(/>/g,"&gt;");
return s;
}
function quoteAttr(s){
s=this.quoteElement(s);
if(s.indexOf("\"")!=-1){
if(s.indexOf("'")!=-1){
s="\""+s.replace(/"/g,"&quot;")+"\"";
}else{
s="'"+s+"'";
}
}else{
s="\""+s+"\"";
}
return s;
}
function dhtmlLoadScript(url){
FastInit.addOnLoad(function(){
var e=document.createElement("script");
e.defer=true;
e.src=url;
e.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
});
}
popupMessageSaver={};
function popupMessage(_59,_5a,_5b,_5c){
if(_5a=="alert"){
_59+="<table width=\"100%\" border=\"0\"><tr><td align=\"center\"><input type=\"button\" value=\"OK\" style=\"display: block;\" onclick=\"closePopupMessage()\" /></td></tr></table>";
}
var _5d=document.getElementsByTagName("body")[0];
var _5e=document.createElement("div");
var _5f=Position.realOffset(_5d);
var _60=document.createElement("table");
popupMessageSaver={blackmist:_5e,alligner:_60,oldonscroll:window.onscroll};
_60.style.position="absolute";
_60.style.zIndex=101;
_60.style.width="100%";
_60.style.height="100%";
_60.style.top=_5f[1]+"px";
_60.style.left=_5f[0]+"px";
var row=_60.insertRow(0);
var _62=row.insertCell(0);
_62.valign="center";
_62.align="center";
var _63=document.createElement("div");
_63.style.border="1px black solid";
_63.style.backgroundColor="white";
_63.style.textAlign="center";
_63.style.padding="20px";
_63.style.width="640px";
if(_5c){
for(i in _5c){
_63.style[i]=_5c[i];
}
}
_62.appendChild(_63);
_5d.appendChild(_60);
_63.innerHTML=_59;
hideWindowizableComponentsNotIn(_63);
_5e.style.height="300%";
_5e.style.width="100%";
_5e.style.backgroundColor="black";
_5e.style.display="none";
_5e.style.opacity=0;
_5e.style.position="absolute";
_5e.style.top=_5f[1]+"px";
_5e.style.left=_5f[0]+"px";
_5e.style.zIndex=100;
_5d.appendChild(_5e);
Effect.Appear(_5e,{from:0,to:0.7});
_59.evalScripts();
}
function closePopupMessage(){
var _64=document.getElementsByTagName("body")[0];
_64.removeChild(popupMessageSaver.blackmist);
_64.removeChild(popupMessageSaver.alligner);
showWindowizableComponentsNotIn(popupMessageSaver.alligner.firstChild.firstChild.firstChild);
}
function showGreyPopUp(url,_66,_67,_68){
var _69=new Ajax.Request(url,{method:"get",evalScripts:true,onComplete:function(_6a){
popupMessage(""+_6a.responseText,_66,_67,_68);
},onFailure:function(_6b,_6c){
logging.debug("Error "+_6b+" -- "+_6c);
},onException:function(_6d,_6e){
logging.debug("Exception "+_6d+" -- "+_6e);
}});
}
function showPopupDialogFromUrl(id,_70,url,_72,_73){
var _74={y:100,width:700,alignTop:true,modal:true,draggable:true,dialogTemplate:"default",dialogContentUrl:url,dialogMessage:_70};
if(!_73){
_73=[];
}
requires(["/statics/popupdialog.js"].concat(_73),function(){
withModule("PopupDialogManager",function(_75){
_75.createDialog(id,Object.extend(_74,_72));
});
});
}
function getWindowDimension(){
var _76=0,_77=0;
if(typeof (window.innerWidth)=="number"){
_76=window.innerWidth;
_77=window.innerHeight;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
_76=document.documentElement.clientWidth;
_77=document.documentElement.clientHeight;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
_76=document.body.clientWidth;
_77=document.body.clientHeight;
}
}
}
var _78=new Object();
_78.width=_76;
_78.height=_77;
return _78;
}
function getScrollOffset(){
var x,y;
if(self.pageYOffset){
x=self.pageXOffset;
y=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
x=document.documentElement.scrollLeft;
y=document.documentElement.scrollTop;
}else{
if(document.body){
x=document.body.scrollLeft;
y=document.body.scrollTop;
}
}
}
if(!x){
x=0;
}
if(!y){
y=0;
}
arrayScrollOffset=new Array(x,y);
return arrayScrollOffset;
}
function gotoNewBlog(){
window.location="http://"+member_domainname+"/index.php?l3=bl&amp;l4=edit";
}
function setGoogleInfo(){
var _7b=new String(document.location.host);
if(_7b.match(/hyves\.nl$/)){
_uacct="UA-288839-1";
_udn="hyves.nl";
_uff=0;
}else{
if(_7b.match(/hyves\.net$/)){
_uacct="UA-288839-2";
_udn="hyves.net";
_uff=0;
}else{
if(_7b.match(/hyves\.be$/)){
_uacct="UA-288839-3";
_udn="hyves.be";
_uff=0;
}else{
if(_7b.match(/hyves\.org$/)){
_uacct="UA-288839-4";
_udn="hyves.org";
_uff=0;
}else{
if(_7b.match(/hyves\.de$/)){
_uacct="UA-288839-5";
_udn="hyves.de";
_uff=0;
}else{
if(_7b.match(/hyves\.co\.uk$/)){
_uacct="UA-288839-6";
_udn="hyves.co.uk";
_uff=0;
}else{
if(_7b.match(/hyves\.es$/)){
_uacct="UA-288839-7";
_udn="hyves.es";
_uff=0;
}else{
if(_7b.match(/hyves\.it$/)){
_uacct="UA-288839-8";
_udn="hyves.it";
_uff=0;
}else{
_uacct="UA-288839-1";
_udn="hyves.nl";
_uff=0;
}
}
}
}
}
}
}
}
}
function detectNorton(){
if(typeof (SymWinOpen)!="undefined"||typeof (SymError)!="undefined"){
return true;
}else{
return false;
}
}
function detectNortonPopupBlocker(){
if(typeof (SymWinOpen)!="undefined"){
return true;
}else{
return false;
}
}
function WSARequest(){
this.callbackVar="ha_callback";
this.base_url=global_wsa_url+"/";
this.extraParams={ha_version:"1.0",ha_format:"json",ha_responsecode_always_200:"true",ha_fancylayout:"false",wsasecret:global_wsa_key};
}
WSARequest.prototype.log=logging.getLogger("WSARequest");
WSARequest.prototype.get=function(_7c,_7d,_7e){
Object.extend(this.extraParams,_7e);
var url=this.base_url+"?ha_method="+_7c+"&"+Object.toQueryString(this.extraParams);
var _80={callbackVar:this.callbackVar};
var _81=new JSONRequest();
_81.get(url,_7d,_80);
};
var _jsreqId=0;
var _jsreqCb={};
function JSONRequest_FlashResponse(_82,_83){
eval(_82);
}
function JSONRequest(){
this.options={callbackVar:"jsonp"};
}
JSONRequest.prototype.log=logging.getLogger("JSONRequest");
JSONRequest.prototype.get=function(url,_85,_86){
try{
var _87=this;
Object.extend(this.options,_86);
if(url.charAt(url.length-1)=="&"){
url=url.substring(0,url.length-1);
}
_jsreqId++;
var src=url+"&"+this.options.callbackVar+"=_jsreqCb.cb_"+_jsreqId;
if(this.options.allowFlashRequest&&window.flashLocalObject){
_jsreqCb["cb_"+_jsreqId]=function(_89){
try{
_85(_89);
}
catch(e){
_87.log.error("error in flash-json request callback: "+e,e);
}
try{
delete _jsreqCb["cb_"+_8a];
}
catch(e){
_87.log.error("could not remove callback element: "+e,e);
}
};
window.flashLocalObject.load(src,"JSONRequest_FlashResponse",""+_jsreqId);
}else{
var _8b=document.createElement("script");
var _8c="_jsreq"+_jsreqId;
_8b.id=_8c;
_8b.src=src;
var _8a=_jsreqId;
_jsreqCb["cb_"+_jsreqId]=function(_8d){
try{
_85(_8d);
}
catch(e){
_87.log.error("error in json request callback: "+e,e);
}
try{
delete _jsreqCb["cb_"+_8a];
Element.remove(_8c);
}
catch(e){
_87.log.error("could not remove callback element: "+e,e);
}
};
var _8e=document.getElementsByTagName("head").item(0);
_8e.appendChild(_8b);
}
}
catch(e){
this.log.error("unknown error in jsonrequest"+e,e);
}
};
function inEnvironment(_8f){
if(hyves_base_url.indexOf("startpda.net")!=-1&&_8f=="development"){
return true;
}else{
return false;
}
}
function rightIndexOf(s,ch){
for(var i=s.length-1;i>=0;i--){
if(s.charAt(i)==ch){
return i;
}
}
return -1;
}
function startsWith(_93,_94){
return _93.substring(0,_94.length)==_94;
}
function overrideDocumentWrite(id){
return "tmp=document.write;document.write=function(s){alert("+id+");document.getElementById('"+id+"').innerHTML=s;};document.write=tmp;";
}
function evalPhpadsScript(_96,_97){
eval("var document =  { write : function(arg) {\telement.innerHTML = arg; } };");
eval(_96);
}
function loadPhpadsScript(_98,id){
var _9a=document.getElementById(id);
evalPhpadsScript(_98,_9a);
}
function loadPhpadsScriptCode(_9b,id){
loadPhpadsScript(_9b,id,"code");
}
function loadPhpadsScriptUrl(_9d,id){
loadPhpadsScript(_9d,id,"url");
}
function cachablefile(src){
if(!window._dynjsload){
logging.error("no _dynjsload, was headerTemplates.js correctly included?");
return;
}
if(_dynjsload[src]){
return _dynjsload[src];
}else{
logging.error("could not map to cached url: "+src+" please add mapping to _dynjsload in headerTemplates.tpl");
return null;
}
}
var _dynjsloaded={};
var _dynjsloading={};
var _dynjscheck={};
var _dynjscheckid=0;
function jsloaded(src){
logging.debug("!!JSLOADED: "+src);
_dynjsloaded[src]=true;
delete _dynjsloading[src];
checkjsloaded();
}
function checkjsloaded(){
$H(_dynjscheck).each(function(_a1){
var id=_a1[0];
var _a3=_a1[1][0];
var _a4=_a1[1][1];
var _a5=0;
_a3.each(function(src,j){
if(_dynjsloaded[src]){
_a5+=1;
}
});
if(_a5==_a3.length){
delete _dynjscheck[id];
setTimeout(function(){
_a4();
},0);
}
});
}
var Hyves={log:logging.getLogger("Hyves"),domReadyFired:false,domReadyListeners:[],onDomReady:function(f){
if(this.domReadyFired){
setTimeout(f,0);
}else{
this.domReadyListeners.push(f);
}
},fireOnDomReady:function(){
if(this.domReadyFired){
return;
}else{
this.log.debug("** HYVES DOM READY **");
this.domReadyFired=true;
this.domReadyListeners.each(function(_a9,i){
try{
_a9();
}
catch(e){
}
});
}
},stripNortonRE:null,stripNorton:function(s){
if(!this.stripNortonRE){
this.stripNortonRE=new RegExp("\\s<script language=\"JavaScript\">\\s<!--[\\s\\S]*?\\s//-->\\s</script>\\s\\s","g");
}
if(s.indexOf("Sym")!=-1){
logging.debug("norton meuk found, stripping");
return s.replace(this.stripNortonRE,"","g");
}else{
return s;
}
}};
function requires(_ac,_ad){
if(!Hyves.domReadyFired){
Hyves.onDomReady(function(){
requires(_ac,_ad);
});
return;
}
var _ae=0;
var _af=[];
var _b0=[];
_ac.each(function(src,i){
if(startsWith(src,"module:")){
_af.push(src.substring("module:".length));
}else{
_b0.push(src);
}
});
if(_af.length>0){
var _ae=_af.length;
var _b3={};
while(_af.length>0){
var _b4=_af.pop();
withModule(_b4,function(_b5,_b6){
_ae--;
_b3[_b6]=_b5;
if(_ae==0){
requires(_b0,function(){
_ad(_b3);
});
}
});
}
return;
}
var _b7=[];
_ac.each(function(src,i){
try{
if(!_dynjsloaded[src]&&!_dynjsloading[src]){
var _ba=cachablefile(src);
if(!_ba){
logging.error("trying to include "+src+" but not declared in headerTemplates.tpl");
return;
}
var ext=src.substring(rightIndexOf(src,".")+1);
if(ext=="js"||ext=="tpl"){
var _bc=document.createElement("script");
_bc.src=_ba;
_bc.type="text/javascript";
_dynjsloading[src]=true;
}else{
if(ext=="css"){
var _bc=document.createElement("link");
_bc.rel="stylesheet";
_bc.type="text/css";
_bc.href=_ba;
_dynjsloaded[src]=true;
}else{
if(ext=="vbs"){
var _bc=document.createElement("script");
_bc.src=_ba;
_bc.type="text/vbscript";
_bc.onreadystatechange=function(){
if(_bc.readyState=="complete"){
jsloaded(src);
}
};
}else{
logging.error("unknown script language for include: "+src+", assuming js");
var _bc=document.createElement("script");
_bc.src=_ba;
_bc.type="text/javascript";
}
}
}
var _bd=document.getElementsByTagName("head").item(0);
_bd.appendChild(_bc);
}
if(!_dynjsloaded[src]){
_b7.push(src);
}
}
catch(e){
logging.error(""+e,e);
}
});
_dynjscheckid+=1;
_dynjscheck[_dynjscheckid]=[_b7,_ad];
checkjsloaded();
}
function identifier(s){
return s.replace(/[^0-9a-zA-Z_]/g,"");
}
function shakeWindow(){
if(parent.moveBy){
for(i=15;i>0;i--){
for(j=2;j>0;j--){
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
}
}
}
}
var _onidle={};
function onidle(id,_c0,f){
if(_onidle[id]){
clearTimeout(_onidle[id]);
}
_onidle[id]=setTimeout(function(){
delete _onidle[id];
f();
},_c0);
}
var _moduleInstances={};
var _moduleInstantiating={};
function withModule(_c2,f){
if(!Hyves.domReadyFired){
Hyves.onDomReady(function(){
withModule(_c2,f);
});
return;
}
if(_moduleInstances[_c2]){
f(_moduleInstances[_c2],_c2);
return;
}
if(_moduleInstantiating[_c2]){
_moduleInstantiating[_c2].push(f);
return;
}
if(!_modules[_c2]){
return;
}
_moduleInstantiating[_c2]=[f];
requires([_modules[_c2]],function(){
var _c4=function(_c5){
var _c6=eval("new "+_c2+"()");
if(_c5!=undefined){
$H(_c5).each(function(_c7){
var _c8=_c7[0].substring(0,1).toLowerCase()+_c7[0].substring(1);
var _c9=_c7[1];
_c6[_c8]=_c9;
});
}
_moduleInstances[_c2]=_c6;
var _ca=_c2.substring(0,1).toLowerCase()+_c2.substring(1);
window[_ca]=_c6;
_moduleInstantiating[_c2].each(function(_cb,i){
_cb(_moduleInstances[_c2],_c2);
});
delete _moduleInstantiating[_c2];
};
var _cd=eval(_c2+".prototype.requires");
if(_cd){
requires(_cd,_c4);
}else{
_c4();
}
});
}
Hyves.onDomReady(function(){
logging.debug("insert flash local object into document");
try{
var uid="flashLocal_"+Math.floor(Math.random()*10000);
var _cf=cachablefile("/statics/XMLStream.swf");
logging.debug("writing flash local object from path: "+_cf);
var _d0=new FlashTag(_cf,1,1,7);
_d0.setId("flashLocalObject");
_d0.setAllowScriptAccess("always");
_d0.setSwliveconnect("true");
_d0.setQuality("high");
_d0.addFlashVar("myUid",uid);
_d0.setBgcolor("ffffff");
var _d1=document.createElement("div");
_d1.id="flashLocalContainer";
var _d2=document.getElementsByTagName("body").item(0);
_d2.appendChild(_d1);
_d0.write(_d1);
logging.debug("flash local object written to document");
}
catch(e){
logging.error("error writing flash local object: "+e,e);
}
});
var flashLocalObjectLoaded=false;
var flashLocalObjectLoadedListeners=[];
function addOnFlashLocalObjectLoaded(_d3){
if(flashLocalObjectLoaded){
_d3();
}else{
flashLocalObjectLoadedListeners.push(_d3);
}
}
function FlashLocalObjectLoaded(){
logging.debug("flash local object loaded");
var _d4=$("flashLocalObject");
if(_d4.test&&(_d4.test(1,1)==2)){
logging.debug("test ok, setting flashLocalObject");
window.flashLocalObject=_d4;
flashLocalObjectLoadedListeners.each(function(_d5,i){
_d5();
});
flashLocalObjectLoadedListeners=[];
flashLocalObjectLoaded=true;
}else{
logging.debug("test failed, no flashLocalObject!");
}
}
function currentTimeSeconds(){
return new Date().getTime()/1000;
}
PIMP_SETTING_EXPIRE_TIMEOUT=1000*60*60*24*365*20;
function togglePimp(_d7,_d8){
if(_d8){
params=_d8+"&viewpimp="+(_d7?1:0);
new Ajax.Request("/",{postBody:params});
}
if(saf){
window.setTimeout(function(){
if(location.hash.substring(1,7)!="search"){
window.location.reload(true);
}
},500);
}
for(i in document.styleSheets){
if(document.styleSheets[i].title=="pimp"){
document.styleSheets[i].disabled=!_d7;
}
}
if(_d7){
if($("turnPimpOffButton")){
$("turnPimpOffButton").style.display="inline";
}
if($("turnPimpOnButton")){
$("turnPimpOnButton").style.display="none";
}
}else{
if($("turnPimpOffButton")){
$("turnPimpOffButton").style.display="none";
}
if($("turnPimpOnButton")){
$("turnPimpOnButton").style.display="inline";
}
}
}
_attachedInitialPresenceSelectors=[];
function attachInitialPresenceSelector(_d9){
initialPresenceSelector=$(_d9);
_attachedInitialPresenceSelectors.push(initialPresenceSelector);
if(getCookie("chatInitialPresence")){
initialPresenceSelector.value=getCookie("chatInitialPresence");
}
YAHOO.util.Event.removeListener(initialPresenceSelector,"change",null);
YAHOO.util.Event.addListener(initialPresenceSelector,"change",function(e){
var _db=this.value;
var _dc=new Date(new Date().getTime()+1000*60*60*24*365);
setCookie("chatInitialPresence",_db,_dc,"/",hyves_base_url,false);
_attachedInitialPresenceSelectors.each(function(x,i){
x.value=_db;
});
});
}
function editRelation(_df,_e0,_e1){
withModule("RelationEditor",function(_e2){
_e2.editRelation(_df,_e0,_e1);
});
}
function deleteRelation(_e3,_e4){
withModule("RelationEditor",function(_e5){
_e5.deleteRelation(_e3,_e4);
});
}
function confirmRelation(_e6,_e7){
withModule("RelationEditor",function(_e8){
_e8.confirmRelation(_e6,_e7);
});
}
function showRelation(_e9,_ea,_eb){
withModule("RelationEditor",function(_ec){
_ec.showRelation(_e9,_ea,_eb);
});
}
function poke(_ed){
withModule("PokeMeDialog",function(_ee){
_ee.showDialog(_ed);
});
}
function editHubModerator(_ef,_f0){
withModule("HubModeratorEditDialog",function(_f1){
_f1.showDialog(_ef,_f0);
});
}
function setCookie(_f2,_f3,_f4,_f5,_f6,_f7){
document.cookie=_f2+"="+escape(_f3)+((_f4)?"; expires="+_f4.toGMTString():"")+((_f5)?"; path="+_f5:"")+((_f6)?"; domain="+_f6:"")+((_f7)?"; secure":"");
}
function getCookie(_f8){
var dc=document.cookie;
var _fa=_f8+"=";
var _fb=dc.indexOf("; "+_fa);
if(_fb==-1){
_fb=dc.indexOf(_fa);
if(_fb!=0){
return null;
}
}else{
_fb+=2;
}
var end=document.cookie.indexOf(";",_fb);
if(end==-1){
end=dc.length;
}
return unescape(dc.substring(_fb+_fa.length,end));
}
function deleteCookie(_fd,_fe,_ff){
if(getCookie(_fd)){
document.cookie=_fd+"="+((_fe)?"; path="+_fe:"")+((_ff)?"; domain="+_ff:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function documentwrite(html){
document.write(html);
}
function autoDisableForm(id){
YAHOO.util.Event.addListener(id,"submit",function(){
setTimeout(function(){
$(id).disable();
},10);
});
}
_autocompletevaluesalreadyloading={};
function attachAutoCompleter(url,box,_104){
var _105=function(){
try{
if(_autocompletevaluesalreadyloading[box]){
return;
}
_autocompletevaluesalreadyloading[box]=true;
new Ajax.Request(url,{method:"get",onComplete:function(_106){
try{
new Autocompleter.Local(box,_104,_106.responseText.parseJSON());
}
catch(e){
logging.error("attachAutoCompleter.onComplete:"+e,e);
}
}});
}
catch(e){
logging.error("attachAutoCompleter:"+e,e);
}
};
YAHOO.util.Event.addListener(box,"focus",function(){
_105();
});
YAHOO.util.Event.addListener(box,"keyup",function(){
_105();
});
}
function fixFireFoxRenderBug(){
if(isFF){
var cc=$("center_container")||$("centercontents");
if(cc){
var _108=parseInt(cc.getStyle("width"));
cc.setStyle({width:(_108+0.1)+"px"});
window.setTimeout(function(){
cc.setStyle({width:_108+"px"});
},10);
}else{
logging.debug("Error: the #div.center_container could not be found");
}
}
}
function ffRenderBug(){
[100,1000,3000,6000,10000].each(function(_109){
window.setTimeout(fixFireFoxRenderBug,_109);
});
}
function actionate(e){
var _10b=$(e).innerHTML;
Element.update(e,"<img src='http://"+hyves_cache_url+"/images/ajax_action.gif'/>");
return _10b;
}
function printMedia(_10c,_10d,_10e){
var _10f=null;
if(_10e){
_10f=actionate(_10e);
}
if(_10c){
var _110="/index.php?module=Media&action=isPrintable";
var _111={mediaId:_10c};
var _112="/index.php?module=OrderItemPhoto&action=edit&mediaId="+_10c+"&photoFunId=PHOTO&albumId="+_10d;
var _113=templates.translate("PRINT_MEDIA_NO_RIGHT_TO_PRINT");
}else{
if(_10d){
var _110="/index.php?module=Album&action=isPrintable";
var _111={albumId:_10d};
var _112="/index.php?module=OrderItemPhoto&action=pickMediaForPrint&autoOpenAlbumId="+_10d;
var _113=templates.translate("PRINT_ALBUM_NO_RIGHT_TO_PRINT");
}
}
new Ajax.Request(_110,{parameters:_111,method:"get",evalScripts:true,onComplete:function(_114){
var _115=_114.responseText.parseJSON();
if(_115.success&&_115.printable){
window.location=_112;
}else{
alert(_113);
Element.update(_10e,_10f);
}
},onFailure:function(_116,_117){
logging.debug("Error "+_116+" -- "+_117);
Element.update(_10e,_10f);
},onException:function(_118,_119){
logging.debug("Exception "+_118+" -- "+_119);
Element.update(_10e,_10f);
}});
}
sSearchTerm=new Object();
currentsearch=undefined;
displayoverridden=false;
function doMemberSearch(_11a){
if(_11a==""){
_11a="SHOW_SEARCH_PAGE";
}
stateManager.changeState("searchhyver",_11a);
doMemberSearchHelper(_11a);
}
function doMemberSearchHelper(_11b){
doMemberSearchHelper.callcount++;
if(doMemberSearchHelper.callcount==1&&_11b==""){
return;
}
var _11c=$("contenttable");
var _11d=function(_11e,_11f){
if(currentsearch==_11e){
setTimeout(function(){
$("form_search_statusline").enable();
},10);
togglePimp(0);
_11c.innerHTML=_11f.stripScripts();
displayoverridden=true;
_11f.evalScripts();
}else{
logging.warn("got result for "+_11e+", but want result for "+currentsearch);
}
};
currentsearch=_11b;
if(_11b==""){
if(displayoverridden){
document.location.reload();
}
return;
}
if(_11b=="SHOW_SEARCH_PAGE"){
_11b="";
currentsearch=_11b;
}
if(sSearchTerm[_11b]=="busy"){
return;
}
if(sSearchTerm[_11b]!=undefined){
_11d(_11b,sSearchTerm[_11b]);
return;
}
sSearchTerm[_11b]="busy";
var url="/search/hyver?searchterms="+escape(_11b)+"&fullpageAjax=1";
var _121=new Ajax.Request(url,{method:"get",onComplete:function(_122){
var _123=_122.responseText;
sSearchTerm[_11b]=_123;
_11d(_11b,_123);
removeLoadingScreen();
},onLoading:function(){
var _124=Position.cumulativeOffset(_11c);
var div=$(document.createElement("div"));
div.id="loadingscreen";
div.setStyle({width:_11c.clientWidth,height:_11c.clientHeight,backgroundColor:"#cfdfef",position:"absolute",left:_124[0],top:_124[1],opacity:0.6,textAlign:"left",padding:"10px"});
div.innerHTML="<img src=\"http://"+hyves_cache_url+"/images/ajax_action_big.gif\" width=\"32\" height=\"32\">";
document.body.appendChild(div);
},onException:function(_126,_127){
logging.error(""+_127,_127);
}});
}
doMemberSearchHelper.callcount=0;
function removeLoadingScreen(){
if($("loadingscreen")){
$("loadingscreen").remove();
}else{
setTimeout(removeLoadingScreen,10);
}
}
function urchinTrackerClickHandler(_128){
if(typeof urchinTracker!="undefined"){
urchinTracker(this.getAttribute("urchinPath"));
}
}
function addUrchinTrackerToIds(ids){
YAHOO.util.Event.addListener(ids,"click",urchinTrackerClickHandler);
}
function attachSignalDeleteListeners(_12a,_12b){
for(var i=0;i<_12b.length;i++){
var _12d=_12b[i];
parmsCallback=function(_12e){
return function(){
return _12e;
};
}(_12d);
var _12f="signalDelete_"+_12d["signalId"]+"_"+_12d["creatorId"]+"_"+_12d["ownerId"];
_12a.addActionListener(_12f,"click",parmsCallback);
}
}
function attachSignalAddMemberBlockListeners(_130,_131){
for(var i=0;i<_131.length;i++){
var _133=_131[i];
var _134={"memberId":_133["creatorId"]};
parmsCallback=function(_135){
return function(){
return _135;
};
}(_134);
var _136="signalMemberBlockId_"+_133["signalId"]+"_"+_133["creatorId"];
_130.addActionListener(_136,"click",parmsCallback);
}
}
function attachMemberPreviewListeners(_137){
for(var i=0;i<_137.length;i++){
var _139=_137[i];
new AjaxTip($(_139["elemId"]),"/index.php?l1=fr&l2=it&l3=info&xmlHttp=1&memberId="+_139["memberId"],{hideOn:false,delay:0,hideAfter:0.25,className:"hyvestip",effect:"appear",hook:{target:"bottomRight",tip:"topLeft"}});
}
}
function getElementsByClassName(_13a,_13b,_13c){
var _13a="."+_13a;
if(!_13b&&!_13c){
return $$(_13a);
}
if(_13c){
var _13d=$(_13c).select(_13a);
}else{
var _13d=$$(_13a);
}
if(!_13b){
return _13d;
}else{
var _13e=[];
_13d.each(function(_13f,i){
if(_13f.tagName.toLowerCase()==_13b){
_13e.push(_13f);
}
});
return _13e;
}
}
Array.prototype.decorate=function(_141){
var r=[];
var il=this.length;
var nl=_141.length;
for(var i=0;i<il;i++){
var o={};
for(var j=0;j<nl;j++){
o[_141[j]]=this[i][j];
}
r.push(o);
}
return r;
};
Array.prototype.prefix=function(p){
var i=0;
for(i=0;i<this.length;i++){
this[i]=p+this[i];
}
return this;
};
function isFormElement(e){
return " button textarea input select option ".indexOf(" "+e.tagName.toLowerCase())!=-1;
}
if(String.prototype.parseJSON!=undefined){
String.prototype._parseJSON=String.prototype.parseJSON;
String.prototype.parseJSON=function(){
return Hyves.stripNorton(this)._parseJSON();
};
}
function dartcallback(_14b,id){
if(_14b=="has_ad"){
var _14d=/^[0-9]+$/;
if(!id.match(_14d)){
return false;
}
var el;
if(el=$("dartholder_"+id)){
el.show();
fixFireFoxRenderBug();
}
}
}


