var Try={these:function(){var returnValue;for(var i=0;i<arguments.length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
return returnValue;}};var _type=function(obj){if(!obj)return'null';if(obj.htmlElement)return'element';var type=typeof obj;if(type=='object'&&obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}}
if(type=='object'||type=='function'){switch(obj.constructor){case Array:return'array';case RegExp:return'regexp';case Class:return'class';}
if(typeof obj.length=='number'){if(obj.item)return'collection';if(obj.callee)return'arguments';}}
return type;};var _merge=function(){var mix={};for(var i=0;i<arguments.length;i++){for(var property in arguments[i]){var ap=arguments[i][property];var mp=mix[property];if(mp&&_type(ap)=='object'&&_type(mp)=='object')mix[property]=_merge(mp,ap);else mix[property]=ap;}}
return mix;};var _extend=function(){var args=arguments;if(!args[1])args=[this,args[0]];for(var property in args[1])args[0][property]=args[1][property];return args[0];};var _native=function(){for(var i=0,l=arguments.length;i<l;i++){arguments[i].extend=function(props){for(var prop in props){if(!this.prototype[prop])this.prototype[prop]=props[prop];if(!this[prop])this[prop]=_native.generic(prop);}};}};_native.generic=function(prop){return function(bind){return this.prototype[prop].apply(bind,Array.prototype.slice.call(arguments,1));};};var Class=function(properties){var klass=function(){return(arguments[0]!==null&&this.initialize&&_type(this.initialize)=='function')?this.initialize.apply(this,arguments):this;};_extend(klass,this);klass.prototype=properties;klass.constructor=Class;return klass;};Class.prototype={extend:function(properties){var proto=new this(null);for(var property in properties){var pp=proto[property];proto[property]=Class.Merge(pp,properties[property]);}
return new Class(proto);},implement:function(){for(var i=0,l=arguments.length;i<l;i++)_extend(this.prototype,arguments[i]);}};Class.empty=function(){};Class.Merge=function(previous,current){if(previous&&previous!=current){var type=_type(current);if(type!=_type(previous))return current;switch(type){case'function':var merged=function(){this.parent=arguments.callee.parent;return current.apply(this,arguments);};merged.parent=previous;return merged;case'object':return _merge(previous,current);}}
return current;};var Events=new Class({addEvent:function(type,fn){if(fn!=Class.empty){this.$events=this.$events||{};this.$events[type]=this.$events[type]||[];this.$events[type].include(fn);}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},removeEvent:function(type,fn){if(this.$events&&this.$events[type])this.$events[type].remove(fn);return this;}});var Options=new Class({setOptions:function(){this.options=_merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var option in this.options){if(_type(this.options[option]=='function')&&(/^on[A-Z]/).test(option))
this.addEvent(option,this.options[option]);}}
return this;}});function $getByMethod(method,tag,root){root=root?$(root):document.body;var n=[];if(_type(tag)=='array'){for(var i=0;i<tag.length;i++)
n=n.merge($A(root.getElementsByTagName(tag[i])),true);}else{n=$A(root.getElementsByTagName((tag&&_type(tag)=='string')?tag:'*'))}
return method?n.flatten().filter(function(i){return method(i);}):n.flatten();}
function $getByClass(klass,root,tag){var method=function(el){return $(el).hasClass(klass);};return $getByMethod(method,tag,root);}
document.getElementsByClassName=$getByClass;var Element={hasClass:function(klass){return String(this.className).indexOf(klass)!==-1;},addClass:function(klass){this.className+=' '+klass;return this;},removeClass:function(klass){var expr=new RegExp(' ?'+klass);this.className=this.className.replace(expr,'');return this;},replaceClass:function(klass1,klass2){this.className=this.className.replace(klass1,klass2);return this;},iAfter:function(e){var s;while(e=e['nextSibling'])if(e.nodeType==1){s=e;break;}
if(!s)this.parentNode.appendChild(this);else this.iBefore(n);return this;},iBefore:function(elm){this.parentNode.insertBefore(this,$(elm));return this;},getValue:function(){if(!this.tagName)return false;switch(this.tagName.toLowerCase()){case'select':var values=[];$A(this.options).each(function(option){if(option.selected)values.push(option.value||option.text);});return(this.multiple)?values:values[0];case'input':if(!(this.checked&&['checkbox','radio'].contains(this.type))&&!['hidden','text','password'].contains(this.type))break;case'textarea':return this.value;}
return false;},setHTML:function(html){this.innerHTML=html;return this;},setStyle:function(property){var type=_type(property);if(type=='object'){for(var prop in property)this.style[prop]=property[prop];}else if(arguments[1])this.style[property]=arguments[1];return this;},getPosition:function(overflown){var el=this,x=0,y=0;do{x+=el.offsetLeft||0;y+=el.offsetTop||0;el=el.offsetParent;}while(el);(overflown||[]).each(function(elm){x-=elm.scrollLeft||0;t-=elm.scrollTop||0;});return{'x':x,'y':y};},append:function(p){(p||document.body).appendChild(this);return this;},moveChildTo:function(e){while(this.childNodes.length>0){e.appendChild(this.childNodes[0]);}
return this;},hide:function(){return this.setStyle({'visibility':'hidden'});},show:function(){return this.setStyle({'visibility':'visible'});},alpha:function(c){return this.setStyle({opacity:c<=1?c:c/100});}};function $(el){var type=_type(el),elem;if(type=='string'){if(/^\:[a-z]/i.test(el))elem=document.createElement(el.replace(':','').toUpperCase());else elem=document.getElementById(el);}
else elem=el;try{if(elem.htmlElement)return elem;_extend(elem,Element);elem.htmlElement=true;}catch(e){}
return elem;};_native(Function,Array,String,Number);Function.extend({create:function(options){var fn=this;options=_merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if(!!options.arguments&&_type(options.arguments)!='array')options.arguments=[options.arguments];return function(event){var args;if(options.event){event=event||window.event;args=[(options.event===true)?event:new options.event(event)];if(options.arguments)args.extend(options.arguments);}
else args=options.arguments||arguments;var returns=function(){return fn.apply(options.bind||fn,args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)try{return returns();}catch(err){return false;};return returns();};},bind:function(bind,args){return this.create({'bind':bind,'arguments':args});},bindAsEventListener:function(bind,args){return this.create({'bind':bind,'event':true,'arguments':args});},delay:function(delay,bind,args){return this.create({'delay':delay,'bind':bind,'arguments':args})();},periodical:function(interval,bind,args){return this.create({'periodical':interval,'bind':bind,'arguments':args})();}});Array.extend({forEach:function(fn,bind){for(var i=0,j=this.length;i<j;i++)fn.call(bind,this[i],i,this);},filter:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))results.push(this[i]);}
return results;},map:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++)results[i]=fn.call(bind,this[i],i,this);return results;},every:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(!fn.call(bind,this[i],i,this))return false;}
return true;},some:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))return true;}
return false;},indexOf:function(item,from){var len=this.length;for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){if(this[i]===item)return i;}
return-1;},remove:function(item){var i=0;var len=this.length;while(i<len){if(this[i]===item){this.splice(i,1);len--;}else{i++;}}
return this;},copy:function(start,length){start=start||0;if(start<0)start=this.length+start;length=length||(this.length-start);var newArray=[];for(var i=0;i<length;i++)newArray[i]=this[start++];return newArray;},contains:function(item,from){return this.indexOf(item,from)!=-1;},include:function(item){if(!this.contains(item))this.push(item);return this;},extend:function(array){for(var i=0,j=array.length;i<j;i++)this.push(array[i]);return this;},merge:function(array){for(var i=0,l=array.length;i<l;i++)this.include(array[i]);return this;},flatten:function(once){var r=[];this.each(function(a){if(_type(a)=='array')r.merge(a.flatten(),!once);else r.push(a);});return r;},end:function(){return this[this.length-1];}});Array.prototype.each=Array.prototype.forEach;Array.each=Array.forEach;function $A(array){return Array.copy(array);};String.extend({trim:function(){return this.replace(/^ *(.*?) *$/,'$1');},isEmpty:function(){return this.trim().length<1;},evalScripts:function(){try{var script,scripts;scripts=[];var regexp=/<script[^>]*>([\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;i<Event.observers.length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null;}
Event.observers=false;},observe:function(element,name,observer,useCapture){var element=$(element);useCapture=useCapture||false;if(name=='keypress'&&((navigator.appVersion.indexOf('AppleWebKit')>0)||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){if(Event.isReady)return fn();Event.readyList.push(fn);}};new function(){var callReady=function(){if(Event.isReady)return;Event.isReady='loaded';Event.readyList.each(function(f){try{f();}catch(e){};});};if(document.addEventListener){document.addEventListener("DOMContentLoaded",callReady,null);}else if(browser.msie){document.write("<scr "+"ipt id=__ie_onload defer "+((location.protocol=="https:")?"src='javascript:void(0)'":"src=//0")+"><\/scr "+"ipt>");document.getElementById("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete")callReady();}}
window.onload=callReady;};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=/<script[^>]*>([\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 css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' '+s+' chrome':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js'];c=b.join(' ');h.className+=' '+c;return c;};css_browser_selector(navigator.userAgent);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'<table class="loading_progress" dir="ltr" width="100%"><tr><td align="center"><table cellpadding="5" style="font-size:11px"><tr><td><img src="'+skinPath+'images/indicator.gif" /></td><td><b>Loading . . .</b><br>Please wait</td></tr></table></td></tr></table>';}
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(window.onHomePageLoad)window.onHomePageLoad();});if(title&&!title.isEmpty())try{$('home_page_header').innerHTML=title}catch(e){};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},function(){initPageLink(null,$('home_page_div'));});$('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';if(window.onBackToHomePage)window.onBackToHomePage();}
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){className=className.replace(' hidded',' showing');style.display='';}
style.height=offsetHeight+Math.ceil((scrollHeight-offsetHeight)/8)+'px';if(offsetHeight<scrollHeight){if(section.hideTimer){clearTimeout(section.hideTimer);section.hideTimer=0;}
section.showTimer=setTimeout('showSection("'+page+'", true);',20);}else{section.showTimer=0;style.overflow='visible';style.height='';className=className.replace(' showing','');}}}
function hideSection(page,not1st,fix_height){fix_height=fix_height||0;var section=$('section_'+page);if(section.style.display=='none'){return;}
var tmph=section.offsetHeight;if(!not1st){section.className=' hidding';section.style.overflow='hidden';}
section.style.height=section.offsetHeight-Math.ceil(section.offsetHeight/8)+'px';if(browser=='gecko'&&document.documentElement.scrollHeight-(document.documentElement.scrollTop+document.documentElement.clientHeight)<section.offsetHeight)
{document.documentElement.scrollTop-=(tmph-section.offsetHeight);}
if(section.offsetHeight>fix_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';section.className=section.className.replace(' hidding',' hidded');}}
function firstChild(elm){for(var i=0;i<elm.childNodes.length;i++){if(elm.childNodes[i].nodeType==1)return elm.childNodes[i]}
return null;}
function scrollMove(elm,height){var self=this;this.event=new Events();this.move=function(el){new Effect.Base({duration:.8,onUpdate:function(pos){el.style.height=height-(pos*height)+'px';},onEnd:function(){elm.appendChild(el);el.style.height=height+'px';self.next();}});}
this.next=function(){var f=firstChild(elm);this.event.fireEvent('onNext',f);this.move.delay(3000,this,[f]);}
this.next();}
function initScroll(elm){var childs=[];for(var i=0;i<elm.childNodes.length;i++){if(elm.childNodes[i].nodeType==1)childs.push(elm.childNodes[i]);}
var fChild=childs[0];if(childs.length==1)elm.appendChild(fChild.cloneNode(true));elm.insertBefore(childs.end(),fChild);elm.style.top=-1*(fChild.offsetHeight)+'px';if(childs.length>1){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;var linkTitle=link.getAttribute('title')||link.text||link.innerText||'none';if(hrf.length>1)homepageLoad(linkTitle,hrf.split('#')[0]);});});}
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.trim()==''){setStyle(name,rg[1]);name.focus();alert(NameRequiredMsg);return false;}else setStyle(name,rg[0]);if(mail.value.trim()==''){setStyle(mail,rg[1]);mail.focus();alert(MailInvalidMsg);return false;}else if(!checkMail(mail.value.trim())){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;i<comSp.length;i++)
{try{insertEmails=insertEmails.concat(String(comSp[i]).split("\n"));}catch(e){continue;}}
var postEmail=[];for(var i=0;i<insertEmails.length;i++)
{insertEmails[i]=String(insertEmails[i]).replace(/^\s+/,'').replace(/\s+$/,'');if(!checkMail(insertEmails[i])){setStyle(emails,rg[1]);emails.focus();alert(MailInvalidMsg);return false;}
if(insertEmails[i].length<1){insertEmails.splice(i,1);continue;}
postEmail.push('mail[]='+insertEmails[i]);}
postEmail.push('name='+name.value);postEmail.push('email='+mail.value);ajaxPost($('send2F'),inite_location,postEmail.join('&'));}
var zWindow,Shadow,domReady;function onPageLoad(){domReady=true;setTimeout(function(){try{initPageLink(null,document);if($('fix_news_table'))initScroll($('fix_news_table'));}catch(e){}},1000);}
Event.onReady(onPageLoad);Array.extend({fill:function(c,f){for(var i=0;i<c;i++)this.push(f?f(i):i);return this;}});var Url=new Class({options:{hashCheck:100},initialize:function(options){this.setOptions(options);this.hash='';},checkHash:function(){var w=window,l=w.location;if(l.hash.isEmpty()&&!this.hash.isEmpty()){this.fireEvent('onEmptyHash');}
if(l.hash!=this.hash){this.hash=l.hash;this.fireEvent('onChangeHash');}},parseHash:function(){var hash=this.hash.replace('#','');for(var a in this.actionHash)
if(hash.match(new RegExp(a,'i'))){var r=[].fill(this.actionHash[a][1],function(i){return RegExp['$'+(i+1)];});this.actionHash[a][0].delay(50,null,r);break;}},parseAction:function(a){var r,c=0;while(r=/:([^\/])?/.exec(a)){var s='';c++;switch(r[1]){case'd':s='(\\d+)';break;case's':s='(\\w+)';break;default:c--;}
a=a.replace(r[0],s);}
return[a,c];},addAction:function(a,c){a=this.parseAction(a);if(!this.actionHash)this.actionHash={};this.actionHash[a[0]]=[c,a[1]];return this;},monitor:function(){if(this.options.hashCheck>1){this.checkHash.periodical(this.options.hashCheck,this);this.addEvent('onChangeHash',this.parseHash.bind(this));}
return this;}});Url.implement(new Events,new Options);