if(self.scriptParsing) { scriptParsing("bp"); }
(function(){var e,b={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
var c,f={array:function(g){var j=[],h=g.length,k;
for(var m=0;
m<h;
m+=1){try{k=c(g[m])
}catch(n){k=null
}if(k===null){return null
}j.push(k)
}return"["+j.join(",")+"]"
},"boolean":function(g){return String(g)
},"null":function(g){return"null"
},"undefined":function(g){return"null"
},number:function(g){return isFinite(g)?String(g):"null"
},object:function(g){if(!g){return"null"
}if(g instanceof Array||g.callee){return f.array(g)
}var h=[],j;
for(var k in g){k=String(k);
if(k.substr(k.length-3,3)=="___"){continue
}try{j=c(g[k])
}catch(l){j=null
}if(j===null){return null
}h.push(f.string(k)+":"+j)
}return"{"+h.join(",")+"}"
},string:function(g){g=g.replace(/([\x00-\x1f\\"])/g,function(i,h){var j=b[h];
if(j){return j
}j=h.charCodeAt();
return"\\u00"+Math.floor(j/16).toString(16)+(j%16).toString(16)
});
return'"'+g+'"'
}};
c=function(g){var h=f[typeof g];
if(!h){return null
}g=h(g);
return(typeof g=="string")?g:null
};
var a,d={array:function(h){var k=[],s,j=h.length,n;
var g=j>20?20:j;
if(e<0){return"[array-too-deep]"
}for(var p=0;
p<g;
p+=1){try{n=a(h[p])
}catch(q){n="[exception: "+q+"]"
}k.push(n)
}if(g<j){k.push("[and-"+(j-g)+"-others]")
}return"[ "+k.join(", ")+" ]"
},"boolean":function(g){return String(g)
},"null":function(g){return"null"
},"undefined":function(g){return"undefined"
},number:function(g){return isFinite(g)?String(g):"infinity"
},object:function(g){if(!g){return"null"
}if(g instanceof Array||g.callee){return d.array(g)
}var h=[],j,l=0;
if(e<0){return"[object-too-deep]"
}for(var k in g){l++;
if(l>=20){h.push("[and-others]");
break
}k=String(k);
if(k.substr(k.length-3,3)=="___"){continue
}try{j=a(g[k])
}catch(m){j="[exception: "+m+"]"
}h.push(d.string(k)+":"+j)
}return"{ "+h.join(", ")+" }"
},string:function(g){g=g.replace(/([\x00-\x1f\\"])/g,function(i,h){var j=b[h];
if(j){return j
}j=h.charCodeAt();
return"\\0"+Math.floor(j/16).toString(16)+(j%16).toString(16)
});
return'"'+g+'"'
}};
var a=function(g){var h=d[typeof g];
if(!h){return"["+(typeof g)+"]"
}e--;
g=h(g);
e++;
return(typeof g=="string")?g:"[error]"
};
window.toSemiJson=function(g,h){e=h||2;
return a(g)
};
window.toJson=function(g,h){e=2;
return h?a(g):c(g)
}
})();
var fromJson=function(str){if(!str){return false
}try{return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(str.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+str+")")
}catch(e){return false
}};
function getGet(a){var c=document.location.href.split("?");
if(!c[1]){return null
}c=c[1].split("#")[0].split("&");
for(var b=0;
b<c.length;
b++){var d=c[b].split("=");
if(d[0]==a){return decodeURIComponent(d[1])
}}}function trackPageview(a){if(!a){return
}try{if(window._gaq){_gaq.push(["_trackPageview",a])
}}catch(b){}}function trackEvent(a){if(!a){return
}try{if(window._gaq){_gaq.push(["_trackEvent"].concat(a))
}}catch(b){}}window.dd=new (function(){var b="undefined";
var a=this.ua=navigator.userAgent.toLowerCase();
this.db=(document.compatMode&&document.compatMode.toLowerCase()!="backcompat")?document.documentElement:(document.body||null);
this.op=!!(window.opera&&document.getElementById);
this.ie=!!(a.indexOf("msie")>=0&&document.all&&this.db&&!this.op);
this.ie7=!!(this.ie&&(a.indexOf("msie 7")>=0||a.indexOf("msie 8")>=0));
this.ie6=this.ie&&!this.ie7;
this.iemac=!!(this.ie&&a.indexOf("mac")>=0);
this.ie4=!!(this.ie&&!document.getElementById);
this.n4=!!(document.layers&&typeof document.classes!=b);
this.n6=!!(typeof window.getComputedStyle!=b&&typeof document.createRange!=b);
this.w3c=!!(!this.op&&!this.ie&&!this.n6&&document.getElementById);
this.ce=!!(document.captureEvents&&document.releaseEvents);
this.ff3=a.indexOf("firefox/3.")>=0||a.indexOf("iceweasel/3.")>=0;
this.webkit=a.indexOf("webkit")>=0;
this.iphone=a.indexOf("iphone")>=0||a.indexOf("ipod")>=0;
this.android=a.indexOf("android")>=0;
this.png=getGet("png")?fromJson(getGet("png")):(!this.ie||this.ie7);
this.linux=a.indexOf("linux")>=0
});
var R="/d/";
if(typeof self.encodeURIComponent=="undefined"){window.encodeURIComponent=escape
}if(typeof self.decodeURIComponent=="undefined"){window.decodeURIComponent=unescape
}String.prototype.strip=function(){return this.replace(/^\s*|\s*$/g,"")
};
function escapeHtml(a){if(a===undefined||a===null){return""
}if(!a.replace){a=new String(a)
}return a.replace(/&/g,"&amp;").replace(/</g,"&lt;")
}function unescapeHtml(a){return a.replace(/&lt;/g,"<").replace(/&amp;/g,"&")
}function escapeHtmlString(a){if(a===undefined||a===null){return""
}if(!a.replace){a=new String(a)
}return a.replace(/&/g,"&amp;").replace(/'/g,"&#039;").replace(/"/g,"&quot;")
}if(!window.dbgEnabled){window.dbgEnabled=getGet("dbg")
}var dbgPrnt,lastDbgs=window.lastDbgs=[];
function DBG_real(j){try{if(!window.document||!document.body){return
}var c=[];
for(var g=0;
g<j.length;
g++){var m=j[g];
if(typeof m=="string"){m=m.replace(/[\x00-\x1F]/g,function(a){var e=a.charCodeAt(0);
return"\\"+Math.floor(e/16).toString(16)+(e%16).toString(16)
});
c.push(escapeHtml(m));
continue
}if(window.toSemiJson){var l=toSemiJson(m);
if(typeof l=="string"){c.push("<span style='color: #8ff;'>"+escapeHtml(l)+"</span>");
continue
}}c.push("<span style='color: red;'>"+escapeHtml(""+m)+"</span>")
}var u=c.join('<span style="color: #666;"> _ </span>');
if(!dbgPrnt){var d="DBG_parent";
if(getGet("dbg")=="x"){var p=window.open("about:blank");
p.document.write("<table width='100%'><tbody id='"+d+"' style='color: white'></tbody></table>");
p.document.close();
dbgPrnt=p.document.getElementById(d)
}else{var n=document.createElement("span");
n.innerHTML="<table width='250' style='width: 250px; position: absolute; top: 0px; left: 100%; overflow: auto; border: 2px solid white; background-color: black; color: white; filter: alpha(opacity=70); opacity: 0.7; z-index: 500000;'><tbody id='"+d+"'></tbody></table>";
if(document.body.firstChild){document.body.insertBefore(n,document.body.firstChild)
}else{document.body.appendChild(n)
}dbgPrnt=document.getElementById(d)
}}var f=document.createElement("td");
f.style.borderBottom="1px dashed #808080";
f.innerHTML=u;
var k=document.createElement("tr");
k.style.backgroundColor=dbgPrnt.childNodes.length&1?"black":"#202020";
k.appendChild(f);
dbgPrnt.appendChild(k)
}catch(h){if(!window.dbgFailed){var q="DBG failed: "+h;
if(window.oldAlert){oldAlert(q)
}else{alert(q)
}window.dbgFailed=true
}}}function DBG(){lastDbgs.push(arguments);
if(lastDbgs.length>16){lastDbgs.shift()
}if((0||dbgEnabled=="console")&&typeof window.console=="object"&&typeof console.log=="function"){if(dd.webkit){console.log(window.toSemiJson?toSemiJson(arguments):"webkitNoToSemiJson")
}else{console.log.apply(console.log,arguments)
}}if(dbgEnabled&&dbgEnabled!="console"){DBG_real(arguments)
}}function enableDBG(){dbgEnabled=true;
for(var a=0;
a<lastDbgs.length;
a++){DBG_real(lastDbgs[a])
}}window.realAlert=window.alert;
function displayError(f){if(typeof f=="object"){DBG("displayError: ",(f.description||f.problem||f.name)," @ ",f.file,":",f.line)
}var b="<b>Something went wrong. Sorry.</b> You can try <a href='mailto:errors@blurrypeople.com'>emailing us</a> about it. We might choose not to reply though.";
var a=document.getElementById("errorDiv");
if(a){a.parentNode.removeChild(a)
}var g=30+(document.documentElement?document.documentElement.scrollTop:document.body.scrollTop);
var c=document.createElement("span");
c.innerHTML='<div id="errorDiv" style="position: absolute; top: '+g+'px; left: 260px; z-index: 15000; width: 160px; height: 100px; border: 2px solid red; background-color: white;">'+b+' <span class="link" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">(close)</span></div>';
try{document.body.insertBefore(c.firstChild,document.body.firstChild)
}catch(d){}}window.xEval=eval;
function objectEmpty(b){for(var a in b){return false
}return true
}function objectsSimilar(c,b){if(c===b){return true
}if(typeof(c)!="object"||typeof(b)!="object"){return false
}for(var a in c){if(c[a]!==b[a]){return false
}}for(var a in b){if(b[a]!==c[a]){return false
}}return true
}function walkTree(b,e,d){if(d===undefined){d=false
}if(e.length==undefined){return d
}var a=b;
for(var c=0;
c<e.length;
c++){a=a[e[c]];
if(a===undefined){return d
}}return a
}function objFirst(b){if(b){for(var a in b){return b[a]
}}}function objCount(b){var d=0;
for(var a in b){d+=1
}return d
}function clone(d,c){if(!d||typeof d!="object"){return d
}var b;
if(d.reverse||d.callee){b=[];
if(c){for(var a=0;
a<d.length;
a++){b[a]=d[a]
}}else{for(var a=0;
a<d.length;
a++){b[a]=clone(d[a])
}}}else{b={};
if(c){for(var a in d){b[a]=d[a]
}}else{for(var a in d){b[a]=clone(d[a])
}}}return b
}function fetchProp(c,a){var b=c[a];
if(typeof b!="undefined"){delete c[a]
}return b
}function delProps(c,a){for(var b=0;
b<a.length;
b++){delete c[a[b]]
}}function callback(b,c,e){if(!b){return
}if(b===true){return xEval(c.join(";"))
}var j=typeof b;
if(j=="string"){j="function";
if(typeof self[b]!=j){return xEval(b)
}b=self[b];
e=self
}if(j=="function"){return c?b.apply(e||self,c):b.call(e||self)
}if(j!="object"){throw"unexpected callback type "+j
}if(b.reverse||b.callee){var g=b,k=1,h=true;
b=g[0];
if(b===false){h=false;
b=g[k++]
}if(typeof b=="object"){e=b;
b=g[k++]
}if(typeof b=="string"){b=(e||self)[b]
}var f=[];
for(var d=k;
d<g.length;
d++){f.push(g[d])
}if(h){for(var d=0;
d<(c?c.length:0);
d++){f.push(c[d])
}}c=f
}else{e=b;
var a=c.shift();
b=e[a];
if(!b){b=e.__call;
if(!b){throw"callback method fetch undefined: "+toJson(arguments,true)
}c.unshift(a)
}}if(!b.apply){alert("callback error: ",b)
}else{return c?b.apply(e,c):b.call(e)
}}function setCallbackTimeout(a,b){return setTimeout(function(){callback(a)
},b)
}function mkcb(a){return function(){callback(a,arguments)
}
}var extendObject=function(a,b){for(var c in b){a[c]=b[c]
}};
var objectExtensions=new (function(){var b=function(g,f,d,e,c){while(f<g.length){if(g[f][d]){return g[f][d].call(this,e,c)
}f++
}return
};
var a=this.sup=function(d,e,c){var g=this.Sup;
if(!g){DBG("attempting to call non-existing super ",d);
return
}for(var f=0;
f<g.length;
f++){if(g[f][d]===a.caller){return b.call(this,g,f+1,d,e,c)
}}return b.call(this,g,0,d,e,c)
};
this.extend=function(d){for(var c in d){this[c]=d[c]
}return this
};
this.copyTo=function(d){for(var c in this){d[c]=this[c]
}};
this.newWithProto=function(){var c=function(){};
c.prototype=this;
return new c()
};
this.timeout=function(d,c,f){d="_to_"+d;
var e=this;
if(this[d]){clearTimeout(this[d]);
if(!c){delete this[d]
}}if(c){this[d]=setTimeout(function(){delete e[d];
callback(c,undefined,e)
},f)
}};
this.fetch=function(d){var c=this[d];
if(typeof c!="undefined"){delete this[d]
}return c
};
this.basics=[]
})();
window.makeClass=(function(){var a=function(d){if(d.length==1&&d[0]!=null&&typeof d[0]=="object"&&!d[0].reverse&&!(d[0].ownerDocument&&d[0].tagName)){d=d[0];
for(var f in d){this[f]=d[f]
}}else{var c=this.basics;
for(var e=0;
e<d.length;
e++){this[c[e]]=d[e]
}}if(this.init){this.init()
}};
return function(e,b){var d=function(){return a.call(this,arguments)
};
var c=objectExtensions;
if(e.inherit){b=e.inherit;
delete e.inherit
}if(b){c=b.prototype||b;
e.Sup=c.Sup?[c].concat(c.Sup):[c]
}d.prototype=c.newWithProto().extend(e);
return d
}
})();
var watchExtensions=new (function(){objectExtensions.copyTo(this);
var b=function(h){var g=this.watchMode;
if(!g){return
}var h=h.sort();
var d;
for(var f=0;
f<h.length;
f++){var m=h[f].split(" ");
if(d){if(g==2){if(m[0]==d[0]&&m[1]==d[1]){continue
}}else{if(m[0]==d[0].slice(0,m[0].length)){continue
}}}var l=this._watch[m[1]];
if(typeof l!="object"||!l.length){continue
}var c=m[0].split(":");
c.shift();
var k=[];
for(var e=0;
e<l.length;
e++){k.push(l[e])
}for(var e=0;
e<k.length;
e++){if(callback(k[e],c,this)===false||g==1){break
}}d=m
}};
this.startWatchBatching=function(){if(!this._trigWatchDepth){this._trigWatchDepth=1;
this._trigWatchList=[]
}else{this._trigWatchDepth++
}};
this.endWatchBatching=function(){if(!this._trigWatchDepth){return
}this._trigWatchDepth--;
if(this._trigWatchDepth){return
}var c=this._trigWatchList;
delete this["_trigWatchList"];
delete this["_trigWatchDepth"];
b.call(this,c)
};
this.addWatch=function(){var e=this._watch;
if(!e){e=this._watch={}
}var g="";
for(var f=0;
f<=arguments.length-2;
f++){var d=arguments[f];
g+=":"+(d=="*"?"{}":d);
if(!e[g]){e[g]=true
}}var c=arguments[arguments.length-1];
if(typeof e[g]=="object"){e[g].push(c)
}else{e[g]=[c]
}};
this.delWatch=function(){var e=this._watch;
if(!e){return
}var h="";
for(var g=0;
g<=arguments.length-2;
g++){var d=arguments[g];
h+=":"+(d=="*"?"{}":d)
}var f=e[h];
if(typeof f!="object"){return
}var c=arguments[arguments.length-1];
if(c){for(var g=0;
g<f.length;
g++){if(objectsSimilar(c,f[g])){f.splice(g--,1)
}}}else{e[h]=true
}};
var a=function(k,t,g,v,m,l){var d=v.shift();
var n=k[d];
if(typeof n=="function"){n.apply(k,v);
return
}var f=[];
for(var j=0;
j<g.length;
j++){var q=g[j];
if(!j||t[q+":"+d]){f.push(q+":"+d)
}if(t[q+":{}"]){f.push(q+":{}")
}}g=f;
var u=false,e=true;
if(v.length<2){var s=v[0];
if(s===null){s=undefined
}if(s===n){}else{if(typeof s=="object"){if(typeof n!="object"){if(l==2){n=k[d]=(s instanceof Array)?[]:{}
}else{k[d]=s;
n=null
}u=true;
e=false
}if(n){for(var h in s){var c=a(n,t,g,[h,s[h]],m,l);
if(c){u=true;
if(c==1){e=false
}}}}}else{if(typeof n=="object"&&l==2){for(var h in n){a(n,t,g,[h,null],m,l)
}}if(s===undefined){delete k[d]
}else{k[d]=s
}u=true;
e=false
}}}else{if(typeof n!="object"){n=k[d]={};
u=true;
e=false
}var c=a(n,t,g,v,m,l==1&&u?0:l);
if(c){u=true;
if(c==1){e=false
}}}if(!u){return 0
}if(!l){return 1
}if(l==1&&e){return 2
}for(var j=0;
j<g.length;
j++){var p=g[j];
if(typeof t[p]=="object"&&p.length){m.push(g[0]+" "+p);
if(l==1){return 2
}e=true
}}return e?2:1
};
this.setVar=function(){var e=[];
for(var c=0;
c<arguments.length;
c++){e.push(arguments[c])
}var f=this._trigWatchList||[];
var d=a(this,this._watch||{},[""],e,f,this.watchMode||1);
if(this.watchMode&&d&&(d==1||this.watchMode==2)&&this._watch&&this._watch[""]){f.push(" ")
}if(!this._trigWatchList){b.call(this,f)
}};
this.setVarList=this.onDelta=this.mergeVarList=function(){this.startWatchBatching();
var d=0,g=[],f=[];
for(;
d<arguments.length&&(typeof arguments[d]!="object"||arguments[d]===null);
d++){g.push(arguments[d])
}for(;
d<arguments.length;
d++){f.push(arguments[d])
}if(!f.length){this.setVar.apply(this,g)
}else{if(f.length==1&&(f[0] instanceof Array)&&typeof(f[0][0])=="object"){f=f[0]
}for(var d=0;
d<f.length;
d++){var e=f[d];
if(e instanceof Array){this.setVar.apply(this,g.concat(e))
}else{for(var c in e){this.setVar.apply(this,g.concat([c,e[c]]))
}}}}this.endWatchBatching()
};
this.watchMode=2
})();
var domElementExtensions=new (function(){objectExtensions.copyTo(this);
var c=this.destruct=function(){var f;
if(f=this._w){if(f.root==this){if(f.unfinish){f.unfinish()
}delete f.root;
if(f.deinit){f.deinit()
}}this._w=null
}if(this._h){this._h=null
}if(f=this._d){f.deinit()
}if(f=this._t){f.undraw();
if(f.deinit){f.deinit()
}}var j=this.childNodes;
for(var g=0;
g<j.length;
g++){var h=j.item(g);
if(h.childNodes){c.call(h)
}}};
var d=function(e,g,f){if(f){if(f===true){c.call(e);
return e.parentNode.replaceChild(g,e)
}if(typeof f!="object"){f=e.firstChild
}}if(f){e.insertBefore(g,f)
}else{e.appendChild(g)
}};
this.insertHtml=function(l,j){var i=false;
if(typeof j=="object"&&j!==null){if(!j.addDynamics){d(this,j,l);
return j
}DBG("DEPRECATED: insertHtml(widget)");
i=j;
j=i.getHtml()
}var f=0,m,e=document.createElement("div");
if(l===true){m=this.parentNode;
if(!m){DBG("tagName: "+this.tagName+", innerHTML: "+this.innerHTML+", _w.name: "+(this._w?this._w.name:"_w unset")+", _w.basics: "+(this._w?this._w.basics:"_w unset")+"");
silentErr("replacing DOM element without parent");
m=document.createElement("span");
m.appendChild(this)
}}else{m=this
}m=m.tagName.toLowerCase();
if(m=="table"||m=="tbody"){j="<table><tbody>"+j+"</tbody></table>";
f=2
}else{if(m=="tr"){j="<table><tbody><tr>"+j+"</tr></tbody></table>";
f=3
}}e.innerHTML=j;
while(f--){e=e.firstChild
}var g,k,h=e.firstChild;
if(!h&&(typeof j!="string"||j.strip()!="")){h=document.createElement("span");
if(window.closed||!document.body){return h
}silentErr("failed to insertHtml: "+toSemiJson(j)+" | tag="+m+" | before="+toSemiJson(l)+"")
}for(k=h;
k;
k=g){g=k.nextSibling;
d(this,k,l)
}if(i){i.addDynamics(h)
}return h
};
this.appendHtml=function(e){return this.insertHtml(null,e)
};
this.prependHtml=function(e){return this.insertHtml(this.firstChild,e)
};
this.setHtml=function(g){var j=this.childNodes;
for(var f=0;
f<j.length;
f++){var h=j[f];
if(h.childNodes){c.call(h)
}}this.innerHTML="";
if(g&&g!=""){return this.insertHtml(null,g)
}};
this.replaceWith=function(e){return this.insertHtml(true,e)
};
this.unlink=function(){this.parentNode.removeChild(this)
};
var a;
this.remove=function(){if(!a){a=document.createElement("span")
}this.destruct();
a.appendChild(this);
a.innerHTML=""
};
this.fireCallback=function(f){var e=this[f];
if(e){e()
}this.addCallback(f,null);
this._h[f]=true
};
var b={};
this.addCallback=function(i,k,f,j){if(j&&this.hasCallback(i,k)){return false
}if(!this._h){this._h={}
}var h=this._h[i];
if(!h){this._h[i]=h=[]
}else{if(h===true){return callback(k)
}}var g=this[i];
var e=b[i];
if(!e){e=b[i]=function(){var l=(this._h?this._h[i]:[])||[];
for(var m=0;
m<l.length;
m++){if(callback(l[m],arguments,this)===false){return false
}}}
}if(e!==g){this[i]=e;
if(window==this&&dd.ie){window[i]=e
}if(typeof g=="function"){h.push(g)
}}if(f){h.unshift(k)
}else{h.push(k)
}};
this.addCallbacks=function(f){for(var e in f){this.addCallback(e,f[e])
}};
this.delCallbacks=function(f){for(var e in f){this.delCallback(e,f[e])
}};
this.delCallback=function(h,e){var j=this._h;
if(!j){return
}var f=j[h];
if(!f){return
}if(e){for(var g=0;
g<f.length;
g++){if(objectsSimilar(e,f[g])){f.splice(g--,1)
}}}else{f=[]
}if(f.length){j[h]=f
}else{this[h]=null;
delete j[h];
if(objectEmpty(j)){this._h=null
}}};
this.hasCallback=function(h,e){var j=this._h;
if(!j){return false
}var f=j[h];
if(!f){return false
}for(var g=0;
g<f.length;
g++){if(objectsSimilar(e,f[g])){return true
}}};
this.addClass=function(e){var f=this.className;
this.className=f?f+" "+e:e
};
this.delClass=function(f){var h=[],g=this.className;
if(!g){return
}g=g.split(" ");
for(var e=0;
e<g.length;
e++){if(g[e]!=f){h.push(g[e])
}}this.className=h.join(" ")
};
this.hasClass=function(e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(this.className||"")
}
})();
function $(b){if(typeof b=="string"){b=document.getElementById(b)
}for(var a=1;
a<arguments.length;
a++){if(b){b=b.childNodes[arguments[a]]
}}if(b&&!b.extend){domElementExtensions.copyTo(b)
}return b
}$(document);
$(window);
window.addCallback("onunload",function(){window._h=[];
document._h=[];
$(document.body).destruct()
});
function deleteCookie(a,b){try{document.cookie=a+"=; path=/; expires=Sat, 04-Oct-1980 00:00:01 GMT; "+(b?"; domain="+b:"");
DBG('deleting cookie "'+a+'" (domain '+b+")")
}catch(c){DBG("not allowed to delete cookie for domain "+b)
}}function getCookie(d){var f=document.cookie.split(";");
var a;
for(var e=0;
e<f.length;
e++){var g=f[e].strip().split("=");
if(g[0]==d){var b=decodeURIComponent(g[1]);
if(a&&a!=b&&window.ev){ev.send("log","double cookie '"+d+"': '"+a+"'!='"+b+"', agent: "+navigator.userAgent+"")
}a=b
}}return a
}function cookiesEnabled(){var b="PaiqTestCookie";
var a=b+"=1; path=/";
document.cookie="x"+a;
document.cookie="y"+a;
if(!getCookie("x"+b)){return false
}deleteCookie("x"+b);
deleteCookie("y"+b);
return true
}(function(){var c=objectExtensions.newWithProto();
var k=1,f=["INIT"],i=true,j,m;
var g=function(){if(!j){j=$("waitingIndicator");
if(!j){return
}loadingParent=j.parentNode
}if(k>0){if(!i){i=true;
loadingParent.appendChild(j);
j.style.top=(window.pageYOffset||(document.documentElement?document.documentElement.scrollTop:document.body.scrollTop)||0)+"px"
}c.timeout("loading",m,window.incrLoadingTimeout||25000)
}else{if(i){i=false;
j.unlink();
c.timeout("loading")
}k=0
}};
window.incrLoading=function(p){k+=1;
var n=window.incrLoading.caller;
f.push(((n&&n.signature)?n.signature():"NOSIG")+(p?":"+p:""));
c.timeout("loadingDelay",g,0)
};
var h=window.decrLoading=function(n){k-=(n||1);
if(k<=-0){f=[]
}c.timeout("loadingDelay",g,0)
};
var d=window.scriptLoadStatus=window.scriptLoadStatus||{};
var e=[];
var m=function(){if(!k){return
}var n="forceDecr loading: "+k+" of "+f.join(",");
DBG(n);
if($("waitingIndicator")&&window.errReport){errReport(n)
}h(k)
};
c.timeout("loading",m,30000);
var a=false;
window.getFlashVersion=function(){if(a){return a
}if(navigator.plugins&&navigator.mimeTypes.length){var n=navigator.plugins["Shockwave Flash"];
if(n&&n.description){a=n.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")
}}else{try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")
}catch(q){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
a=[6,0,21];
p.AllowScriptAccess="always"
}catch(q){if(a[0]==6){return a
}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
}catch(q){}}if(p!=null){a=((p.GetVariable("$version")||"").split(" ")[1]||"").split(",")
}}if(!a){a=[0]
}return a
};
window.flashAvailable=function(p,q,n){if(!p){p=6
}var s=getFlashVersion();
if(s[0]!=p||!q){return s[0]>=p
}if(s[1]!=q||!n){return s[1]>=q
}return s[2]>n
};
window.scriptParsing=function(n){DBG("scriptParsing:",n);
if(d[n]==1){d[n]=2
}};
var b=function(){DBG("scriptLoadStatusChanged");
for(var p,n;
(n=e[0])!==undefined&&(p=d[n[0]])>=3;
){DBG("(1)");
if(p==4){DBG("scriptReady callback",toSemiJson(n[1]));
callback(n[1])
}e.shift()
}DBG("(2)")
};
window.scriptReady=function(n){DBG("scriptReady:",n);
if(d[n]&&d[n]<3){h()
}d[n]=4;
b()
};
window.isLoaded=function(n){DBG(d);
if(typeof n=="object"){n=n.name||n.url
}return d[n]>=4
};
var l=function(p,n){DBG("polling for func "+p);
if(self[p]){scriptReady(n);
return
}setTimeout(function(){l(p,n)
},100)
};
window.loadCall=function(n,u){if(typeof n=="string"){n={url:n}
}else{if(n.reverse||n.callee){var t=n.length;
for(var w=0;
w<n.length;
w++){loadCall(n[w],function(){if(t--==1){callback(u)
}})
}return
}}var p=n.url=(window.jsVersions||{})[n.url]||n.url;
var q=n.name=n.name||p.match(/^(.*\/)?(.*)/)[2].split(".")[0];
var v=d[q]||0;
e.push([q,u]);
if(v>=4){setTimeout(b,0)
}else{if(!v){d[q]=1;
incrLoading(q);
var y=false;
DBG("Loading "+q+": "+p);
if(n.flash){loadFlashObject(n)
}else{var x=document.createElement("SCRIPT");
x.src=p;
x.type="text/javascript";
document.getElementsByTagName("head").item(0).appendChild(x)
}if(n.poll){l(n.poll,q)
}}}};
window.callOnLoad=function(p,n){var q=d[p]||0;
e.push([p,n]);
if(q>=4){setTimeout(b,0)
}};
window.callAgainWhenLoaded=function(q,t,p){if(isLoaded(q)){return false
}var n=[t];
for(var s=0;
s<p.length;
s++){n.push(p[s])
}loadCall(q,n);
return true
}
})();
function cancelEvent(b,a){b=b||window.event;
if(!b){}else{if(b.preventDefault){if(!a){b.preventDefault()
}b.stopPropagation()
}else{if(!a){b.returnValue=false
}b.cancelBubble=true
}}return false
}function getKeyCode(a){return a?(a.keyCode||a.which):(window.event?window.event.keyCode:0)
}function getSelectValue(a){if(a.selectedIndex<0){return undefined
}return a.childNodes[a.selectedIndex].value
}function setOpacity(a,b){if(dd.ie){a.style.filter="Alpha(opacity="+parseInt(100*b)+")"
}else{a.style.opacity=b
}}function getOpacityCss(a){if(dd.ie){return" filter: alpha(opacity="+(a*100)+");"
}return"opacity: "+a+";-moz-opacity: "+a+";"
}function viewportSize(){var c,a,b;
if(c=window.innerWidth){a=window.innerHeight
}else{if((b=document.documentElement)&&(c=b.clientWidth)){a=b.clientHeight
}else{if(document.body&&(c=document.body.clientWidth)){a=document.body.clientHeight
}else{c=950;
a=700
}}}return[c,a]
}function gId(a){return document.getElementById(a)
}function addSlashes(a){a=a.replace(/\\/g,"\\\\");
a=a.replace(/'/g,"\\'");
return a.replace(/"/g,'\\"')
}function safeLink(b,a,c){c=c?"target='"+escapeHtmlString(c)+"' ":"";
return"<a "+c+'href="'+escapeHtmlString(b)+'">'+escapeHtml(a)+"</a>"
}window.e2h=function(a){var b=document.createElement("span");
b.appendChild(a);
return b.innerHTML
};
function formatXml(g){var f=/(<|\/>)/;
var b,h="",a=1,d=false,c;
while(b=f.exec(g)){c=d;
d=false;
h+=g.substring(0,b.index);
var j=a;
if(b[0]=="<"){if(g.substr(b.index+1,1)=="/"){j=(a-=1)
}else{a+=1;
d=true
}if(d||!c){h+="<br />";
for(var e=0;
e<j;
e++){h+="&nbsp;&nbsp;&nbsp;"
}}h+="&lt;"
}else{a-=1;
h+="/&gt;"
}g=g.substring(b.index+b[0].length)
}h+=g;
return h
}function inDom(a){while(a){if(a==document){return true
}a=a.parentNode
}return false
}function getOffsetXY(c){var b=0,f=0,a=false;
do{var d=c.style.position;
if(d=="relative"||d=="absolute"){a=false
}if(!a){b+=c.offsetLeft||0;
f+=c.offsetTop||0
}if(d=="absolute"){a=true
}}while(c=c.offsetParent);
return[b,f]
}function getOffsetX(a){return getOffsetXY(a)[0]
}function getOffsetY(a){return getOffsetXY(a)[1]
}function getEventXY(b,d){var c=getOffsetXY(b);
d=d||window.event;
var a=(window.pageXOffset||(document.documentElement?document.documentElement.scrollLeft:document.body.scrollLeft)||0)+d.clientX-c[0];
var f=(window.pageYOffset||(document.documentElement?document.documentElement.scrollTop:document.body.scrollTop)||0)+d.clientY-c[1];
return[a,f]
}function scrollToElement(d,a){var b=getOffsetY(d),f=d.offsetHeight,c=(dd.ie?document.documentElement.scrollTop:window.pageYOffset),h=viewportSize()[1];
if(a||b<c||b+f>c+h){var g=Math.max(0,b-parseInt((h-f)/2));
window.scrollTo(0,g)
}}function openWindow(a){window.open(a)
}function showPopup(c,b,d,a){var e=window.open(c,c.replace(/[^a-zA-Z0-9]/g,""),"toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+(d||600)+",height="+(a||510));
if(e&&e.focus){e.focus()
}}function openFsWindow(a){window.open(a,null,"screenX=0,screenY=0,left=0,top=0,width="+(screen.availWidth||800)+",height="+(screen.availHeight||600)+",location=1,toolbar=1,statusbar=1,menubar=1,resizable=1,scrollbars=1")
}function link(f,g,e,c){if(typeof g=="object"&&g.which){g=null
}if(f=="default"||!f){f=""
}f="/"+f;
var d=f;
if(g){d+="?msg="+encodeURIComponent(g)
}if(e&&e!=""){d+=(g?"&":"?")+e
}incrLoading();
var b=d+((c&&c!="")?"#"+c:"");
var a=document.location.href.match(/:\/\/[^\/]*(\/.*)(#.*)$/);
if(a&&a[1]==d){if("#"+(c||"")!=a[2]){DBG("invalid anchor change: "+b+"")
}window.location.reload(false)
}else{window.location.href=b
}}function refresh(d,c){if(!d){d=document
}var a=d.location.href;
var b=a.indexOf("?");
if(b<0){b=a.indexOf("#")
}if(b>=0){a=a.substring(0,b)
}if(c&&c!="all"&&(b=a.indexOf("_"))>=0&&(a.substring(b+1)!=c&&a.substring(b+1)!=c+"Exe")){return
}d.location.href=a
}(function(){var c,f,b,e,a;
window.testFont=function(d){if(!c){c=document.body;
f=document.createElement("DIV");
b=document.createElement("SPAN");
f.appendChild(b);
f.style.visibility="hidden";
f.style.fontFamily="monospace sans-serif";
b.style.fontFamily="monospace sans-serif";
b.style.fontSize="72px";
b.innerHTML="mmmmmmmmmml";
c.appendChild(f);
e=b.offsetWidth;
a=b.offsetHeight;
c.removeChild(f)
}b.style.fontFamily=d;
c.appendChild(f);
var g=b.offsetWidth!=e||b.offsetHeight!=a;
c.removeChild(f);
return g
}
})();
window.fixViewportY=function(a,c){var b=getOffsetY(a),d=parseInt(a.style.marginTop)||0;
c=c||0;
$(window).addCallback("onscroll",function(){var e=(window.pageYOffset||(document.documentElement?document.documentElement.scrollTop:document.body.scrollTop)||0);
var f=e-b;
if(f>-c){f+=c
}else{if(f<0){f=0
}}a.style.marginTop=(f+d)+"px"
})
};
(function(){window.saveFocus=function(a){window.focussed=a
};
window.unsaveFocus=function(a){if(window.focussed==a){window.focussed=null
}};
window.restoreFocus=function(b){try{if(b&&b.focus){b.focus()
}}catch(a){}}
})();
(function(){var a;
window.setForegroundRoot=function(c){if(c==a){return
}a=c;
b(document)
};
window.updateForegroundRoot=function(){b(document)
};
var b=function(f,d){if(!a||f==a){d=true
}if(d){if(f._background){var c=f._background;
if(c.visibility){f.style.visibility=c.visibility
}if(c.tabIndex){f.setAttribute(dd.ie?"tabIndex":"tabindex",c.tabIndex)
}f._background=undefined
}}else{var c={},g=false;
if(dd.ie&&(f.tagName=="SELECT"||f.tagName=="INPUT")&&f.style.visibility!="hidden"){c.visibility="visible";
f.style.visibility="hidden";
g=true
}if(f.tabIndex>=0){c.tabIndex=f.tabIndex;
f.tabIndex=-1;
g=true
}if(g){f._background=c
}}for(var e=0;
e<(f.childNodes||[]).length;
e++){b(f.childNodes[e],d)
}}
})();
var errEvaluated=0;
var errSavedTrace=0;
var errNoTrace=0;
function errTrace(a){if(errNoTrace){return"trace failed"
}var b=a||errTrace.caller||errTrace;
return b.trace().join("\n")
}var globalTraceCount=0;
Function.prototype.trace=function(){var a=[];
var d=this;
globalTraceCount++;
var c=globalTraceCount;
try{while(d&&a.length<15){if(d.traceCount>=c){break
}d.traceCount=c;
a.push(d.signature());
d=d.caller
}}catch(b){a.push("TRACE_ERR: "+b)
}return a
};
if(!Function.prototype._pqToString){Function.prototype._pqToString=Function.prototype.toString
}Function.prototype.getName=function(){var c=this.name,g=false;
var d=this._pqToString();
var b=d.match(/^function(s+([\d\w_\$]+))?\s*(\([^)]*\))/gi);
if(b){if(!c){c=b[1]
}g=b[2]
}if(!c){for(var a in window){try{if(window[a]===this&&a!="errSavedTrace"){c="window."+a;
break
}}catch(f){}}}if(!c){c=(d.split("\n")[1]||"").strip();
c="anon{ "+c+" ..}"
}return c+(g||"")
};
Function.prototype.signature=function(){if(!this._pqToString){return"[pseudo-func]"
}var b=this.getName(),d=[];
if(this.arguments){for(var a=0;
a<this.arguments.length;
a++){d.push(this.arguments[a])
}}try{d=d.length>0?"'"+d.join("', '")+"'":""
}catch(c){return b+"( error converting function arguments to string: "+c+")"
}return b+"("+d+")"
};
var pageLoadTime=new Date().getTime();
var setErrHandler,lastErrTime;
window.errReport=function(msg,url,line,stack){var curTime=new Date().getTime();
if(lastErrTime&&lastErrTime>curTime-250){return
}lastErrTime=curTime;
window.onerror=null;
var info={detectMethod:"onerror"};
if(typeof msg=="object"){for(var m in msg){try{info[m]=msg[m]
}catch(e){info[m]="EXCEPTION: "+e
}}msg=null
}if(msg){info.message=msg
}if(url){info.fileName=url
}if(line){info.lineNumber=line
}if(stack){info.stack=stack
}if(errEvaluated){info.eval=errEvaluated
}info.trace=errTrace();
if(window.toSemiJson&&window.lastDbgs){var a=[];
for(var i=0;
i<lastDbgs.length;
i++){var ld=lastDbgs[i];
var j=false;
try{j=(typeof ld=="object"&&ld.length==1)?(typeof ld[0]=="string"?ld[0]:toSemiJson(ld[0])):toSemiJson(ld)
}catch(z){}if(typeof j!="string"){j="JSON-ERR"
}else{if(j.indexOf("lastDbgs")>=0){j="RECUR"
}}if(j.length>40){j=j.substring(0,40)+"(etc..)"
}a.push(j)
}info.lastDbgs=a.join("\n")
}info.agent=navigator.userAgent;
info.document=document.location.href;
var js=[],sls=window.scriptLoadStatus;
for(var name in sls){js.push(name+":"+sls[name])
}info.js=js.join(" ");
info.pageAge=(curTime-pageLoadTime)+"ms";
info.code=Math.round(Math.random()*9999999);
if(errSavedTrace){var t=errTrace(errSavedTrace);
if(t!=info.trace){info.savedTrace=t
}}if(typeof info.file=="string"&&info.file.indexOf("connect.facebook.com")>=0){info.silent=true
}if(window.ev){if(!window.jserrorLogged){window.jserrorLogged=true;
ev.send("jserror",info,[DBG,"jserror logged "])
}}if(!info.silent){displayError(info);
decrLoading(100)
}setErrHandler();
return true
};
window.silentErr=function(a){errReport({detectMethod:"silentErr",silent:true,message:""+a})
};
setErrHandler=function(){if(1&&(1||!dd.ff3)&&!getGet("err")){window.onerror=errReport
}};
setErrHandler();
function xEval(arg,comment,trace){var r,oe=errEvaluated,es=errSavedTrace;
errSavedTrace=xEval.caller||xEval;
errEvaluated=arg+(comment?" // "+comment:"");
try{r=eval(arg)
}catch(e){e.detectMethod="xEval";
errReport(e)
}errEvaluated=oe;
errSavedTrace=es;
return r
}(function(){var a=function(g,h){if(!g.match(/^[A-Z]\S*?[A-Z]\S*?\b/)){g=g.substr(0,1).toLowerCase()+g.substr(1)
}var e=this.textSize||h,d="",c=getOpacityCss(0.3),f="";
var b="#ffffff";
if(dd.ie){d='<div style="font-size: '+(e||"100%")+"; color: #000000; "+c+""+f+'position: absolute; left: 0px; top: 0px;">'+escapeHtml(g)+"</div>";
c="visibility: hidden;"
}d+='<div style="font-size: '+(e||"100%")+"; color: "+(b||"#ffffff")+"; white-space: nowrap; "+c+""+f+'}">'+escapeHtml(g)+'</div><div style="font-size: '+(e||"100%")+"; color: #ffffff; position: absolute; left: 1px; top: 1px; white-space: nowrap; "+f+'">'+escapeHtml(g)+"</div>";
if(this.subcontent){d+="<div style='margin-top: -10px; font-size: 85%; font-weight: bold; color: #e0e0e0; text-align: center;'>"+(this.subcontent.replace(/ /g,"&nbsp;"))+"</div>"
}return d
};
window.boxHelpers={t:{basicButton:function(b){return a.call(this,b,"22px")
},smallButton:function(b){return a.call(this,b,"11px")
}}}
})();
(function(){var f;
String.prototype.render=function(){return this
};
(function(){var k=function(K){if(!this.root){return
}var M=this.attrs["class"];
if(M){this.attrs["class"]=M.replace(/( |^)![^ ]*/,"")
}if(this.attrs.id&&/^_PqLoMk/.test(this.attrs.id)){delete this.attrs.id
}if(this._rchld){for(var L=0;
L<this._rchld.length;
L++){this._rchld[L].undraw(true)
}delete this["_rchld"]
}if(this.unfinish){this.unfinish()
}if(this.htmlNotReady){delete this.htmlNotReady;
decrLoading()
}this.root._w=null;
if(!K){this.root.remove(true)
}delete this.root
};
var m=function(){var K=this.root;
if(K){k.call(this,true);
var L=K.replaceWith(this.getHtml());
if(L){A(L,this.parent,this)
}}};
var J=function(){if(this.root){unexpectedGetHtml(this.name)
}var N=null;
if(this.ihtml){N=this.ihtml()
}var O="",L=this.attrs;
for(var M in L){if(L[M]!==undefined){O+=" "+M+'="'+escapeHtmlString(L[M].toString())+'"'
}}if(this.htmlNotReady){DBG("html now ready for "+this.name+"");
this.htmlNotReady=false;
decrLoading()
}if(this.tag=="img"||this.tag=="br"||this.tag=="input"){N="<"+this.tag+""+O+" />"
}else{if(N===null){N=this.html(O)
}else{if(N===undefined){DBG("html not ready for "+this.name+"");
N="<span"+O+">Laden..</span>";
this.htmlNotReady=true;
incrLoading()
}else{N="<"+this.tag+""+O+">"+N+"</"+this.tag+">"
}}}if(this.dbg){var K=window.open("about:blank")||window;
K.document.write("<b>html:</b>");
K.document.write(formatXml(N));
var P=this.finish;
this.finish=function(){if(!K.document){return
}if(P){K.document.write("<br /><b>finishing</b>");
P.call(this)
}K.document.write("<br /><b>finished</b>");
K.document.close()
}
}return N
};
var C=0,t={};
var A=function(O,K,Q){var L,U=Q||O,M;
var T=O.className;
if(T){T=T.split(" ");
for(var W=0;
W<T.length;
W++){var S=T[W];
var P=S.substring(0,1);
if(P=="!"){if(S.substring(1,2)=="!"){M=true
}else{U=Q=fetchProp(t,parseInt(S.substring(1)));
if(!U){if(S.substring(1)!=""){DBG("unable to link widget "+S.substring(1)+" to "+O+"");
if(O._w){DBG("assuming double scanTreeInit- aborting");
return
}}U=Q={}
}}}else{if(P=="@"&&K){L=true;
if(S.substring(1,2)=="@"){S=S.substring(2);
if(!K[S]){K[S]=[]
}U._nr=K[S].length;
K[S].push(U)
}else{K[S.substring(1)]=U
}}}}}if(M){return
}if(Q){if(U===O){O.className=O.className?O.className+" !!":"!!"
}Q.root=$(O);
Q.parent=K;
O._w=K=Q
}else{if(L){$(O)._w=K
}}var V=O.childNodes;
for(var N=0;
N<V.length;
N++){if(V[N]){A(V[N],K)
}else{DBG(""+N+"th element of "+O+" is undefined")
}}if(Q&&typeof Q.finish=="function"){Q.finish()
}};
var H=function(K,L){var M=$(K).insertHtml(L,this.getHtml());
A(M,K._w,this);
return this
};
var s=function(K){var L=$(K).setHtml(this.getHtml());
A(L,K._w,this);
return this
};
var u=function(L,N){var M=[];
if(!N){for(var O=L.firstChild;
O;
O=O.nextSibling){M.push(O)
}}this.content=this.content||"";
this.insert(L,true);
if(this.inner){for(var K=0;
K<M.length;
K++){this.inner.appendChild(M[K])
}}return this
};
var p=function(){var K=this.attrs["class"],L="!";
if(!this.simple){t[++C]=this;
L="!"+C
}this.attrs["class"]=K?L+" "+K:L;
return this.getHtml()
};
var D=0,y={};
var v=function(){for(var K in y){var L=y[K],M=$(K);
if(M){A(M,false,L)
}else{DBG("unable to finish widget "+K+" "+L.name)
}}y={}
};
var I=function(){if(!this.simple){if(!y.length){setTimeout(v,1)
}var K=this.attrs.id=this.attrs.id||"_PqLoMk"+(++D);
y[K]=this
}return this.getHtml()
};
var B=function(){if(!this.simple){this.id=this.attrs.id=this.attrs.id||"_PqLoMk"+(++D)
}this.content="<span class='!!'>\001</span>";
var K=this.getHtml().split("\001");
this.endHtml=K[1];
return K[0]
};
var q=function(){if(!this.simple){if(!y.length){setTimeout(v,1)
}y[this.id]=this
}return this.fetch("endHtml")
};
var z=function(){var K;
if(!this.simple){K=this.attrs.id=this.attrs.id||"_PqLoMk"+(++D)
}document.write(this.getHtml());
if(K=$(K)){A(K,false,this)
}return this
};
var x=function(){document.write(B.call(this));
return this
};
var w=function(){document.write(this.fetch("endHtml"));
var K=$(this.id);
if(K){A(K,false,this)
}return this
};
var n=function(O,N,L,M,K){while(N<O.length){if(O[N][L]){return O[N][L].call(this,M,K)
}N++
}return
};
var E=function(L,M,K){var O=this.Sup;
for(var N=0;
N<O.length;
N++){if(O[N][L]===E.caller){return n.call(this,O,N+1,L,M,K)
}}return n.call(this,O,0,L,M,K)
};
var G=function(S,K){var P,N,Q=this[K||this.mainChild||this.basics[0]],O=S.charAt(0).toUpperCase()+S.substr(1);
if(typeof Q!="object"){Q=undefined
}if(Q&&(P=Q["_getParent"+O+""])){N=Q
}else{if(Q&&(P=Q["parent"+O+""])!==undefined){N=undefined
}else{if(P=this["_get"+O+""]){N=this
}else{if((P=this[S])!==undefined){N=undefined
}else{if(Q&&(P=Q["_get"+O+""])){N=Q
}else{if(Q&&(P=Q[S])!==undefined){N=undefined
}}}}}}if(N){var L=[];
for(var M=2;
M<arguments.length;
M++){L.push(arguments[M])
}P=P.apply(N,L)
}return P
};
var j=function(K,L){var M=this[K||this.mainChild||this.basics[0]];
if(typeof M!="object"){return M||L
}if(this._rchld){this._rchld.push(M)
}else{this._rchld=[M]
}return M.render()
};
f=watchExtensions.newWithProto().extend({make:I,makeStart:B,makeEnd:q,write:z,writeStart:x,writeEnd:w,insert:H,set:s,replace:u,redraw:m,redrawParent:function(){if(this.parent&&this.parent.redraw){this.parent.redraw()
}else{this.redraw()
}},closeModal:function(){for(var K=this;
K.name!="Modal"&&K.parent;
K=K.parent){}if(K.name=="Modal"){K.close()
}},undraw:k,render:p,getHtml:J,tag:"span",addDynamics:function(K){A(K,false,this)
},addCallback:domElementExtensions.addCallback,delCallback:domElementExtensions.delCallback,addCallbacks:domElementExtensions.addCallbacks,remove:function(){this.root.remove()
},basics:["content"],appendAttr:function(L,K){var M=this.attrs[L];
this.attrs[L]=M?M+" "+K:K
},prop:G,child:j,watchMode:1});
var F={id:"id",style:"style",className:"class"};
var l=function(L){var M={};
if(this.args){this.args=L
}else{if(L.length==1&&L[0]!=null&&typeof L[0]=="object"&&!L[0].reverse&&!(L[0].ownerDocument&&L[0].tagName)){L=L[0];
if(typeof L.attrs=="object"){for(var O in L.attrs){M[O]=L.attrs[r]
}delete L.attrs
}for(var O in L){if(F[O]){M[F[O]]=L[O]
}else{this[O]=L[O]
}}}else{var K=this.basics;
for(var N=0;
N<L.length;
N++){this[K[N]]=L[N]
}}}var P=this.init;
if(P){P=this.init();
if(typeof P=="object"){if(P.className){P["class"]=fetchProp(P,"className")
}for(var O in P){M[O]=M[O]?P[O]+" "+M[O]:P[O]
}}}if(this.attrs){for(var O in this.attrs){M[O]=this.attrs[O]+(M[O]?" "+M[O]:"")
}}this.attrs=M
};
window.makeWidget=function(S,L){var P=function(){return l.call(this,arguments)
};
var N=S.init;
if(N&&typeof N!="function"){DBG("DEPRECATED: this.init not func for "+S.name+"");
S.init=function(){return N
}
}var O=f;
if(S.inherit){L=S.inherit;
delete S.inherit
}if(L){O=L.prototype||L;
S.Sup=O.Sup?[O].concat(O.Sup):[O];
if(O.attrs){S.attrs=S.attrs||{};
for(var K in O.attrs){var M=S.attrs[K],Q=O.attrs[K];
S.attrs[K]=M?((typeof Q=="string"&&typeof M=="string")?Q+" "+M:M):Q
}}}P.prototype=O.newWithProto().extend(S);
P.prototype.widgetType=P;
return P
}
})();
window.InlineWidget=makeWidget({basics:["h","finish","tag"],h:"",tag:"span",ihtml:function(){return this.h
}});
window.EmptyWidget=makeWidget({ihtml:function(){return""
}});
var a={click:function(j){if(this.onclick){this.onclick(j)
}},submit:function(j){for(var k=this;
k;
k=k.parentNode){if(k.submit){return k.submit()
}if(k._w&&k._w.onSubmit){return callback(k._w.onSubmit)
}}},next:function(j){this.blur()
}};
var d=function(k){var j=this._w;
if(j&&j.getValue&&j.onChange){callback(j.onChange,[j.getValue.call(j)],j)
}if(getKeyCode(k)!=13){return
}cancelEvent(k);
if(this.onEnter){this.onEnter()
}else{if(this._w&&this._w.onEnter){this._w.onEnter()
}else{a.submit.call(this)
}}};
var c=function(k,j){var l=document.defaultView;
if(l&&l.getComputedStyle){return l.getComputedStyle(k,"").getPropertyValue(j.replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()
}))
}if(k.currentStyle){return k.currentStyle[j]
}};
var b=window.computeCssValue=function(k,j){var l=c(k,j);
return(l=="transparent"||l=="inherit")?b(k.parentNode,j):l
};
var i=function(k){if(!k){return[255,255,255]
}var j;
if(k.substr(0,1)=="#"){j=[];
for(var l=0;
l<=2;
l++){j[l]=parseInt(k.substr(l*2+1,2),16)
}return j
}if(j=k.match(/^rgba?\(([0-9]+), ?([0-9]+), ?([0-9]+)(, ?[0-9]+)? ?\)$/)){j.shift();
for(var l=0;
l<=2;
l++){j[l]=parseInt(j[l])
}return j
}DBG("unable to parse color "+k);
return[255,255,255]
};
var h={};
var e=window.blendCssColors=function(n,m,l){var p=""+n+"_"+l+"_"+m;
var k=h[p];
if(k){return k
}if(!l){l=50
}n=i(n);
m=i(m);
for(var j=0;
j<=2;
j++){n[j]=Math.round((n[j]*(100-l)+m[j]*l)/100)
}k="rgb("+n.join(",")+")";
h[p]=k;
return k
};
var g=this.toggleClass=function(j,q,l,s,k){var n=function(){this.addClass(q);
callback(k)
},t=function(){this.delClass(q);
callback(k)
};
if(typeof j!="object"||!(j instanceof Array)){j=[j]
}for(var m=0;
m<j.length;
m++){var p=$(j[m]);
p.addCallback(l,n);
p.addCallback(s,t)
}};
window.toggleFocus=function(k,j,l){return g(k,j||"focus","onfocus","onblur",l)
};
window.toggleMouse=function(k,j,l){return g(k,j||"mouse","onmouseover","onmouseout",l)
};
window.BoxWidget=(function(){var j={tag:"table",attrs:{style:"table-layout: "+(dd.ie?"auto":"fixed")+";"}};
j.transformContent=function(k){return k
};
j.ihtml=function(){this.attrs.border=this.attrs.cellspacing=this.attrs.cellpadding=0;
var q="margin:"+((this.textTop!=undefined)?this.textTop-this.top:0)+"px "+((this.textRight!=undefined)?this.textRight-this.borderRight:0)+"px "+((this.textBottom!=undefined)?this.textBottom-this.bottom:0)+"px "+((this.textLeft!=undefined)?this.textLeft-this.borderLeft:0)+"px;position: relative;"+(dd.ie?"display: inline-block;":"")+"";
var p="",l="";
if(this.ver){var t="background: url("+this.ver+") repeat-y top ";
p=t+"left;";
l=t+"right;"
}else{if(this.borderColor){p=l="background: "+this.borderColor+";"
}}var s=this.left-this.borderLeft;
var k=this.right-this.borderRight;
if(0&&(s<0||k<0)){(window.oldAlert?oldAlert:alert)("BoxWidget ["+(this.anchorName||this.content||"unknown")+"] WARNING: leftDif || rightDif < 0!")
}var n=this.renderedCols={};
var m=this.renderedRows={};
if(this.top!=0){m.top="<tr>"+(this.borderLeft||s?'<td colspan="'+((this.borderLeft?1:0)+(s?1:0))+'" style="background: url('+this.cor+") no-repeat top left; height: "+this.top+'px;"></td>':"")+'<td colspan="'+(1+(this.borderRight?1:0)+(k?1:0))+'" style="background: url('+this.cor+") no-repeat top right; height: "+this.top+'px;"></td></tr>'
}if(this.bottom!=0){m.bottom="<tr>"+(this.borderLeft||s?'<td colspan="'+((this.borderLeft?1:0)+(s?1:0))+'" style="background: url('+this.cor+") no-repeat bottom left; height: "+this.bottom+'px;"></td>':"")+'<td colspan="'+(1+(this.borderRight?1:0)+(k?1:0))+'" style="background: url('+this.cor+") no-repeat bottom right; height: "+this.bottom+'px;"></td></tr>'
}return"<tbody><tr>"+(this.borderLeft?(n[0]='<td style="height: 1px;" width="'+this.borderLeft+'"></td>'):"")+""+(s?(n[1]='<td style="height: 1px;" width="'+s+'"></td>'):"")+'<td style="height: 1px;" width="*"></td>'+(k?(n[3]='<td style="height: 1px;" width="'+k+'"></td>'):"")+""+(this.borderRight?(n[4]='<td style="height: 1px;" width="'+this.borderRight+'"></td>'):"")+"</tr>"+(m.top||"")+"<tr>"+(this.borderLeft?'<td style="'+p+'"></td>':"")+'<td colspan="'+(1+(s?1:0)+(k?1:0))+'" style="background: '+(this.color||"transparent")+'; "><div class="@inner" style="'+q+'">'+this.transformContent(this.content)+"</div></td>"+(this.borderRight?'<td style="'+l+'"></td>':"")+"</tr>"+(m.bottom||"")+"</tbody>"
};
j.restyle=function(t){if(t){var p=t.prototype||t;
var k=["top","bottom","left","right","cor","ver","color","borderColor","borderLeft","borderRight","textLeft","textRight","textTop","textBottom"];
for(var n=0;
n<k.length;
n++){this[k[n]]=p[k[n]]
}}if(!this.root){return
}var q=this.root.firstChild.childNodes;
if(!!this.renderedCols[0]!=!!this.borderLeft||!!this.renderedCols[1]!=!!(this.left-this.borderLeft)||!!this.renderedCols[3]!=!!(this.right-this.borderRight)||!!this.renderedCols[4]!=!!this.borderRight||!!this.renderedRows.top!=!!this.top||!!this.renderedRows.bottom!=!!this.bottom){DBG("DEPRECATED: BoxWidget.restyle called, but column configurations differ");
this.content=this.inner.innerHTML;
this.redraw();
return
}if(this.renderedRows.top){var s=q[1];
for(var l=0;
l<s.childNodes.length;
l++){s.childNodes[l].style.backgroundImage="url("+this.cor+")";
s.childNodes[l].style.height=""+this.top+"px"
}}if(this.renderedRows.bottom){var s=q[3-(this.renderedRows.top?0:1)];
for(var l=0;
l<s.childNodes.length;
l++){s.childNodes[l].style.backgroundImage="url("+this.cor+")";
s.childNodes[l].style.height=""+this.bottom+"px"
}}var m=q[2-(this.renderedRows.top?0:1)].childNodes,n=0;
if(this.renderedCols[0]){m[n++].style.background=this.ver?"url("+this.ver+") repeat-y top left":(this.borderColor||"transparent")
}n++;
if(this.renderedCols[4]){m[n++].style.background=this.ver?"url("+this.ver+") repeat-y top right":(this.borderColor||"transparent")
}var u=q[2].childNodes[1].firstChild;
u.style.marginTop=(this.textTop!=undefined?this.textTop-this.top:0)+"px";
u.style.marginRight=(this.textRight!=undefined?this.textRight-this.borderRight:0)+"px";
u.style.marginBottom=(this.textBottom!=undefined?this.textBottom-this.bottom:0)+"px";
u.style.marginLeft=(this.textLeft!=undefined?this.textLeft-this.borderLeft:0)+"px";
u.parentNode.style.backgroundColor=this.color;
var m=q[0].childNodes,n=0;
if(this.renderedCols[0]){m[n++].style.width=this.borderLeft+"px"
}if(this.renderedCols[1]){m[n++].style.width=(this.left-this.borderLeft)+"px"
}n++;
if(this.renderedCols[3]){m[n++].style.width=(this.right-this.borderRight)+"px"
}if(this.renderedCols[4]){m[n++].style.width=this.borderRight+"px"
}};
j.basics=["content","title","subtitle"];
return makeWidget(j)
})();
window.finishColumn=function(){this.columns=true;
var j=this.root;
var k=j;
do{k=k.previousSibling
}while(k&&k.tagName=="SCRIPT");
j.style.cssFloat=j.style.styleFloat="left";
if(k&&k._w&&k._w.columns){$(j.parentNode).insertHtml(j.nextSibling,'<div style="clear: both"></div>')
}};
(function(){var j=function(){if(!this.root){return DBG("checkDims while DocumentCover.root gone")
}var k=document.body.parentNode.scrollHeight||Math.max(document.body.offsetHeight,document.body.parentNode.clientHeight);
if(k>this.height){this.root.style.height=k+"px";
this.height=k
}this.tout=setCallbackTimeout([this,j],250)
};
window.DocumentCover=makeWidget({basics:["opacity","onclick"],opacity:50,backgroundColor:"#000000",tag:"div",ihtml:function(){this.height=document.body.parentNode.scrollHeight||Math.max(document.body.offsetHeight,document.body.parentNode.clientHeight);
this.attrs.style="position: absolute; display: block; width: 100%; height: "+this.height+"px; top: 0px; left: 0px; padding: 0px; background-color: "+this.backgroundColor+";"+getOpacityCss(this.opacity)+"z-index: 9998; ";
return""
},finish:function(){j.call(this);
if(this.onclick){this.root.addCallback("onclick",this.onclick)
}},unfinish:function(){clearTimeout(this.tout);
delete this.tout
},show:function(){this.insert(document.body)
},hide:function(){this.undraw()
}})
})();
window.Button=(function(){var j={name:"Button",content:"Ok",basics:["content","onclick","subcontent"]};
j.attrs={style:"cursor: pointer; display: "+(dd.ie?"inline":"inline-table")+"; -moz-user-select: none; -khtml-user-select: none; user-select: none; -moz-outline-style: none; outline-style: none; outline: none;",tabindex:"1"};
j.ihtml=function(){this.content=this.content||this.text;
return this.sup("ihtml")
};
j.highlightRestyle=function(){if(!this.origHash){this.origHash={cor:this.cor,ver:this.ver}
}if(!this.highlightHash){return
}var k=this.origHash;
if(typeof this.highlight=="string"){k=this[""+this.highlight+"Hash"]
}else{if(this.root.hasClass("focus")||this.root.hasClass("mouse")||this.highlight){k=this.highlightHash
}}this.cor=k.cor;
this.ver=k.ver;
this.restyle()
};
j.blink=function(k){var l=function(m){this.highlight=(m&1)?"inverse":false;
this.inner.childNodes[1]._w.setColor((m&1)?"#000000":"#ffffff");
this.highlightRestyle();
if(m>0){setCallbackTimeout([this,l,m-1],150)
}else{if(k){callback(k)
}}};
l.call(this,5)
};
j.onEnter=function(){if(this.onclick){callback(this.onclick,[],this.root)
}};
j.finish=function(){toggleMouse(this.root,null,[this,this.highlightRestyle]);
toggleFocus(this.root,null,[this,this.highlightRestyle]);
this.root.addCallback("onkeypress",d);
if(this.onclick){this.root.addCallback("onclick",this.onclick)
}if(this.highlightHash){preloadImage(this.highlightHash.cor);
preloadImage(this.highlightHash.ver)
}return this.sup("finish")
};
return makeWidget(j,BoxWidget)
})();
window.BasicButton=(makeWidget({textRight:15,inherit:Button,top:16,textLeft:15,bottom:16,borderLeft:0,transformContent:boxHelpers.t.basicButton,borderRight:0,left:17,textTop:4,color:"#1b8db3",right:17,textBottom:3,cor:R+(dd.png?"1/i/_8m.png":"1/i/_8n.png")}));
window.SmallButton=(makeWidget({textRight:8,inherit:Button,top:9,textLeft:8,bottom:9,borderLeft:0,transformContent:boxHelpers.t.smallButton,borderRight:0,left:9,textTop:2,color:"#1b8db3",right:9,textBottom:1,cor:R+(dd.png?"1/i/_8o.png":"1/i/_8p.png")}));
window.ChatBox=(makeWidget({textRight:6,top:7,textLeft:6,inherit:BoxWidget,bottom:7,borderLeft:222,ver:R+(dd.png?"1/i/_8s.png":"1/i/_8t.png"),borderRight:221,left:222,textTop:6,color:"#dfe5f1",right:221,textBottom:6,cor:R+(dd.png?"1/i/_8q.png":"1/i/_8r.png")}));
(function(){var A=new BoxWidget();
var q={};
var x;
var l=[];
var p;
var s;
var y=new DocumentCover({onclick:function(){if(x.prop("allowCancel")){callback(x.prop("onCancel"),false,x)
}}});
var k;
var n=function(){k=window.focussed;
callback(window.modalShowing,[true]);
y.show();
document.addCallback("onkeydown",u,true)
};
var m=function(){document.delCallback("onkeydown",u);
y.hide();
setForegroundRoot(null);
callback(window.modalShowing,[false]);
restoreFocus(k)
};
var z=function(){var C=x;
x=l[0];
if(x==C){return
}var D=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;
if(C){C.scrollTop=D
}else{s=D
}var B;
if(x){B=x.scrollTop;
delete x.scrollTop
}else{B=s;
s=undefined
}if(B!==undefined){window.scrollTo(0,B)
}if(window.notificationHandlers){notificationHandlers.setVarList({modalTitle:x?(x.prop("title")||null):null,subModalTitle:x?(x.prop("subTitle")||null):null,anchorName:x?(x.prop("anchorName")||null):null})
}if(C&&!x){m()
}else{if(C){if(C.root){v.call(C)
}if(x.root){j.call(x)
}else{x.insert(document.body)
}}else{n();
x.insert(document.body)
}}};
var j=function(){this.root.style.zIndex=this.aboveWait?15000:10000;
setForegroundRoot(this.root)
};
var v=function(){this.root.style.zIndex=9997
};
q.show=function(){l.unshift(this);
z();
return this
};
q.schedule=function(){l.push(this);
z();
return this
};
q.cancel=function(){for(var C=0;
C<l.length;
C++){if(l[C]===this){l.splice(C,1)
}}var B=!!this.root;
if(this.root){this.root.remove()
}z();
return B
};
window.clearModals=function(D){var C=[];
for(var B=0;
B<l.length;
B++){if(callback(D,[l[B]])){C.push(l[B])
}}for(var B=0;
B<C.length;
B++){C[B].clear()
}return C.length
};
var u=function(B){if(getKeyCode(B)==27){if(x.prop("allowCancel")){callback(x.prop("onCancel"),false,x)
}cancelEvent(B);
return false
}};
var w=function(C,B){if(callback(C,false,this)!==false){callback(B,false,this)
}};
var t=function(){var D=this.prop("options")||["Okay"];
if(typeof D!="object"){D=D.split("|")
}var I=this.prop("onAction");
var H=this.prop("onCancel");
var G=[];
for(var F=0;
F<(D||[]).length;
F++){var B,E=D[F];
if(typeof E=="object"&&E.widgetType){B=E.onclick
}else{B=D[++F];
var C=(F>=D.length-1)?BasicButton:(B?GoButton:AbortButton);
E=new C(E)
}if(B){if(I){B=[this,w,B,I]
}}else{if(this.allowCancel===undefined){this.allowCancel=true
}B=H
}if(F==D.length-1){this.onSubmit=B
}E.onclick=(typeof B=="function")?[this,B]:B;
G.push(E.render())
}return G.join("")
};
q.close=q.clear=function(){if(this.modalId&&!this.dontKillModal&&parseInt(this.modalId)){killAutoRun(this.modalId,2)
}return this.cancel()
};
q.setAnchor=function(){if(this.anchorName){var C=this.anchorName.split("#")[0];
for(var B=0;
B<arguments.length;
B++){if(arguments[B]||B<arguments.length-1){C+="#"+(arguments[B]||"")
}}this.anchorName=C
}if(x===this){var C="#"+(this.anchorName||"_");
if(document.location.href.slice(-C.length)!=C){document.location.href=document.location.href.split("#")[0]+C
}}};
q.setSubTitle=function(B){this.subTitle=B;
if(x===this&&window.notificationHandlers){window.notificationHandlers.setVar("subModalTitle",B)
}};
q.init=function(){if(this.modalId){setAutoRunCloser(this.modalId,[this,this.cancel])
}return this.sup("init")
};
q.ihtml=function(){var M=(this.textLeft||this.left||0)+(this.textRight||this.right||0)+(this.extraChildMargin||0);
var F=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,H=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,D=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,E=550+M;
var Q=N-50;
var L=parseInt(N*0.9);
if(Q>L){Q=L
}Q-=M;
if(Q<550){Q=550
}var E=this.prop("preferredWidth",null,Q);
if(!E){E=550
}else{if(E>Q){E=Q
}}E+=M;
var P=F+D/10,G=H+(N-E)/2,O=this.aboveWait?15000:10000;
this.appendAttr("style","position: absolute; left: "+G+"px; top: "+P+"px; width: "+E+"px; z-index: "+O+";");
var K=this.child("content");
var I=t.call(this);
I=I?'<div style="margin-top: 15px; width: 100%;"><div style="zoom: 1; float: right; margin-right: 15px;" class="@buttonContainerE">'+I+'</div><div style="clear: both;"></div></div>':"";
var C=this.title;
var J=this.content;
this.title=this.prop("title");
this.content='<div style="width: 100%; min-height: '+(this.top+this.bottom-(this.textTop||0)-(this.textBottom||0))+'px; position: relative; ">'+K+'<div style="clear: both;"></div>'+I+"</div>";
var B=this.sup("ihtml");
this.title=C;
this.content=J;
return B
};
q.redrawOptions=function(){new InlineWidget(t.call(this)).set(this.buttonContainerE)
};
q.finish=function(){setForegroundRoot(this.root)
};
q.onCancel=q.onAction=q.close=q.clear;
q.name="Modal";
q.basics=["modalId","content","title"];
q.mainChild="content";
window.Modal=makeWidget(q,A);
window.unsafeModal=function(D,C){incrLoading();
var B=function(){var F=window[D.name];
if(!F){throw"unsafeModal: cannot load "+D.name+""
}var H=F.prototype.newWithProto();
F.apply(H,C||[]);
var E=new Modal({content:H,modalId:D.id,anchorName:D.anchor});
if(D.now){E.show()
}else{E.schedule()
}decrLoading();
try{if(E.show&&window.pageTracker){pageTracker._trackPageview("/modal/"+D.name+"?args="+encodeURIComponent(toJson(C||[])))
}}catch(G){}};
if(D.deps){loadCall(D.deps,B)
}else{B()
}};
window.triggerModal=function(G,C,I){var F=C[0];
var D=1,B;
if((""+F).match(/^[0-9]*$/)){B=parseInt(F);
F=C[D++]
}if(F&&F.slice&&(F.slice(-6)=="Dialog"||F.slice(-6)=="Widget")){F=F.slice(0,-6)
}var H=(window.safeModals||{})[F];
if(!H){return DBG("cannot show undefined modal '"+F+"'")
}if((!window.uid&&!H[2])||(I&&H[3])){return
}var E=[];
while(D<C.length){E.push(C[D++])
}if(E.length){o=E[E.length-1];
if(typeof o=="object"&&o!==null&&o.cancelBubble!==undefined){E.pop()
}}unsafeModal({name:H[1]||F,deps:H[0],id:B,now:G,anchor:H[3]?false:F},E)
};
window.showModal=function(){triggerModal(true,arguments)
};
window.schedModal=function(){triggerModal(false,arguments)
}
})();
window.FormField=makeWidget({setError:function(j){if(!this.root){return
}var k=!j?"":"<span><div style='clear: both;'></div><span style='color: red; font-weight: bold; font-size: 85%;'>"+j+"</span></span>";
if(this.error){$(this.error).setHtml(k)
}else{this.error=$(this.root.parentNode).insertHtml(this.root.nextSibling,k)
}}});
window.Link=makeWidget({attrs:{"class":"link",tabindex:"1"},basics:["content","onclick","tooltip"],ihtml:function(){return this.content
},finish:function(){toggleFocus(this.root);
this.root.addCallback("onkeypress",d);
if(this.onclick){this.root.addCallback("onclick",this.onclick)
}if(this.tooltip){addTooltip(this.root,this.tooltip);
this.tooltip=undefined
}this.inner=this.root
},onEnter:function(){if(this.onclick){callback(this.onclick)
}}});
window.CheckBox=makeWidget({name:"CheckBox",attrs:{style:"padding: 2px; padding-top: 0px; cursor: pointer;",tabindex:"1"},tag:"div",ihtml:function(){if(this.value){this.checked=this.value
}var j=this.post?"name='"+escapeHtmlString(this.post)+"' ":"";
return"<table style='margin: 0px; padding: 0px; border-collapse: collapse;'><tr><td><input tabindex='-1' class='@input checkbox' style='position: relative;' type='checkbox' "+((this.checked!="false"&&this.checked)?"checked ":"")+""+j+"/></td><td style='padding-top: 3px; padding-left: 6px;'>"+this.content+"</td></tr></table>"
},getValue:function(){return this.input.checked?1:0
},setValue:function(j){this.input.checked=(j&&j!="false")?"checked":""
},changeValue:function(){this.setValue(!this.getValue())
},finish:function(){this._mouseOverBackground=e(b(this.root,"backgroundColor"));
var j=function(){this.root.style.backgroundColor=this.root.hasClass("focus")||this.root.hasClass("mouse")?this._mouseOverBackground:"transparent"
};
toggleFocus(this.root,null,[this,j]);
toggleMouse(this.root,null,[this,j]);
this.root.addCallbacks({onclick:[this,function(){this.changeValue();
this.isChanged=true;
callback(this.onChange,[this.getValue()],this)
}],onkeypress:d});
this.input.addCallback("onclick",[this,function(k){cancelEvent(k,true);
this.root.focus();
this.isChanged=true;
callback(this.onChange,[this.getValue()],this)
}])
},onEnter:function(){this.changeValue();
this.isChanged=true;
callback(this.onChange,[this.getValue()],this);
return false
},basics:["content","checked"]},FormField);
window.Selector=(function(){var j={name:"Selector",basics:["answers","value"]};
j.html=function(m){var l=[];
for(var n=0;
n<this.answers.length;
n++){l.push('<option value="'+n+'" '+(n==this.value?"selected":"")+">"+escapeHtml(this.answers[n])+"</option>")
}return"<select "+m+" tabindex='1'>"+(l.join(""))+"</select>"
};
j.getValue=function(){return this.root.childNodes[this.root.selectedIndex].value
};
var k=function(){var l=this._w;
callback(l.onChange,[l.getValue()],l)
};
j.finish=function(){var l=this.input=this.root;
l.addCallback("onchange",k);
l.addCallback("onkeypress",d)
};
return makeWidget(j,FormField)
})();
(function(){var j={name:"TextArea",tag:"textarea",ihtml:function(){return escapeHtml(this.value||this.content||"")
},basics:["content"],attrs:{tabindex:1}};
var n=function(){var s=this._w;
this.addClass("focus");
saveFocus(this);
s.isChanged=true;
callback(s.onChange,[s.getValue()],s)
};
var q=function(){var s=this._w;
this.delClass("focus");
unsaveFocus(this);
s.isChanged=true;
callback(s.onChange,[s.getValue()],s)
};
j.finish=function(){var s=this.inputE=this.inputE||this.root;
s.addCallbacks({onfocus:n,onblur:q});
if(this.focused){this.focus()
}};
j.disable=function(s){if(s!==false){s=true
}this.disabled=s;
this.root.style.backgroundColor=s?"#d0d0d0":"#ffffff"
};
j.getValue=function(){return this.inputE.value.toString().replace(/\u200B/g,"")
};
j.setValue=function(s){this.inputE.value=s
};
j.focus=function(){try{this.inputE.focus();
if(this.inputE.createTextRange){var s=this.inputE.createTextRange();
s.move("character",this.inputE.value.length);
s.select()
}}catch(t){}};
window.TextArea=makeWidget(j,FormField);
var m={tag:"div",basics:["content","hint","height"],enterMode:3,height:"100px",fontSize:"100%",attrs:{tabindex:-1}};
var l=function(){callback(this.onChange,[this.getValue()],this);
this.hintE.style.display=(this.hint&&this.getValue().strip()=="")?"block":"none"
};
this.setValue=function(s){this.sup("setValue",s);
l.call(this)
};
m.setHint=function(s){new InlineWidget(s).set(this.innerHintE);
l.call(this)
};
m.ihtml=function(){delete this.attrs.tabindex;
this.appendAttr("style","position: relative;"+(dd.ie?"display: inline-block;":""));
var s=this.value||this.content||"";
var u="   "+(dd.ie?"<fieldset style='padding: 0; margin: 0; border: 0;'><div>":"")+'<textarea tabindex="'+(this.tabindex||1)+'" class="@inputE" style="padding: 0px; margin: 0; border: 0px; width: 100%; font-size: '+this.fontSize+"; height: "+this.height+"; background: transparent; color: black; "+(dd.ie?"overflow: auto;":"")+'">'+escapeHtml(s)+"</textarea>"+(dd.ie?"</div></fieldset>":"")+'<div class="@hintE" style="position: absolute; left: 0; top: 0; height: '+this.height+"; width: 100%; z-index: 30; overflow: hidden; cursor: text; "+(s==""?"":"display: none;")+"\"><div class='@innerHintE' style='position: absolute; top: 50%; margin-top: -0.5em; text-align: center; color: #c0c0c0; width: 100%;'>"+(this.hint||"")+"</div></div>";
var w="";
if(!this.button){this.appendAttr("class","inputStyle");
this.appendAttr("style",w);
return u
}this.appendAttr("class","inputStyle");
this.appendAttr("style",w);
var t=37;
return'<div style="margin-right: '+t+'px;">'+u+'</div><div class="@buttonE" tabindex="'+(this.tabindex||1)+'" style="z-index: 31; position: absolute; right: 3px; bottom: 3px; width: 31px; height: 31px; cursor: pointer; background: url('+(R+(dd.png?"1/i/chat-send-button.png":"1/i/_8u.png"))+');"></div>'
};
var p=function(s){this.buttonE.style.visibility=s?"visible":"hidden"
};
var k=function(v){v=v||window.event||{};
var u=v.keyCode||v.which||v.charCode;
if((u==13||u==10)){var t=v.shiftKey?1:(v.ctrlKey?3:2);
if(t>=this.enterMode){if(callback(this.onEnter,false,this)!==false){return cancelEvent(v)
}}else{if(t>=2&&this.buttonE){for(var s=0;
s<3;
s++){setCallbackTimeout([this,p,false],s*150);
setCallbackTimeout([this,p,true],s*150+50)
}}}}};
m.finish=function(){this.sup("finish");
this.inputE.addCallbacks({onkeyup:[this,l],onkeydown:[this,k]});
this.hintE.addCallback("onclick",[this,this.focus]);
if(this.buttonE){var s=this;
var t=function(v){cancelEvent(v);
callback(s.onEnter,false,s);
try{s.focus()
}catch(u){}};
this.buttonE.addCallbacks({onclick:t,onkeypress:function(u){if(getKeyCode(u)==13||getKeyCode(u)==32){t(u)
}}});
if(!this.noTooltip){addTooltip(this.buttonE,"Send! (<b>"+(this.enterMode>2?"ctrl-enter":"enter")+"</b>)")
}}this.inputE.addCallback("onfocus",[this,function(){this.root.addClass("inputFocusStyle")
}]);
this.inputE.addCallback("onblur",[this,function(){this.root.delClass("inputFocusStyle")
}])
};
window.EnhancedTextArea=makeWidget(m,TextArea)
})();
(function(){var l=function(){return{style:"display: none;"}
};
var j=function(){return this.value
};
var k=function(m){this.value=m
};
window.HiddenInput=makeWidget({name:"HiddenInput",init:l,html:function(m){return"<span "+m+"></span>"
},getValue:j,setValue:k},FormField)
})();
(function(){var k;
var q={basics:["content","focus"],tag:"input"};
q.getValue=function(){return this.input.value
};
q.setValue=function(t){this.input.value=t
};
var p=function(){this.root.addClass("focus")
};
var s=function(){this.root.delClass("focus")
};
var n=function(){this.isChanged=true;
callback(this.onChange,[this.getValue()],this)
};
q.init=function(){if(!this.type){this.type=this.password?"password":"text"
}};
var j=function(){return;
if(k||this.dontFocus){return
}DBG("Setting .focus of input element because we seem to be the first");
k=true;
this.focus=true
};
q.ihtml=function(){j.call(this);
this.attrs.value=this.value||this.content;
this.attrs["class"]+=" "+this.type;
this.attrs.type=this.type;
this.attrs.tabindex=1;
if(this.post!==undefined){this.attrs.name=this.post
}if(this.disabled){this.attrs.disabled="1";
this.attrs.style="background-color: #b0b0b0; background-image: none;"
}};
q.finish=function(){var t=this.input=this.inputE=this.inputE||this.root;
t.addCallbacks({onfocus:[this,p],onblur:[this,s],onkeyup:[this,n],onkeypress:d});
if(this.focus&&!this.dontFocus){k=false;
t.focus()
}};
q.disable=function(t){if(t!==false){t=true
}this.disabled=this.input.disabled=t
};
window.InputLine=makeWidget(q,FormField);
var m={basics:["content","hint"],tag:"div",attrs:{"class":"inputStyle",style:"zoom: 1;"}};
var l=function(){this.hintE.style.display=(this.hint&&this.getValue().strip()=="")?"block":"none"
};
m.setHint=function(t){new InlineWidget(t).set(this.innerHintE);
l.call(this)
};
m.ihtml=function(){j.call(this);
var t=this.value||this.content||"";
return'<input class="@inputE" type="'+this.type+'" tabindex="'+(this.tabindex||1)+'" style="padding: 1px 0 0 0; margin: 0 0 -1px 0; border: none; width: 100%; height: 100%; background: transparent; color: black; '+(dd.ie?"overflow: hidden;":"")+'" value="'+escapeHtmlString(t)+'"/><div class="@hintE" style="position: absolute; left: 0; top: 0; height: '+(dd.ie6?"20px":"100%")+"; width: 100%; z-index: 30; overflow: hidden; cursor: text; "+(t==""?"":"display: none;")+"\"><div class='@innerHintE' style='position: absolute; top: 50%; margin-top: -0.6em; text-align: center; color: #c0c0c0; width: 100%;'>"+(this.hint||"")+"</div></div>"
};
m.finish=function(){this.sup("finish");
this.inputE.addCallback("onkeyup",[this,l]);
this.hintE.addCallback("onclick",[this,function(){this.inputE.focus()
}]);
this.inputE.addCallback("onfocus",[this,function(){this.root.addClass("inputFocusStyle")
}]);
this.inputE.addCallback("onblur",[this,function(){this.root.delClass("inputFocusStyle")
}]);
if(this.focus&&!this.dontFocus){this.root.addClass("inputFocusStyle")
}};
window.EnhancedInputLine=makeWidget(m,InputLine)
})();
(function(){var m=function(){return{style:"height: 17px; border: 1px solid black; padding: 0px; text-align: left;"}
};
var n=function(p,q){this.progBarText.innerHTML=(q===undefined||q===null)?""+(p||0)+"%":(q===false?"":q);
this.progBar.style.width=p+"%"
};
var l=function(){if(this.tout){clearTimeout(this.tout)
}this.tout=false
};
var k=function(){if(!this.random){return
}var p=(this.aniPos||0)+1;
if(p>=85){p=-85
}this.aniPos=p;
this.progBar.style.width="15%";
this.progBar.style.left=(p<0?-p:p)+"%";
this.tout=setCallbackTimeout([this,k],40)
};
var j=function(s){var q=this.value,t=""+(this.percentage||0)+"%";
if(this.random){q=false
}q=(q===undefined||q===null)?t:(q===false?"":q);
return"<div "+s+'><div class="@progBar" style="position: relative; top: 0px; left: 0px; background-image: url('+R+"1/i/progani.gif); background-repeat: 'repeat'; height: 100%; width: "+t+'; padding: 0px;"><div class="@progBarText" style="position: relative; top: 0px; color: #d8d8d8; left: 0px; height: auto; text-align: center; font-weight: bold; padding: 0px; padding-top: 1px; padding-left: 3px;">'+q+"</div></div></div>"
};
window.ProgBar=makeWidget({setPercentage:n,init:m,html:j,finish:k,unfinish:l})
})();
window.MultipleChoice=(function(){var n=0;
var m="mcAnswerSelected";
var k={tag:"div",attrs:{tabindex:"1",cellspacing:"0"},basics:["answers","defaultValue","onChange"]};
k.init=function(){if(typeof this.answers=="string"){this.answers=this.answers.split("##")
}this.disabledNrs=[];
this.values=[];
for(var q=0;
q<this.answers.length;
q++){var p=this.answers[q];
if(typeof p=="string"){p=p.split("%%")
}this.values[q]=p.length==1?(q+1):p[1];
if(p[2]){this.disabledNrs[q]=true;
if(this.val==p[0]){this.val=undefined
}}this.answers[q]=p[0]
}if(this.val){this.defaultValue=this.val
}};
var j=function(q){var p=this._w;
if(p.disabledNrs[this._nr]){return
}p.setPosition(this._nr);
p.isChanged=true;
callback(p.onChange,[p.getValue()],p)
};
k.setPosition=function(p){if(this.disabledNrs[p]){return
}if(!this.answersEA[p]){return
}if(this.position!=null){this.answersEA[this.position].delClass(m)
}this.position=p;
this.answersEA[this.position].addClass(m);
this.answersEA[this.position].firstChild.firstChild.checked=true
};
k.getValue=function(){return this.values[this.position]||null
};
k.setValue=function(q){for(var p=0;
p<(this.values||[]).length;
p++){if(!!this.values[p]&&this.values[p]==q&&!this.disabledNrs[p]){this.setPosition(p);
return true
}}return false
};
var l=function(u){var s=getKeyCode(u),q=this._w,t=q.position;
if(s==40&&(t===undefined||q.answers[t+1])){q.setPosition(q.position===undefined?0:t+1)
}else{if(s==38&&(t===undefined||q.answers[t-1])){q.setPosition(q.position===undefined?q.answers.length-1:t-1)
}else{return
}}cancelEvent(u);
q.isChanged=true;
callback(q.onChange,[q.getValue()],q)
};
k.ihtml=function(){var p=[],v=this.answers,u=[],w=n++;
for(var q=0;
q<this.answers.length;
q++){var t=(!!this.defaultValue&&this.defaultValue==this.values[q]&&!this.disabledNrs[q]);
if(t){this.position=q
}p.push('<tr class="@@answersEA mcAnswer'+(q&1)+" "+(t?m:"")+'" '+(this.disabledNrs[q]?'style="cursor: default;"':"")+'><td class="mcOptionAnswered"><input tabindex="-1" style="cursor: pointer;" type="radio" name="ignoreMc'+w+'" value="'+1+'" '+(this.disabledNrs[q]?"disabled":"")+" "+(t?"checked ":"")+' /></td><td class="mcAnswerText" '+(this.disabledNrs[q]?'style="color: gray;"':"")+">"+this.answers[q]+"</td></tr>")
}return'<table cellspacing="0" class="qArea">'+(p.join(""))+"</table>"
};
k.finish=function(){if(this.defaultValue){this.setValue(this.defaultValue)
}toggleMouse(this.answersEA,"mcAnswerHover");
for(var p=0;
p<this.answersEA.length;
p++){this.answersEA[p].addCallback("onclick",j)
}this.root.addCallback("onkeypress",l)
};
return makeWidget(k,FormField)
})();
window.Animation=(function(){var k,u,j=[];
var p;
var v=function(){if(k){clearTimeout(k)
}if(j.length){var t=j[0][0]-new Date().getTime();
if(t<5){t=5
}k=setTimeout(p,t)
}else{k=false
}};
p=function(){k=false;
var y=new Date().getTime();
var z=y+10;
var t=0;
while(t<j.length&&j[t][0]<=y){t++
}var w=j.splice(0,t);
u=true;
for(t=0;
t<w.length;
t++){try{w[t][1].onTimeout(y)
}catch(x){DBG("caught animation error: "+x)
}}u=false;
v()
};
var n=function(x,w){var y=new Date().getTime()+x;
var t=0;
while(j[t]&&y>j[t][0]){t++
}j.splice(t,0,[y,w]);
if(!t&&!u){v()
}};
var l=function(w){for(var t=0;
t<j.length;
t++){if(j[t][1]===w){j.splice(t,1);
t--
}}};
var m={defaultInterval:40};
m.start=function(){var t=this.delay||0;
this.startTime=new Date().getTime()+t;
if(t){this.sched(t)
}else{this.onTimeout(this.startTime)
}return this
};
m.onTimeout=function(y){if(!this.started){callback(this.onStart,false,this);
this.started=true
}if(this.duration&&this.duration>0){while(y-this.startTime>this.duration){var w=this.duration;
if(callback(this.onUpdate,[1],this)===false||callback(this.onReady,false,this)!==true){return
}this.startTime+=w
}y=(y-this.startTime)/this.duration
}var x=callback(this.onUpdate,[y],this);
if(x===false){return
}var t=this.defaultInterval;
if(typeof x=="number"){t=x
}this.sched(t)
};
m.sched=function(t){if(this.scheduled){l(this)
}if(typeof t=="number"){n(t,this);
this.scheduled=true
}else{this.scheduled=false
}};
m.cancel=function(t){this.sched(false);
callback(this.onCancel,false,this)
};
var s={};
s.sinsin=function(t){return 0.5*Math.sin((t-0.5)*Math.PI)+0.5
};
s.sin=function(t){return Math.sin(t*Math.PI/2)
};
s.linear=function(t){return t
};
s.elastic=function(t){if(t>=1){return 1
}return 1-Math.pow(2,10*-t)*Math.cos(20*t*Math.PI/3)
};
var q=makeClass(m);
q.T=s;
return q
})();
window.CssAnimation=(function(){var k={basics:["element","targetValues","unit","duration","originValues"],duration:1000,transform:Animation.T.elastic,property:"style"};
k.onStart=function(){if(!this.originValues){this.originValues={}
}var n=this.element;
if(!n||!n.parentNode){return
}if(this.property){n=n[this.property]
}for(var q in this.targetValues){if(this.originValues[q]===undefined){this.originValues[q]=parseFloat(n[q])
}}if(this.constantSpeed){var q=this.constantSpeed[0],m=this.constantSpeed[1];
this.duration=Math.max(10,Math.abs(this.targetValues[q]-this.originValues[q])*m)
}};
var j=/(^l|L)eft$|(^t|T)op$|(^r|R)ight$|(^b|B)ottom$|(^w|W)idth$|(^h|H)eight$|^margin$|^padding$/;
var l=/^zIndex$/;
k.onUpdate=function(m){var q=this.element;
if(!q||!q.parentNode){DBG("Canceling animation for seemingly removed element ",q);
return false
}if(this.property){q=q[this.property]
}for(var t in this.targetValues){var s=this.originValues[t]+(this.targetValues[t]-this.originValues[t])*this.transform(m);
if(t.match(l)){s=Math.round(s)
}if(isNaN(s)){continue
}if((t.toLowerCase()=="width"||t.toLowerCase()=="height")&&s<0){s=0
}if(this.unit&&this.unit[t]){s=""+s+""+this.unit[t]+""
}else{if(this.unit){s=""+s+""+this.unit+""
}else{if(t.match(j)){s=""+Math.round(s)+"px"
}}}try{q[t]=s;
if(dd.ie&&this.property=="style"&&t=="opacity"){setOpacity(this.element,parseFloat(s))
}}catch(n){ev.send("log","exception while setting prop '"+t+"' on '"+q+"' to '"+s+"': "+n)
}}};
return makeClass(k,Animation)
})();
window.TooltipHint=(function(){var j={tag:"div",width:250,attrs:{style:"position: absolute; z-index: 20000; opacity: 0; "+getOpacityCss(0)+""}};
j.init=function(){this.element.addCallbacks({onmouseover:[this,this.show],onmousemove:[this,this.show],onmouseout:[this,this.hide]})
};
j.deinit=function(){this.element.delCallbacks({onmouseover:[this,this.show],onmousemove:[this,this.show],onmouseout:[this,this.hide]})
};
j.ihtml=function(){var k="background: black; opacity: 0.5; ";
if(typeof this.content=="function"||this.content instanceof Array){this.content=callback(this.content)
}var l=(typeof this.content=="object"&&this.content.render)?this.child("content"):this.content;
return'<div style="width: '+this.width+'px; margin: 0 6px 6px 0; background: #dfe5f1; border: solid 1px #7931b8; padding: 6px;" class="@contentDivE">'+l+'</div><div class="@shadow0E" style="position: absolute; top: 6px; bottom: 0; height: auto; right: 0; width: 6px; background: #000; '+getOpacityCss(0.5)+'"><!-- --></div><div class="@shadow1E" style="position: absolute; left: 6px; bottom: 0; width: auto; right: 6px; height: 6px; background: #000; '+getOpacityCss(0.5)+'"><!-- --></div>'
};
if(dd.ie){j.finish=function(){this.shadow0E.style.bottom=null;
this.shadow0E.style.height=this.contentDivE.offsetHeight+"px";
this.shadow1E.style.right=null;
this.shadow1E.style.width=this.contentDivE.offsetWidth+"px"
}
}j.hide=function(){var k=function(){if(this.showAnim&&this.showAnim.scheduled){this.showAnim.cancel()
}if(!(this.hideAnim||{}).scheduled){var l=new CssAnimation({element:this.root,targetValues:{opacity:0},constantSpeed:["opacity",200],onReady:[this,this.undraw]}).start();
l.transform=Animation.T.sinsin;
this.hideAnim=l.start()
}};
if(this.sticky){document.addCallbacks({onclick:[this,k],ontooltip:[this,k]})
}else{k.call(this)
}};
j.show=function(n){if(document.ontooltip){document.ontooltip(this)
}n=n||window.event;
var l=n.target||n.srcElement;
for(var p=l;
p._t!=this;
p=p.parentNode){if(p._t||p==document.body){return
}}var k=n.pageX,q=n.pageY;
if(k===undefined){k=n.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
q=n.clientY+document.body.scrollTop+document.documentElement.scrollTop
}if(this.root){if(this.hideAnim&&this.hideAnim.scheduled){this.hideAnim.cancel()
}}else{this.insert(document.body)
}if(this.root.style.opacity!=1&&!(this.showAnim||{}).scheduled){var m=new CssAnimation({element:this.root,targetValues:{opacity:1},constantSpeed:["opacity",300]});
m.transform=Animation.T.sinsin;
this.showAnim=m.start()
}this.setPosition(k,q)
};
j.setPosition=function(m,s){if(!this.root){return
}var p=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,q=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
var k=(this.forceAbove?true:(this.forceBelow?false:(p+n<s+this.root.offsetHeight+10)));
this.root.style.left=Math.min(m+10,q+l-this.root.offsetWidth-25)+"px";
this.root.style.top=(k?s-5-this.root.offsetHeight:s+10)+"px"
};
window.addTooltip=function(m,n,k){var p={content:n,element:m};
extendObject(p,k||{});
var l;
if(l=m._t){if(l.undraw){l.undraw()
}if(l.deinit){l.deinit()
}}m._t=new TooltipHint(p)
};
return makeWidget(j)
})();
(function(){var l=function(m){var n=this.image;
if(!n){n=R+"1/i/question-mark.gif"
}else{if(n.indexOf("/")<0){n=R+"i/"+n+".gif"
}}if(this.word){return"<div style='white-space: nowrap; display: inline;'>"+this.word+"<img "+m+' src="'+n+'" /></div>'
}return"<img "+m+' src="'+n+'" />'
};
var j=function(m){return"<span "+m+">"+this.content+"</span>"
};
var k=function(){if(this.tooltip){addTooltip(this.root,this.tooltip,this.topts)
}if(this.onclick){this.root.addCallback("onclick",this.onclick);
delete this.onclick
}};
window.Tooltip=makeWidget({name:"Tooltip",attrs:{"class":"@inner",style:"border: 0;"},html:j,finish:k,basics:["content","tooltip","onclick"]});
window.Icon=makeWidget({name:"Icon",attrs:{"class":"icon"},init:function(){if(this.onclick){this.appendAttr("style","cursor: pointer;")
}},html:l,finish:k,basics:["image","tooltip","onclick"]});
window.HelpIcon=makeWidget({name:"HelpIcon",attrs:{"class":"helpicon"},html:l,finish:k,basics:["tooltip","word"]})
})();
window.ScrollTextDialog=makeWidget({content:"",ihtml:function(){if(window.isMobile){return this.content
}return'<div style="width: 100%; height: '+(this.height||350)+'px; overflow: auto;">'+this.content+"</div>"
}});
window.Emoticon=makeWidget({name:"Emoticon",html:function(j){return"<img "+j+" class='emoticon' height='22' src='"+R+"es/"+this.content+".gif' />"
},simple:true});
window.DynText=(function(){var k={};
var m={};
var l={basics:["identifier"]};
l.ihtml=function(){var n=k[this.identifier];
return(n===undefined)?"?":n
};
l.finish=function(){if(!m[this.identifier]){m[this.identifier]=[]
}m[this.identifier].push(this)
};
l.unfinish=function(){var p=m[this.identifier];
if(!p){return
}for(var n=0;
n<p.length;
n++){if(p[n]===this){p.splice(n,1);
return
}}};
var j=makeWidget(l);
j.setValue=function(n,s){k[n]=s;
var q=m[n];
if(q){for(var p=0;
p<q.length;
p++){q[p].redraw()
}}};
j.getValue=function(n){return k[n]
};
return j
})();
window.numberFormat=function(k){var j=(Math.round(k*100)/100).toString().match(/^([^\.]*)(\.(.*))?$/);
return j[1].split("").reverse().join("").replace(/(?=\d*\.?)(\d{3})/img,"$1.").split("").reverse().join("").replace(/^\./,"")+(j[3]?","+j[3]+"":"")
};
(function(){var k=function(){if(this.isLoaded){if(this.root){var l=window[this.widgetName];
var m=l.prototype.newWithProto();
l.apply(m,this.args);
m.replace(this.root);
callback(fetchProp(this,"onLoad"),[m],this)
}}else{if(this.shouldLoad){DBG("LoaderWidget: loading ",this.filename);
loadCall(this.filename,[this,function(){this.isLoaded=true;
k.call(this)
}])
}}};
var j={};
window.getWidgetLoader=function(m,p,n){if(isLoaded(m)){return self[p]
}if(!n){n="init"
}var q=j[n+"|"+p];
if(q){return q
}var l={filename:m,widgetName:p,args:[]};
if(n=="noti"){l.notiPath=arguments[3];
l.init=function(){this._watching=this.notiPath.concat([[this,this.load]]);
DBG("widgetLoader[noti]::init _watching=",this._watching);
window.notificationHandlers.addWatch.apply(window.notificationHandlers,this._watching)
};
l.deinit=function(){if(this._watching){window.notificationHandlers.delWatch.apply(window.notificationHandlers,this._watching);
delete this._watching
}};
l.ihtml=function(){return""
};
l.load=function(){DBG("widgetLoader[noti]::load");
this.shouldLoad=true;
k.call(this);
this.deinit()
};
l.finish=k
}else{l.ihtml=function(){return'<span style="font-style: italic;">Laden..</span>'
};
l.shouldLoad=true;
l.init=l.finish=k
}return j[n+"|"+p]=makeWidget(l)
}
})();
(function(){var k={basics:["u","w","h","l"]};
k.ihtml=function(){if(this.data){extendObject(this,this.data);
delete this.data
}this.l=this.l&&dd.ie&&!dd.ie7;
if(this.l){this.tag="span";
var l=this.u.replace(/"/g,'""').replace(/\)/g,"%29");
this.appendAttr("style",((this.w&&this.h)?"width: "+this.w+"px; height: "+this.h+"px; ":"")+'display: inline-block; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+l+'");')
}else{this.tag="img";
this.attrs.src=this.u;
this.appendAttr("style","border: 0;");
if(this.w){this.attrs.width=this.w
}if(this.h){this.attrs.height=this.h
}}if(!this.l){return""
}return(this.w&&this.h)?"":'<img src="'+escapeHtmlString(this.u)+'" style="border: 0px; visibility: hidden;" alt="" />'
};
k.setUrl=function(l){var m=this.data||this;
if(this.l){var l=l.replace(/"/g,'""').replace(/\)/g,"%29");
this.root.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+l+'")'
}else{this.root.src=l
}};
window.ImageWidget=makeWidget(k);
var j={};
window.preloadImage=function(l){if(j[l]){return
}DBG("Preloading image "+l+"");
try{var m=new Image();
m.src=l;
j[l]=true
}catch(n){DBG("preloadImage failed: ",n)
}}
})();
window.Columns=makeWidget({basics:["columns","columnWidths","justify"],tag:"table",attrs:{cellspacing:"0",cellpadding:"2"},init:function(){this.attrs.width=this.justify?"100%":undefined
},ihtml:function(){var l=[];
for(var k in this.columns){var j=(this.columnWidths&&this.columnWidths[k]!==undefined)?' width="'+this.columnWidths[k]+'"':"";
l.push('<td style="vertical-align: middle; '+(this.justify&&(k==this.columns.length-1)?"text-align: right;":"")+'"'+j+">"+this.columns[k]+"</td>")
}return"<tr>"+(l.join(""))+"</tr>"
}});
(function(){window.StaticInput=function(n){this.value=n
};
window.StaticInput.prototype.getValue=function(){return this.value
};
var m={empty:"Bovenstaande vraag is nog niet beantwoord."};
var l={tag:"div",attrs:{style:"clear: both; padding: 15px 0px 15px 0px; font-weight: bold; text-align: center; color: red;"}};
var j=function(q,p,n){if(q.widgetType){if(q.root){q.root.innerHTML=(p?p:"")
}else{DBG("Unable to write error message to unrendered setError widget: "+name+"")
}}else{if(q.tagName){q.innerHTML=p
}else{callback(q,[p],n)
}}};
var k=function(v,n){if(!this.noLoading){decrLoading()
}if(!n){n={}
}var s=[],p;
for(var q in this.form){var w=this.form[q];
if(w.setError){j.call(this,w.setError,null,w)
}if(w._showingInlineErrMsg){w.root.nextSibling.remove()
}}if(typeof this.deferErr=="object"&&!this.deferErr.tagName){for(var q in this.deferErr){j.call(this,this.deferErr[q],null)
}}for(var q in n){if(q=="success"){continue
}var u=n[q];
if(typeof u=="object"){if(u.value&&w.setValue){w.setValue(u.value)
}u=u.error
}if(!u){continue
}delete n[q];
u=m[u]||u;
var w=this.form[q],t=null;
if(typeof w=="object"&&w.getValue&&w.root){if(w.setError){t=[w,w.setError];
p=w.root
}else{if(!this.deferErr){p=w.root;
if(w._showingInlineErrMsg){w.root.nextSibling.remove()
}w._showingInlineErrMsg=true;
new InlineWidget('<div style="margin-bottom: 10px; font-weight: bold; text-align: center; color: red;">'+u+"</div>").insert(w.root.parentNode,w.root.nextSibling);
t=true
}}}else{if(this.deferErr&&this.deferErr[q]){t=[undefined,this.deferErr[q]]
}}if(t===null){DBG("Nowhere to direct error message for key "+q+": "+u+"")
}else{if(t!==true){j.call(this,t[1],u,t[0]);
if(t.root){p=t.root
}else{if(t.tagName){p=t
}}}}s.push(u)
}if(p){scrollToElement(p)
}DBG("onResult CB time ",s.length,this.onFailure);
callback((s.length==0||n.success)?this.onSuccess:this.onFailure,[n.success,v],this)
};
l.ihtml=function(){return""
};
l.getValues=function(){var p={};
for(var n in this.form){var q=this.form[n];
if(typeof q=="object"&&q.getValue){p[n]=q.getValue()
}}return p
};
l.save=function(t){if(!this.noLoading){incrLoading()
}var q=this.getValues();
var s=this.preSave?callback(this.preSave,[q],this):undefined;
if(typeof s=="object"&&!objectEmpty(s)){k.call(this,q,s)
}else{t=t||this.rpc;
var n=[q,[this,k,q]];
if(typeof t=="object"){for(var p=t.length-1;
p>=0;
p--){n.unshift(t[p])
}}else{n.unshift(t)
}ev.send.apply(ev.send,n)
}return false
};
l.basics=["rpc","form","onSuccess"];
window.InputSender=makeWidget(l)
})();
window.Enquete=makeWidget({basics:["key"],allowCancel:false,parentTitle:"Enquête",init:function(){if(!this.rpc&&this.key){this.rpc=["Enquete.write",this.key]
}var j=this.parentOptions=["Opslaan",[this,this.save]];
if(this.allowCancel){j.unshift(false);
j.unshift("Annuleren")
}this.attrs.style=""
},ihtml:function(){this.form={};
return this.formHtml(this.form)+"<div class='@deferErr' style='clear: both; padding: 15px 0px 15px 0px; font-weight: bold; text-align: center; color: red;'></div>"
},onSuccess:function(){if(this.parent&&this.parent.close){this.parent.close()
}}},InputSender);
window.FlashWidget=makeWidget({basics:["url"],html:function(l){var n=escapeHtml(this.url);
var j=(this.width||2),m=(this.height||1);
var k=escapeHtml(this.name=this.name||"flashName"+Math.floor(Math.random()*1000000));
DBG("name = "+k);
var p=this.wmode||(j>5?"opaque":"transparent");
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){return"<embed "+l+'src="'+n+'"bgcolor="'+(this.bgcolor||"white")+'"width="'+j+'"height="'+m+'"flashvars="'+(this.flashvars||"")+'"quality="high"swLiveConnect="true"allowScriptAccess="always"type="application/x-shockwave-flash"pluginspage="http://www.macromedia.com/go/getflash"id="'+k+'"wmode="'+p+'"/>'
}return"<object "+l+'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+j+'" height="'+m+'" name="'+k+'"id="'+k+'"><param name="movie" value="'+n+'" /><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="flashvars" value="'+(this.flashvars||"")+'" /><param name="bgcolor" value="'+(this.bgcolor||"white")+'" /><param name="wmode" value="'+p+'" /></object>'
}});
(function(){var l=function(t,s){DBG("loadFlashPoll");
if(t.readyState==4||t.PercentLoaded()==100){DBG("==ready");
scriptReady(s)
}else{DBG("==polling");
setTimeout(function(){l(t,s)
},100)
}};
window.loadFlashObject=function(x,v,z,y,A,u,t){var s=(typeof x=="object")?x:{url:x,bgcolor:A,width:v,height:z,style:t,name:u,parent:y};
s.flashvars="objname="+(s.name||"");
DBG("flashLoading",s.name);
if(!s.parent){s.parent=(dd.ie?document.getElementsByTagName("head")[0]:gId("hiddenStuff"))||document.body
}var w=new FlashWidget(s);
if(dd.ie){x.parent.outerHTML=w.getHtml();
w.addDynamics(gId(s.name))
}else{w.replace(s.parent)
}};
var j,n,q,p,k,m;
m=function(t){var v=[];
for(var w=1;
w<arguments.length;
w++){v.push(arguments[w])
}var s=n(v,0);
var u='<invoke name="';
u=u+t;
u=u+'" returntype="javascript">';
u=u+s;
u=u+"</invoke>";
return u
};
j=function(v){var u="<array>";
for(var t=0;
t<v.length;
t++){u+='<property id="'+t+'">'+k(v[t])+"</property>"
}return u+"</array>"
};
n=function(w,t){var v="<arguments>";
for(var u=t;
u<w.length;
u++){v+=k(w[u])
}return v+"</arguments>"
};
q=function(u){var t="<object>";
for(var v in u){t+='<property id="'+v+'">'+k(u[v])+"</property>"
}return t+"</object>"
};
p=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")
};
k=function(t){var s=typeof(t);
if(s=="string"){return"<string>"+p(t)+"</string>"
}else{if(s=="undefined"){return"<undefined/>"
}else{if(s=="number"){return"<number>"+t+"</number>"
}else{if(t==null){return"<null/>"
}else{if(s=="boolean"){return t?"<true/>":"<false/>"
}else{if(t instanceof Date){return"<date>"+t.getTime()+"</date>"
}else{if(t instanceof Array){return j(t)
}else{if(s=="object"){return q(t)
}else{return"<null/>"
}}}}}}}}};
window.callFlash=function(t,v){if(!t){DBG("no flsh object");
return""
}var s=[];
for(var u=2;
u<arguments.length;
u++){s.push(arguments[u])
}if(dd.ie){s.unshift(v);
return t.callFunction(m.apply(self,s))
}else{DBG("flsh[func]",window.fff=t[v]);
if(t[v]){return t[v].apply(t,s)
}}throw"Unable to callFlash"
}
})()
})();
var rnd=function(){return Math.round(Math.random()*999999)
};
function PoolEntity(b,m){this.win=window;
window.ilcsName="tmp";
this.available=function(){try{return !window.closed&&window.ilcsName&&window.document&&window.document.getElementsByTagName("body").length
}catch(c){return false
}};
if(!this.available()){DBG("ev: WARNING! current document not available")
}var G=this;
var l=function(H,I){if(!H){return false
}var c=false;
try{c=H.getIlcsObj(I)
}catch(J){}try{for(var w=0;
!c&&w<(H.frames||[]).length;
w++){c=l(H.frames[w],I)
}}catch(J){}return c
};
var g,f,B;
var u=this._setEntity=function(c,e){if(e){f[c]=e
}else{delete f[c]
}};
var h=function(c,e){u(c,e);
B(function(i){i._setEntity(c,e)
})
};
var n=this.getEntity=function(c){if(!c){for(var w in f){var I=n(w);
if(I){return I
}}return false
}var H=f[c];
if(!H){return false
}if(H.available&&H.available()){return H
}try{if(H.win){delete H.win.ilcsName
}}catch(I){}try{deleteCookie("ilcs_"+c)
}catch(I){}h(c);
if(G.entityLost){G.entityLost(c)
}return false
};
B=this.forEach=function(w){for(var c in f){var H=n(c);
if(H){w(H)
}}};
var s=this.getVal=function(c){return g[c]
};
var a=this.setVal=function(c,e){B(function(i){i._setVal(c,e)
})
};
this.chVal=function(e,i){var c=i(s(e));
a(e,c);
return c
};
this._setVal=function(c,e){g[c]=clone(e)
};
var t=l(top,b)||l(window.opener,b);
if(t){DBG("ev: pool with top/opener")
}var x=0;
var k=document.cookie.split("; ");
for(var y=0;
y<k.length;
y++){var D=k[y].split("=");
if(D[0].substr(0,5)!="ilcs_"){continue
}var v=parseInt(D[0].substr(5));
if(v>x){x=v
}if(t){continue
}var d=D[1].split(":");
var z=(d[0]&&d[0]!="*")?d[0]:D[0];
DBG("ev: cookie: "+k[y]+" -> "+z);
var p=false;
try{p=window.open("",z,"",false);
DBG("ev: -> "+(p?"found":"blocked"))
}catch(C){DBG("ev: -> except");
p=false
}if(p&&(t=l(p,b))){DBG("ev: pool from cookie "+k[y])
}else{if(!p||!l(p)){deleteCookie(D[0]);
if(p&&typeof(p)=="object"&&window!=p&&p.close){DBG("ev: reclosing");
try{p.close()
}catch(C){}}}}}var q=this.id=1+x;
var A="ilcs_"+q;
if(!t){DBG("ev: new pool");
t={udata:(m||{}),entities:{}}
}g=this.udata=clone(t.udata);
f=this.entities=clone(t.entities,true);
h(q,this);
window.ilcsName=b;
window.ilcsObj=this;
window.getIlcsObj=function(c){return(!c||this.ilcsName==c)?this.ilcsObj:false
};
try{top.name=A
}catch(C){}try{window.name=A
}catch(C){}var F=top.name||window.name||F;
if(F==A){F="*"
}DBG("ev: window.name: "+window.name+"");
this.cookie=function(c){c=F+(c?":"+c:"");
document.cookie=A+"="+c+"; path=/"
};
this.cookie();
var j=function(){};
var E=this.destroy=function(){DBG("ev: destroy");
if(G.onunload){G.onunload()
}G.stateChanged=j;
window.ilcsName=window.ilcsObj=false;
G.available=function(){return false
};
n(q)
};
window.addCallback("onunload",E)
}function getXmlHttp(){if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP")
}catch(a){}try{return new ActiveXObject("Microsoft.XMLHTTP")
}catch(a){}}if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest()
}throw"Unable to obtain XmlHttp object"
}window.errorReload=function(f){if(window.errorReloading){DBG("ev: already reloading");
return
}window.errorReloading=true;
DBG("ev: reloading:",f);
var a=[],d=window.location.href.split("#");
var b=d[0].split("?");
if(b[1]){var g=b[1].split("&");
for(var c=0;
c<g.length;
c++){var e=g[c].split("=")[0];
if(e!="msg"&&e!="rnd"){a.push(g[c])
}}}if(f){a.push("msg="+encodeURIComponent(f))
}a.push("rnd="+rnd());
b=b[0]+"?"+a.join("&");
if(d[1]){b+="#"+d[1]
}window.location.href=b;
window.location.href=b
};
function EventConnection(g){var I=this;
var B=String.fromCharCode(1);
var K=String.fromCharCode(2);
var v=this.sep=String.fromCharCode(3);
var b=String.fromCharCode(4);
var a=String.fromCharCode(5);
this.stateChanged=function(M){DBG("ev: stateChanged: "+M);
var L;
if(M>=1&&(L=fetchProp(I,"modal"))){L.cancel()
}else{if(!M&!I.modal&&window.Modal){I.modal=new Modal({title:"Geen verbinding met de site",aboveWait:true,content:'Op dit moment kan er geen verbinding worden gemaakt met BlurryPeople.<br /><br />Dit kan verschillende oorzaken hebben:<br /><ul><li>BlurryPeople is down</li><li>Je internetverbinding is weggevallen</li><li>Er is een andere -misschien tijdelijke- fout opgetreden (<a href="javascript: refresh();">opnieuw proberen</a>)</li></ul>Dit bericht verdwijnt vanzelf wanneer de verbinding is hersteld ...</div>',finish:function(){var Q=parseInt(this.root.style.left),P=parseInt(this.root.style.top),O=this.root.offsetWidth,N=this.root.offsetHeight;
this.degradeBox=document.createElement("div");
this.degradeBox.setAttribute("style","position: absolute; left: "+(Q+9)+"px; top: "+(P+9)+"px; width: "+(O-18)+"px; height: "+(N-18)+"px; background: #e0e0e0; border: solid 3px #ffffff; z-index: 14900;");
document.body.appendChild(this.degradeBox);
return this.sup("finish")
},unfinish:function(){document.body.removeChild(this.degradeBox)
}}).schedule()
}}};
var f=[];
var n={};
var F={0:errorReload,1:true};
var z=99;
var y=function(O,L,N,P){DBG("ev: sending for entity "+(N||I.id)+": "+O);
if(f){f.push(arguments);
DBG("ev: delayed: still loading..");
return
}var M=I.chVal("reqSeqNr",function(Q){return parseInt(Q||0)+1
});
I.chVal("reqArr",function(Q){Q.push([M,""+(N||I.id)+K+O]);
return Q
});
if(P){I.setVal("signing",true)
}if(!L||L<=0){s(true,L<0)
}};
function q(){DBG("ev: cancel");
var M={};
if(arguments.length>0){for(var L=0;
L<arguments.length;
L++){M[L]=this[arguments[L]]
}}else{M=this
}var N=[];
for(var L in M){if(!F[M[L]]){continue
}delete F[M[L]];
N.push(M[L])
}y("C"+N.join(K))
}var J=false;
this.send=function(){var P=arguments.length>1?arguments:arguments[0].split(v);
var M="",S=P[0].split("|");
if(S.length>1){M=K+S[0];
S=S[1]
}else{S=S[0]
}var L={cancel:q};
var T=[];
for(var Q=1;
Q<P.length;
Q++){var O,N=P[Q];
if((typeof N!="object"||N===null||(typeof N[0]!="function"&&typeof N[1]!="function"))&&typeof(O=toJson(N))=="string"){T.push("j"+O)
}else{F[z+=1]=N;
T.push("c"+z);
L[Q]=z
}}y((J?"I":"M")+"blurrypeople.com|"+S+v+T.join(v)+M,0,undefined,J);
J=false;
return L
};
this.signed=function(){J=true;
return this.send.apply(this,arguments)
};
this.resp=function(Q){DBG("ev: resp:",Q);
var L=parseInt(Q.shift());
var M=Q.shift();
var P,O=F[L];
if(!O){return
}for(var N=0;
N<Q.length&&this.available&&this.available();
N++){var T=Q[N].split(b);
if(T[0].charAt(0)==a){T[0]=T[0].substring(1);
if(T[T.length-1]===""){T.pop()
}T=xEval("["+T.join(",")+"]")
}try{P=callback(O,T)===true||P
}catch(S){DBG("ev: caught response handling exception");
S.detectMethod="evCb";
if(window.errReport){errReport(S)
}else{setTimeout(function(){throw S
},0)
}}}M=parseInt(n[L])+(M=="+"?1:(M=="-"?-1:parseInt(M)));
if(P&&M>=0){y("C"+L,1);
M=0
}if(M<0){delete F[L];
delete n[L]
}else{n[L]=M
}};
var H,m,i,D,C,x,E,w;
var p=false,s;
var c=function(){s()
};
var s=this.triggerMaster=function(L,N){if(p){clearTimeout(p)
}p=setTimeout(c,750);
var M=I.getVal("master");
if(M){M=I.getEntity(M)
}if(!M){DBG("ev: becoming master");
I.setVal("master",I.id);
M=I;
L=true;
H=true
}if(L){M.reconnectSoon(N)
}};
var G=function(){DBG("ev: stopMaster");
if(m){m.onreadystatechange=function(){};
m.abort()
}if(C){clearTimeout(C)
}if(x){clearTimeout(x)
}if(E){clearTimeout(E)
}H=m=C=x=E=0
};
this.entityLost=function(L){DBG("ev: entityLost "+L);
y("D",0,L);
if(L!=this.getVal("master")){return
}if(L==this.id){G()
}var M=this.getEntity();
if(M){M.triggerMaster()
}else{if(I.getVal("reqArr").length){H="unload";
D()
}}};
var l=function(M){var L=w;
w=M;
if(M==L||(M==1&&L>1)){return
}I.forEach(function(N){N.stateChanged(M)
})
};
var u=function(){x=0;
D()
};
var e=function(){l(0);
E=0;
D()
};
var d=function(){};
var t=0;
var k=function(T){DBG("ev: RESPONSE:",T);
if(E){clearTimeout(E);
E=0
}if(x){clearTimeout(x);
x=0
}var S=(T||"").split(B);
var O=S.shift().split(K);
var P=parseInt(O[1]);
var L=I.getVal("bid");
if(O[0]!="ilcs"){if(O[0].match(/running-in-maintenance-mode/)){return errorReload("maintenance")
}DBG("ev: invalid identifier (or no bid): "+O[0]);
if(t++){l(0)
}if(C){clearTimeout(C)
}C=setTimeout(D,3000);
return
}else{if(!P||(L&&L!=P)){DBG("ev: resync");
I.destroy();
I.forEach(function(X){if(I!=X){X.destroy();
X.win.errorReload("resync")
}});
I.destroy();
errorReload("resync");
return
}else{l(L?(L==P?1:3):2)
}}t=0;
I.cookie(P);
I.setVal("bid",P);
I.setVal("sec",O[2]);
var V=parseInt(O[3]);
I.chVal("reqArr",function(X){while(X.length&&V>=X[0][0]){X.shift()
}return X
});
if(!I.getVal("reqArr").length){I.setVal("signing",false)
}var U=3;
var W=U;
var N;
for(var Q=0;
Q<S.length;
Q++){r=S[Q].split(K);
if(!r[1]){continue
}N=r.shift();
var M=I.getEntity(parseInt(r.shift()));
if(M){M.resp(r)
}}DBG("ev: finished response proc");
if(N){I.setVal("lastResp",N)
}if(O[4]=="D"){DBG("ev: disconnect");
I.setVal("reqSeqNr",0);
I.setVal("bid",0);
I.setVal("sec",0);
I.setVal("lastResp",0);
if(I.getVal("reqArr").length){D()
}}else{D()
}};
var A=0;
var h=function(M){if(!m||M!=A||m.readyState!=4){return
}m.onreadystatechange=d;
var L=m.responseText;
m=0;
k(L)
};
D=function(){DBG("ev: reconnect");
if(C){clearTimeout(C);
C=0
}if(!H){DBG("ev: !isMaster");
return
}if(m){if(!i||(x&&i<2)){return DBG("ev: not aborting xhr")
}DBG("ev: aborting xhr");
m.onreadystatechange=function(){};
m.abort()
}i=0;
if(x){clearTimeout(x)
}x=setTimeout(u,500);
if(E){clearTimeout(E)
}E=setTimeout(e,35000);
var L="ilcb"+K+0+K+I.getVal("bid")+K+I.getVal("sec")+K+I.getVal("lastResp")+K+K+32+B;
var P=I.getVal("reqArr");
for(var N=0;
N<P.length;
N++){L+=""+P[N][0]+K+P[N][1]+B
}A+=1;
var T=A;
DBG("ev: REQUEST "+T+":",L);
var Q=I.getVal("signing");
var M=g+(Q?"Get":"")+"?r="+rnd();
try{m=getXmlHttp();
if(!m){throw 1
}m.open("POST",M,"sync"!=H);
if("sync"!=H){if(m.readyState==0){throw 2
}m.onreadystatechange=function(){h(T)
}
}m.send(L)
}catch(O){var S=encodeURIComponent;
S="_noxmlhttp?exception="+S(O.toString())+"&url="+S(g)+"&location="+S(document.location.href);
document.location.href=S
}};
this.start=function(){var L=f;
f=false;
for(var M=0;
M<L.length;
M++){y.apply(null,L[M])
}};
this.reconnectSoon=function(L){if(!i){i=1
}if(L){i=2;
D()
}else{if(!C){C=setTimeout(D,10)
}}};
var j={reqArr:[],reqSeqNr:0,bid:0,sec:0,lastResp:0};
PoolEntity.call(this,window.location.host+g,j)
}window.GradBox=(makeWidget({textRight:0,textLeft:0,top:40,inherit:BoxWidget,bottom:40,borderLeft:0,borderRight:0,color:"#dfe5f1",textTop:0,left:40,textBottom:0,right:40,cor:R+(dd.png?"1/i/_8v.png":"1/i/_8w.png")}));
window.LBalloon=(makeWidget({textRight:20,top:35,textLeft:50,inherit:BoxWidget,bottom:35,borderLeft:71,ver:R+(dd.png?"1/i/_8z.png":"1/i/_90.png"),borderRight:44,color:"#7931b8",left:71,textTop:15,right:44,textBottom:15,cor:R+(dd.png?"1/i/_8x.png":"1/i/_8y.png")}));
window.RBalloon=(makeWidget({textRight:50,top:35,textLeft:20,inherit:BoxWidget,bottom:35,borderLeft:44,ver:R+(dd.png?"1/i/_93.png":"1/i/_94.png"),borderRight:71,color:"#1b8db3",left:44,textTop:15,right:71,textBottom:15,cor:R+(dd.png?"1/i/_91.png":"1/i/_92.png")}));
(function(){var f=dd.ie?"display: inline-block;":"";
var i={tabindex:2,noTooltip:true};
i.setValue=function(j){this.sup("setValue",j);
this.chatWidget.onUpdateTA(this)
};
i.insertText=function(j){if(this.inputE&&this.inputE.selectionStart!==undefined){this.inputE.value=this.inputE.value.substring(0,this.inputE.selectionStart)+j+this.inputE.value.substring(this.inputE.selectionEnd)
}else{this.setValue(this.getValue()+j)
}};
var b=function(k){k=k||window.event||{};
var j=k.keyCode||k.which||k.charCode;
if(j!=16&&j!=18){this.chatWidget.onUpdateTA(this)
}};
i.finish=function(){this.inputE.addCallbacks({onkeyup:[this,b]});
this.sup("finish")
};
window.ChatTextArea=makeWidget(i,EnhancedTextArea);
var c=function(k,j){k=escapeHtml(k).replace(/([ \(]|^)www\./,"$1http://www.").replace(/(http:\/\/(www\.)?([^ \)\/"',]+)(\/[^ \)'",]*)?)/g,function(l,p,n,m){return'<a target="_blank" href="'+escapeHtmlString(unescapeHtml(p))+'"> ['+m+"] </a>"
});
k=k.replace(/[^ \t\n\<\>]{35,}/g,function(q,s){var n=q.length;
var m=k.indexOf(">",s+n);
if(m>=0){var p=k.indexOf("<",s+n);
if(p<0||p>m){return q
}}return q.replace(/(.{5})/g,dd.n6?"$1&#8203;":"$1&shy;")
});
return"<span class='from-"+(j?"other":"self")+"'>"+(j?"&larr;":"&rarr;")+" "+k+"</span>"
};
var g=function(j){return"<span class='from-system'>"+j+"</span>"
};
var a=function(l,j){var k=j&3;
if(k==0){l=g(l)
}else{l=c(l,k==2)
}return new InlineWidget({h:l,tag:"div"})
};
var e={};
var d=function(){var j=this.ta.getValue().strip();
if(j==""){return
}this.ta.setValue("");
this.bp.sendMsg(j)
};
e.onUpdateTA=function(){};
e.scrollDown=function(){try{this.historyE.scrollTop=this.historyE.scrollHeight-this.historyE.offsetHeight+10
}catch(j){}};
e.attrs={style:"width: 100%;"};
e.init=function(){extendObject(this,{textRight:6,top:7,textLeft:6,inherit:BoxWidget,bottom:7,borderLeft:222,ver:R+(dd.png?"1/i/_8s.png":"1/i/_8t.png"),borderRight:221,left:222,textTop:6,color:"#dfe5f1",right:221,textBottom:6,cor:R+(dd.png?"1/i/_8q.png":"1/i/_8r.png")})
};
e.ihtml=function(){DBG("cw.ihtml!?");
this.ta=new ChatTextArea({height:"40px",button:true,hint:'<span style="font-size: 85%;">Talking not your forte? Use this area to send a text message.</span>',style:"margin-top: 6px;",onEnter:[this,d],enterMode:2,chatWidget:this});
this.content='<div class="@historyE chat-history" style="'+f+' background-color: #f3f1fb; overflow: auto; height: 168px; position: relative; padding: 3px;"></div>'+this.ta.render()+"";
return this.sup("ihtml")
};
var h=function(k,j){a.call(this,k,j).insert(this.historyE);
this.scrollDown()
};
e.finish=function(){this.bp.onMsg=[this,h];
if(this.initMsg){h.call(this,this.initMsg,0)
}};
e.unfinish=function(){this.bp.onMsg=false
};
window.ChatWidget=makeWidget(e,BoxWidget)
})();
(function(){var a=(function(){var f={};
var c=function(l){var d;
if(this.cover){this.cover.remove();
delete this.cover
}if((d=walkTree(this,["targets",this.curTarget,"_w"]))&&d.onDragLeave){callback(d.onDragLeave,[],d)
}this.curTarget=l;
if(l!==false){var j=$(this.targets[l]);
if((d=walkTree(this,["targets",this.curTarget,"_w"]))&&d.onDragEnter){callback(d.onDragEnter,[],d)
}else{var k=getOffsetXY(j);
this.cover=new InlineWidget('<div style="width: '+j.clientWidth+"px; height: "+j.clientHeight+"px; position: absolute; z-index: 18900; left: "+k[0]+"px; top: "+k[1]+"px; "+getOpacityCss(0.3)+'; background: #8f8;"></div>');
this.cover.insert(document.body)
}}};
var i=function(l){var k=getEventXY(document.body,l);
this.widget.root.style.left=""+(k[0]-this.handle[0])+"px";
this.widget.root.style.top=""+(k[1]-this.handle[1])+"px";
for(var m in this.targets){var d=$(this.targets[m]);
var j=getOffsetXY(d);
if(k[0]>=j[0]&&k[0]<j[0]+d.offsetWidth&&k[1]>=j[1]&&k[1]<j[1]+d.offsetHeight){c.call(this,m);
return
}}c.call(this,false)
};
var b=function(d){DBG("Dragging::stagE0");
this.handle=getEventXY(this.element,d);
this.element.addCallback("onmouseout",[this,h,true]);
document.addCallback("onmouseup",[this,h,false]);
this.element.addCallback(dd.ie?"onselectstart":"onmousedown",cancelEvent)
};
var h=function(d,j){DBG("Dragging::stage1");
document.delCallback("onmouseup",[this,h,false]);
this.element.delCallback("onmouseout",[this,h,true]);
if(d){g.call(this,j)
}else{this.element.delCallback(dd.ie?"onselectstart":"onmousedown",cancelEvent)
}};
var g=function(d){DBG("Dragging::start");
this.widget=false;
this.targets=false;
extendObject(this,callback(this.ctrl.onDragStart,[],this.ctrl));
if(!this.targets||objectEmpty(this.targets)){this.targets={}
}this.exWidget=!!this.widget.root;
if(!this.exWidget){this.widget.insert(document.body);
this.widget.root.style.position="absolute";
this.widget.root.style.zIndex=19000;
this.widget.root.style.cursor="move"
}i.call(this,d);
document.addCallbacks({onmousemove:[this,i],onmouseup:[this,e]})
};
var e=function(){DBG("Dragging::end");
document.delCallbacks({onmousemove:[this,i],onmouseup:[this,e]});
this.element.delCallback(dd.ie?"onselectstart":"onmousedown",cancelEvent);
callback(this.ctrl.onDragEnd,[this.curTarget],this.ctrl);
c.call(this,false);
if(!this.exWidget&&this.widget.root){this.widget.remove()
}this.widget=false
};
f.init=function(){this.element.addCallback("onmousedown",[this,this.clickable?b:g])
};
f.deinit=function(){this.element.delCallback("onmousedown",[this,this.clickable?b:g]);
if(this.widget){e.call(this)
}};
f.clickable=true;
return makeClass(f)
})();
window.regDraggable=function(c,b){if(!b){b=c.root
}if(b._d){b._d.deinit()
}b._d=new a({element:b,ctrl:c})
}
})();
var PlainFavBox=(makeWidget({textRight:10,textLeft:10,top:25,inherit:BoxWidget,bottom:25,borderLeft:25,ver:R+(dd.png?"1/i/_81.png":"1/i/_96.png"),borderRight:25,color:"#f0f3fa",textTop:0,left:25,textBottom:10,right:25,cor:R+(dd.png?"1/i/_7z.png":"1/i/_95.png")}));
var FavBox=makeWidget({ihtml:function(){var a=this.subtitle?'<div style="font-style: italic; font-size: 80%; margin: 0 14px 0 14px;">'+escapeHtml(this.subtitle)+"</div>":"";
this.content='<span style="position: absolute; '+(this.alignRight?"right":"left")+': 10px; padding-left: 3px; padding-right: 3px; top: -0.5em; background-color: #f0f3fa;" class="title">'+escapeHtml(this.title)+"</span><div style='padding-top: 0.5em; "+(this.alignRight?"text-align: right;":"")+"'>"+a+""+(this.content||"<div style='height: 50px;'></div>")+"</div>";
return this.sup("ihtml")
}},PlainFavBox);
window.Snapshot=(function(){var a={tag:"span",attrs:{style:"height: 54px; width: 54px; display: inline-block; margin: 4px; position: relative; user-select: none; -moz-user-select: none;"}};
var b={f0f3fa:{dating:{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-dating.png",h:54},busy:{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-busy.png",h:54},nothing:{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-nothing.png",h:54},offline:{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-offline.png",h:54},calling:[{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-dating.png",h:54},{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-online.png",h:54}],called:[{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-dating.png",h:54},{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-online.png",h:54}],unknown:{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa.png",h:54},online:{l:1,w:54,u:R+"1/i/snap-frame-f0f3fa-online.png",h:54}},dbc4ef:{dating:{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-dating.png",h:54},busy:{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-busy.png",h:54},nothing:{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-nothing.png",h:54},offline:{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-offline.png",h:54},calling:[{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-dating.png",h:54},{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-online.png",h:54}],called:[{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-dating.png",h:54},{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-online.png",h:54}],unknown:{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef.png",h:54},online:{l:1,w:54,u:R+"1/i/snap-frame-dbc4ef-online.png",h:54}}};
a.ihtml=function(){var c=this.u.state||"unknown";
if(this.my||(this.dragMask&&this.dragging)){c="nothing"
}else{if(this.u.dating){c="dating"
}}this.img=this.my?this.u.myImg:this.u.img;
if(!this.img){this.img=R+"1/i/blurryman-small.png"
}var d=b[this.bg||"f0f3fa"][c];
if(d instanceof Array){this.blink=d;
d=d[0]
}else{this.blink=false
}this.blinkMsg=(this.hint&&this.u.newMessages);
this.frame=new ImageWidget({data:d,style:"position: absolute; left: 0; top: 0; z-index: 3; height: 54px; width: 54px;"});
if(this.dragMask&&this.dragging){return'<div style="position: absolute; left: 0; top: 4px; z-index: 2; height: 50px; width: 50px; background: #c0c0c0;"></div>'+this.frame.render()+""
}return'<img style="position: absolute; left: 0; top: 4px; z-index: 2;" height="50" width="50" alt="" src="'+escapeHtml(this.img)+'" /><img class="@unreadIcon" style="visibility: hidden; position: absolute; left: 34px; top: 7px; z-index: 4;" height="11" width="13" alt="" src="'+R+'1/i/mail_icon.png" />'+this.frame.render()
};
a.finish=function(){if(this.hint){this.root._t=new SnapHint({el:this.root,bp:this.bp,u:this.u})
}this.root.style.cursor="pointer";
regDraggable(this);
if(this.blink){setCallbackTimeout([this,function(){if(!this.root||!this.blink||!this.frame){return
}this._blink=!this._blink;
this.frame.setUrl(this.blink[this._blink?1:0].u);
setCallbackTimeout([this,arguments.callee],500)
}],500)
}if(this.blinkMsg){setCallbackTimeout([this,function(){if(!this.root||!this.blinkMsg||!this.unreadIcon){return
}this._blinkMsg=!this._blinkMsg;
this.unreadIcon.style.visibility=this._blinkMsg?"visible":"hidden";
setCallbackTimeout([this,arguments.callee],500)
}],500)
}};
a.onDragStart=function(){this.dragging=true;
if(this.dragMask){this.redraw()
}return{widget:new InlineWidget({tag:"div",style:"width: 50px; height: 50px;",h:'<img width="50" height="50" src="'+escapeHtml(this.img)+'" />'}),targets:this.dragTo}
};
a.onDragEnd=function(d){this.dragging=false;
if(this.dragMask){this.redraw()
}DBG("onDragEnd for contact ",this.u.id,": ",d);
var c;
if(d=="youLike"){c="yes";
if(!this.bp.userEmail){this.bp.notify("registerLike")
}}else{if(d=="likesYou"||d=="recent"){c="no"
}}if(c){incrLoading();
ev.send("Contact.setFav",this.u.id,c);
ev.send("Bp.reply",decrLoading)
}};
return makeWidget(a)
})();
window.SnapHint=(function(){var g=(makeWidget({textRight:8,borderColor:"#7931b8",textLeft:8,top:22,inherit:BoxWidget,bottom:22,borderLeft:2,borderRight:2,color:"#d5d2e1",textTop:8,left:46,textBottom:8,right:22,cor:R+(dd.png?"1/i/_9t.png":"1/i/_9u.png")}));
var a={tag:"div",attrs:{style:"width: 220px; height: 140px; position: absolute; z-index: 18000;"}};
var f;
var e=function(i){if(f){if(!i&&f.eta&&f.eta.getValue().strip()!=""){return
}f.undraw()
}f=false
};
a.init=function(){var i;
if(i=this.el._t){if(i.undraw){i.undraw()
}if(i.deinit){i.deinit()
}}this.el._t=this;
this.el.addCallback("onclick",[this,this.show]);
document.addCallback("onclick",[false,e])
};
a.deinit=function(){this.el.delCallback("onclick",[this,this.show]);
window.delCallback("onclick",[false,e])
};
a.show=function(k){var l=getOffsetXY(this.el);
if(this.u.newMessages){this.bp.setVar("favs",this.u.id,"newMessages",false)
}var j=f;
e();
if((j&&j.eta&&j.eta.getValue().strip()!="")||j==this){return
}this.insert(document.body);
f=this;
var i=l[0]-(dd.ie?29:30);
var m=l[1]-23;
this.forceBelow=true;
TooltipHint.prototype.setPosition.call(this,i,m);
cancelEvent(k)
};
var d=function(i,j){if(i=="block"&&!j){if(this.u.dating){this.bp.ask("When blocking, your date will be canceled. Proceed?",["Yes","No"],[this,d,i,true])
}else{this.bp.ask("Are you sure you want to block this person?",["Yes","No"],[this,d,i,true])
}return
}else{if(i=="yes"){if(!this.bp.userEmail){this.bp.notify("registerLike")
}}}ev.send("Contact.setFav",this.u.id,i)
};
var h=function(i){trackPageview("/S3G2/attemptConnect");
ev.send("Bp.reqDate",i?0:this.u.id)
};
var b=function(){var i=this.eta.getValue().strip();
if(i==""){this.bp.notify("msgEmpty");
return
}if(i.length>100){this.bp.notify(["Your message is "+(i.length-100)+" characters too long!<br />(max 100 characters allowed)",false,false],true);
return
}ev.send("Contact.sendMessage",this.u.id,i,[this,function(j){if(j){this.bp.notify("msgSent")
}}]);
e(true)
};
var c=function(n,m){if(!m){new InlineWidget("<div style='font-size: 85%; border-top: 1px solid #c0c0c0; padding-top: 4px; margin-top: 4px;'>The last message was sent by you, less than 24 hours ago..</div>").set(this.msgControlsDiv)
}this.msgControlsDiv.style.visibility="visible";
if(this.eta){this.eta.onChange=[this,function(i){this.charCounter.style.color=i.length>100?"red":"black";
this.charCounter.innerHTML=((100-i.length)==0)?"":(""+(100-i.length))
}]
}if(!n.length){new InlineWidget("<div style='text-align: center; padding: 15px; margin-top: 25px; color: gray;'>you can send one message per day to this person</div>").set(this.messages);
return
}var j=["<span style='font-weight: bold;'>Last messages:</span><br />"];
for(var l=0;
l<n.length;
l++){var q=n[l];
var k=(q.fromSelf==1)?"#1b8db3":"#7931b8";
j.push("<span style='color: "+k+";'>"+(escapeHtml(q.text))+"</span><br />")
}new InlineWidget(j.join("")).set(this.messages);
try{this.messages.scrollTop=this.messages.scrollHeight-this.messages.offsetHeight+10
}catch(p){}};
a.ihtml=function(){var m={date:"connected",called:"wants to connect",calling:"connecting",online:(this.u.dating?"connected,":"")+"online",busy:(this.u.dating?"connected, online":"online, busy"),offline:(this.u.dating?"connected,":"")+"offline"}[this.u.state]||(this.u.dating?"connected, not (yet) liking you":"secret "+new HelpIcon("For privacy reasons, we're only showing online status for people who <i>like</i> you.").render());
var i=msgHtml="";
if(this.u.state=="called"){i=new SmallButton("Connect",[this,h,false]).render()
}else{if(this.u.state=="calling"){i=new SmallButton("Cancel connect",[this,h,true]).render()
}else{if((this.u.state=="online"||this.u.state=="busy")&&this.u.likesYou&&!this.u.dating){i=new SmallButton("Connect",[this,h,false]).render()
}}}if(this.u.likesYou){msgHtml=new SmallButton({content:"Discard",onclick:[false,this,e,true],style:"margin-right: 3px;"}).render()+new SmallButton("Send",[this,b]).render()
}this.eta=new EnhancedTextArea({className:"@msgEta",enterMode:2,onEnter:[this,b],content:"",hint:'<span style="font-size: 11px; position: relative; top: -5px;">enter message<br />(max 100 chars)</span>',height:"30px",fontSize:"11px"});
var j=(this.u.offlineSince&&(!this.u.state||this.u.state=="offline"))?"<strong>Last online:</strong><br />"+this.u.offlineSince+"<br /><br />":"";
var l="";
if(this.u.dating){l=new SmallButton("Snapshot",[this.bp,this.bp.makeSnapshot]).render()
}var k=this;
return new g({style:"height: 200px; width: 375px;",className:"snapHint",eta:this.eta,content:"<div class='@msgDiv' style='float: right; margin-top: 6px; margin-right: 10px; width: 144px; padding: 3px;'><div class='@messages' style='overflow: auto; padding: 1px; height: 113px; width: 142px; font-size: 80%;'><img style='margin-top: 36px; margin-left: 52px;' src='"+R+"1/i/msgs-loading-indicator.gif' /></div><div class='@msgControlsDiv' style='visibility: hidden;'>"+this.eta.render()+"<div class='@charCounter' style='float: left; margin-top: 7px; font-size: 85%; font-weight: bold;'></div><div style='float: right; margin-top: 4px;'>"+msgHtml+"</div><div style='clear: both;'></div></div></div><div style='float: left; width: 180px; height: 160px; border-right: 1px solid #c0c0c0;'><div style='width: 70px; float: left; padding-left: 8px;'><div>"+(new Snapshot({bg:"dbc4ef",bp:this.bp,u:this.u,hint:false}).render())+"</div><div>"+(new Snapshot({bg:"dbc4ef",bp:this.bp,u:this.u,my:true,hint:false}).render())+"</div></div><div style=\"float: left; width: 95px; font-size: 85%; margin: 7px 3px;\"><span style='font-weight: bold; position: relative; left: -10px;'>= Status:</span><br />"+m+"<br /><br />"+j+"<strong>First met:</strong><br />"+this.u.since+'</div></div><div style="float: left; margin: 2px 8px 5px 8px;">'+i+" "+l+" "+(new SmallButton(this.u.youLike?"Unlike":"Like",[false,this,d,this.u.youLike?"no":"yes"]).render())+" "+(new SmallButton("Block!",[false,this,d,"block"]).render())+" </div>",finish:function(){this.msgDiv.addCallback("onclick",function(n){cancelEvent(n)
});
this.msgEta.root.addCallback("onclick",function(n){cancelEvent(n)
});
if(k.u.youLike&&k.u.likesYou){ev.send("Contact.getMsgs",k.u.id,[this,c])
}else{new InlineWidget("<div style='text-align: center; padding: 15px; margin-top: 25px; color: gray;'>you can only send messages to people who <em>like you</em> (and who <em>you like</em> as well)</div>").set(this.messages)
}this.sup("finish")
}}).render()
};
return makeWidget(a)
})();
(function(){var a={};
var d=a.sort_time=function(f,e){return e.time-f.time
};
var c={date:7,called:6,calling:5,online:4,busy:3,offline:2,dateNotLikedBack:1,unknown:0};
a.sort_online=function(f,e){return((c[e.dating?(e.likesYou?"date":"dateNotLikedBack"):e.state]||0)-(c[f.dating?(f.likesYou?"date":"dateNotLikedBack"):f.state]||0))||d(f,e)
};
a.ihtml=function(){var m=this.bp.favs||{};
var n=[];
for(var k in m){var g=m[k];
if(this.filter(g)){n.push(g)
}}n=n.sort(this["sort_"+(this.sort||"online")+""]);
if(this.max){n=n.slice(0,this.max)
}var l=[];
var e=false;
var f="";
this.userCount=0;
for(var j=0;
j<n.length;
j++){if(this.unknownSep&&!e&&((n[j].youLike&&!n[j].likesYou))){f="<div style='border-top: 1px solid #d0d0d0; padding-top: 5px; margin: 10px 6px 0px 6px; font-style: italic; font-size: 80%;'>these people don't like you back yet:</div>";
if(n[j].youLike&&!n[j].likesYou){e=true;
if(j==0){f="<div style='height: 50px;'></div>"+f
}l.push(f)
}}l.push(new Snapshot({bp:this.bp,u:n[j],hint:true,dragTo:(typeof this.dragTo=="function")?this.dragTo(n[j]):this.dragTo,dragMask:this.dragMask}).render());
if(this.unknownSep&&!e&&n.length>0&&j==n.length-1){l.push(f+"<div style='height: 50px;'></div>")
}this.userCount++
}if(this.reverse){l.reverse()
}this.content=l.join("");
return this.sup("ihtml")
};
a.finish=function(){this.root.style.display=(!this.userCount&&this.hideWhenEmpty)?"none":(dd.ie6||dd.ie7?"block":"table");
this.bp.addWatch("favs",[this,this.redraw])
};
a.unfinish=function(){this.bp.delWatch("favs",[this,this.redraw])
};
var b=makeWidget(a,FavBox);
window.RecentList=makeWidget({attrs:{id:"list_recent"},title:"recent blurry people",sort:"time",reverse:true,alignRight:true,max:6,filter:function(e){return !!e.time
},dragTo:function(e){return !e.youLike?{youLike:"list_youLike"}:false
}},b);
window.YouLikeList=makeWidget({attrs:{id:"list_youLike"},title:"liked blurry people",subtitle:"to add someone drag his/her snapshot here",unknownSep:true,filter:function(e){return !!e.youLike
},dragTo:function(e){return e.likesYou?{likesYou:"list_likesYou",recent:"list_recent"}:{recent:"list_recent"}
},dragMask:true},b);
window.LikesYouList=makeWidget({attrs:{id:"list_likesYou"},title:"blurry people you don't like yet",subtitle:"..but they like you!",hideWhenEmpty:true,filter:function(e){return !e.youLike&&!!e.likesYou
},dragTo:{youLike:"list_youLike"},dragMask:true},b)
})();
(function(){var k=function(p,n){return(p<<n)|(p>>>(32-n))
};
var a=function(t,p){var v,n,s,u,q;
s=(t&2147483648);
u=(p&2147483648);
v=(t&1073741824);
n=(p&1073741824);
q=(t&1073741823)+(p&1073741823);
if(v&n){return(q^2147483648^s^u)
}if(v|n){if(q&1073741824){return(q^3221225472^s^u)
}else{return(q^1073741824^s^u)
}}else{return(q^s^u)
}};
function l(n,q,p){return(n&q)|((~n)&p)
}function j(n,q,p){return(n&p)|(q&(~p))
}function i(n,q,p){return(n^q^p)
}function h(n,q,p){return(q^(n|(~p)))
}function f(q,p,w,v,n,t,u){q=a(q,a(a(l(p,w,v),n),u));
return a(k(q,t),p)
}function c(q,p,w,v,n,t,u){q=a(q,a(a(j(p,w,v),n),u));
return a(k(q,t),p)
}function g(q,p,w,v,n,t,u){q=a(q,a(a(i(p,w,v),n),u));
return a(k(q,t),p)
}function d(q,p,w,v,n,t,u){q=a(q,a(a(h(p,w,v),n),u));
return a(k(q,t),p)
}var e=function(t){var w;
var s=t.length;
var q=s+8;
var p=(q-(q%64))/64;
var v=(p+1)*16;
var x=Array(v-1);
var n=0;
var u=0;
while(u<s){w=(u-(u%4))/4;
n=(u%4)*8;
x[w]=(x[w]|(t.charCodeAt(u)<<n));
u++
}w=(u-(u%4))/4;
n=(u%4)*8;
x[w]=x[w]|(128<<n);
x[v-2]=s<<3;
x[v-1]=s>>>29;
return x
};
var b=function(s){var n="",p="",t,q;
for(q=0;
q<=3;
q++){t=(s>>>(q*8))&255;
p="0"+t.toString(16);
n=n+p.substr(p.length-2,2)
}return n
};
var m=function(q){q=q.replace(/\r\n/g,"\n");
var p="";
for(var t=0;
t<q.length;
t++){var s=q.charCodeAt(t);
if(s<128){p+=String.fromCharCode(s)
}else{if((s>127)&&(s<2048)){p+=String.fromCharCode((s>>6)|192);
p+=String.fromCharCode((s&63)|128)
}else{p+=String.fromCharCode((s>>12)|224);
p+=String.fromCharCode(((s>>6)&63)|128);
p+=String.fromCharCode((s&63)|128)
}}}return p
};
window.md5=function(n){var H,I,p,v,G,Q,P,N,L;
var E=7,C=12,A=17,y=22;
var O=5,M=9,K=14,J=20;
var u=4,t=11,s=16,q=23;
var F=6,D=10,B=15,z=21;
var w=e(m(n));
Q=1732584193;
P=4023233417;
N=2562383102;
L=271733878;
for(H=0;
H<w.length;
H+=16){I=Q;
p=P;
v=N;
G=L;
Q=f(Q,P,N,L,w[H+0],E,3614090360);
L=f(L,Q,P,N,w[H+1],C,3905402710);
N=f(N,L,Q,P,w[H+2],A,606105819);
P=f(P,N,L,Q,w[H+3],y,3250441966);
Q=f(Q,P,N,L,w[H+4],E,4118548399);
L=f(L,Q,P,N,w[H+5],C,1200080426);
N=f(N,L,Q,P,w[H+6],A,2821735955);
P=f(P,N,L,Q,w[H+7],y,4249261313);
Q=f(Q,P,N,L,w[H+8],E,1770035416);
L=f(L,Q,P,N,w[H+9],C,2336552879);
N=f(N,L,Q,P,w[H+10],A,4294925233);
P=f(P,N,L,Q,w[H+11],y,2304563134);
Q=f(Q,P,N,L,w[H+12],E,1804603682);
L=f(L,Q,P,N,w[H+13],C,4254626195);
N=f(N,L,Q,P,w[H+14],A,2792965006);
P=f(P,N,L,Q,w[H+15],y,1236535329);
Q=c(Q,P,N,L,w[H+1],O,4129170786);
L=c(L,Q,P,N,w[H+6],M,3225465664);
N=c(N,L,Q,P,w[H+11],K,643717713);
P=c(P,N,L,Q,w[H+0],J,3921069994);
Q=c(Q,P,N,L,w[H+5],O,3593408605);
L=c(L,Q,P,N,w[H+10],M,38016083);
N=c(N,L,Q,P,w[H+15],K,3634488961);
P=c(P,N,L,Q,w[H+4],J,3889429448);
Q=c(Q,P,N,L,w[H+9],O,568446438);
L=c(L,Q,P,N,w[H+14],M,3275163606);
N=c(N,L,Q,P,w[H+3],K,4107603335);
P=c(P,N,L,Q,w[H+8],J,1163531501);
Q=c(Q,P,N,L,w[H+13],O,2850285829);
L=c(L,Q,P,N,w[H+2],M,4243563512);
N=c(N,L,Q,P,w[H+7],K,1735328473);
P=c(P,N,L,Q,w[H+12],J,2368359562);
Q=g(Q,P,N,L,w[H+5],u,4294588738);
L=g(L,Q,P,N,w[H+8],t,2272392833);
N=g(N,L,Q,P,w[H+11],s,1839030562);
P=g(P,N,L,Q,w[H+14],q,4259657740);
Q=g(Q,P,N,L,w[H+1],u,2763975236);
L=g(L,Q,P,N,w[H+4],t,1272893353);
N=g(N,L,Q,P,w[H+7],s,4139469664);
P=g(P,N,L,Q,w[H+10],q,3200236656);
Q=g(Q,P,N,L,w[H+13],u,681279174);
L=g(L,Q,P,N,w[H+0],t,3936430074);
N=g(N,L,Q,P,w[H+3],s,3572445317);
P=g(P,N,L,Q,w[H+6],q,76029189);
Q=g(Q,P,N,L,w[H+9],u,3654602809);
L=g(L,Q,P,N,w[H+12],t,3873151461);
N=g(N,L,Q,P,w[H+15],s,530742520);
P=g(P,N,L,Q,w[H+2],q,3299628645);
Q=d(Q,P,N,L,w[H+0],F,4096336452);
L=d(L,Q,P,N,w[H+7],D,1126891415);
N=d(N,L,Q,P,w[H+14],B,2878612391);
P=d(P,N,L,Q,w[H+5],z,4237533241);
Q=d(Q,P,N,L,w[H+12],F,1700485571);
L=d(L,Q,P,N,w[H+3],D,2399980690);
N=d(N,L,Q,P,w[H+10],B,4293915773);
P=d(P,N,L,Q,w[H+1],z,2240044497);
Q=d(Q,P,N,L,w[H+8],F,1873313359);
L=d(L,Q,P,N,w[H+15],D,4264355552);
N=d(N,L,Q,P,w[H+6],B,2734768916);
P=d(P,N,L,Q,w[H+13],z,1309151649);
Q=d(Q,P,N,L,w[H+4],F,4149444226);
L=d(L,Q,P,N,w[H+11],D,3174756917);
N=d(N,L,Q,P,w[H+2],B,718787259);
P=d(P,N,L,Q,w[H+9],z,3951481745);
Q=a(Q,I);
P=a(P,p);
N=a(N,v);
L=a(L,G)
}return(b(Q)+b(P)+b(N)+b(L)).toLowerCase()
}
})();
(function(){var f=true;
var e={};
var a=function(){this.force="create";
this.redraw()
};
var d=getGet("lcn")||"login";
var i=function(m){var q=window.location.hostname;
if(q.slice(0,4)=="www."){q=q.slice(4)
}var p=new Date();
p.setTime(p.getTime()+(14*24*60*60*1000));
document.cookie=d+"="+(m||"")+"; path=/; domain="+q+"; expires="+p.toGMTString()
};
var c=function(s,q){incrLoading();
if(this.bp.subscription){this.bp.subscription.cancel()
}var m=this;
this.bp.subscription=ev.send("User.login",s,q,[this.bp,this.bp.setVarList],function(p){decrLoading();
if(p){m.err.innerHTML=(p=="noSuchUser")?"Email address not registered.":(p=="unconfirmed"?"Please confirm your account using the email we sent during sign up.":(p=="notEmail"?"That doesn't look like an email address.":"Incorrect password."));
i()
}else{i(s+":"+q);
if(m.password){m.password.setValue("")
}m.passwordValue=false
}})
};
var g=function(m){return md5(m+"pinchOfBlurryPeopleSalt")
};
var n=function(){c.call(this,this.email.getValue(),g(this.password.getValue().strip()))
};
var h=function(){var t=this.email.getValue().strip();
var s=this.password.getValue().strip();
var q=this.password2.getValue().strip();
if(s!=q){this.err.innerHTML="Passwords do not match."
}else{if(s.length<4){this.err.innerHTML="Password too short."
}else{incrLoading();
s=g(s);
var m=this;
if(!this.bp.userId){this.bp.createAnon()
}ev.send("User.register",t,s,function(p){decrLoading();
if(!p){i(t+":"+s);
trackPageview("/S1G2/registered")
}else{if(p=="exists"){m.err.innerHTML="Account already exists."
}else{if(p=="notConfirmed"){m.err.innerHTML="Account already exists. Please confirm using the email we resent just now."
}else{m.err.innerHTML="That doesn't look like an email address."
}}}})
}}};
var b=function(){this.redraw();
this.bp.reset();
if(this.signinDiv){this.signinDiv.style.display="block"
}if(this.signinLink){this.signinLink.root.style.display="none"
}if(this.email.inputE){this.email.inputE.focus()
}i()
};
var l=function(){this.force="unsubscribe";
this.redraw()
};
var j=function(){if(!this.sure.getValue()){return
}incrLoading();
var m=this;
ev.send("User.unsubscribe",g(this.password.getValue().strip()),function(p){if(p){m.err.innerHTML="Incorrect password."
}else{b.call(m);
this.bp.notify("You have been unsubscribed.");
trackPageview("/S1G4/unsubscribed")
}decrLoading()
})
};
var k=function(y,v,x,z){var w=[];
for(var s=0;
s<(v||[]).length;
s++){var m=v[s];
var t=false;
for(var q=0;
q<y.length;
q++){if(!z&&y[q][0]=="male"){continue
}if(y[q][1]==m[0]){var u=(y[q][2]!==false)==(m[1]>0);
if(u||x){t='<span style="font-size: '+(90+(Math.abs(m[1]*8)))+"%; color: "+(w.length&1?"#7931b8":"#5fafc9")+'">'+(u?"":"not-")+""+escapeHtml(y[q][0])+"</span>"
}if(u){break
}}}if(t){w.push(t)
}}return w.join(" ")
};
e.ihtml=function(){var m,p=this.bp;
this.onSubmit=[this,n];
var s=this.force;
this.force=false;
var q=new this.ScalesDisplayer({bp:p});
var t="<div style='margin-bottom: 7px; margin-top: 2px;'>According to blurry people, you are rather...</div><div class='title @awe' style='margin-top: 5px; margin-bottom: 20px; text-align: right; color: #888;'>"+q.render()+"<div style='clear: both;'></div></div>";
if(!p.userId&&s!="create"){this.email=new EnhancedInputLine({content:this.emailValue,hint:"email",style:"margin-top: 7px;"});
this.password=new EnhancedInputLine({content:this.passwordValue,hint:"password",password:true,style:"margin-top: 7px;"});
this.signinLink=new Link("sign in",[this,function(){if(this.signinDiv){this.signinDiv.style.display="block"
}if(this.signinLink){this.signinLink.root.style.display="none"
}if(this.email.inputE){this.email.inputE.focus()
}}]);
return""+t+"<ul style='margin: 0px; padding-left: 15px;'><li>have an account? "+this.signinLink.render()+"</li></ul><div class='@signinDiv' style='padding-bottom: 16px;'>"+this.email.render()+""+this.password.render()+"<div class='@err' style='font-weight: bold; color: red;'></div>"+(new BasicButton({content:"Sign in",onclick:[this,n],style:"float: right; margin-top: 8px; margin-bottom: 8px;"}).render())+"</div><div style='clear: both; padding-top: 4px; margin-right: -8px; font-style: italic;'><ul style='margin: 0px; padding-left: 15px;'><li>no? just try it first, or..<br />"+(new Link("sign up now",[this,a]).render())+"</li></ul></div>"
}if(p.userEmail&&s=="unsubscribe"){this.sure=new CheckBox("Yes, I'm sure.");
this.password=new EnhancedInputLine({content:this.passwordValue,hint:"password",password:true,style:"margin-top: 7px;"});
return"You will loose all BlurryPeople contacts and feedback associated with <b>"+this.bp.userEmail+"</b>."+this.password.render()+"<br />"+this.sure.render()+"<br /><div class='@err' style='font-weight: bold; color: red;'></div>"+(new BasicButton({content:"Unsubscribe",onclick:[this,j],style:"float: right;"}).render())+"<div class='@unsub' style='clear: both; font-size: 12px; padding-top: 20px; font-style: italic;'>"+(new Link("never mind",[this,this.redraw]).render())+"</div>"
}if(p.userEmail){return""+t+""+(new BasicButton({content:"Sign out",onclick:[this,b],style:"float: right;"}).render())+"<div class='@unsub' style='clear: both; font-size: 12px; padding-top: 20px; font-style: italic;'>"+(new Link("unsubscribe",[this,l]).render())+"</div>"
}this.email=new EnhancedInputLine({content:this.emailValue,hint:"email",style:"margin-top: 7px;"});
this.password=new EnhancedInputLine({content:this.passwordValue,hint:"password",password:true,style:"margin-top: 7px;"});
this.password2=new EnhancedInputLine({content:this.password2Value,hint:"password again",password:true,style:"margin-top: 7px;"});
this.onSubmit=[this,h];
return""+t+"<div>Next time you visit this page, you'll start from scratch unless you sign up now:</div>"+this.email.render()+""+this.password.render()+""+this.password2.render()+"<div class='@err' style='font-weight: bold; color: red;'></div>"+(new BasicButton({content:"Sign up",onclick:[this,h],style:"float: right; margin-top: 8px; margin-bottom: 8px;"}).render())+"<div style='clear: both; font-size: 12px; padding-top: 20px; font-style: italic;'>"+(new Link("login or start from scratch",[this,b]).render())+"</div>"
};
e.finish=function(){if(this.signinDiv){this.signinDiv.style.display="none"
}if(f){var m=(getCookie(d)||"").split(":");
if(m[1]){c.call(this,m[0],m[1])
}f=false
}};
e.unfinish=function(){if(this.email){this.emailValue=this.email.getValue()
}if(this.password){this.passwordValue=this.password.getValue()
}if(this.password2){this.password2Value=this.password2.getValue()
}};
window.AccountWidget=makeWidget(e)
})();
var SelectorWithTemplate=(function(){var c={basics:["data","noDataText","listFormatter","textFormatter","onDataRequired","onSelect"],tag:"div",attrs:{style:"display: inline-block; border: 1px solid transparent; padding-left: 3px; padding-right: 3px;"},name:"SelectorWithTemplate",listShown:false,button:R+(dd.png?"1/i/selector-list-button.png":"1/i/_8l.png")};
var a=false;
c.listFormatter=function(d){return typeof d=="string"?d:toJson(d)
};
c.textFormatter=function(d){if(d===null){return""
}return this.listFormatter.apply(this,arguments)
};
c.init=function(){var e=this;
var d=function(){e.redraw();
if(e.focusE&&e.giveFocus){e.giveFocus=false;
try{e.focusE.focus()
}catch(f){}}};
this.addWatch("data",d);
this.addWatch("selectedIndex",d);
this.addWatch("noDataData",d)
};
c.ihtml=function(){var e;
if(this.data){if(!this.data[this.selectedIndex]){for(var d=0;
d<this.data.length;
d++){if(this.data[d]._selectable===undefined||this.data[d]._selectable){this.selectedIndex=d;
break
}}}e=this.textFormatter(this.data[this.selectedIndex]||null)
}else{e=this.textFormatter(this.noDataData||null)
}return'<div style="width: auto; height: 18px; padding-right: 10px; background: transparent url('+this.button+') no-repeat scroll 99% 6px; cursor: pointer;" class="@outerE"><div style="height: 18px; line-height: 18px; overflow: hidden; padding-right: 5px;" tabindex="1" class="@focusE">'+(typeof e=="object"?e.render():e)+"</div></div>"
};
c.getValue=function(){var d=(this.values||{})[this.selectedIndex];
if(d===undefined){d=this.data[this.selectedIndex]
}if(typeof d!="string"&&typeof d!="number"){return 1+this.selectedIndex
}return d
};
c.selectItem=function(d,e){if(!this.data[d]||this.data[d]._selectable===false){return
}this.selectedIndex=d;
this.listShown=false;
this.currentlyShown=false;
if(!e){callback(this.onSelect,[d,this.data[d]],this)
}this.redraw()
};
c.setValue=function(d){if(!this.values){return
}for(var e=0;
e<this.values.length;
e++){if(this.values[e]==d){this.selectItem(e,true)
}}};
c.focusItem=function(d){if(this.focusedIndex==d){return
}if(this.focusedIndex!=null){this.itemWidgets[this.focusedIndex].root.style.backgroundColor=""
}if(!this.data[d]||this.data[d]._focusable===false){this.focusedIndex=null;
return
}this.focusedIndex=d;
this.itemWidgets[this.focusedIndex].root.style.backgroundColor="#cfdfef"
};
var b=function(){var h=this;
if(!this.listShown&&this.listWidget){this.focusedIndex=null;
this.listWidget.undraw();
delete this.listWidget
}else{if(this.listShown&&!this.data){callback(this.onDataRequired,[],this)
}else{if(this.listShown){if(this.listWidget&&this.listWidget.root){this.listWidget.undraw()
}var f=[];
this.itemWidgets=[];
var k=this;
for(var e=0;
e<this.data.length;
e++){var d=this.listFormatter(this.data[e]);
var g=this.itemWidgets[e]=new InlineWidget({selectorItemIndex:e,innerWidget:d,h:typeof d=="object"&&d.render?d.render():d,tag:"div",finish:function(){toggleMouse(this.root,null,[false,k,k.focusItem,this.selectorItemIndex]);
this.root.addCallback("onmousedown",[this,function(i){k.selectItem(this.selectorItemIndex);
cancelEvent(i,true)
}])
},tag:"div"});
f.push(g.render())
}var j=getOffsetX(this.root);
if(this.listWidth&&this.listAlign=="right"){j+=this.root.offsetWidth-this.listWidth
}this.listWidget=new InlineWidget('<div style="border: solid 1px #a0a0a0; position: absolute; left: '+j+"px; top: "+(getOffsetY(this.root)+this.root.offsetHeight)+"px; width: "+(this.listWidth||this.root.offsetWidth)+'px; overflow-y: auto; overflow-x: none; z-index: 20000; background: #fff; cursor: default;" class="@containerE">'+(f.join(""))+""+(f.length?"":'<div style="height: 2px;"></div>')+"</div>",function(){if(this.containerE.offsetHeight>220){this.containerE.style.height="220px";
setTimeout(function(){for(var m=0;
m<h.itemWidgets.length;
m++){var l=h.itemWidgets[m].innerWidget;
if(typeof l=="object"){l.redraw()
}}},0)
}});
this.listWidget.insert(document.body)
}}}};
c.toggleList=function(){this.listShown=!this.listShown;
if(this.listShown){if(a&&a.listShown&&a!=this){a.toggleList()
}a=this
}else{a=false
}b.call(this)
};
c.finish=function(){var d=this;
document.addCallback("onclick",function(f){a=false;
if(d.listShown){d.listShown=false;
b.call(d)
}});
this.root.addCallbacks({onclick:[this,function(f){this.toggleList();
this.focusE.focus();
cancelEvent(f,true)
}],onmouseover:function(){this.style.border="1px solid gray"
},onmouseout:function(){this.style.border="1px solid transparent"
}});
this.root.addCallbacks({});
b.call(this)
};
return makeWidget(c)
})();
window.BpSelector=SelectorWithTemplate;
BpSelector.button=R+(dd.png?"1/i/selector-list-button.png":"1/i/_9a.png");
window.PlusMin=(function(){var b=(makeWidget({textRight:0,textLeft:6,top:9,inherit:Button,bottom:9,borderLeft:0,borderRight:0,transformContent:function(d){return d
},color:"#1b8db3",textTop:1,left:9,cor:R+(dd.png?"1/i/_8o.png":"1/i/_9b.png"),textBottom:0,right:9}));
var a={name:"PlusMin",attrs:{style:"text-align: left; color: white; font-weight: bold; float: right;",tabindex:"1"},tag:"div",basics:["value","minimum"]};
var c=function(d){this.incrValue(d);
callback(this.onChange,[this.getValue()],this)
};
a.ihtml=function(){if(!this.value){this.value=0
}return"<table cellspacing='0' cellpadding='0'><tr><td style='padding-left: 6px; text-align: right;'>"+this.value+"</td><td style='padding-left: 6px;'>"+(new b("-",[this,c,false]).render())+"</td><td style='padding-left: 2px;'>"+(new b("+",[this,c,true]).render())+"</td></tr></table>"
},a.getValue=function(){return this.value
};
a.setValue=function(d){this.value=d;
this.redraw()
};
a.incrValue=function(d){if((this.value+(d?1:-1))<(this.minimum||0)){return
}this.setValue(this.value+(d?1:-1))
};
a.finish=function(){this.root.onselectstart=function(){return false
};
this.root.onmousedown=function(){return false
}
};
return makeWidget(a)
})();
var BP=(function(){var ageLabels=[];
var ageValues=[];
for(var i=5;
i<=95;
i+=5){ageLabels.push("around "+i+" y/o.");
ageValues.push(i)
}var blinkShareInfo=function(){scrollToElement(this.shareDiv);
var sDiv=this.shareDiv;
setTimeout(function(){sDiv.style.visibility="hidden"
},300);
setTimeout(function(){sDiv.style.visibility="visible"
},600);
setTimeout(function(){sDiv.style.visibility="hidden"
},900);
setTimeout(function(){sDiv.style.visibility="visible"
},1200)
};
var ScalesDisplayer=(function(){var sd={};
sd.ihtml=function(){if(!this.bp){return""
}var theScales=this.peer?this.bp.peerScales:this.bp.scales;
var theAwesomeness=this.peer?this.bp.peerAwesomeness:this.bp.awesomeness;
var scaleHtml=[];
var scales=[["friendly","friendly"],["interesting","interesting"],["goodLooking","good looking"],["generous","generous"],["popular","popular"]];
for(var i=0;
i<scales.length;
i++){var v=parseInt((theScales||{})[scales[i][0]]||0);
DBG("i "+i+" v "+v+"");
if((i==3||i==4)&&!v){continue
}var n=scales[i][1];
if(i==4){n=new Link({content:n,style:"text-decoration: none; font-weight: bold; font-style: italic;",onclick:[this.bp,blinkShareInfo]}).render()
}scaleHtml.push("<tr "+(v<0?'style="color: red;"':"")+"><td>"+n+":&nbsp;&nbsp;</td><td>"+v+"</td></tr>")
}return"<table style='float: right; border-collapse: collapse;'>"+(scaleHtml.join(""))+"<tr><td colspan='2'><div style='height: 1px; border-top: 1px solid #b0b0b0; margin-top: 3px;'></div></td></tr><tr style='font-size: 120%; color: #f70194;'><td>awesome:&nbsp;&nbsp;</td><td>"+(theAwesomeness||0)+"</td></tr></table>"
};
return makeWidget(sd)
})();
var Rater=(function(){var r={};
var onSubmit=function(){var o=["Interesting","GoodLooking","Friendly","Age","Gender"];
var fb={};
for(var i in o){var w=this["rate"+o[i]];
fb["rate"+o[i]]=w.getValue()
}if(fb.rateGender==-1){var rg=this.rateGender.root;
for(var j=0;
j<15;
j++){setTimeout((j&1)?(function(){rg.style.border="1px solid transparent"
}):(function(){rg.style.border="1px solid red"
}),j*125)
}}else{if(fb.rateAge==-1&&fb.rateGender>0){var ra=this.rateAge.root;
for(var j=0;
j<15;
j++){setTimeout((j&1)?(function(){ra.style.border="1px solid transparent"
}):(function(){ra.style.border="1px solid red"
}),j*125)
}}else{incrLoading();
DBG("sending feedback");
if(fb.rateGender==1){trackPageview("/S4G1/ratedMan");
trackEvent(["Ratings","Gender","A man"])
}else{if(fb.rateGender==2){trackPageview("/S4G2/ratedWoman");
trackEvent(["Ratings","Gender","A woman"])
}else{if(fb.rateGender==-2){trackEvent(["Ratings","Gender","A blur"])
}else{if(fb.rateGender==-3){trackEvent(["Ratings","Gender","Multiple people"])
}else{if(fb.rateGender==-4){trackEvent(["Ratings","Gender","No one"])
}}}}}if(fb.rateFriendly==-1){trackPageview("/S4G3/ratedDown")
}ev.send("Contact.feedback",fb);
ev.send("Bp.reply",[this,function(){this.awesomeResult.style.display="none";
for(var i in o){var w=this["rate"+o[i]];
if(typeof w.defaultVal!="undefined"){w.setValue(w.defaultVal)
}}decrLoading()
}])
}}};
var onRateGenderSelect=function(){var v=this.rateGender.getValue();
this.rateAppearance.style.display=(v==-1||v>0)?"block":"none"
};
var onRateSomethingSelect=function(){var awsChange=0;
var o=["Friendly","Interesting","GoodLooking"];
for(var i=0;
i<o.length;
i++){awsChange+=this["rate"+o[i]].getValue()
}this.awesomeResult.style.display=(awsChange!=0)?"block":"none";
this.awesomeResultSpan.innerHTML=(awsChange<0?"":"+")+awsChange+" awesome"
};
r.ihtml=function(){var fr=this.bp.feedbackRange||[0,1];
var opts=[];
var vls=[];
for(var i=fr[0];
i<=fr[1];
i++){var e=i>0?"+"+i:(i?i:"neutral");
if(e!="neutral"){e='<span style="font-weight: bold; color: #f70194;">'+e+"</span>"
}opts.push(e);
vls.push(i)
}var o=["Friendly","Interesting","GoodLooking"];
for(var i=0;
i<o.length;
i++){var addNegative=(o[i]=="Friendly"&&fr[0]==0);
var negHtml='<span style="font-weight: bold; color: #f70194;">-1</span>';
this["rate"+o[i]]=new BpSelector({data:addNegative?[negHtml].concat(opts):opts,values:addNegative?[-1].concat(vls):vls,defaultVal:0,selectedIndex:addNegative?1:-fr[0],listWidth:60,listAlign:"right",onSelect:[this,onRateSomethingSelect],style:"float: right;"})
}this.rateGender=new BpSelector({data:["<i>please select</i>","a blur","a man","a woman","multiple people","no one"],values:[-1,-2,1,2,-3,-4],defaultVal:-1,listWidth:120,listAlign:"right",onSelect:[this,onRateGenderSelect],style:"float: right;"});
this.rateAge=new BpSelector({data:["<i>please select</i>","no idea!"].concat(ageLabels),values:[-1,0].concat(ageValues),defaultVal:-1,listWidth:150,listAlign:"right",style:"float: right;"});
return"<span style='font-weight: bold; color: #7931b8;'>Who did you meet?</span><br /><table style='margin: 0px; margin-left: 6px; padding: 0px; width: 95%; border-collapse: collapse;'><tr><td style='text-align: right;'>"+this.rateGender.render()+"</td></tr></table><br /><div><span style='font-weight: bold; color: #7931b8;'>Personality?</span><br /><table style='margin: 0px; margin-left: 6px; padding: 0px; width: 95%; border-collapse: collapse;'><tr><td style='font-weight: bold; font-size: 90%;'>friendly</td><td style='text-align: right;'>"+this.rateFriendly.render()+"</td></tr><tr><td style='font-weight: bold; font-size: 90%;'>interesting</td><td style='text-align: right;'>"+this.rateInteresting.render()+"</td></tr></table><br /><div class='@rateAppearance'><span style='font-weight: bold; color: #7931b8;'>Appearance?</span><br /><table style='margin: 0px; margin-left: 6px; padding: 0px; width: 95%; border-collapse: collapse;'><tr><td style='font-weight: bold; font-size: 90%;'>good looking</td><td style='text-align: right;'>"+this.rateGoodLooking.render()+"</td></tr></table><table style='margin: 0px; margin-left: 6px; padding: 0px; width: 95%; border-collapse: collapse;'><tr><td style='font-weight: bold; font-size: 90%;'>age</td><td style='text-align: right;'>"+this.rateAge.render()+"</td></tr></table></div><div class='@awesomeResult' style='display: none; border-top: 1px solid #b0b0b0; text-align: right; padding-right: 15px; margin-top: 4px; margin-bottom: 10px; padding-top: 4px;'><span class='@awesomeResultSpan' style='font-weight: bold; color: #f70194;'></span><br /><span style='font-size: 85%;'>..for the blurry person!</span></div></div><table style='margin-top: 12px; width: 100%;'><tr><td><span class='@fbLikeTip' style='font-style: italic; font-size: 85%; color: #888;'>"+(new Link("like him/her",[this.bp,this.bp.like]).render())+" to keep in touch!</span></td><td style='text-align: right;'>"+(new BasicButton({content:"Done",onclick:[this,onSubmit,false],style:"vertical-align: middle; margin-left: 10px;"}).render())+"</td></tr></table>"
};
r.finish=function(){onRateGenderSelect.call(this)
};
return makeWidget(r)
})();
var c={};
var audioControls={"mic-on":R+(dd.png?"1/i/mic-on.png":"1/i/_9c.png"),"voice-on":R+(dd.png?"1/i/voice-on.png":"1/i/_9d.png"),"sounds-on":R+(dd.png?"1/i/sounds-on.png":"1/i/_9e.png"),"mic-off":R+(dd.png?"1/i/mic-off.png":"1/i/_9f.png"),"voice-off":R+(dd.png?"1/i/voice-off.png":"1/i/_9g.png"),"sounds-off":R+(dd.png?"1/i/sounds-off.png":"1/i/_9h.png")};
var toggleControl=function(control){var enable=this[control+"Enabled"]=!this[control+"Enabled"];
if(control=="mic"){callFlash(this.bp.leftFlash,"toggleMic",enable)
}else{if(control=="voice"){callFlash(this.bp.rightFlash,"toggleVoice",enable)
}}this.redraw()
};
c.init=function(){this.micEnabled=false;
this.voiceEnabled=this.soundsEnabled=true
};
c.ihtml=function(){return"<span style='vertical-align: top; line-height: 0.9em; display: inline-block; text-align: right; font-size: 10px; margin-right: 15px; color: #888;'><b>*</b> and possibly<br />some others<br />as well...</span><a style='display: inline-block; text-align: right; margin-right: 15px; font-size: 12px; font-style: italic; vertical-align: top;' href='mailto:feedback@blurrypeople.com'>tell us what<br />you think!</a> <img class='@micImg' style='vertical-align: top; cursor: pointer; margin-right: 10px;' src='"+(audioControls["mic-"+(this.micEnabled?"on":"off")])+"' /><img class='@voiceImg' style='vertical-align: top; cursor: pointer; margin-right: 10px;' src='"+(audioControls["voice-"+(this.voiceEnabled?"on":"off")])+"' /><img class='@soundsImg' style='vertical-align: top; cursor: pointer; margin-right: 20px;' src='"+(audioControls["sounds-"+(this.soundsEnabled?"on":"off")])+'\' /><div style="text-align: right; font-size: 70%; margin: 4px 20px 0 -100px; color: #666;" class="@hoverE"></div>'
};
var setHoverMsg=function(prop,msg){if(prop){msg=(this[prop]?"Disable":"Enable")+" "+msg
}new InlineWidget(msg).set(this.hoverE)
};
c.finish=function(){this.micImg.addCallback("onmouseover",[this,setHoverMsg,"micEnabled","audio recording"]);
this.voiceImg.addCallback("onmouseover",[this,setHoverMsg,"voiceEnabled","audio playback"]);
this.soundsImg.addCallback("onmouseover",[this,setHoverMsg,"soundsEnabled","notification sounds"]);
this.root.addCallback("onmouseout",[this,setHoverMsg,false,""]);
this.micImg.addCallback("onclick",[this,toggleControl,"mic"]);
this.voiceImg.addCallback("onclick",[this,toggleControl,"voice"]);
this.soundsImg.addCallback("onclick",[this,toggleControl,"sounds"])
};
var AudioControls=makeWidget(c);
var m={watchMode:2,feedback:false};
var sounds={online:"http://blurrypeople.com:29721/d/1/online.mp3",found:"http://blurrypeople.com:29721/d/1/found.mp3",calling:"http://blurrypeople.com:29721/d/1/calling.mp3"};
var genderCertainty=["not so sure","fairly sure","pretty sure"];
var onCiao=function(hadWarning){incrLoading();
ev.send("Bp.cancel",!!hadWarning);
ev.send("Bp.reply",decrLoading)
};
var onCancel=function(someoneSpecific){incrLoading();
if(someoneSpecific){this.searchConfig.preference=10
}ev.send("Bp.cancel");
ev.send("Bp.reply",decrLoading)
};
var getSearchConfigAwe=function(config){if(!config){return
}var totalReqAwe=0;
var sp=config.preference;
var sg=config.man;
var sa=config.age;
totalReqAwe+=(sp>0&&sp!=10)?3:0;
totalReqAwe+=sg!=0?5:0;
totalReqAwe+=sa>0?10:0;
return totalReqAwe
};
var fixConfig=function(config,awesomeness){if(!config){config={word:"",man:0,age:0,preference:0}
}var diff=getSearchConfigAwe(config)-awesomeness;
if(diff<=0){return config
}var c=config;
if(diff>0&&c.age!=0){c.age=0;
diff-=10
}if(diff>0&&c.man!=0){c.man=0;
diff-=5
}if(diff>0&&(c.preference!=0||c.preference!=10)){c.preference=0;
diff-=3
}return c
};
var applySearchConfig=function(config){if(!config){return
}if(this.searchWord.getValue()==""){this.searchWord.setValue(config.word)
}this.searchGender.setValue(config.man);
this.searchAge.setValue(config.age);
this.searchPreference.setValue(config.preference);
this.rightCol.otherSearchOptions.style.display=(config.preference==10)?"none":"block";
this.rightCol.wordSearchOption.style.display=(config.preference==10)?"block":"none"
};
var checkCurrentSearchConfig=function(){var currentConfig=getCurrentSearchConfig.call(this);
var totalReqAwe=getSearchConfigAwe(currentConfig);
if(totalReqAwe>(this.awesomeness||0)){if((this.searchConfig.man!=1&&currentConfig.man==1)||(this.searchConfig.man!=-1&&currentConfig.man==-1)){var guysOrGirls=(currentConfig.man==1)?"guys":"girls";
this.notify(["Awesome people get the "+guysOrGirls+". Talk to some other blurry people, be nice, be interesting, and you too will become awesome!<br /><br /><span style='font-size: 85%;'>Searching by gender requires 5 awesomeness points. You have "+((this.awesomeness||0)-(totalReqAwe-5))+" left.</span>",false,"blurryMan"],true)
}else{if(this.searchConfig.age==0&&currentConfig.age>0){this.notify(["You'll need to collect some more awesomeness to search with these options!<br /><br /><span style='font-size: 85%;'>Searching by age requires 10 awesomeness points. You have "+((this.awesomeness||0)-(totalReqAwe-10))+" left.</span>",false,"blurryMan"],true)
}else{if((this.searchConfig.preference==0||this.searchConfig.preference==10)&&currentConfig.preference>0&&currentConfig.preference<10){this.notify(["You'll need to collect some more awesomeness to search with these options!<br /><br /><span style='font-size: 85%;'>Searching for a friendly, interesting or good looking person requires 3 awesomeness points. You have "+((this.awesomeness||0)-(totalReqAwe-3))+" left.</span>",false,"blurryMan"],true)
}}}applySearchConfig.call(this,this.searchConfig);
return false
}this.searchConfig=currentConfig;
var wordSearch=(currentConfig.preference==10);
this.rightCol.otherSearchOptions.style.display=wordSearch?"none":"block";
this.rightCol.wordSearchOption.style.display=wordSearch?"block":"none";
return true
};
var getCurrentSearchConfig=function(){return{man:this.searchGender.getValue(),age:this.searchAge.getValue(),preference:this.searchPreference.getValue(),word:this.searchWord.getValue()}
};
m.init=function(){this.firstMsg=getGet("msg");
return this.sup("init")
};
m.eval=function(js){eval(js)
};
m.like=function(){if(!this.dateId&&!this.feedbackId){return
}var dateId=this.dateId||this.feedbackId;
incrLoading();
if(!this.userEmail){this.notify(["registerLike",false,"leftCol.signinE"])
}trackPageview("/S3G1/likedPerson");
ev.send("Contact.setFav",dateId,"yes");
ev.send("Bp.reply",decrLoading)
};
m.ihtml=function(){var pageWidth=parseInt(Math.max(document.body.offsetWidth,document.body.parentNode.clientWidth));
var extraWidth=pageWidth-2*240-4*20-440;
if(extraWidth>300){extraWidth=300
}else{if(extraWidth<0){extraWidth=0
}}var margin=20+parseInt(extraWidth/15);
var chatWidth=440+parseInt(extraWidth/3);
this.blurryMe=new ImageWidget({data:{l:1,w:240,u:R+"1/i/blurryme.png",h:240},style:"position: absolute; text-align: center;"});
this.leftCol=new GradBox({style:"width: 210px; float: left; position: relative;",content:"<div style='height: 240px; width: 240px; position: absolute; top: 0px; left: 0px;'>"+this.blurryMe.render()+"<span class='@video'></span></div><div style='padding: 240px "+(dd.ie?20:5)+"px 0 "+(dd.ie?20:5)+"px;'><div style='font-size: 12px; text-align: center; font-style: italic; padding: 4px;'>you (<span class='@yourEmail' style='font-weight: bold;'>not signed in</span>)</div><div style='padding: 20px "+(dd.ie?0:12)+"px 12px "+(dd.ie?0:12)+"px;' class='@signinE'></div></div>"});
this.rater=new Rater({bp:this});
this.peerScalesDisplayer=new ScalesDisplayer({bp:this,peer:true});
var sb=R+(dd.png?"1/i/selector-list-button.png":"1/i/_9i.png");
this.searchPreference=new BpSelector({button:sb,data:["A random","A specific","A friendly","An interesting","A good looking"],values:[0,10,1,2,3],listWidth:100,onSelect:[this,checkCurrentSearchConfig],listAlign:"right"});
this.searchGender=new BpSelector({button:sb,data:["person","man","woman"],values:[0,1,-1],listWidth:80,onSelect:[this,checkCurrentSearchConfig],listAlign:"right"});
this.searchAge=new BpSelector({button:sb,data:["of any age."].concat(ageLabels),values:[0].concat(ageValues),listWidth:130,onSelect:[this,checkCurrentSearchConfig],listAlign:"right"});
var me=this;
this.searchWord=new InputLine({content:"",style:(dd.ie?"background-color: rgb(255, 255, 255);":"background: rgba(255, 255, 255, 0.7);")+" font-size: 110%; width: 80px; font-weight: bold; margin-left: 10px;",onEnter:function(){search.call(me)
}});
this.searchFriendly=new PlusMin({onChange:[this,checkCurrentSearchConfig]});
this.searchInteresting=new PlusMin({onChange:[this,checkCurrentSearchConfig]});
this.searchGoodLooking=new PlusMin({onChange:[this,checkCurrentSearchConfig]});
this.blurryMan=new ImageWidget({data:{l:1,w:240,u:R+"1/i/blurryman.png",h:240},style:"position: absolute; display: none; text-align: center;"});
this.searchButton=new BasicButton({content:"Search!",style:"position: absolute; left: 66px; top: 192px;",onclick:[this,search]});
var noteText="<br /><br /><span style='font-size: 12px;'>Note that you can also like a blurry person by dragging his/her snapshot (below the chat) to the 'blurry people you like' area.</span>";
this.rightCol=new GradBox({style:"width: 210px; float: right; position: relative;",content:"<div style='height: 240px; width: 240px; position: absolute; top: 0px; right: 0px;'>"+this.blurryMan.render()+""+this.searchButton.render()+"<div class='@banInfo' style='position: absolute; width: 100%; color: white; display: none;'><div style='padding: 9px 13px 7px 13px; text-shadow: 0px 0px 2px #1d1d1d;'><div style='text-align: center; font-weight: bold; font-size: 115%; margin-bottom: 15px; text-shadow: 2px 2px 1px #1d1d1d;'>Time-out!</div><br />People are telling us you are not being very friendly, so we've put you on hold for a little while.<br /><br />You'll be able to search again in:<br /><br /><br /><div style='text-align: center;'><span class='@banCounter' style=\"font-weight: bold; font-size: 120%;\"></span></div></div></div><div class='@searchSettings' style='position: absolute; width: 100%; color: white; display: none;'><div style='padding: 9px 7px 0 7px; text-shadow: 0px 0px 2px #1d1d1d;'><div style='text-align: center; font-weight: bold; font-size: 115%; margin-bottom: 33px; text-shadow: 2px 2px 1px #1d1d1d;'>Whom shall we find you?</div><div style='text-align: center;'>"+this.searchPreference.render()+"<br style='clear: both;' /></div><div class='@otherSearchOptions'><div style='text-align: center;'>"+this.searchGender.render()+"<br style='clear: both;' /></div><div style='text-align: center;'>"+this.searchAge.render()+"<br style='clear: both;' /></div>       </div><div class='@wordSearchOption' style='display: none; padding-left: 10px; padding-right: 10px;'><div style='text-align: center; padding-bottom: 14px;'>person.</div><span style='font-size: 85%;'>Connect with a friend, or with the first person who uses the same secret word.</span><table style='margin-top: 2px; margin-bottom: 0px; padding: 0px; border-collapse: collapse;'><tr><td><b>Secret word:</b></td><td>"+this.searchWord.render()+"</td></tr></table><br style='clear: both;' /></div></div></div><div class='@searching' style='width: 100%; display: none;'><div style='position: absolute; width: 100%; padding-top: 9px; color: white; text-shadow: 0px 0px 2px #1d1d1d; text-align: center;'><div style='text-align: center; font-weight: bold; font-size: 115%; text-shadow: 2px 2px 1px #1d1d1d;'>Help spread the word!</div><span style='font-size: 85%;'>(and shorten waiting times)</span><div style='padding: 6px; margin-top: 10px;'>..by <em>liking</em> the site:</div><div style='padding: 6px; padding-top: 9px;'><iframe src=\"http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FBlurryPeople%2F113483668704941&amp;layout=button_count&amp;show_faces=true&amp;width=120&amp;action=like&amp;colorscheme=light&amp;height=21\" scrolling=\"no\" frameborder=\"0\" style=\"position: relative; left: 13px; border:none; overflow:hidden; width:120px; height:21px;\" allowTransparency=\"true\"></iframe><br /></div><div style='padding: 6px;'>..or by sending people your:</div><div style='padding: 6px;'>"+(new Link({content:"personal invite URL",onclick:[this,blinkShareInfo],style:"color: white;"}).render())+"</div></div><div style='width: 100%; position: absolute; bottom: 10px; color: #1b8db3; text-align: center; font-weight: bold;'><img src=\""+R+"1/i/search-indicator.gif\" /><br />searching</div></div><span class='@video'></span></div><div style='font-size: 12px; text-align: center; font-style: italic; padding: 4px; padding-top: 244px;'>blurry person<br /><span class='@otherGender'></span></div><div style='padding-left: "+(dd.ie?20:5)+"px; padding-right: "+(dd.ie?20:5)+"px; position: relative; zoom: 100%;'><div style='padding: 6px "+(dd.ie?0:9)+"px 9px "+(dd.ie?0:9)+"px;'><div class='@fbControls' style='margin-top: 14px; "+getOpacityCss(0.3)+" zoom: 100%; background-color: #dfe5f1;'>"+this.rater.render()+"<div style='clear: both; height: 15px;'></div></div><div class='@fbDate' style='zoom: 100%; display: none;'><div style='margin-bottom: 7px; margin-top: 2px;'>According to blurry people, this one is rather...</div><div class='title' style='margin-top: 5px; margin-bottom: 20px; text-align: right; color: #888;'>"+this.peerScalesDisplayer.render()+"<div style='clear: both;'></div></div><div style='float: right;'>"+(new BasicButton({content:"Ciao!",onclick:[this,onCiao,false],style:"vertical-align: middle; margin-left: 10px;"}).render())+"</div>Done talking? Say..<div style='clear: both; padding-top: 20px; font-style: italic; color: #888;'><span class='@likeTip'><b>Tip:</b> don't forget to "+(new Link("like",[this,this.like]).render())+" this stranger, if you want him/her to be able to contact you through BlurryPeople at a later time.</span></div></div><div class='@fbCancel' style='display: none; margin-bottom: 6px; margin-top: 6px; text-align: right;'>"+(new BasicButton({content:"Cancel",onclick:[false,this,onCancel]}).render())+"</div><div class='@fbTip' style='font-size: 12px; font-style: italic; margin-top: 10px; display: none;'>Once you're done talking to a blurry person, you can use this form to rate him/her. This will affect his/her awesomeness. You are rated as well.</div>     <div class='@fbShield' style='width: 220px; height: "+(dd.ie?"300px":"100%")+"; "+getOpacityCss(0)+" background-color: white; left: 0; top: 0; position: absolute; z-index: 10;'></div></div></div>"});
var recentW=new RecentList({bp:this,style:"width: "+(dd.ie6?"98":"100")+"%; margin-bottom: 20px;"}),youLikeW=new YouLikeList({bp:this,style:"width: "+(dd.ie6?"98":"100")+"%; margin-bottom: 20px;"}),likesYouW=new LikesYouList({bp:this,style:"width: "+(dd.ie6?"98":"100")+"%; margin-bottom: 20px;"});
this.audioControls=new AudioControls({bp:this});
var ibp="left: 50%; margin-left: -"+(parseInt(chatWidth/2)+margin)+"px; position: fixed; top: -1px;";
if(dd.ie){ibp="position: absolute; left: expression(documentElement.scrollLeft + ((documentElement.clientWidth-this.clientWidth)/2 )); top: expression(documentElement.scrollTop-1);"
}return"<div class='@infobars' style='width: "+(chatWidth+2*margin)+"px; "+ibp+" z-index: 100;'></div><div style='width: "+(2*240+chatWidth+2*margin)+"px; margin-left: auto; margin-right: auto; position: relative; background-image: url("+(R+(dd.png?"1/i/bggrad.png":"1/i/_9j.png"))+"); background-repeat: no-repeat; background-position: 0 0;'>"+(new ImageWidget({data:{l:1,w:563,u:R+"1/i/bplogo2.png",h:105},style:"margin: 5px 0 20px 3px; float: left;"}).render())+"<div style='float: right; margin-top: 10px;'>"+this.audioControls.render()+"</div><div style='clear: both; height: 20px;'></div>"+this.leftCol.render()+""+this.rightCol.render()+"<div class='@centerColumn' style='margin: 0 "+(240+margin)+"px 0 "+(240+margin)+"px;'><div class='@chatE' style='"+(dd.ie6?"":"min-")+"height: 240px; margin-bottom: 20px; margin-top: 2px;'></div>"+recentW.render()+"<div style='position: relative; top: -12px; text-align: center;'><a target=\"_blank\" href=\"http://www.tjetter.com\" style='color: red; font-weight: bold; font-size: 85%;'>Chat without a webcam? Try tjetter.com!</a></div>"+youLikeW.render()+""+likesYouW.render()+"<div class='@shareDiv'></div></div><div style='clear: both;'></div></div>"
};
var recordIntro=function(){incrLoading();
this.setVar("record","none");
decrLoading()
};
var watchIntro=m.watchIntro=function(){incrLoading();
var me=this;
ev.send("Bp.intro",function(url){me.setVar("intro",url);
callFlash(me.rightFlash,"receive",url+"  none");
decrLoading()
},getGet("intro"))
};
var stopIntro=function(){callFlash(this.rightFlash,"stopStream");
this.introSeen=this.intro;
this.setVar("intro",false);
this.notify("Think you can do a better introductory video? Great, "+(new Link("help us out!",[this,recordIntro]).render())+"",true)
};
var updateStatus=function(){var state=false;
if(this.storedSearchConfig){this.searchConfig=clone(this.storedSearchConfig);
if(this.urlSearchWord){this.searchConfig.word="#"+this.urlSearchWord;
this.searchConfig.preference=10;
this.urlSearchWord=false
}this.storedSearchConfig=false
}applySearchConfig.call(this,(this.searchConfig=fixConfig(this.searchConfig,this.awesomeness)));
var mwidget,mtop,mleft,mright,peerKey,dateId,showBlurExamples;
if(!this.userId&&!this.feedback&&this.state=="idle"&&!this.record){mtop=new InlineWidget("<table><tr><td colspan='4' style='padding-bottom: 5px;' class='title'><b>Want to meet awesome strangers?</b></td></tr><tr style='vertical-align: top; font-size: 85%;'><td style='padding: 5px; width: 25%;'><span style='color: black; font-weight: bold;'>1.</span> Sit down in front of your webcam and let the site <span style='font-weight: bold; color: #7931b8;'>find</span> you a stranger.</td><td style='padding: 5px; width: 25%;'><span style='color: black; font-weight: bold;'>2.</span> Chat a bit, while the video feed slowly <span style='font-weight: bold; color: #7931b8;'>unblurs</span>.</td><td style='padding: 5px; width: 25%;'><span style='color: black; font-weight: bold;'>3.</span> Done talking? Say ciao, and <span style='font-weight: bold; color: #7931b8;'>rate</span> the stranger.</td><td style='padding: 5px; width: 25%;'><span style='color: black; font-weight: bold;'>4.</span> Repeat. If people think you're <span style='font-weight: bold; color: #f70194;'>awesome</span>, that'll allow you to filter out non-awesome people.</td></tr></table>")
}if(this.flashVer){mleft="This site requires Flash version 10. Presently installed: "+(this.flashVer[0]>0?this.flashVer.join(","):"none")+". <a href='http://get.adobe.com/flashplayer/' target='_blank'>Get it while it's hot!</a>";
mtop=false
}else{if(!this.rcvReady||!this.pubReady){mleft="Loading Flash. If this takes longer than a few seconds, something is wrong."
}else{if(this.firstMsg){this.notify(this.firstMsg);
this.firstMsg=false
}this.rightFlash.style.visibility=(this.state=="date"||this.record=="playback"||this.intro)?"visible":"hidden";
var showLeftFlash=(this.cam=="active"||this.gotStarted||this.userId);
this.leftFlash.style.visibility=showLeftFlash?"visible":"hidden";
this.blurryMe.root.style.display=showLeftFlash?"none":"block";
if(this.intro){mright="Playing introductory video.<br /><br />"+new Link('<span style="color: white;">Skip!</span>',[this,stopIntro]).render()
}else{if(this.record){state=this.record;
mwidget=new (getWidgetLoader(R+"1/j/record.js","Recorder"))({bp:this})
}else{if((this.cam=="none"||this.cam=="muted"||this.cam=="ready")&&!this.gotStarted&&!this.userId){mleft=false;
showBlurExamples=true
}else{if(this.cam=="none"){mleft="Sorry, you need a webcam to proceed, and it seems that you do not have one connected."
}else{if(this.cam=="muted"){mleft="Please enable your webcam to proceed."
}else{if(this.cam=="ready"){mleft="No image. Please show us your pretty face!"
}else{state=this.state;
if(state=="search"){mright=(this.searchConfig.preference==10)?"Waiting for someone who uses the same secret word: '"+(escapeHtml(this.searchConfig.word))+"'":"We're now trying to find you someone nice! This may or may not take forever. We'll make some noise when we need you back at the keyboard!<br /><br /><span style='font-size: 85%;'>(or: "+(new Link({content:"connect with a friend!",onclick:[this,onCancel,true],style:"font-weight: bold; color: white; text-decoration: underline;"}).render())+")</span>"
}else{if(state=="date"){peerKey=this.peerKey;
dateId=this.dateId;
trackPageview("/S1G5/hadDate")
}else{if(state=="feedback"){mright="Please help us spot awesome people, by telling us a little about your last encounter."
}else{mleft="Is this a blurry version of your face?";
mright="Then proceed by searching for someone to talk to!"
}}}}}}}}}}}DBG("state",state);
var dId=this.dateId||this.feedbackId;
var likeCurrentDate=(this.favs&&dId&&this.favs[dId]&&!!this.favs[dId].youLike);
this.blurryMan.root.style.display=(state===false||state=="idle"||state=="search"||state=="feedback")?"block":"none";
this.rightCol.searching.style.display=(state=="search")?"block":"none";
this.rightCol.likeTip.style.display=likeCurrentDate?"none":"block";
this.searchButton.root.style.display=(state=="idle"&&!this.bannedSeconds)?"block":"none";
this.rightCol.searchSettings.style.display=(state=="idle"&&!this.bannedSeconds)?"block":"none";
this.rightCol.banInfo.style.display=(this.bannedSeconds)?"block":"none";
setOpacity(this.rightCol.fbControls,(state=="date"||state=="feedback")?1:0.3);
if(state!="feedback"){this.rater.rateAppearance.style.display="block"
}this.rater.fbLikeTip.style.display=likeCurrentDate?"none":"block";
this.rightCol.fbShield.style.display=(state=="date"||state=="search"||state=="feedback")?"none":"block";
this.rightCol.otherGender.style.display=(state=="date")?"inline":"none";
this.rightCol.fbDate.style.display=(state=="date")?"block":"none";
this.rightCol.fbCancel.style.display=(state=="search")?"block":"none";
this.rightCol.fbControls.style.display=(state=="search"||state=="date")?"none":"block";
if(peerKey!==this.prevPeerKey){if(peerKey&&peerKey!=""){callFlash(this.rightFlash,"receive",peerKey);
callFlash(this.leftFlash,"nowBlurring");
if(!((this.favs||{})[this.dateId]||{}).img){callFlash(this.rightFlash,"schedSnapshots","http://"+window.location.host+"/snapshot/"+this.token+"/"+this.dateId+"")
}}else{callFlash(this.rightFlash,"stopStream")
}this.prevPeerKey=peerKey
}else{if(peerKey){return
}}if(dateId!==this.prevDateId){if(dateId){mwidget=new ChatWidget({bp:this,initMsg:"<div style='padding: 4px;'>You're now connected to a stranger. Here's what to do:<br />- Try to <i>really</i> give a damn about him or her, if only just for a minute.<br />- If someone offers to trade points, just agree and rate <em>down</em> instead.<br />- Be <span style='color: #f70194'>awesome</span>!<br /></div>"});
callFlash(this.leftFlash,"publish")
}else{callFlash(this.leftFlash,"stopStream")
}this.prevDateId=dateId
}else{if(dateId){return
}}if(!mwidget){if(mtop){mwidget=mtop
}if(showBlurExamples){var t=new InlineWidget("<table style='width: 100%; margin-top: 30px;'><tr><td style='text-align: center;'><img src=\""+(R+(dd.png?"1/i/blurpic1.png":"1/i/_9k.png"))+"\" /></td><td style='text-align: center;'><img src=\""+(R+(dd.png?"1/i/blurpic2.png":"1/i/_9l.png"))+"\" /></td> <td style='text-align: center;'><img src=\""+(R+(dd.png?"1/i/blurpic3.png":"1/i/_9m.png"))+"\" /></td> <td style='text-align: center;'><img src=\""+(R+(dd.png?"1/i/blurpic4.png":"1/i/_9n.png"))+"\" /></td> </tr><tr style='font-size: 85%; color: gray;'><td style='text-align: center;'>0 mins</td><td style='text-align: center;'>1 min</td><td style='text-align: center;'>2 mins</td><td style='text-align: center;'>3 mins</td></tr><tr><td colspan='4' style='padding: 25px; text-align: center;'>"+(new BasicButton({content:"ok, let's get started!",style:"",onclick:[this,getStarted]}).render())+"</td></tr></table>");
if(mwidget){mwidget=new InlineWidget(mwidget.render()+t.render())
}else{mwidget=t
}}else{if(mleft){var t=new LBalloon({content:mleft,style:"padding-left: 8px; padding-right: 8px; width: 250px; color: white; font-weight: bold; text-align: center; margin-top: 5px;"});
if(mwidget){mwidget=new InlineWidget(mwidget.render()+t.render())
}else{mwidget=t
}}if(mright){var t=new RBalloon({content:mright,style:"padding-left: 8px; padding-right: 8px; width: 250px; float: right; color: white; font-weight: bold; text-align: center; margin-top: "+(mtop&&mleft?0:40)+"px; margin-bottom: 20px;"});
if(mwidget){mwidget=new InlineWidget(mwidget.render()+t.render())
}else{mwidget=t
}}}}if(!mwidget){mwidget=new EmptyWidget()
}mwidget.set(this.chatE)
};
var ufid=0;
var toGlobalName=function(cb){var n="_bpflcb"+(++ufid);
window[n]=function(){DBG(arguments);
callback(cb,arguments)
};
return n
};
var handlePublisher=function(n,p,force){if(force!=="force"){setCallbackTimeout([this,handlePublisher,n,p,"force"],0);
return
}DBG("pub",n,p);
this.startWatchBatching();
if(n=="ready"){this.setVar("pubReady",true)
}else{if(n=="cam"){if(!p){this.setVar("cam","none")
}else{if(p.muted){this.setVar("cam","muted")
}else{if(this.cam!="active"){this.setVar("cam",(p.activityLevel>3||this.cam=="active")?"active":"ready")
}}}}else{if(n=="key"){if(this.record){this.recordingKey=p
}else{ev.send("User.setPeerKey",p)
}}else{if(n=="getFmsUrl"){ev.send("Bp.getFmsUrl",[callFlash,this.leftFlash,"onFmsUrl"])
}else{DBG("hp inval "+n)
}}}}this.endWatchBatching()
};
var handleReceiver=function(n,p,force){if(force!=="force"){setCallbackTimeout([this,handleReceiver,n,p,"force"],0);
return
}DBG("rcv",n,p);
this.startWatchBatching();
if(n=="ready"){if(!this.rcvReady&&getGet("intro")){watchIntro.call(this)
}this.setVar("rcvReady",true)
}else{if(n=="msg"){DBG("msg3");
callback(this.onMsg,[p,2])
}else{if(n=="receiveCheck"){if(this.userId){ev.send("Contact.receiveCheck",p)
}}else{if(n=="playstop"){if(this.intro){stopIntro.call(this)
}callback(this.onPlaystop,[],this)
}else{DBG("hr inval "+n)
}}}}this.endWatchBatching()
};
var flashUrl=R+"5/bp.swf";
var flashLoaded=function(lr,force){if(force!=="force"){setCallbackTimeout([this,flashLoaded,lr,"force"],0);
return
}DBG("flashLoaded",lr);
if(lr=="left"){this.leftFlash=gId("leftFlash");
callFlash(this.leftFlash,"initPublisher",toGlobalName([this,handlePublisher]));
callOnLoad("rightFlash",[this,flashLoaded,"right"]);
loadFlashObject({name:"rightFlash",url:flashUrl,parent:this.rightCol.video,width:240,height:240,wmode:"window"})
}else{if(lr=="right"){this.rightFlash=gId("rightFlash");
callFlash(this.rightFlash,"initReceiver",toGlobalName([this,handleReceiver]))
}else{var me=this;
callOnLoad("leftFlash",[this,flashLoaded,"left"]);
loadFlashObject({name:"leftFlash",url:flashUrl,parent:this.leftCol.video,width:240,height:240,wmode:"window"})
}}};
m.createAnon=function(cb,searchingForWord){trackPageview("/S1G1/anonCreated");
if(this.subscription){this.subscription.cancel()
}var z=document.location.href.split("#").shift().split("/").pop();
var inviterUserId=((z-0)==z&&z.length>0)?z:0;
this.subscription=ev.send("User.createAnon",[this,this.setVarList],this.intro||this.introSeen,searchingForWord,inviterUserId);
if(cb){ev.send("Bp.reply",cb)
}};
var getStarted=function(){this.setVar("gotStarted",true)
};
var search=function(loop){this.urlSearchWord=false;
var config=getCurrentSearchConfig.call(this);
if(config.preference==10){if(config.word.strip()==""){return this.notify("searchWordEmpty")
}else{if(config.word.strip().length>16){return this.notify("searchWordTooLong")
}}this.searchConfig.word=config.word
}if(loop!==true){incrLoading();
if(!this.userId){this.createAnon([this,search,true],config.preference==10?config.word:false);
return
}}this.setVar("state","search");
ev.send("Bp.search",config);
ev.send("Bp.reply",decrLoading)
};
var updateBanCounter=function(){if(!this.bannedUntilTime){this.rightCol.banCounter.innerHTML="";
return
}this.rightCol.banCounter.innerHTML=""+(Math.ceil((this.bannedUntilTime-new Date().getTime())/1000))+" second"+((Math.ceil((this.bannedUntilTime-new Date().getTime())/1000))==1?"":"s")+"";
if(this.banCounterTimeout){clearTimeout(this.banCounterTimeout)
}this.banCounterTimeout=setCallbackTimeout([this,updateBanCounter],100)
};
var updateBan=function(expired){if(expired){this.bannedUntilTime=0;
this.bannedSeconds=0;
this.banTimeout=false
}if(this.rightCol.searchSettings){this.rightCol.searchSettings.style.display=this.bannedSeconds?"none":"block"
}if(this.searchButton){this.searchButton.root.style.display=this.bannedSeconds?"none":"block"
}if(this.rightCol.banInfo){this.rightCol.banInfo.style.display=this.bannedSeconds?"block":"none"
}if(!this.bannedSeconds){return
}if(this.bannedSeconds==60){trackPageview("/S2G4/receivedTimeout60")
}else{if(this.bannedSeconds%20==0){trackPageview("/S2G3/receivedTimeout")
}}this.bannedUntilTime=new Date().getTime()+1000*this.bannedSeconds;
updateBanCounter.call(this);
if(this.banTimeout){clearTimeout(this.banTimeout)
}this.banTimeout=setCallbackTimeout([this,updateBan,true],this.bannedSeconds*1000)
};
var updateShareInfo=function(){new InlineWidget(!this.userId?"":"<table style='color: gray; font-size: 12px; margin-bottom: 20px;'><tr><td><div style='float: left; width: 47%; text-align: right;'><span style='color: #f70194;'>Awesome</span> people have <span style='color: #f70194'>awesome</span> friends. Invite them to BlurryPeople using your personal URL, and they'll add to <i>your</i> <span style='color: #1b8db3; font-style: italic;'>popularity</span>!</div><div style='float: right; width: 47%;'><div>Your personal invite URL:</div><input type='text' onclick='focus(); select();' style='border: 1px solid #bbb; width: 200px; margin: 0;' readonly value='www.blurrypeople.com/"+this.userId+'\' /><div class="a2a_kit a2a_default_style" style=\'margin: 10px 0 0 0;\'><a class="a2a_dd" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblurrypeople.com%2F'+this.userId+'&amp;linkname=BlurryPeople">Share</a><span class="a2a_divider"></span><a class="a2a_button_facebook"></a><a class="a2a_button_twitter"></a> <a class="a2a_button_google_gmail"></a><a class="a2a_button_hyves"></a><a class="a2a_button_google_buzz"></a><a class="a2a_button_ping"></a><a class="a2a_button_live"></a></div></div></td></tr><tr><td style=\'text-align: center; padding: 5px 0; font-weight: bold;\'>Your '+(this.inviteeCount||0)+" invitee"+((this.inviteeCount||0)==1?"":"s")+" "+((this.inviteeCount||0)==1?"has an":"have a combined")+" awesomeness of "+(this.inviteeAws||0)+", a third of which reflects on you!</td></tr></table>").set(this.shareDiv);
if(this.userId){if(window.a2a&&window.a2a.init){window.a2a_config={vars:{vars:[]}};
a2a.init()
}else{var script=document.createElement("script");
script.type="text/javascript";
script.src="http://static.addtoany.com/menu/page.js";
document.body.appendChild(script)
}}};
var updateSignin=function(force){if(this.accountWidget){this.accountWidget.redraw()
}else{this.accountWidget=new AccountWidget({bp:bp,ScalesDisplayer:ScalesDisplayer}).set(this.leftCol.signinE)
}this.leftCol.yourEmail.innerHTML=escapeHtml(this.userEmail||"not signed in");
window.a2a_config={linkname:"BlurryPeople",linkurl:"http://blurrypeople.com/"+this.userId+"",no_3p:1}
};
var youAreAwesome=function(){var o=this.oldAwesomeness,n=this.awesomeness;
if(typeof o=="number"){var earnedAbility="";
if(o<3&&n>=3){earnedAbility="<br />You can now search by gender!"
}else{if(o<5&&n>=5){earnedAbility="<br />You can now search by gender!";
trackPageview("/S2G1/fiveAwesomeUp")
}else{if(o>=5&&n<5){trackPageview("/S2G2/fiveAwesomeDown")
}else{if(o<10&&n>=10){earnedAbility="<br />You can now search by age!"
}}}}if(n>o){this.notify(['<span style="font-size: 170%;">+'+(n-o)+" you are awesome!<span>"+earnedAbility+"",false,"leftCol.awe"],true)
}}this.oldAwesomeness=n
};
var askChangeNewsEmail=function(disable){if(disable){this.ask("Do you want to stop receiving email newsletters from BlurryPeople?",["Yes","No"],[this,function(){ev.send("User.changeNewsEmail",true,[this,this.notify])
}])
}else{this.ask("Do you want to receive email newsletters from BlurryPeople?",["Yes","No"],[this,function(){ev.send("User.changeNewsEmail",false,[this,this.notify])
}])
}};
m.reset=function(){if(this.subscription){this.subscription.cancel();
this.subscription=false
}this.setVarList({favs:false,userId:false,token:false,props:false,userEmail:false,bannedSeconds:0,state:"idle",dateId:false,feedbackId:false,peerKey:false,peerGender:false,peerAwesomeness:false,peerScales:false,awesomeness:false,storedSearchConfig:{word:"",man:0,age:0,preference:0},scales:false});
callFlash(this.leftFlash,"stopStream");
callFlash(this.rightFlash,"stopStream")
};
m.finish=function(){var z=document.location.href.split("#");
z.shift();
if(z[0]){if(z[0]=="DisableEmailNews"){askChangeNewsEmail.call(this,true)
}else{this.urlSearchWord=z[0]
}}this.state="idle";
this.searchConfig={word:this.urlSearchWord?"#"+this.urlSearchWord:"",man:0,age:0,preference:this.urlSearchWord?10:0};
this.flashVer=getFlashVersion();
if(this.flashVer&&this.flashVer[0]>=10){this.flashVer=false
}this.addWatch([this,updateStatus]);
updateStatus.call(this);
this.addWatch("awesomeness",[this.rater,this.rater.redraw]);
this.addWatch("peerScales",[this.peerScalesDisplayer,this.peerScalesDisplayer.redraw]);
this.addWatch("peerGender",[this,function(){this.rightCol.otherGender.innerHTML=(!this.peerGender?"unknown gender":((this.peerGender<0?"female ":"male ")+"("+genderCertainty[Math.abs(this.peerGender)-1]+")"))
}]);
this.addWatch("scales",[this,updateSignin]);
this.addWatch("userEmail",[this,updateSignin]);
this.addWatch("userId",[this,updateSignin]);
this.addWatch("userId",[this,updateShareInfo]);
this.addWatch("inviteeCount",[this,updateShareInfo]);
this.addWatch("inviteeAws",[this,updateShareInfo]);
this.addWatch("bannedSeconds",[this,updateBan,false]);
this.addWatch("awesomeness",[this,youAreAwesome]);
if(this.bannedSeconds){updateBan.call(this,false)
}updateSignin.call(this);
if(!this.flashVer){flashLoaded.call(this,"none")
}var tip1=this.rightCol.fbTip;
this.rightCol.fbShield.addCallbacks({onmouseover:function(){tip1.style.display="block"
},onmouseout:function(){tip1.style.display="none"
}});
this.root.addCallback("onclick",[this,this.removeNotify,true]);
decrLoading()
};
m.makeSnapshot=function(){if(!this.dateId||!this.token){return
}var ssUrl="http://"+window.location.host+"/snapshot/"+this.token+"/"+this.dateId+"";
callFlash(this.rightFlash,"makeSnapshot",ssUrl)
};
m.sendMsg=function(txt){ev.send("Contact.msg",txt);
callback(this.onMsg,[txt,1])
};
m.receiveMsg=function(arr){callback(this.onMsg,arr)
};
m.quickCiaoWarning=function(){this.ask("You are ciao'ing this real person of flesh and blood rather quickly. Are you sure that's the awesome thing to do?",["Yes","No"],[this,onCiao,true])
};
m.playSound=function(snd){var sUrl=sounds[snd];
if(sUrl&&this.audioControls.soundsEnabled){callFlash(this.leftFlash,"playSound",sUrl)
}};
var msgs={done:"Done!",badReputation:["Due to excessive access we currently require a confirmed account in order to search. Sorry!",false,"leftCol.signinE"],confirmFirst:["Please confirm your account using the email we sent during sign up.",false,"leftCol.signinE"],searchWordEmpty:["You need to enter a secret word...",false,"blurryMan"],searchWordTooLong:["The secret word is not allowed to be over 16 characters!",false,"blurryMan"],msgSent:["Message sent!",false,false],msgEmpty:["Empty message!",false,false],msgTooLong:["Message too long (max. 100 characters allowed).",false,false],msgNotAllowed:["You are (currently) not allowed to send a message to him/her.",false,false],noUserOrUnconfirmed:["No confirmed email-address known...",false,"leftCol.signinE"],canceledSearch:["You cancelled the search.",false,"blurryMan"],thanksFeedback:["Thanks for helping BlurryPeople get smarter!",false,"rightCol.fbControls"],justLiked:["The blurry person just 'liked' you, alright!",false,"blurryMan"],ciaod:["You were ciao'd by the blurry person. Would you please tell us a bit about him/her?",false,"rightCol.fbControls"],ciaodQuickly:["You were ciao'd by the blurry person.<br /><br />Help us weed out bad apples by rating negatively on friendliness, when appropriate.",false,"rightCol.fbControls"],saidCiao:["You ciao'd the blurry person. Would you please tell us a bit about him/her?",false,"rightCol.fbControls"],ciaodDone:["You were ciao'd by the blurry person.",false,"rightCol.fbControls"],saidCiaoDone:["You ciao'd the blurry person.",false,"rightCol.fbControls"],justUnliked:["You were just unliked by the blurry person, oh well...",false,"blurryMan"],justBlocked:["You were just blocked by the blurry person, ouch!",false,"blurryMan"],registerLike:["Don't forget to sign up now, as otherwise you'll loose all your liked blurry people the moment you leave this page.",false,"leftCol.signinE"],registerLiked:["You were just 'liked' by a blurry person, alright! However, you'll <b>not</b> be able to keep in touch once you leave this page, <b>unless you sign up now!</b>",false,"leftCol.signinE"],otherSession:["You have been automatically signed out here, because you have signed in elsewhere.",false,"leftCol.signinE"],cannotReqWhileFeedback:["Please give feedback on your previous encounter first..",false,"rightCol.fbControls"],cannotReqWhileDating:["Cannot connect while already connected. Say ciao first!",false,"rightCol.fbDate"]};
var showSteps=35;
var hideSteps=25;
var notifyAnimate=function(info){var stepTime=1000/35;
var e=info.e;
if(!info.ns){$(e).remove();
return
}if(info.ns>0){var es={w:"width",h:"height",x:"left",y:"top"};
var p=1*info.ns/showSteps;
p=0.5*Math.sin((p-0.5)*Math.PI)+0.5;
for(var i in es){e.style[es[i]]=""+(info["s"+i]+(info["t"+i]-info["s"+i])*p)+"px"
}if(info.ns==1){e.style.visibility="visible"
}info.ns++;
if(info.ns>showSteps){info.ns=-hideSteps+1;
stepTime=info.t
}}else{info.ns++;
e.style.top=""+(info.ty-info.th*(hideSteps+info.ns)/hideSteps)+"px"
}info.to=setCallbackTimeout([notifyAnimate,info],stepTime)
};
var NotiBox=(makeWidget({textRight:6,borderColor:"#ffffff",textLeft:6,top:20,inherit:BoxWidget,bottom:20,borderLeft:2,borderRight:2,color:"#7931b8",textTop:23,left:20,textBottom:8,right:20,cor:R+(dd.png?"1/i/_9r.png":"1/i/_9s.png")}));
m.notify=function(msg,allowCustom){msg=(typeof msg=="string"?msgs[msg]:false)||(allowCustom===true?msg:undefined);
if(!msg){return
}var onclick,source;
if(typeof msg=="object"){onclick=msg[1];
source=msg[2];
msg=msg[0]
}if(typeof source=="string"){source=source.split(".");
var e=this;
for(var i=0;
i<source.length;
i++){e=(e||{})[source[i]]
}source=e
}if(source&&source.widgetType){source=source.root
}DBG("src1",source);
while(source&&!source.offsetParent){source=source.parentNode;
DBG("src2",source)
}source=source||this.chatE;
msg="<div style='color: white; font-weight: bold; text-align: center;' class='@msg'> "+msg+"</div>";
var nb=new NotiBox({content:msg,style:"position: absolute; z-index: 101; width: 100%; top: -20px; visibility: hidden;"});
nb.insert(this.infobars);
var startDim=40;
var sxy=getOffsetXY(source);
DBG("sx: "+sxy[0]+" + "+source.offsetWidth+"/2 - "+startDim+"/2 - "+this.infobars.offsetLeft+"");
var info={tx:0,ty:-20,tw:nb.root.offsetWidth,th:nb.root.offsetHeight,sx:sxy[0]+source.offsetWidth/2-startDim/2-this.infobars.offsetLeft,sy:sxy[1]+source.offsetHeight/2-startDim/2-(window.pageYOffset||(document.documentElement?document.documentElement.scrollTop:document.body.scrollTop)||0),sw:startDim,sh:startDim,e:nb.root,t:6000+msg.length*15,ns:1};
DBG("notify info",info);
nb.msg.style.width=nb.msg.offsetWidth+"px";
nb.msg.style.height=nb.msg.offsetHeight+"px";
nb.inner.style.overflow="hidden";
this.removeNotify();
this.curNotiInfo=info;
notifyAnimate(info)
};
m.removeNotify=function(onlyOld){if(this.curNotiInfo){if(this.curNotiInfo.ns==-hideSteps+1){clearTimeout(this.curNotiInfo.to);
notifyAnimate(this.curNotiInfo)
}else{if(this.curNotiInfo.ns>0&&onlyOld!==true){this.curNotiInfo.t=1000/35
}}}};
var destroyAsk=function(cb){var w=walkTree(this,["_w","parent"]);
if(w){w.remove()
}callback(cb)
};
m.ask=function(msg,opts){var buttons=[];
for(var i=0;
i<opts.length;
i++){buttons.push(new (makeWidget({textRight:8,textLeft:8,top:9,inherit:Button,bottom:9,borderLeft:0,borderRight:0,transformContent:boxHelpers.t.smallButton,color:"#1b8db3",textTop:2,left:9,cor:R+(dd.png?"1/i/_8o.png":"1/i/_9q.png"),textBottom:1,right:9}))({content:opts[i],onclick:[destroyAsk,arguments[i+2]],style:"line-height: 1em;"}).render())
}this.notify(msg+' <div style="font-weight: normal; display: inline-block; vertical-align: middle;">'+buttons.join(" ")+"</div>",true)
};
return makeWidget(m)
})();
window.addCallback("onSemiLoad",function(){window.ev=new EventConnection("/ilcs");
window.bp=new BP();
bp.insert(document.body);
ev.start()
});if(self.scriptReady) { scriptReady("bp"); }

