function callDDiv(atobj, dom_name, detailed,cl){
self.onClick=null;
var oDiv = document.getElementById('contdiv');
oDiv.style.visibility = 'visible';
var oAtobj = document.getElementById(atobj);
oDiv.style.left = GetXof(oAtobj);
oDiv.style.top = GetYof(oAtobj);
ajaxDo('/admoutputonly.php?act=informer&op=domain&closecode=hideCDiv%28%29&dom_name='+dom_name+'&cl='+cl+'&dshow='+detailed,'contdiv','GET',0,0);
self.onClick=hideCDiv;
}
function callCDiv(atobj, cname){
self.onClick=null;
var oDiv = document.getElementById('contdiv');
oDiv.style.visibility = 'visible';
var oAtobj = document.getElementById(atobj);
oDiv.style.left = GetXof(oAtobj);
oDiv.style.top = GetYof(oAtobj);
ajaxDo('/admoutputonly.php?act=informer&op=contact&closecode=hideCDiv%28%29&cont='+cname,'contdiv','GET',0,0);
self.onClick=hideCDiv;
}
function hideCDiv(){
self.onClick=null;
var oDiv = document.getElementById('contdiv');
oDiv.style.visibility = 'hidden';
}
function cfCheckLogin(ogID){
var re = /^[a-z][0-9a-z]{5,11}$/i
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckPw(ogID){
var re = /^.{6,}$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckPhone(ogID){
var re = /^\+[0-9]{1,3}\.[0-9]{10,19}$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckName(ogID){
var re = /^([_0-9A-Za-z,\.\"`\/\'-]+[ ]+)+([_0-9A-Za-z,\.\"`\/\'-]+)[ ]*$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckAlfaNE(ogID){
var re = /^([_0-9A-Za-z,\.\"`\/\'-]+)([_0-9A-Za-z,\.\"`\/\' -]*)$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckAlfaE(ogID){
var re = /^[_0-9A-Za-z,\.\"`\/\' -]*$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckNumNE(ogID){
var re = /^[0-9]+$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckNumE(ogID){
var re = /^[0-9]*$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckAlfaNEru(ogID){
var re = /^([_0-9A-Za-zÀ-ßà-ÿ,\.\"`\/\'-]+[ ]+)+([_0-9A-Za-zÀ-ßà-ÿ,\.\"`\/\'-]+)[ ]*$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckAlfaEru(ogID){
var re = /^[_0-9A-Za-zÀ-ßà-ÿ,\.\"`\/\' -]*$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
function cfCheckEmail(ogID){
var re = /^[_0-9A-Za-z\.-]+@[_0-9A-Za-z\.-]+\.[_0-9A-Za-z\.-]{2,}$/
oinp = document.getElementById('confitem'+ogID);
oaux = document.getElementById('confitemaux'+ogID);
var result = re.test(oinp.value) ? 'aff_tick.gif' : 'aff_cross.gif';
var resultcomment = re.test(oinp.value) ? 'ÏÐÀÂÈËÜÍÎ' : 'ÍÅÂÅÐÍÎ';
oaux.innerHTML='
';
}
//////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Transliteration
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
var abc1 = new Array();
abc1['à'] = 'a';
abc1['á'] = 'b';
abc1['â'] = 'v';
abc1['ã'] = 'g';
abc1['ä'] = 'd';
abc1['å'] = 'e';
abc1['¸'] = 'jo';
abc1['æ'] = 'zh';
abc1['ç'] = 'z';
abc1['è'] = 'i';
abc1['é'] = 'j';
abc1['ê'] = 'k';
abc1['ë'] = 'l';
abc1['ì'] = 'm';
abc1['í'] = 'n';
abc1['î'] = 'o';
abc1['ï'] = 'p';
abc1['ð'] = 'r';
abc1['ñ'] = 's';
abc1['ò'] = 't';
abc1['ó'] = 'u';
abc1['ô'] = 'f';
abc1['õ'] = 'h';
abc1['ö'] = 'c';
abc1['÷'] = 'ch';
abc1['ø'] = 'sh';
abc1['ù'] = 'w';
abc1['ú'] = '#';
abc1['û'] = 'y';
abc1['ü'] = '\'';
abc1['ý'] = 'je';
abc1['þ'] = 'ju';
abc1['ÿ'] = 'ja';
abc1['À'] = 'A';
abc1['Á'] = 'B';
abc1['Â'] = 'V';
abc1['Ã'] = 'G';
abc1['Ä'] = 'D';
abc1['Å'] = 'E';
abc1['¨'] = 'JO';
abc1['Æ'] = 'ZH';
abc1['Ç'] = 'Z';
abc1['È'] = 'I';
abc1['É'] = 'J';
abc1['Ê'] = 'K';
abc1['Ë'] = 'L';
abc1['Ì'] = 'M';
abc1['Í'] = 'N';
abc1['Î'] = 'O';
abc1['Ï'] = 'P';
abc1['Ð'] = 'R';
abc1['Ñ'] = 'S';
abc1['Ò'] = 'T';
abc1['Ó'] = 'U';
abc1['Ô'] = 'F';
abc1['Õ'] = 'H';
abc1['Ö'] = 'C';
abc1['×'] = 'CH';
abc1['Ø'] = 'SH';
abc1['Ù'] = 'W';
abc1['Ú'] = '##';
abc1['Û'] = 'Y';
abc1['Ü'] = '\'\'';
abc1['Ý'] = 'JE';
abc1['Þ'] = 'JU';
abc1['ß'] = 'JA';
function translatechartolatin(symb)
{
return abc1[symb]?abc1[symb]:symb;
}
function translateStringtoLatin(txt)
{
txtnew="";
var symb = "";
for (kk=0;kk, MIT Style License.
var MooTools={version:'1.11'};function $defined(obj){return(obj!=undefined);};function $type(obj){if(!$defined(obj))return false;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;};function $merge(){var mix={};for(var i=0;i-1:this.indexOf(string)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');}});Array.extend({rgbToHex:function(array){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);}
return array?hex:'#'+hex.join('');},hexToRgb:function(array){if(this.length!=3)return false;var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));}
return array?rgb:'rgb('+rgb.join(',')+')';}});Function.extend({create:function(options){var fn=this;options=$merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if($chk(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($pick(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();};},pass:function(args,bind){return this.create({'arguments':args,'bind':bind});},attempt:function(args,bind){return this.create({'arguments':args,'bind':bind,'attempt':true})();},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})();}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn){for(var i=0;i';}
el=document.createElement(el);}
el=$(el);return(!props||!el)?el:el.set(props);}});var Elements=new Class({initialize:function(elements){return(elements)?$extend(elements,this):this;}});Elements.extend=function(props){for(var prop in props){this.prototype[prop]=props[prop];this[prop]=$native.generic(prop);}};function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false;}
if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el);};document.getElementsBySelector=document.getElementsByTagName;function $$(){var elements=[];for(var i=0,j=arguments.length;i0&&fKey<13)this.key='f'+fKey;}
this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else if(this.type.test(/(click|mouse|menu)/)){this.page={'x':event.pageX||event.clientX+document.documentElement.scrollLeft,'y':event.pageY||event.clientY+document.documentElement.scrollTop};this.client={'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,'y':event.pageY?event.pageY-window.pageYOffset:event.clientY};this.rightClick=(event.which==3)||(event.button==2);switch(this.type){case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;}
this.fixRelatedTarget();}
return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Element.Methods.Events={addEvent:function(type,fn){this.$events=this.$events||{};this.$events[type]=this.$events[type]||{'keys':[],'values':[]};if(this.$events[type].keys.contains(fn))return this;this.$events[type].keys.push(fn);var realType=type;var custom=Element.Events[type];if(custom){if(custom.add)custom.add.call(this,fn);if(custom.map)fn=custom.map;if(custom.type)realType=custom.type;}
if(!this.addEventListener)fn=fn.create({'bind':this,'event':true});this.$events[type].values.push(fn);return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;},removeEvent:function(type,fn){if(!this.$events||!this.$events[type])return this;var pos=this.$events[type].keys.indexOf(fn);if(pos==-1)return this;var key=this.$events[type].keys.splice(pos,1)[0];var value=this.$events[type].values.splice(pos,1)[0];var custom=Element.Events[type];if(custom){if(custom.remove)custom.remove.call(this,fn);if(custom.type)type=custom.type;}
return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;},addEvents:function(source){return Element.setMany(this,'addEvent',source);},removeEvents:function(type){if(!this.$events)return this;if(!type){for(var evType in this.$events)this.removeEvents(evType);this.$events=null;}else if(this.$events[type]){this.$events[type].keys.each(function(fn){this.removeEvent(type,fn);},this);this.$events[type]=null;}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},cloneEvents:function(from,type){if(!from.$events)return this;if(!type){for(var evType in from.$events)this.cloneEvents(from,evType);}else if(from.$events[type]){from.$events[type].keys.each(function(fn){this.addEvent(type,fn);},this);}
return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({'mouseenter':{type:'mouseover',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);}},'mouseleave':{type:'mouseout',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);}},'mousewheel':{type:(window.gecko)?'DOMMouseScroll':'mousewheel'}});Element.NativeEvents=['click','dblclick','mouseup','mousedown','mousewheel','DOMMouseScroll','mouseover','mouseout','mousemove','keydown','keypress','keyup','load','unload','beforeunload','resize','move','focus','blur','change','submit','reset','select','error','abort','contextmenu','scroll'];Function.extend({bindWithEvent:function(bind,args){return this.create({'bind':bind,'arguments':args,'event':Event});}});Elements.extend({filterByTag:function(tag){return new Elements(this.filter(function(el){return(Element.getTag(el)==tag);}));},filterByClass:function(className,nocash){var elements=this.filter(function(el){return(el.className&&el.className.contains(className,' '));});return(nocash)?elements:new Elements(elements);},filterById:function(id,nocash){var elements=this.filter(function(el){return(el.id==id);});return(nocash)?elements:new Elements(elements);},filterByAttribute:function(name,operator,value,nocash){var elements=this.filter(function(el){var current=Element.getProperty(el,name);if(!current)return false;if(!operator)return true;switch(operator){case'=':return(current==value);case'*=':return(current.contains(value));case'^=':return(current.substr(0,value.length)==value);case'$=':return(current.substr(current.length-value.length)==value);case'!=':return(current!=value);case'~=':return current.contains(value,' ');}
return false;});return(nocash)?elements:new Elements(elements);}});function $E(selector,filter){return($(filter)||document).getElement(selector);};function $ES(selector,filter){return($(filter)||document).getElementsBySelector(selector);};$$.shared={'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,'xpath':{getParam:function(items,context,param,i){var temp=[context.namespaceURI?'xhtml:':'',param[1]];if(param[2])temp.push('[@id="',param[2],'"]');if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');if(param[4]){if(param[5]&¶m[6]){switch(param[5]){case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;case'=':temp.push('[@',param[4],'="',param[6],'"]');break;case'!=':temp.push('[@',param[4],'!="',param[6],'"]');}}else{temp.push('[@',param[4],']');}}
items.push(temp.join(''));return items;},getItems:function(items,context,nocash){var elements=[];var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,j=xpath.snapshotLength;i<\/script>');$('ie_ready').onreadystatechange=function(){if(this.readyState=='complete')domReady();};}}else{window.addListener("load",domReady);document.addListener("DOMContentLoaded",domReady);}}};window.onDomReady=function(fn){return this.addEvent('domready',fn);};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft;},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{'size':{'x':this.getWidth(),'y':this.getHeight()},'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}};},getPosition:function(){return{'x':0,'y':0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(p){return-(Math.cos(Math.PI*p)-1)/2;},duration:500,unit:'px',wait:true,fps:50},initialize:function(options){this.element=this.element||null;this.setOptions(options);if(this.options.initialize)this.options.initialize.call(this);},step:function(){var time=$time();if(time=(7-4*a)/11){value=-Math.pow((11-6*a-11*p)/4,2)+b*b;break;}}
return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});Fx.Transitions.compat(transition);});var Drag={};Drag.Base=new Class({options:{handle:false,unit:'px',onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:'left',y:'top'},grid:false,snap:6},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.handle=$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.bound={'start':this.start.bindWithEvent(this),'check':this.check.bindWithEvent(this),'drag':this.drag.bindWithEvent(this),'stop':this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this);},attach:function(){this.handle.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handle.removeEvent('mousedown',this.bound.start);return this;},start:function(event){this.fireEvent('onBeforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=0;i<2;i++){if($chk(limit[z][i]))this.limit[z][i]=($type(limit[z][i])=='function')?limit[z][i]():limit[z][i];}}}
if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};document.addListener('mousemove',this.bound.check);document.addListener('mouseup',this.bound.stop);this.fireEvent('onStart',this.element);event.stop();},check:function(event){var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){document.removeListener('mousemove',this.bound.check);document.addListener('mousemove',this.bound.drag);this.drag(event);this.fireEvent('onSnap',this.element);}
event.stop();},drag:function(event){this.out=false;this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];this.out=true;}else if($chk(this.limit[z][0])&&(this.value.now[z]el.left&&now.xel.top);},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent('drop',[this.element,this]);else this.element.fireEvent('emptydrop',this);this.parent();return this;}});Element.extend({makeDraggable:function(options){return new Drag.Move(this,options);}});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=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):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]);this.callChain();},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($pick(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 Chain,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).empty().setHTML(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;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':data=Object.toQueryString(data);}
if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/