Object.extend=function(_1,_2,_3){for(prop in _2){if(_3==false&&_1[prop]!=null){continue;}_1[prop]=_2[prop];}return _1;};Object.extend(Function.prototype,{apply:function(o,a){var r,x="__fapply";if(typeof o!="object"){o={};}o[x]=this;var s="r = o."+x+"(";for(var i=0;i0){s+=",";}s+="a["+i+"]";}s+=");";eval(s);delete o[x];return r;},bind:function(o){if(!Function.__objs){Function.__objs=[];Function.__funcs=[];}var _a=o.__oid;if(!_a){Function.__objs[_a=o.__oid=Function.__objs.length]=o;}var me=this;var _c=me.__fid;if(!_c){Function.__funcs[_c=me.__fid=Function.__funcs.length]=me;}if(!o.__closures){o.__closures=[];}var _d=o.__closures[_c];if(_d){return _d;}o=null;me=null;return Function.__objs[_a].__closures[_c]=function(){return Function.__funcs[_c].apply(Function.__objs[_a],arguments);};}},false);Object.extend(Array.prototype,{push:function(o){this[this.length]=o;},addRange:function(_f){if(_f.length>0){for(var i=0;i<_f.length;i++){this.push(_f[i]);}}},clear:function(){this.length=0;return this;},shift:function(){if(this.length==0){return null;}var o=this[0];for(var i=0;i");}}if(window.frames&&window.frames[_2b]){this.iframe=window.frames[_2b];}this.iframe.name=_2b;this.iframe.document.open();this.iframe.document.write("");this.iframe.document.close();}this.method=_28;this.url=url;this.async=_2a;},setRequestHeader:function(_2d,_2e){for(var i=0;i=0){tag="textarea";}if(doc.all){ele=doc.createElement("<"+tag+" name=\""+_34+"\" />");}else{ele=doc.createElement(tag);ele.setAttribute("name",_34);}ele.setAttribute("value",_35);_33.appendChild(ele);ele=null;},send:function(_38){if(this.iframe==null){return;}var doc=this.iframe.contentDocument||this.iframe.document;var _3a=doc.createElement("form");doc.body.appendChild(_3a);_3a.setAttribute("action",this.url);_3a.setAttribute("method",this.method);_3a.setAttribute("enctype","application/x-www-form-urlencoded");for(var i=0;i=" "){if(c=="\\"||c=="\""){v.push("\\");}v.push(c);}else{switch(c){case "\n":v.push("\\n");break;case "\r":v.push("\\r");break;case "\b":v.push("\\b");break;case "\f":v.push("\\f");break;case "\t":v.push("\\t");break;default:v.push("\\u00");v.push(c.charCodeAt().toString(16));}}}return "\""+v.join("")+"\"";case Array:var v=[];for(var i=0;i0){return "{"+v.join(",")+"}";}return "{}";}return o.toString();}},dispose:function(){if(AjaxPro.queue!=null){AjaxPro.queue.dispose();}}},false);addEvent(window,"unload",AjaxPro.dispose);AjaxPro.Request=function(url){this.url=url;this.xmlHttp=null;};AjaxPro.Request.prototype={url:null,callback:null,onLoading:AjaxPro.noOperation,onError:AjaxPro.noOperation,onTimeout:AjaxPro.noOperation,onStateChanged:AjaxPro.noOperation,args:null,context:null,isRunning:false,abort:function(){if(this.timeoutTimer!=null){clearTimeout(this.timeoutTimer);}if(this.xmlHttp){this.xmlHttp.onreadystatechange=AjaxPro.noOperation;this.xmlHttp.abort();}if(this.isRunning){this.isRunning=false;this.onLoading(false);}},dispose:function(){this.abort();},getEmptyRes:function(){return {error:null,value:null,request:{method:this.method,args:this.args},context:this.context,duration:this.duration};},endRequest:function(res){this.abort();if(res.error!=null){this.onError(res.error,this);}if(typeof this.callback=="function"){this.callback(res,this);}},mozerror:function(){if(this.timeoutTimer!=null){clearTimeout(this.timeoutTimer);}var res=this.getEmptyRes();res.error={Message:"Unknown",Type:"ConnectFailure",Status:0};this.endRequest(res);},doStateChange:function(){this.onStateChanged(this.xmlHttp.readyState,this);if(this.xmlHttp.readyState!=4||!this.isRunning){return;}this.duration=new Date().getTime()-this.__start;if(this.timeoutTimer!=null){clearTimeout(this.timeoutTimer);}var res=this.getEmptyRes();if(this.xmlHttp.status==200&&this.xmlHttp.statusText=="OK"){res=this.createResponse(res);}else{res=this.createResponse(res,true);res.error={Message:this.xmlHttp.statusText,Type:"ConnectFailure",Status:this.xmlHttp.status};}this.endRequest(res);},createResponse:function(r,_4b){if(!_4b){var _4c=new String(this.xmlHttp.responseText);if(AjaxPro.cryptProvider!=null&&typeof AjaxPro.cryptProvider=="function"){_4c=AjaxPro.cryptProvider.decrypt(_4c);}if(this.xmlHttp.getResponseHeader("Content-Type")=="text/xml"){r.value=this.xmlHttp.responseXML;}else{if(_4c!=null&&_4c.trim().length>0){r.json=_4c;eval("r.value = "+_4c+"*/");}}}return r;},timeout:function(){this.duration=new Date().getTime()-this.__start;var r=this.onTimeout(this.duration,this);if(typeof r=="undefined"||r!=false){this.abort();}else{this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);}},invoke:function(_4e,_4f,_50,_51){this.__start=new Date().getTime();if(this.xmlHttp==null){this.xmlHttp=new XMLHttpRequest();}this.isRunning=true;this.method=_4e;this.args=_4f;this.callback=_50;this.context=_51;var _52=typeof _50=="function"&&_50!=AjaxPro.noOperation;if(_52){if(MS.Browser.isIE){this.xmlHttp.onreadystatechange=this.doStateChange.bind(this);}else{this.xmlHttp.onload=this.doStateChange.bind(this);this.xmlHttp.onerror=this.mozerror.bind(this);}this.onLoading(true);}var _53=AjaxPro.toJSON(_4f)+"";if(AjaxPro.cryptProvider!=null){_53=AjaxPro.cryptProvider.encrypt(_53);}this.xmlHttp.open("POST",this.url,_52);this.xmlHttp.setRequestHeader("Content-Type","text/plain; charset=utf-8");this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Method",_4e);if(AjaxPro.token!=null&&AjaxPro.token.length>0){this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Token",AjaxPro.token);}if(!MS.Browser.isIE){this.xmlHttp.setRequestHeader("Connection","close");}this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);try{this.xmlHttp.send(_53);}catch(e){}if(!_52){return this.createResponse({error:null,value:null});}return true;}};AjaxPro.RequestQueue=function(_54){this.queue=[];this.requests=[];this.timer=null;if(isNaN(_54)){_54=2;}for(var i=0;i<_54;i++){this.requests[i]=new AjaxPro.Request();this.requests[i].callback=function(res){var r=res.context;res.context=r[3][1];r[3][0](res,this);};this.requests[i].callbackHandle=this.requests[i].callback.bind(this.requests[i]);}};AjaxPro.RequestQueue.prototype={process:function(){this.timer=null;if(this.queue.length==0){return;}for(var i=0;i0;i++){if(this.requests[i].isRunning==false){var r=this.queue.shift();this.requests[i].url=r[0];this.requests[i].onLoading=r[3].length>2&&r[3][2]!=null&&typeof r[3][2]=="function"?r[3][2]:AjaxPro.onLoading;this.requests[i].onError=r[3].length>3&&r[3][3]!=null&&typeof r[3][3]=="function"?r[3][3]:AjaxPro.onError;this.requests[i].onTimeout=r[3].length>4&&r[3][4]!=null&&typeof r[3][4]=="function"?r[3][4]:AjaxPro.onTimeout;this.requests[i].onStateChanged=r[3].length>5&&r[3][5]!=null&&typeof r[3][5]=="function"?r[3][5]:AjaxPro.onStateChanged;this.requests[i].invoke(r[1],r[2],this.requests[i].callbackHandle,r);r=null;}}if(this.queue.length>0&&this.timer==null){this.timer=setTimeout(this.process.bind(this),10);}},add:function(url,_5b,_5c,e){this.queue.push([url,_5b,_5c,e]);if(this.timer==null){this.timer=setTimeout(this.process.bind(this),1);}},abort:function(){this.queue.length=0;if(this.timer!=null){clearTimeout(this.timer);}this.timer=null;for(var i=0;i35?String.fromCharCode(c+29):c.toString(36))};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('g=1s a(){j.V=a(6,H){q e=$6(6).e;e.H=e.13=e.14=H/N;e.1k="V(H="+H+")"};j.15=a(6){q u=["b","n","O","D","h"],r=u.P;R(r--)F($6(6).g[u[r]])};j.h=a(6,e,f,o,l,c){o=g.h$(o);F($6(6).g.h);6.g.h=z(a(){q h=g.h$(f),r=3;R(r--)h[r]=$o(h[r],o[r],l);6.e[e]=f=g.$h(h);k(""+h==""+o)$c(6,"h",c)},1)};j.W=a(6,f,o,c,8){a $c(p,c){k(c)c.G(6,p);m X};q 7=$6(6).g.W;g.$E(6,"B",a(p){7.f=19;7.B=d.B;7.v=d.v;d.v=6.v;d.B=$c;m $c(p,f)});g.$E(6,"v",a(p){7.f=X;d.B=7.B;d.v=7.v;m $c(p,o)});g.$E(d,"1c",a(p){q x=p.1d,y=p.10,b={x:x-7.x,y:y-7.y};k(7.f){k(8){b.x=C(b.x,8.$x);b.y=C(b.y,8.$y);b.x=A(b.x,8.x$);b.y=A(b.y,8.y$)};g.8(6,b);$c(p,c)}17{7.x=x-6.T;7.y=y-6.U};m X})};j.D=a(6,f,o,l,c){F($6(6).g.D);6.g.D=z(a(){f=$o(f,o,l);g.V(6,f);k(f==o)$c(6,"D",c)},1)};j.O=a(6,8,l,c){q f=g.$8($6(6));$z(6,"O",l/N,f,8,["x","y"],"8",c)};j.8=a(6,8){q e=$6(6).e;e.8="1h";e.1i=8.x+"M";e.1j=8.y+"M"};j.n=a(6,l,c){a n(8){m d.J?d.J[8]:d.K[8]};q f=g.$n(),o={x:f.x,y:A(g.$8(6).y,C(n("Y"),d.K.Y)-A(n("Z"),d.K.Z))};$z($6(g),"n",l/N,f,o,["x","y"],"n$",c?a(){c.G(6)}:1r)};j.b=a(6,b,l,c){q f=g.$b($6(6)),7=w.1l;k(!/1m/i.1n(1o.1p)||(7&&I(7.1q())>=9)){k(b.$t)f.t-=b.$t;k(b.$s)f.s-=b.$s;k(b.t$)b.t-=b.t$;k(b.s$)b.s-=b.s$};6.e.1t="1u";$z(6,"b",l/N,f,b,["t","s"],"b$",c)};j.$h=a(h){a 7(r){q 7=h[r].1w(16);m 7.P==1?"0"+7:7};m"#"+7(0)+7(1)+7(2)};j.h$=a(h){a 7(r){m h.1x(r)};h=h.1y(1);k(h.P==3)h=7(0)+7(0)+7(1)+7(1)+7(2)+7(2);m[I(7(0)+7(1),16),I(7(2)+7(3),16),I(7(4)+7(5),16)]};j.$E=a(6,7,c){q Q=6[7];6[7]=a(p){k(!p)p=w.E;k(Q)Q.G(j,p);m c.G(j,p)}};j.$8=a(6){q 8={x:6.T,y:6.U};R(6=6.12){8.x+=6.T;8.y+=6.U};m 8};j.$n=a(){a n(8,n){m(d.J?d.J[8]:w[n]||d.K[8])||0};m{x:n("18","1a"),y:n("1b","1e")}};j.n$=a(6,8){w.1f(8.x,8.y)};j.$b=a(6){m{t:6.1g,s:6.Y}};j.b$=a(6,b){q e=6.e;e.t=b.t+"M";e.s=b.s+"M"};a $c(6,u,c){F(6.g[u]);k(c)c.G(6)};a $6(6){k(!6.g)6.g={h:0,W:{},D:0,O:0,n:0,b:0};m 6};a $o(x,y,l){m x"); document.getElementById("pnlMessages").style.display="block"; } } String.prototype.trim = function() { return this.replace(/^\s\s*/, '').replace(/\s\s*$/,''); }; var G_Summary=null; function InvalidateField(p,f,m) { if(document.getElementById(p+"_icon0")!=null) { document.getElementById(p+"_icon0").style.display=(f!=0?"none":"inline"); } if(document.getElementById(p+"_icon1")!=null) { document.getElementById(p+"_icon1").style.display=(f!=1?"none":"inline"); } if(document.getElementById(p+"_icon2")!=null) { document.getElementById(p+"_icon2").style.display=(f!=2?"none":"inline"); } if(G_Summary==null&&document.getElementById(p+"_msg")!=null) { document.getElementById(p+"_msg").setAttribute("class",(f==0?"ValidatorMessageError":"ValidatorMessageWarning")); document.getElementById(p+"_msg").setAttribute("className",(f==0?"ValidatorMessageError":"ValidatorMessageWarning")); document.getElementById(p+"_msg").style.display=(f==1?"none":"block"); document.getElementById(p+"_msg").innerHTML=" "+m; } else if(G_Summary!=null) { G_Summary+=m+"\n"; } if(document.getElementById(p)!=null) { document.getElementById(p).setAttribute("IsValid",f==1?"1":"0"); } return f; } function IsValid(f) { return document.getElementById(f).attributes["IsValid"]!=null&&document.getElementById(f).attributes["IsValid"].value=="1"; } function ValidateNickname(f) { var v=document.getElementById("nname").value.trim(); if(InvalidateField("nname",(v.toLowerCase()!="nickname"&&v.length>3&&v.length<21&&(/^[A-Za-z]+[A-Za-z0-9\-_]*$/).test(v))?1:0,"Nickname must be 4 to 20 characters and start with a letter")&&!f) { OW.Ajax.CheckNickname(v, function(r) { InvalidateField("nname",r.value?1:2,"This nickname is already in use"); } ); } } function ValidateEmail(f) { var v=document.getElementById("nemail").value.trim(); if(InvalidateField("nemail",((/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i).test(v)&&v.length<96)?1:0,"The email address you entered is invalid")&&!f) { OW.Ajax.CheckEmail(v, function(r) { InvalidateField("nemail",r.value?1:2,"This email is already in use"); } ); } } function ValidatePassword(f) { var v=document.getElementById("npassword").value.trim(); InvalidateField("npassword",(v.length>5&&v.length<21)?1:0,"Password must be 6 to 20 characters"); } function ValidatePassword2(f) { var v=document.getElementById("npassword2").value.trim(); if(InvalidateField("npassword2",(v.length>5&&v.length<21)?1:0,"Password must be 6 to 20 characters")) { InvalidateField("npassword2",v==document.getElementById("npassword").value.trim(),"Passwords do not match"); } } function ValidateCaptcha(f) { //(!isNaN(v)&&v>99999&&v<1000000) v.length==6 var v=parseInt(document.getElementById("ncpvalue").value.trim()); var v=document.getElementById("ncpvalue").value.trim(); InvalidateField("ncpvalue",(!isNaN(v)&&v>99999&&v<1000000)?1:0,"Please enter text as it appears on the image"); } var G_CAFree=true; function CreateAccount() { if(G_CAFree) { ValidateNickname(); ValidateEmail(); ValidatePassword(true); ValidatePassword2(true); ValidateCaptcha(true); if(IsValid("nname")&&IsValid("nemail")&&IsValid("npassword")&&IsValid("npassword2")&&IsValid("ncpvalue")) { G_CAFree=true; OW.Ajax.CreateAccount(document.getElementById("nname").value,document.getElementById("nemail").value,document.getElementById("npassword").value,document.getElementById("ncpkey").value,document.getElementById("ncpvalue").value,document.getElementById("nskey").value,document.getElementById("cpkey").value,CA_CB); } } } function CA_CB(r) { var error_obj=null; var msg=""; var error_flag=0; switch(parseInt(r.value[0])) { case -6: msg=("This email is already in use"); error_obj=document.getElementById("nemail"); error_flag=2; break; case -5: msg=("Password must be 6 to 20 characters"); error_obj=document.getElementById("npassword"); break; case -4: msg=("The email address you entered is invalid"); error_obj=document.getElementById("nemail"); break; case -3: msg=("Nickname must be 4 to 20 characters and start with a letter"); error_obj=document.getElementById("nname"); break; case -2: msg=("Please enter text as it appears on the image"); error_obj=document.getElementById("ncpvalue"); OW.Ajax.GetCaptchaCode( function(r) { document.getElementById("captcha").src="/scripts/captcha.aspx?t="+r.value+"&n=1"; document.getElementById("ncpkey").value=r.value; } ); break; case -1: msg=("This nickname is already in use"); error_obj=document.getElementById("nname"); error_flag=2; break; case 0: msg=("An error occured when creating an account. Please try again a bit later"); break; case 1: msg=("Your account has been successfully created. Thank you for your interest!"); createCookie("owaacct",r.value[1],8030); top.location.href=top.location.href; return; break; default: msg=("Unknown error. Please contact us for further assistance"); alert(r.value[0]); break; }; if(error_obj!=null) { G_CAFree=true; InvalidateField(error_obj.id,error_flag,msg); } else if(msg!="") { G_CAFree=true; JSVErrorFormErrorHandler(msg); } } function GoToEvent(i) { if(document.getElementById("pnlAccountRequired")!=null) { document.getElementById("pnlAccountRequired").style.display="block"; document.getElementById("pnlDescription").style.display="none"; } ShowCreateAccount(); top.location.href=top.location.href.replace("#ca","")+"#ca"; } function FindEvents() { OW.Ajax.GetEvents(document.getElementById("eventkeyword").value,FECB); } function FECB(r) { document.getElementById("pnlEvents").innerHTML=r.value; document.getElementById("pnlEvents").style.display="block"; } function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else expires="";document.cookie=name+"="+value+expires+"; path=/";}; function RemindPassword() { document.getElementById("fpflag").value="1"; document.getElementById("LoginForm").submit(); } var G_Tabs={"intros":Array("what","why","how")}; function ShowTab(g,t) { for(var i=0;i0&&(/^email of friend\s[1-5]/i).test(v)==false) { //v.toLowerCase().indexOf("friend ")==-1) { InvalidateField(o.id,((/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i).test(v)&&v.length<96)?1:0,"The email address you entered is invalid"); } else { InvalidateField(o.id,1,""); } } function TAF() { var ctrls=document.getElementsByName("taf"); var l=[]; for(var i=0;i-1||(v.length>0&&(/^email of friend\s[1-5]/i).test(v)==false&&(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i).test(v))) { l.push(v); } } if(l.length>0) { document.getElementById("tafemptylist").style.display="none"; OW.Ajax.NotifyFriends(l, function(r) { //alert(r); document.getElementById("tafsent").style.display=""; FlashBox(document.getElementById("tafsent")); var ctrls=document.getElementsByName("taf"); for(var i=0;i