﻿
var $d=document,$b,$un="undefined",$GA_url="",OLExecuted=false,unknownDC,chooseC,dctimer=null,myActiveTab,specialDC=[39,225,228,241,250,352],$Tel,CallMgr,DestMgr,ABMgr,GroupMgr,SmsMgr,NrControlMgr,AdsManager,RedialManager,RecentCallsRenderer,DelayedCallListManager,TabStrip,ClickOnTab=false,$notify=false;String.prototype.ltrim=function()
{return this.replace(/^\s+/g,"");};String.prototype.rtrim=function()
{return this.replace(/\s+$/g,"");};String.prototype.trim=function()
{return this.replace(/^\s+|\s+$/g,"");};String.prototype.wrap=function(l)
{var reg=new RegExp("(\\S{"+l+",})","g");return this.replace(reg,function()
{var r="",s=arguments[0];while(s.length>l)
{r=r+s.substring(0,l)+"<wbr />";s=s.substring(l);}
return r+s;});};String.prototype.startsWith=Number.prototype.startsWith=function(s)
{return String(this).substring(0,String(s).length)==String(s);};Array.prototype.each=function()
{var args=$A(arguments),f=args.shift(),_this=args.shift();for(var i=0,l=this.length;i<l;i++)
{f.apply(_this||this,[this[i]].concat(args));}};Array.prototype.hasKey=Object.prototype.hasKey=function(k)
{return $un!=typeof(this[k]);};Array.prototype.contains=function(v)
{for(var i=0,len=this.length;i<len;i++)
{if(this[i]==v)
{return true;}}
return false;};Array.prototype.clone=function(keepref)
{if($un==typeof keepref)
{keepref=false;}
var arr;if(keepref)
{arr=this.slice(0);}
else
{arr=[];for(var i=0,len=this.length;i<len;i++)
{switch(typeof(this[i]))
{case"object":case"array":arr.push(null==this[i]?null:this[i].clone(keepref));break;default:arr.push(this[i]);break;}}}
return arr;};Object.prototype.clone=function(keepref)
{if($un==typeof(keepref))
{keepref=false;}
var o={},k=GetKeys(this);for(var i=0,len=k.length;i<len;i++)
{switch(typeof(this[k[i]]))
{case"object":case"array":o[k[i]]=this[k[i]].clone(keepref);break;default:o[k[i]]=this[k[i]];break;}}
return o;};function equals(a,b)
{if(typeof a!=typeof b)
{return false;}
if(isFunction(a.toSource))
{return a.toSource().toLowerCase()==b.toSource().toLowerCase();}
if(isArray(a))
{if(a.length!=b.length)
{return false;}
for(var i=0,l=a.length;i<l;i++)
{if(!equals(a[i],b[i]))
{return false;}}
return true;}
if(isObject(a))
{var k=GetKeys(a);if(!equals(k,GetKeys(b)))
{return false;}
for(var i=0,l=k.length;i<l;i++)
{if(!equals(a[k[i]],b[k[i]]))
{return false;}}
return true;}
if(isFunction(a))
{return a.toString()==b.toString();}
return String(a).toLowerCase()==String(b).toLowerCase();}
Function.prototype.link=function()
{var m=this,args=$A(arguments),_this=args.shift();return function()
{return m.apply(_this,args.concat($A(arguments)));};};Function.prototype.delay=function()
{var m=this,args=$A(arguments),t=args.shift(),_this=args.shift();return window.setTimeout(function(){m.apply(_this,args);},t);};function GetKeys(o)
{var k=[];for(var key in o)
{if(o.hasOwnProperty(key))
{k.push(key);}}
return k;}
if(typeof $T==$un)
{$T=function(id,v)
{if(typeof TM!=$un)
{return TM.Get(id);}
if(v)
{return v;}
else
{return id.replace(/\./," ");}}}
preload("/images/animations/loading.gif");if($d.addEventListener)
{AttachEvent($d,"DOMContentLoaded",OnContentLoad);}
AttachEvent(window,"load",function(){OnContentLoad();OnLoad();});function OnContentLoad()
{if(OLExecuted)
{return;}
OLExecuted=true;$b=$d.body;unknownDC=$T("unknown.dialcode","Invalid country code");chooseC=$T("country.choose","Please select country");TabStrip=new TabStripMgr();myActiveTab=0;var init=["PhoneNumberManager",function()
{$Tel=new PhoneNumberManager();},"NrControlManager",function()
{NrControlMgr=new NrControlManager();},"CallManager",function()
{CallMgr=new CallManager("CallMgr");},"DestinationManager",function()
{DestMgr=new DestinationManager();},"SmsManager",function()
{SmsMgr=new SmsManager();},"ABManager",function()
{ABMgr=new ABManager("ABMgr");},"GroupManager",function()
{GroupMgr=new GroupManager('GroupMgr');},"AdsMgr",function()
{AdsManager=new AdsMgr();},"RedialMgr",function()
{RecentCallsRenderer=new RecentCallsRendererMgr();RedialManager=new RedialMgr("RedialManager",RecentCallsRenderer);},"ScheduleManager",function()
{DelayedCallListManager=new ScheduleManager();},"clickHandler",function()
{AttachEvent($d,"click",clickHandler);}];for(var i=0,len=init.length;i<len;i=i+2)
{if(eval("$un != typeof("+init[i]+")"))
{init[i+1]();}}
ExecuteOL();}
function OnLoad()
{if(CallMgr)
{}}
function ExecuteOL()
{if($un==typeof($OL))
{return;}
$OL.sort(function(a,b){return a[0]-b[0]});for(var i=0,len=$OL.length;i<len;i++)
{var valid=true;if($OL[i].length>4)
{try
{valid=eval($OL[i][4]);}
catch(ex)
{$Log(ex);valid=false;}}
if(valid)
{var f=eval($OL[i][1]);if(isFunction(f))
{f.apply(eval($OL[i][2]),$OL[i][3]||[]);}}}
$OL=[];}
var Ajax=function()
{this.Methods={Get:"GET",Post:"POST"};var path="/engine/ajax/";this.Url={Account:path+"account.ashx",Button:path+"services/button.ashx",Call:path+"services/call.ashx",Contacts:path+"contacts.ashx",Default:path+"default.ashx",Modal:path+"ui/modal.ashx",Mobile:path+"services/mobile.ashx",SMS:path+"services/sms.ashx"};this.defaultUrl=this.Url.Default;};Ajax.prototype={Enabled:function()
{return null!=this.XHR();},XHR:function()
{if($un!=typeof XMLHttpRequest)
{return new XMLHttpRequest();}
if($un!=typeof ActiveXObject)
{try
{return new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{}
try
{return new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{}}
return null;},Send:function(method,url,server_func,params,cb,secure)
{return new AjaxReq(this.XHR(),method,url,server_func,params,cb,secure,this);},Get:function()
{return this.Send.apply(this,[this.Methods.Get].concat($A(arguments)));},Post:function()
{return this.Send.apply(this,[this.Methods.Post].concat($A(arguments)));}};function AjaxReq(xhr,method,url,server_func,params,cb,secure,base)
{this.base=base;this.XHR=xhr;this.method=method||this.base.Methods.Post;this.url=url||this.base.defaultUrl;this.server_func=server_func||"";this.params=params;this.cb=cb||null;this.secure=$un==typeof secure?true:!!secure;}
AjaxReq.prototype={Send:function(async)
{if(null==this.XHR)
{return false;}
if($un==typeof async)
{async=true;}
try
{this.XHR.open(this.method,this.url+this.GetQuery(),async);if(this.method==this.base.Methods.Post)
{this.XHR.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}
this.XHR.send(this.GetBody());if(null!=(this.cb||null))
{if(async)
{this.IeCacheFix.delay(1,this);this.XHR.onreadystatechange=this.OnStateChange.link(this);}
else
{this.cb(this.GetResponse(),this.Ok());this.CleanUp();}}}
catch(e)
{this.CleanUp();return false;}
return true;},IeCacheFix:function()
{try
{if(null!=this.XHR&&this.Ok())
{this.cb(this.GetResponse(),this.Ok());this.CleanUp();}}
catch(e)
{}},OnStateChange:function()
{if(null!=this.XHR&&4==this.XHR.readyState)
{this.cb(this.GetResponse(),this.Ok());this.CleanUp();}},Ok:function()
{var status=(this.XHR.status||0);return 200<=status&&300>status;},GetQuery:function()
{if(this.method==this.base.Methods.Get)
{return((this.url||this.base.defaultUrl).indexOf("?")>-1?"&":"?")+this.GetParamQuery();}
return"";},GetBody:function()
{if(this.method==this.base.Methods.Post)
{return this.GetParamQuery();}
return"";},GetParamQuery:function()
{var p=this.params,q="_sf="+this.server_func+(this.secure?"&_sid="+(typeof $sid!=$un?$sid:""):"");if(null==p)
{return q;}
if(isArray(p))
{for(var i=0,l=p.length;i<l;i++)
{q+=this.Prefix(q)+"_p="+urlEncode(this.ToString(p[i]));}}
else if(isObject(p))
{var k=GetKeys(p);for(var i=0,l=k.length;i<l;i++)
{if(isArray(p[k[i]])&&p[k[i]].length>0)
{q+=this.Prefix(q)+this.ToString(p[k[i]],urlEncode(k[i]));}
else
{q+=this.Prefix(q)+urlEncode(k[i])+"="+urlEncode(this.ToString(p[k[i]]));}}}
else
{q+=(""==q?"":"&")+this.ToString(p);}
return q;},Prefix:function(q)
{return(""==q||q.match(/(\&|\?)$/i))?"":"&";},ToString:function(v,n)
{if(null==v)
{return"";}
if(isArray(v))
{var q="";for(var i=0,l=v.length;i<l;i++)
{q+=this.Prefix(q)+(n||"_p")+"="+urlEncode(this.ToString(v[i]));}
return q;}
if(isFunction(v.toString))
{return v.toString();}
return v;},GetResponse:function()
{if(!this.Ok())
{if(403==this.XHR.status)
{$M.Show("token");}
return this.XHR.statusText;}
var ctype=this.XHR.getResponseHeader("Content-type");if(null!=ctype&&ctype.match(/^application\/json(;.*)?$/i))
{var re=null;try
{re=this.XHR.responseText.parseJSON()}
catch(ex)
{$Log(ex.message,location.href,"$X.GetResponse");try
{re=Eval(this.XHR.responseText);}
catch(ex)
{$Log(ex.message,location.href,"$X.GetResponse");}}
return re;}
return this.XHR.responseText;},EmptyFunc:function()
{},CleanUp:function()
{this.XHR.onreadystatechange=this.EmptyFunc;this.XHR=null;}};var $X=new Ajax();(function()
{if(-1==window.location.href.indexOf("\/mini")&&"?nr"!=window.location.search)
{var bot=["bot","yahoo","crawler"],nav=window.navigator;if(nav)
{for(var i=0,l=bot.length;i<l;i++)
{if(nav.userAgent.indexOf(bot[i])>-1)
{return;}}}
if(!$X.Enabled())
{redirect("http://mobile.jajah.com/");}}})();function $Log(msg,url,line,stack)
{try
{var a=$A(arguments);if(1==a.length)
{msg=a[0].message;url=a[0].fileName;line=a[0].lineNumber;stack=a[0].stack;}
var i=new Image();i.src="/engine/log4js.ashx?msg=#m#&url=#u#&line=#l#&stack=#s#".replace(/#m#/,urlEncode(msg)).replace(/#u#/,urlEncode(url)).replace(/#l#/,urlEncode(line)).replace(/#s#/,urlEncode(stack));return false;}
catch(e)
{}}
window.onerror=$Log;function el(id)
{return"string"==typeof(id)?$d.getElementById(id):id;}
function create(tag)
{return $d.createElement(tag);}
function elByTag(o,t)
{if(null==(o=el(o)))
{return[];}
return $A(o.getElementsByTagName(t));}
function setText(c,t)
{var o=el(c);if(null==o)
{return;}
if("clear"==t)
{t="";}
if(""==t.replace(/[\s]/g,""))
{t="";}
if(t!=o.innerHTML)
{o.innerHTML=t;}
o.style.display=(""==t?"none":"");if("infobox"==c||"lowerinfobox"==c)
{o=el(c+"line");if(null!=o)
{o.style.display=(t==""?"none":"");}}}
function isVisible(o)
{o=el(o);if(null==o)
{return false;}
return(("none"!=o.style.display)||(o.getAttribute("isVisible")&&"true"==o.getAttribute("isVisible")));}
function $html(o,h)
{return $mod.apply(this,[function(o){o.innerHTML=h||"";}].concat([o]));}
function $show()
{return $tog.apply(this,$A(arguments).concat([true]));}
function $hide(id)
{return $tog.apply(this,$A(arguments).concat([false]));}
function $tog()
{var args=$A(arguments),show=args.pop();return $s.apply(this,args.concat(["display",show?"":"none"]));}
function $class(o,css)
{return $mod.apply(this,[function(o){o.className=css;}].concat([o]));}
function $s(o,k,s)
{o=$A(arguments),v=o.pop(),k=o.pop();return $mod.apply(this,[function(o){o.style[fixStyle(k)]=v;}].concat(o));function fixStyle(n)
{if("float"==n)
{return $un!=typeof create("DIV").style.styleFloat?"styleFloat":"cssFloat";}
if(n.indexOf("-")>-1)
{return n.replace(/-./gi,function(match)
{return match.substr(1).toUpperCase();});}
return n;}}
function $mod()
{var o=$A(arguments),f=o.shift();for(var i=0,len=o.length;i<len;i++)
{o[i]=el(o[i]);if(null!=o[i])
{f(o[i]);}}
return 1==o.length?o[0]:o;}
function isFunction(f)
{return"function"==typeof f;}
function isObject(o)
{return o&&"object"==typeof o;}
function isArray(o)
{return $un!=typeof o&&[].constructor==o.constructor;}
function $A(a)
{if(!a)
{return[];}
if(a.toArray)
{return a.toArray();}
if($un!=typeof a.length)
{try
{return Array.prototype.slice.call(a,0);}
catch(ex)
{var r=[];for(var i=0,l=a.length;i<l;i++)
{r.push(a[i]);}
return r;}}
return[a];}
function fixE(e)
{return e||window.event;}
function Eval(s)
{return eval('('+s.replace(/\r|\n/g,' ')+')');}
function urlEncode(s)
{if(encodeURIComponent)
{return encodeURIComponent(s);}
return encode(s);}
function encode(t)
{return t.replace(/\"/,"&quot;").replace(/</,"&lt;").replace(/>/,"&gt;");}
function redirect(url)
{window.location.href=url;}
function foc(o)
{if("string"==typeof(o))
{o=el(o);}
if(null!=o)
{if($un!=typeof focTimer&&null!=focTimer)
{window.clearTimeout(focTimer);focTimer=null;}
focTimer=setfocus.delay(400,null,o);}}
function setfocus(o)
{if($un==typeof(o)||null==o||$un==typeof(o.focus))
{return;}
o.focus();}
function getMouseXY(e)
{e=fixE(e);if($un!=typeof(e.pageX))
{return{x:e.pageX,y:e.pageY};}
else if(e.clientX)
{return{x:(e.clientX+document.documentElement.scrollLeft),y:(e.clientY+document.documentElement.scrollTop)};}
return{x:0,y:0};}
function _parseFloat(v,g,d)
{return parseFloat(v.replace(eval("/\\"+g+"/"),"").replace(eval("/\\"+d+"/"),"."));}
function CryptNumber(nr)
{return nr.substr(0,3)+"<span></span>"+nr.substr(3);}
function onlyDigits(e,o,plusAllowed,extAllowed,numOnly)
{if(e.ctrlKey||e.altKey||e.metaKey)
{return true;}
var chars=(numOnly?"":"- ,./\()")+"0123456789",key=e.which||e.keyCode;var ok=(isSpecialKey(key)||(plusAllowed&&key==43&&o.value.indexOf('+')==-1)||(extAllowed&&key==120&&o.value.indexOf('x')==-1)||chars.indexOf(String.fromCharCode(key))>-1);if(!ok)
{preventDefaultEvent(e);}
return ok;}
function isSpecialKey(k)
{return("|"+[8,9,13,17,18,35,36,37,38,39].join("|")+"|").indexOf("|"+k+"|")>-1;}
function CustomSubmit(f,url,method,target)
{var a=f.action,t=f.target,m=f.method;f.action=url;f.target=$un==typeof(target)?t:target;f.method=method;f.submit();f.action=a;f.target=t;f.method=m;return false;}
function pop(u,n,w,h,s,r)
{if($un==typeof(s))
{s=true;}
if($un==typeof(r))
{r=false;}
(window.open(u,n,"width="+w+",height="+h+",resizable="+(r?"yes":"no")+",scrollbars="+(s?"yes":"no"))).focus();}
function togSWF(v,p)
{$s.apply(this,$swf(p||null).concat(["visibility",v?"visible":"hidden"]));}
function $swf(p)
{return elByTag(p||$d.body,"OBJECT").concat(elByTag(p||$d.body,"EMBED"));}
function preload(s)
{try
{if($un==typeof(pre))
{pre=[];}
var img=new Image();img.src=s;pre.push(img);}
catch(e)
{}}
function PreLoadAnimations()
{var ba=["call.gif","call-2.gif","call-3.gif"];if(CallMgr.IsLoggedIn)
{ba.push("send_1.png","send_2.png","send_3.png","set_green_1.gif","set_green_2.gif","set_green_3.gif","set_orange_1.png","set_orange_2.png","set_orange_3.png");}
for(var i=0;i<ba.length;i++)
{preload("/images/en/"+ba[i]);}
var ia=["phone_1.gif","phone_2.gif","laeuten_1.gif","ruhend_2.gif","connect_call.gif","call_globe.gif","abheben_1.gif","laeuten_2.gif","abheben_2.gif","active_call.gif","auflegen_1.gif","besetzt_1.gif","besetzt_2.gif","auflegen_2.gif"];if(CallMgr.IsLoggedIn)
{ia.push("sms_1.gif","sms_2.gif","sms_call.gif");}
for(var i=0;i<ia.length;i++)
{preload("/images/animations/"+ia[i]);}}
function ShowLoader(css,container)
{var l='<div'+(null!=css?' class="'+css+'"':' style="margin:6px 0px;"')+' align="center"><div class="loading">loading</div></div>';if(container)
{return $html(container,l);}
else
{$d.write(l);}}
function LanguageMgr()
{this.timer=null;this.id="langlist";this.opened=false;}
LanguageMgr.prototype={Open:function()
{if(this.opened)
{return;}
$show(this.id);this.opened=true;fade(el(this.id),0,100,10,5,null);},Close:function()
{fade(el(this.id),100,0,10,5,(function(){$hide(this.id);this.opened=false;}).link(this));},MouseOut:function()
{if(this.opened)
{this.timer=this.Close.delay(500,this);}},MouseOver:function()
{if(null!=this.timer)
{window.clearTimeout(this.timer);this.timer=null;}}}
var LangMgr=new LanguageMgr();function ExecuteAjaxJS(t)
{var regex=new RegExp("<script[^>]*>(.*?)</scr"+"ipt>","gi"),res;while(res=regex.exec(t))
{try
{eval(RegExp.$1);}
catch(e)
{}}}
function CleanAjaxJS(t)
{return t.replace(new RegExp("<script[^>]*>(.*?)</scr"+"ipt>","gi"),"");}
function $msg(msg,typ,line,link,cont)
{var html=(line?'<div class="cboxline">&nbsp;</div>':'')+'<div class="content">{link}<table cellpadding="0" cellspacing="0" width="100%"><tr><td class="infoimg"><img src="/images/icons/{img}" width="25" height="25" alt="" /></td><td>'+(/^(error|e)$/.test(typ)?'<div class="jbx info"><div><div class="tl"><div class="tr"><div class="tm"></div></div></div></div><div class="ml"><div class="mr"><div style="padding: 2px 8px;" class="m">{msg}</div></div></div><div><div class="bl"><div class="br"><div class="bm"></div></div></div></div></div>':'<div class=\"infomsg\">{msg}</div>')+'</td></tr></table></div>',img;switch(typ)
{case"error":case"e":img="fehler.gif";break;case"jajah":case"j":img="jajah.gif";break;case"buddy":case"b":img="buddy.gif";break;case"info":case"i":default:img="hinweis.gif";break;}
var l="";if(null!=link&&""!=link)
{l='<div style="float:right;"><b class="bluebtn-li">&nbsp;</b><a href="{href}" class="bluebtnlink">{name}</a><b class="bluebtn-re">&nbsp;</b></div>'.replace(/\{href\}/g,link.href).replace(/\{name\}/g,link.name);}
html=html.replace(/\{msg\}/g,msg).replace(/\{img\}/g,img).replace(/\{link\}/g,l);if($un!=typeof(cont)&&null!=cont)
{cont=el(cont);cont.innerHTML=html;cont.style.display="";}
return html;}
function ExecuteWhenLoaded(requiredobj,call,t)
{var exist=false;t=t||250;try
{exist=$un!=typeof(eval(requiredobj));}
catch(e)
{}
if(!exist)
{ExecuteWhenLoaded.delay(t,null,requiredobj,call,t);}
else
{if(isFunction(call))
{call();}
else
{eval(call);}}}
function ExecuteWhenRendered(element,call)
{if(null==el(element))
{ExecuteWhenRendered.delay(250,null,element,call);}
else
{if(isFunction(call))
{call();}
else
{eval(call);}}}
function LoadScript(src,id)
{var script=el(id);if(null==script)
{script=create("SCRIPT");if($un!=id)
{script.id=id;}}
else if(src==script["relsrc"])
{return;}
script.src=src;script["relsrc"]=src;script.type="text/javascript";elByTag($d,"head")[0].appendChild(script);}
function AttachEvent(o,e,f)
{if("submit"==e)
{var f2=o.onsubmit;if(isFunction(f2))
{o.onsubmit=function(e){f2();f();};}
else
{o.onsubmit=f;}}
else if(o.addEventListener)
{o.addEventListener(e,f,false);}
else
{o.attachEvent("on"+e,f);}}
function DetachEvent(o,e,f)
{if(o.removeEventListener)
{o.removeEventListener(e,f,false);}
else
{o.detachEvent("on"+e,f);}}
function getEventSource(e)
{e=fixE(e);return e.target||e.srcElement;}
function preventDefaultEvent(e)
{e=fixE(e);e.returnValue=false;stopBubble(e);if(e.preventDefault)
{e.preventDefault();}
return false;}
function stopBubble(e)
{if(e.stopPropagation)
{e.stopPropagation();}
else if($un!=typeof(e.cancelBubble))
{e.cancelBubble=true;}}
function Notify(start,cid,nid)
{$notify=start;if(cid)
{notifyDefContent=cid;notifyArea=nid;}
if(start)
{DisLinks();$show(notifyArea);$hide(notifyDefContent);}
else if($un!=typeof(notifyArea))
{$hide(notifyArea);$show(notifyDefContent);}}
function DisLinks()
{var l=document.links;for(var i=0,len=l.length;i<len;i++)
{if($un!=typeof(l[i].defOnClick))
{continue;}
l[i].defOnClick=l[i].onclick;l[i].onclick=function()
{this.onclick=this.defOnClick;if(isFunction(this.onclick))
{Notify(false);return this.onclick();}}}}
function FadeManager()
{this.container=null;this.step=5;this.delay=20;this.pause=4000;this.index=0;this.texts=[];}
FadeManager.prototype={add:function(txt)
{this.texts.push(txt);},transform:function()
{this.index++;if(this.index>=this.texts.length)
{this.index=0;}
this.fadeOut();},fadeOut:function()
{fade(this.container,100,0,this.step,this.delay,(function(){this.fadeIn();}).link(this));},fadeIn:function()
{this.container.innerHTML=this.texts[this.index];fade(this.container,0,100,this.step,this.delay,(function(){this.transform.delay(this.pause,this)}).link(this));}};function fade(o,as,ae,st,t,cb)
{var na=as>ae?as-st:as+st;if(!isArray(o))
{o=[o];}
for(var i=0,len=o.length;i<len;i++)
{setOpacity(o[i],na);}
if((ae<as&&na<=ae)||(ae>as&&na>=ae))
{if(null!=cb)
{cb();}}
else
{fade.delay(t,this,o,na,ae,st,t,cb);}}
function setOpacity(o,val)
{o.style.opacity=(val/100);o.style.MozOpacity=(val/100);o.style.KhtmlOpacity=(val/100);o.style.filter="alpha(opacity="+val+")";return o;}
function ToolTipMgr()
{this.template='<div class="tl"><div class="tr"><div class="tm">%t%</div></div></div><div class="ml"><div class="mr"><div class="m">%h%</div></div></div><div class="bl"><div class="br"><div class="bm">%tip%</div></div></div>';this.list={};this.open=null;this.timer=null;}
ToolTipMgr.prototype={Cfg:function(title,html,parent,tip,size,fade)
{return{title:title,html:html,parent:parent,tip:tip,size:size,fade:fade};},Add:function(name,cfg)
{this.list[name]={title:cfg.title,html:cfg.html,parent:cfg.parent,tip:{show:cfg.tip?cfg.tip.show:false,xpos:cfg.tip?(cfg.tip.xpos?cfg.tip.xpos:null):null},size:cfg.size,fade:cfg.fade,obj:null};},Show:function(name,cfg)
{this.timer=(function(name,cfg)
{if(!this.list.hasKey(name))
{if(!cfg)
{return;}
this.Add(name,cfg);}
this.Draw(name);}).delay(300,this,name,cfg);},Hide:function(name)
{if(this.timer!=null)
{window.clearTimeout(this.timer);}
this.timer=(function(name)
{if(this.list.hasKey(name))
{var tt=this.list[name];if(tt.fade)
{fade(tt.obj,100,0,4,20,$hide.link(this,tt.obj));}
else
{$hide(tt.obj);}}}).delay(300,this,name);},Draw:function(name)
{if(!this.list.hasKey(name))
{return;}
var tt=this.list[name];if(null!=tt.obj)
{if(!isVisible(tt.obj))
{if(this.fade)
{setOpacity(tt.obj,0);}
$show(tt.obj);if(tt.fade)
{fade(tt.obj,0,100,4,20,null);}}
return;}
var n=$class(create("div"),"bln");n.innerHTML=this.template.replace(/%t%/,tt.title).replace(/%h%/,tt.html).replace(/%tip%/,tt.tip.show?'<div class="tip"'+(null!=tt.tip.xpos?' style="left:'+tt.tip.xpos+'px;"':'')+'></div>':'');if(tt.size)
{var s=GetKeys(tt.size);for(var k in s)
{n.style[s[k]]=tt.size[s[k]]+"px";}}
if(tt.tip.show)
{n.style.paddingBottom="12px";}
tt.obj=n;if(tt.fade)
{setOpacity(n,0);}
el(tt.parent).appendChild(n);if(tt.fade)
{fade(n,0,100,4,20,null);}
return n;}};var $TT=new ToolTipMgr();function TabStripMgr()
{this.tabsList=[0,0,0,0];this.regTab=function(ix)
{this.tabsList[ix]=1;};this.nextTab=function(ix)
{for(var i=ix+1,len=this.tabsList.length;i<len;++i)
{if(1==this.tabsList[i])
{return i;}}
return-1;};this.prevTab=function(ix)
{for(var i=ix-1;i>=0;--i)
{if(1==this.tabsList[i])
{return i;}}
return-1;};this.init=function()
{var tabObj;for(var i=0;i<4;++i)
{tabObj=el("mytab"+i+"x1");if(null!=tabObj)
{this.tabsList[i]=1;}}};}
function showMyTab(tabid)
{if(ClickOnTab==false&&tabid!=4)
{var str=document.cookie;ClickOnTab=true;if(str.indexOf("tabClick")<0)
{document.cookie="tabClick=true;Path=/members/";}}
if(tabid==myActiveTab)
{return;}
var c=elByTag("MyTabContainer","div");for(var i=0,len=c.length;i<len;i++)
{var id=c[i].id;if($un!=typeof(id)&&"MyTab"==id.substring(0,5))
{c[i].style.display=parseInt(id.substring(5,id.length))==tabid?"":"none";}}
if(myActiveTab>-1)
{if(myActiveTab>0&&-1!=TabStrip.prevTab(myActiveTab))
{$class("mytab"+TabStrip.prevTab(myActiveTab)+"x3","headtab2-r");}
$class("mytab"+myActiveTab+"x1","headtab2-l");$class("mytab"+myActiveTab+"x2","headtab2");$class("mytab"+myActiveTab+"x3","headtab2-r");$hide("tabText"+(myActiveTab+1));}
if(tabid>0&&-1!=TabStrip.prevTab(tabid))
{$class("mytab"+TabStrip.prevTab(tabid)+"x3","headtab2");}
$class("mytab"+tabid+"x1","headtab-l");$class("mytab"+tabid+"x2","headtab");$class("mytab"+tabid+"x3","headtab-r");$show("tabText"+(tabid+1));myActiveTab=tabid;}
function sealMe(sID)
{var div=el(sID);if(null!=div)
{var ifr=create("iframe"),q="?l="+$T("l","en");ifr.id=sID+"_seal2";ifr.width=100;ifr.height=72;ifr.scrolling="no";ifr.frameBorder="0";ifr.style.border="none";ifr.src=window.location.protocol+"//www.jajah.com/payment/verisign.html"+q;div.innerHTML="";div.appendChild(ifr);}}
function Modal()
{this.timer=null;this.modals=[];this.OnWinResize=this.onresize.link(this);this.bg="modalbg";this.useiframe=!!window.attachEvent;this.iframe=this.bg+"iframe";this.opacity=65;this.cache={};}
Modal.prototype={DefaultLayout:function(b,w)
{var m=$class(create("DIV"),"defmodal"),close=$html($class(create("DIV"),"close"),'<a href="#" onclick="$M.Close();return false;">Close</a>'),body=$s($html(create("DIV"),b),"padding","10px");if($un!=typeof w)
{$s(m,"width",w+"px");}
m.appendChild(close);m.appendChild(body);return m;},Create:function(body,fadein,replacelast)
{this.CreateBg();var b=create("DIV");$class(b,"modal");if("string"==typeof body)
{b.innerHTML=body;}
else
{b.appendChild(body);}
window.scrollTo(0,0);togSWF(false);if(this.modals.length>0)
{if(replacelast)
{this.RemoveLast();}
else
{$hide(this.modals[this.modals.length-1]);}}
else
{AttachEvent(window,"resize",this.OnWinResize);}
if($un==typeof fadein||fadein)
{$d.body.appendChild(setOpacity(b,0));fade(b,0,100,15,8,null);}
else
{$d.body.appendChild(b);}
this.modals.push(b);return this;},CreateBg:function()
{if(null!=el(this.bg))
{if(this.modals.length<1)
{this.onresize();}}
else
{var o=create("DIV"),s=getPageSize();o.id=this.bg;o.style.width=s.pw+"px";o.style.height=s.ph+"px";var o2=o.cloneNode(false);if(this.useiframe)
{var i=create("IFRAME");i.src="/blank.html";o2.id=this.iframe;o2.appendChild(i);$d.body.appendChild(setOpacity(o2,0));}
$d.body.appendChild(setOpacity(o,this.opacity));}},RemoveLast:function()
{var box=this.modals.pop();$swf(box).each(function(o){o.parentNode.removeChild(o);});box.parentNode.removeChild(box);},Close:function()
{this.RemoveLast();if(this.modals.length>0)
{$show(this.modals[this.modals.length-1]);}
else
{DetachEvent(window,"resize",this.OnWinResize);$hide(this.bg);$hide(this.iframe);togSWF(true);}},onresize:function()
{if(null!=this.timer)
{window.clearTimeout(this.timer);this.timer=null;}
var a=[el(this.iframe),el(this.bg)];if(null!=a[1])
{this.timer=(function()
{this.each($hide);(function()
{var s=getPageSize();for(var i=0;i<2;i++)
{if(null!=this[i])
{this[i].style.width=s.pw+"px";this[i].style.height=s.ph+"px";}}
this.each($show);}).delay(1,this);}).delay(50,a);}},Load:function(n,s)
{$X.Get($X.Url.Modal,"GetModal",{id:n,l:$T("l","en")},this.GetResult.link(this,n,s),false).Send();},GetResult:function(n,s,re,ok)
{if(ok)
{this.cache[n]=re;if(s)
{this.Show(n);}}},Show:function(n)
{var m;if(null==(m=this.cache[n]||null))
{return this.Load(n,true);}
this.Create(this.cache[n]);}};var $M=new Modal();function LoadCSS(src)
{var script=create("LINK");script.href=src;script.rel="stylesheet";script.type="text/css";elByTag($d,"head")[0].appendChild(script);}
function getPageSize(){var xScroll,yScroll,windowWidth,windowHeight;if(window.innerHeight&&window.scrollMaxY)
{xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}
else if($d.body.scrollHeight>$d.body.offsetHeight)
{xScroll=$d.body.scrollWidth;yScroll=$d.body.scrollHeight;}
else
{xScroll=$d.body.offsetWidth;yScroll=$d.body.offsetHeight;}
if(self.innerHeight)
{windowWidth=$d.documentElement.clientWidth?document.documentElement.clientWidth:self.innerWidth;windowHeight=self.innerHeight;}
else if($d.documentElement&&$d.documentElement.clientHeight)
{windowWidth=$d.documentElement.clientWidth;windowHeight=$d.documentElement.clientHeight;}
else if($d.body)
{windowWidth=$d.body.clientWidth;windowHeight=$d.body.clientHeight;}
return{pw:(xScroll<windowWidth?xScroll:windowWidth),ph:(yScroll<windowHeight?windowHeight:yScroll),ww:windowWidth,wh:windowHeight};}
try
{document.execCommand("BackgroundImageCache",false,true);}
catch(e)
{}
function BaseInit()
{var q=window.location.search.replace(/(\?l=[^&]*&?)|(&l=[^&]*)/,"");if(""!=q)
{elByTag("langlist","A").each
(function(a)
{a.href=a.search+"&"+q.substr(1);});}
elByTag("mainnav","A").each(function(a)
{AttachEvent(a,"mousedown",$press.link(a,a));});}
function $press(a)
{(function(){this.blur()}).delay(1,a);if(!$disabled(a))
{a.className="pressed";["mouseup","mouseout"].each(function(e)
{AttachEvent(this,e,$unpress.link(this));},a);}}
function $unpress()
{$class(this,"");}
function $disable(o)
{o=el(o);if(o.tagName=="A")
{o=o.parentNode;}
setOpacity(o,33);$class(elByTag(o,"A")[0],"btndisabled");}
function $disabled(a)
{return/btndisabled/i.test(a.className);}
function $enable(o)
{elByTag(o,"a").each(function(a)
{setOpacity(a.parentNode,100);$class(a,"");});}
function TZMgr(f,c,l)
{this.brOff=-new Date().getTimezoneOffset();this.usrOff=null;this.cont=c;this.list=l;this.first=!f;}
TZMgr.prototype={start:function()
{if(this.list!=null)
{this.usrOff=this.list.value;}
else
{this.usrOff=0;}
window.setInterval(this.timer.link(this),1000);},timer:function()
{if(this.cont!=null)
{var parsed=new Date(new Date().getTime()+(this.usrOff-this.brOff)*60000).toLocaleTimeString();this.cont.innerHTML=parsed.indexOf(" GMT")>-1?parsed.substr(0,parsed.indexOf(" GMT")):parsed;}},update:function(v)
{this.usrOff=v;this.timer();}};