var Try={these:function(){var returnValue;for(var i=0;i]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this)))scripts.push(script[1]);scripts=scripts.join('\n');if(scripts) (window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);}catch(e){}}});new function(){var b=navigator.userAgent.toLowerCase();browser={safari:/webkit/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b)};};var Event={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},pointerX:function(event){return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(event){return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))) element=element.parentNode;return element;},observers:false,_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer);}},unloadCache:function(){if(!Event.observers)return;for(var i=0;i0)||element.attachEvent)) name='keydown';this._observeAndCache(element,name,observer,useCapture);},stopObserving:function(element,name,observer,useCapture){var element=$(element);useCapture=useCapture||false;if(name=='keypress'&&((navigator.appVersion.indexOf('AppleWebKit')>0)||element.detachEvent)) name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element.detachEvent){element.detachEvent('on'+name,observer);}},isReady:false,readyList:[],onReady:function(fn){Event.readyList.push(fn);},ready:function(){if(!Event.isReady){Event.isReady=true;if(Event.readyList){Event.readyList.each(function(f){f.apply(document);});Event.readyList=null;} if(browser.mozilla||browser.opera) document.removeEventListener("DOMContentLoaded",Event.ready,false);}}};new function(){if(browser.mozilla||browser.opera) document.addEventListener("DOMContentLoaded",Event.ready,false);else if(browser.msie){document.write("<\/script>");var script=document.getElementById("__ie_init");if(script) script.onreadystatechange=function(){if(this.readyState!="complete")return;this.parentNode.removeChild(this);Event.ready();};script=null;}else if(browser.safari) var safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(safariTimer);safariTimer=null;Event.ready();}},10);else Event.observe(window,"load",Event.ready);} var XHR=new Class({options:{method:'post',async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:'utf-8',autoCancel:false,headers:{}},setTransport:function(){this.transport=Try.these(function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')},function(){return new XMLHttpRequest()})||false;return this;},initialize:function(options){this.setTransport().setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);} if(this.options.initialize)this.options.initialize.call(this);},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var status=0;try{status=this.transport.status;}catch(e){};if(this.options.isSuccess.call(this,status))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty;},isSuccess:function(status){return((status>=200)&&(status<300));},onSuccess:function(){this.response={'text':this.transport.responseText,'xml':this.transport.responseXML};this.fireEvent('onSuccess',[this.response.text,this.response.xml]);},onFailure:function(){this.fireEvent('onFailure',this.transport);},setHeader:function(name,value){this.headers[name]=value;return this;},send:function(url,data){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(data&&this.options.method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;} this.transport.open(this.options.method.toUpperCase(),url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=='post')&&this.transport.overrideMimeType) this.setHeader('Connection','close');_extend(this.headers,this.options.headers);for(var type in this.headers) try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};this.fireEvent('onRequest');this.transport.send(data||null);return this;},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent('onCancel');return this;}});XHR.implement(new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(url,options){this.addEvent('onSuccess',this.onComplete);this.setOptions(options);this.options.data=this.options.data||this.options.postBody;if(!['post','get'].contains(this.options.method)){this._method='_method='+this.options.method;this.options.method='post';} this.parent();this.setHeader('X-Requested-With','XMLHttpRequest');this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');this.url=url;},onComplete:function(){if(this.options.update)$(this.options.update).innerHTML=this.response.text;if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent('onComplete',[this.response.text,this.response.xml],20);},request:function(data){data=data||this.options.data;if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){try{var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this.response.text)))scripts.push(script[1]);scripts=scripts.join('\n');} if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);}catch(e){}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){};return null;}});var Effect={};Effect.Base=new Class({options:{transitions:function(pos){return(-Math.cos(pos*Math.PI)/2)+0.5;},duration:1,fps:10,onStart:Class.empty,onUpdate:Class.empty,onEnd:Class.empty},initialize:function(options){this.setOptions(options);this.startOn=new Date().getTime();this.finishOn=this.startOn+(this.options.duration*1000);this.fireEvent('onStart');this.timer=this.loop.periodical(this.options.fps,this);},set:function(){this.fireEvent('onUpdate',[1]);},loop:function(){var timePos=new Date().getTime();if(timePos>=this.finishOn){this.set();clearInterval(this.timer);this.timer=null;this.fireEvent('onEnd');return;} var pos=(timePos-this.startOn)/(this.finishOn-this.startOn);pos=this.options.transitions(pos);this.fireEvent('onUpdate',[pos]);}});Effect.Base.implement(new Events,new Options);function setStyle(elm,property){var type=_type(property);if(type=='object'){for(var prop in property)$(elm).style[prop]=property[prop];}} var includedFiles=new Array();function include(file,callback){includedFiles.push(file);ajaxReq('js/?f='+file,{method:'get'},callback);} function include_once(file,callback){if(includedFiles.indexOf(file)===-1){include(file,callback);return true;} return false;} function getLoadingHTML(element){return'
Loading . . .
Please wait
';} function ajaxReq(url,options,callback,fx){var req=function(){options=options||{};options.evalScripts=true;if(options.update&&options.preload)$(options.update).innerHTML=getLoadingHTML(options.update);var ajax=new Ajax(url,options);ajax.addEvent('onComplete',function(r){if(options.update&&($(options.update).id=='home_page'))window.scrollTo(0,0);if(fx)Shadow.hide();(callback||Class.empty)(r);});ajax.addEvent('onFailure',function(r){if(fx)Shadow.hide();});ajax.request();} fx?Shadow.show(req):req();} function ajaxload(element,url,callback){ajaxReq(url,{update:element,preload:true,method:'get'},callback);} function ajaxPost(element,url,body){ajaxReq(url,{update:element,data:body,method:body?'post':'get',preload:true});} function winAjaxLoad(url,title,width,body,callback){if(!zWindow)return false;zWindow.addEvent('onHide',function(){});ajaxReq(url,{data:body,method:body?'post':'get'},function(r){zWindow.setTitle(title).setBody(r).setWidth(width).show();window.scrollTo(0,0);});} function homepageLoad(title,zp,callback){$('other_homepage_modules').style.display='none';$('home_page_div').style.display='';try{elm=$('home_page');}catch(e){} ajaxReq(zp,{update:elm,preload:true,method:'get'},function(){initPageLink(null,$('home_page_div'));if(callback)callback();});if(title&&!title.isEmpty())$('home_page_header').innerHTML=title;window.scrollTo(0,0);} function doFormSubmit(id,url,body){ajaxReq(url,{update:id,data:body,method:body?'post':'get',preload:true});} function doFormSubmit_bytitle(id,title,url,body){$('other_homepage_modules').style.display='none';$('home_page_div').style.display='';ajaxReq(url,{update:id,data:body,method:body?'post':'get',preload:true});$('home_page_header').innerHTML=title;window.scrollTo(0,0);} function backToHomepage(){if(!window.location.href.match(new RegExp('^.*\/(index\.php)?(#.*)?$'))){window.location='index.php';return true;} $('other_homepage_modules').style.display='';$('home_page_div').style.display='none';window.location='#home';} var currentPage=new Array();function changePage(page,group,fix_height){try{if(parseInt($('section_'+page).style.height)!=(fix_height||0)) hideSection(page,false,fix_height);else showSection(page);}catch(e){return false;}} function showSection(page,not1st){var section=$('section_'+page);with(section){if(!not1st){style.display='';} style.height=offsetHeight+Math.ceil((scrollHeight-offsetHeight)/8)+'px';if(offsetHeightfix_height){if(section.showTimer){clearTimeout(section.showTimer);section.showTimer=0;} section.hideTimer=setTimeout('hideSection("'+page+'", true, '+fix_height+');',20);}else{section.hideTimer=0;section.style.height=fix_height+'px';}} function firstChild(elm){for(var i=0;i1){return new scrollMove(elm,(fChild.offsetHeight));}} function checkMail(email) {var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;var email_val=emailfilter.test(email);return!!email_val;} function show_message(msg,elm){alert(msg);try{if(elm.focus&&_type(elm.focus)=='function')elm.focus();}catch(e){}} function getOffset(obj,attr){var offset=0;while(obj){offset+=obj['offset'+attr];obj=obj.offsetParent;} return offset;} function getDirection(obj){var dir='ltr';while(obj){if(obj.style.direction!='')return obj.style.direction.toLowerCase();if(obj.dir!='')return obj.dir.toLowerCase();obj=obj.parentNode;} return dir;} function initPageLink(className,root){document.getElementsByClassName(className||'ajax_link',root||$('home_page_div')).each(function(link){if(link._addLinkEvent)return;link._addLinkEvent=true;Event.observe(link,'click',function(e){Event.stop(e);var hrf=link.href;if(hrf.indexOf('#')!=-1){location='#'+hrf.split('#')[1];}else{var linkTitle=link.getAttribute('title')||link.text||link.innerText||'none';if(hrf.length>1)homepageLoad(linkTitle,hrf);}});});} function inviteFriend(){var emails=$('friend_emails');var mail=$('member_email');var name=$('member_name');var rg=[{border:'1px solid green'},{border:'1px solid red'}];if(name.value==''){setStyle(name,rg[1]);name.focus();return false;}else setStyle(name,rg[0]);if(mail.value==''){setStyle(mail,rg[1]);mail.focus();alert(MailInvalidMsg);return false;}else if(!checkMail(mail.value)){setStyle(mail,rg[1]);mail.focus();alert(MailInvalidMsg);return false;}else setStyle(mail,rg[0]);try{var comSp=emails.value.split(",");}catch(e){var comSp=[];} var insertEmails=[];if(comSp.length<1) {setStyle(emails,rg[1]);emails.focus();return false;} for(var i=0;i1){this.checkHash.periodical(this.options.hashCheck,this);this.addEvent('onChangeHash',this.parseHash.bind(this));} return this;}});Url.implement(new Events,new Options); Event.onReady(mladdevents);function mladdevents(){if(window.mlrunShim==true){var Iframe=document.createElement("iframe");Iframe.setAttribute("src","about:blank");Iframe.setAttribute("scrolling","no");Iframe.setAttribute("frameBorder","0");Iframe.style.zIndex="2";Iframe.style.filter='alpha(opacity=0)';} var effects_a=new Array();var divs=document.getElementsByTagName('div');for(var j=0;j0){lis[i].className+='haschild';if(divs[j].className.indexOf('arrow')!=-1){if(divs[j].className.indexOf('vertical')!=-1||lis[i].parentNode.parentNode.nodeName!='DIV'){} else{}} else if(divs[j].className.indexOf('plus')!=-1){}} else{if(divs[j].className.indexOf('arrow')!=-1){}} var uls=lis[i].getElementsByTagName('ul');for(var k=0;k