
var eventManager={events:new Array(),addEvent:function(eventnode,eventname,eventfunction,eventcapture)
{this.events.push(arguments);},registerEvent:function(eventnode,eventname,eventfunction,eventcapture)
{this.addEvent(eventnode,eventname,eventfunction,eventcapture);if(eventnode.addEventListener)
{eventnode.addEventListener(eventname,eventfunction,eventcapture);return true;}
else if(eventnode.attachEvent)
{var r=eventnode.attachEvent('on'+eventname,eventfunction);return r;}
else
{this.addEvent(eventnode,eventname,eventfunction,eventcapture);eventnode['on'+eventname]=eventfunction;return true;}},load:function()
{},flush:function()
{if(!this.events)
return;var i,item;for(i=this.events.length-1;i>=0;i=i-1)
{item=this.events[i];if(item[0].removeEventListener)
{item[0].removeEventListener(item[1],item[2],item[3]);};if(item[1].substring(0,2)!="on")
{item[1]="on"+item[1];};if(item[0].detachEvent)
{item[0].detachEvent(item[1],item[2]);};item[0][item[1]]=undefined;}},init:function()
{this.registerEvent(window,'load',this.load,false);this.registerEvent(window,'unload',this.flush,false);}}
eventManager.init();
var $Context='';function $()
{if(arguments.length==1)
{var element=arguments[0];if(typeof element=='string')
return document.getElementById($Context+element);}
var elements=new Array();for(var i=0,l=arguments.length;i<l;i++)
{var element=arguments[i];if(typeof element=='string')
{el=document.getElementById($context+element);elements.push(el);}
else if(typeof element=='object')
{for(var j=0,m=element.length;j<m;j++)
{el=document.getElementById($context+element[j]);elements.push(el);}}}
return elements;}
function min()
{var min=+Infinity;for(var i=0,l=arguments.length;i<l;i++)
{if(arguments[i]<min)
min=arguments[i];}
return min;}
function max()
{var max=-Infinity;for(var i=0,l=arguments.length;i<l;i++)
{if(arguments[i]>max)
max=arguments[i];}
return max;}
function functionQueue()
{var self=this;this.functions=new Array();this.registerFunction=registerFunction;function registerFunction(fct)
{self.functions[self.functions.length]=fct;}
this.unregisterFunction=unregisterFunction;function unregisterFunction(fct)
{for(var i=0;i<self.functions.length;i++)
{}}
this.destroy=destroy;function destroy()
{self.functions=new Array();}
this.call=call;function call()
{var args;if(arguments.length==1)
args=arguments[0];else
args=arguments;for(var i=0;i<self.functions.length;i++)
{self.functions[i](args);}}}
var logger={loggerwindow:null,__getWindow:function()
{if(!this.loggerwindow)
{this.loggerwindow=$('logger_window');}},put:function(message)
{this.__getWindow();if(this.loggerwindow)
{var text=this.loggerwindow.value;this.loggerwindow.value=message+"<br />\r\n"+text;}},clear:function()
{this.__getWindow();if(this.loggerwindow)
{this.loggerwindow.value="";}}}
function isDate(year,month,day)
{var numdays=[,31,28,31,30,31,30,31,31,30,31,30,31][month];return day>0&&!!numdays&&(day<=numdays||day==29&&year%4==0&&(year%100!=0||year%400==0))}
function isHour(hour,min,sec)
{return hour>=0&&hour<=23&&min>=0&&min<=59&&sec>=0&&sec<=59;}
var utf8={encode:function(value)
{value=value.replace(/\r\n/g,"\n");var utf="";for(var i=0,l=value.length;i<l;i++)
{var c=value.charCodeAt(i);if(c<128)
{utf+=String.fromCharCode(c);}
else if((c>127)&&(c<2048))
{utf+=String.fromCharCode((c>>6)|192);utf+=String.fromCharCode((c&63)|128);}
else
{utf+=String.fromCharCode((c>>12)|224);utf+=String.fromCharCode(((c>>6)&63)|128);utf+=String.fromCharCode((c&63)|128);}}
return utf;},decode:function(value)
{var str="";var i=0;var c1=c2=c3=0;while(i<value.length)
{c1=value.charCodeAt(i);if(c1<128)
{str+=String.fromCharCode(c1);i++;}
else if((c1>191)&&(c1<224))
{c2=value.charCodeAt(i+1);str+=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2;}
else
{c2=value.charCodeAt(i+1);c3=value.charCodeAt(i+2);str+=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return str;}}
function RGBColor(color)
{this.ok=false;if(color.charAt(0)=='#')
color=color.substr(1,6);color=color.replace(/ /,'').toLowerCase();var htmlcolors={black:'000000',silver:'c0c0c0',gray:'808080',white:'ffffff',maroon:'800000',red:'ff0000',purple:'800080',fuchsia:'ff00ff',green:'008000',lime:'00ff00',olive:'808000',yellow:'ffff00',navy:'000080',blue:'0000ff',teal:'008080',aqua:'00ffff'};for(var name in htmlcolors)
{if(color==name)
{this.name=color;color=htmlcolors[name];}}
var rgb=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(color);if(rgb)
{this.red=parseInt(rgb[1],10);this.green=parseInt(rgb[2],10);this.blue=parseInt(rgb[3],10);this.ok=true;}
else
{rgb=/^(\w{2})(\w{2})(\w{2})$/.exec(color);if(rgb)
{this.red=parseInt(rgb[1],16);this.green=parseInt(rgb[2],16);this.blue=parseInt(rgb[3],16);this.ok=true;}
else
{rgb=/^(\w{1})(\w{1})(\w{1})$/.exec(color);if(rgb)
{this.red=parseInt(rgb[1]+rgb[1],16);this.green=parseInt(rgb[2]+rgb[2],16);this.blue=parseInt(rgb[3]+rgb[3],16);this.ok=true;}}}
this.red=(this.red<0||isNaN(this.red))?0:((this.red>255)?255:this.red);this.green=(this.green<0||isNaN(this.green))?0:((this.green>255)?255:this.green);this.blue=(this.blue<0||isNaN(this.blue))?0:((this.blue>255)?255:this.blue);this.toRGB=function()
{return'rgb('+this.red+', '+this.green+', '+this.blue+')';}
this.toHex=function()
{var red=this.red.toString(16);var green=this.green.toString(16);var blue=this.blue.toString(16);if(red.length==1)red='0'+red;if(green.length==1)green='0'+green;if(blue.length==1)blue='0'+blue;return'#'+red+green+blue;}}
var browser={https:false,msie:false,ns:false,safari:false,dom:false,version:null,zindex:1,main:function()
{if(document.location.href.indexOf("https")==0)
{this.https=true;}
if(document.getElementById&&document.childNodes&&document.createElement)
{this.dom=true;}
if((pos=navigator.userAgent.indexOf('MSIE'))>=0)
{this.msie=true;this.version=parseFloat(navigator.userAgent.substr(pos+4));return true;}
if((pos=navigator.userAgent.indexOf('Netscape6/'))>=0)
{this.ns=true;this.version=parseFloat(navigator.userAgent.substr(pos+10));return true;}
if((pos=navigator.userAgent.indexOf('Safari/'))>=0)
{this.safari=true;this.version=parseFloat(navigator.userAgent.substr(pos+7));return true;}
if(navigator.userAgent.indexOf('Gecko')>=0)
{this.ns=true;this.version=6.1;return true;}
return false;},isHttps:function()
{return this.https;},isIE:function()
{return this.msie;},isNS:function()
{return this.ns;},getVersion:function()
{return this.version;},getNextZIndex:function()
{return++this.zindex;},getDocumentWidth:function()
{if(this.dom&&((this.msie&&this.version>=7)||!this.msie))
return document.documentElement.scrollWidth;return document.body.scrollWidth;},getDocumentHeight:function()
{if(this.dom&&((this.msie&&this.version>=7)||!this.msie))
return document.documentElement.scrollHeight;return document.body.scrollHeight;},getWindowWidth:function()
{if(!this.msie)
return window.innerWidth;if(document.documentElement&&document.documentElement.clientWidth)
return document.documentElement.clientWidth;if(document.body&&document.body.clientWidth)
return document.body.clientWidth;return 0;},getWindowHeight:function()
{if(!this.msie)
return window.innerHeight;if(document.documentElement&&document.documentElement.clientHeight)
return document.documentElement.clientHeight;if(document.body&&document.body.clientHeight)
return document.body.clientHeight;return 0;},getScreenWidth:function()
{return screen.width;},getScreenHeight:function()
{return screen.height;},getScrollLeft:function()
{if(this.dom&&((this.msie&&this.version>=7)||!this.msie))
return document.documentElement.scrollLeft;if(document.body&&document.body.scrollLeft)
return document.body.scrollLeft;if(typeof(window.pageXOffset)=='number')
return window.pageXOffset;return 0;},getScrollTop:function()
{if(this.dom&&((this.msie&&this.version>=7)||!this.msie))
return document.documentElement.scrollTop;if(document.body&&document.body.scrollTop)
return document.body.scrollTop;if(typeof(window.pageYOffset)=='number')
return window.pageYOffset;return 0;},getClientWidth:function()
{return this.getWindowWidth();},getClientHeight:function()
{return this.getWindowHeight();},getScrollWidth:function()
{return this.getDocumentWidth();},getScrollHeight:function()
{return this.getDocumentHeight();},getNodeDocumentLeft:function(node)
{var l=node.offsetLeft;if(node.offsetParent!=null)
l+=this.getNodeDocumentLeft(node.offsetParent);return l;},getNodeDocumentTop:function(node)
{var t=node.offsetTop;if(node.offsetParent!=null)
t+=this.getNodeDocumentTop(node.offsetParent);return t;},getNodeNodeLeft:function(node,refnode)
{var l=node.offsetLeft;if(node.offsetParent!=null&&node.offsetParent!=refnode)
l+=this.getNodeNodeLeft(node.offsetParent,refnode);return l;},getNodeNodeTop:function(node,refnode)
{var t=node.offsetTop;if(node.offsetParent!=null&&node.offsetParent!=refnode)
t+=this.getNodeNodeTop(node.offsetParent,refnode);return t;},getNodeOffsetWidth:function(node)
{return node.offsetWidth;},getNodeOffsetHeight:function(node)
{return node.offsetHeight;},getNodeWidth:function(node)
{if(this.msie)
{return this.getNodeOffsetWidth(node)-(isNaN(parseInt(node.currentStyle.paddingLeft,10))?0:parseInt(node.currentStyle.paddingLeft,10))-(isNaN(parseInt(node.currentStyle.paddingRight,10))?0:parseInt(node.currentStyle.paddingRight,10))
-(isNaN(parseInt(node.currentStyle.borderLeftWidth,10))?0:parseInt(node.currentStyle.borderLeftWidth,10))-(isNaN(parseInt(node.currentStyle.borderRightWidth,10))?0:parseInt(node.currentStyle.borderRightWidth,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeOffsetWidth(node)-parseInt(e.getPropertyValue('padding-left'),10)-parseInt(e.getPropertyValue('padding-right'),10)
-parseInt(e.getPropertyValue('border-left-width'),10)-parseInt(e.getPropertyValue('border-right-width'),10);}
return this.getNodeOffsetWidth(node)-(node.style.paddingLeft?parseInt(node.style.paddingLeft,10):0)-(node.style.paddingRight?parseInt(node.style.paddingRight,10):0)
-(node.style.borderLeftWidth?parseInt(node.style.borderLeftWidth,10):0)-(node.style.borderRightWidth?parseInt(node.style.borderRightWidth,10):0);},getNodeHeight:function(node)
{if(this.msie)
{return this.getNodeOffsetHeight(node)-(isNaN(parseInt(node.currentStyle.paddingTop,10))?0:parseInt(node.currentStyle.paddingTop,10))-(isNaN(parseInt(node.currentStyle.paddingBottom,10))?0:parseInt(node.currentStyle.paddingBottom,10))
-(isNaN(parseInt(node.currentStyle.borderTopWidth,10))?0:parseInt(node.currentStyle.borderTopWidth,10))-(isNaN(parseInt(node.currentStyle.borderBottomWidth,10))?0:parseInt(node.currentStyle.borderBottomWidth,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeOffsetHeight(node)-parseInt(e.getPropertyValue('padding-top'),10)-parseInt(e.getPropertyValue('padding-bottom'),10)
-parseInt(e.getPropertyValue('border-top-width'),10)-parseInt(e.getPropertyValue('border-bottom-width'),10);}
return this.getNodeOffsetHeight(node)-(node.style.paddingTop?parseInt(node.style.paddingTop,10):0)-(node.style.paddingBottom?parseInt(node.style.paddingBottom,10):0)
-(node.style.borderTopWidth?parseInt(node.style.borderTopWidth,10):0)-(node.style.borderBottomWidth?parseInt(node.style.borderBottomWidth,10):0);},getNodeInnerWidth:function(node)
{if(this.msie)
{return this.getNodeOffsetWidth(node)-(isNaN(parseInt(node.currentStyle.borderLeftWidth,10))?0:parseInt(node.currentStyle.borderLeftWidth,10))-(isNaN(parseInt(node.currentStyle.borderRightWidth,10))?0:parseInt(node.currentStyle.borderRightWidth,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeOffsetWidth(node)-parseInt(e.getPropertyValue('border-left-width'),10)-parseInt(e.getPropertyValue('border-right-width'),10);}
return this.getNodeOffsetWidth(node)-(node.style.borderLeftWidth?parseInt(node.style.borderLeftWidth,10):0)-(node.style.borderRightWidth?parseInt(node.style.borderRightWidth,10):0);},getNodeInnerHeight:function(node)
{if(this.msie)
{return this.getNodeOffsetHeight(node)-(isNaN(parseInt(node.currentStyle.borderTopWidth,10))?0:parseInt(node.currentStyle.borderTopWidth,10))-(isNaN(parseInt(node.currentStyle.borderBottomWidth,10))?0:parseInt(node.currentStyle.borderBottomWidth,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeOffsetHeight(node)-parseInt(e.getPropertyValue('border-top-width'),10)-parseInt(e.getPropertyValue('border-bottom-width'),10);}
return this.getNodeOffsetHeight(node)-(node.style.borderTopWidth?parseInt(node.style.borderTopWidth,10):0)-(node.style.borderBottomWidth?parseInt(node.style.borderBottomWidth,10):0);},getNodeOuterWidth:function(node)
{if(this.msie)
{return this.getNodeOffsetWidth(node)+(isNaN(parseInt(node.currentStyle.marginLeft,10))?0:parseInt(node.currentStyle.marginLeft,10))+(isNaN(parseInt(node.currentStyle.marginRight,10))?0:parseInt(node.currentStyle.marginRight,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeOffsetWidth(node)+parseInt(e.getPropertyValue('margin-left'),10)+parseInt(e.getPropertyValue('margin-right'),10);}
return this.getNodeOffsetWidth(node)+(node.style.marginLeft?parseInt(node.style.marginLeft,10):0)+(node.style.marginRight?parseInt(node.style.marginRight,10):0);},getNodeOuterHeight:function(node)
{if(this.msie)
{return this.getNodeOffsetHeight(node)+(isNaN(parseInt(node.currentStyle.marginTop,10))?0:parseInt(node.currentStyle.marginTop,10))+(isNaN(parseInt(node.currentStyle.marginBottom,10))?0:parseInt(node.currentStyle.marginBottom,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeOffsetHeight(node)+parseInt(e.getPropertyValue('margin-top'),10)+parseInt(e.getPropertyValue('margin-bottom'),10);}
return this.getNodeOffsetHeight(node)+(node.style.marginTop?parseInt(node.style.marginTop,10):0)+(node.style.marginBottom?parseInt(node.style.marginBottom,10):0);},getNodeExternalWidth:function(node)
{if(this.msie)
{return(isNaN(parseInt(node.currentStyle.marginLeft,10))?0:parseInt(node.currentStyle.marginLeft,10))+(isNaN(parseInt(node.currentStyle.marginRight,10))?0:parseInt(node.currentStyle.marginRight,10))
+(isNaN(parseInt(node.currentStyle.borderLeftWidth,10))?0:parseInt(node.currentStyle.borderLeftWidth,10))+(isNaN(parseInt(node.currentStyle.borderRightWidth,10))?0:parseInt(node.currentStyle.borderRightWidth,10));}
else
{var e=window.getComputedStyle(node,null);return parseInt(e.getPropertyValue('margin-left'),10)+parseInt(e.getPropertyValue('margin-right'),10)
+parseInt(e.getPropertyValue('border-left-width'),10)+parseInt(e.getPropertyValue('border-right-width'),10);}
return(node.style.marginLeft?parseInt(node.style.marginLeft,10):0)+(node.style.marginRight?parseInt(node.style.marginRight,10):0)
+(node.style.borderLeftWidth?parseInt(node.style.borderLeftWidth,10):0)+(node.style.borderRightWidth?parseInt(node.style.borderRightWidth,10):0);},getNodeExternalHeight:function(node)
{if(this.msie)
{return(isNaN(parseInt(node.currentStyle.marginTop,10))?0:parseInt(node.currentStyle.marginTop,10))+(isNaN(parseInt(node.currentStyle.marginBottom,10))?0:parseInt(node.currentStyle.marginBottom,10))
+(isNaN(parseInt(node.currentStyle.borderTopWidth,10))?0:parseInt(node.currentStyle.borderTopWidth,10))+(isNaN(parseInt(node.currentStyle.borderBottomWidth,10))?0:parseInt(node.currentStyle.borderBottomWidth,10));}
else
{var e=window.getComputedStyle(node,null);return parseInt(e.getPropertyValue('margin-top'),10)+parseInt(e.getPropertyValue('margin-bottom'),10)
+parseInt(e.getPropertyValue('border-top-width'),10)+parseInt(e.getPropertyValue('border-bottom-width'),10);}
return(node.style.marginTop?parseInt(node.style.marginTop,10):0)+(node.style.marginBottom?parseInt(node.style.marginBottom,10):0)
+(node.style.borderTopWidth?parseInt(node.style.borderTopWidth,10):0)+(node.style.borderBottomWidth?parseInt(node.style.borderBottomWidth,10):0);},getNodeExtraWidth:function(node)
{if(this.msie)
{return this.getNodeExternalWidth(node)+(isNaN(parseInt(node.currentStyle.paddingLeft,10))?0:parseInt(node.currentStyle.paddingLeft,10))+(isNaN(parseInt(node.currentStyle.paddingRight,10))?0:parseInt(node.currentStyle.paddingRight,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeExternalWidth(node)+parseInt(e.getPropertyValue('padding-left'),10)+parseInt(e.getPropertyValue('padding-right'),10);}
return this.getNodeExternalWidth(node)+(node.style.paddingLeft?parseInt(node.style.paddingLeft,10):0)+(node.style.paddingRight?parseInt(node.style.paddingRight,10):0);},getNodeExtraHeight:function(node)
{if(this.msie)
{return this.getNodeExternalHeight(node)+(isNaN(parseInt(node.currentStyle.paddingTop,10))?0:parseInt(node.currentStyle.paddingTop,10))+(parseInt(isNaN(node.currentStyle.paddingBottom,10))?0:parseInt(node.currentStyle.paddingBottom,10));}
else
{var e=window.getComputedStyle(node,null);return this.getNodeExternalHeight(node)+parseInt(e.getPropertyValue('padding-top'),10)+parseInt(e.getPropertyValue('padding-bottom'),10);}
return this.getNodeExternalHeight(node)+(node.style.paddingTop?parseInt(node.style.paddingTop,10):0)+(node.style.paddingBottom?parseInt(node.style.paddingBottom,10):0);},getCursorNode:function(e)
{if(!e)var e=window.event;if(e.target)return e.target;if(e.srcElement)return e.srcElement;return null;},getCursorX:function(e)
{if(!e)var e=window.event;return e.clientX+this.getScrollLeft();},getCursorY:function(e)
{if(!e)var e=window.event;return e.clientY+this.getScrollTop();},getCursorWindowX:function(e)
{if(!e)var e=window.event;return e.clientX;},getCursorWindowY:function(e)
{if(!e)var e=window.event;return e.clientY;},getCursorOffsetX:function(e)
{if(!e)var e=window.event;if(typeof(e.layerX)=='number')
return e.layerX-(browser.ns?1:0);if(typeof(e.offsetX)=='number')
return e.offsetX-(browser.ns?1:0);},getCursorOffsetY:function(e)
{if(!e)var e=window.event;if(typeof(e.layerY)=='number')
return e.layerY-(browser.ns?1:0);if(typeof(e.offsetY)=='number')
return e.offsetY-(browser.ns?1:0);},getOffsetX:function(e)
{return this.getCursorOffsetX(e);},getOffsetY:function(e)
{return this.getCursorOffsetY(e);},getKey:function(e)
{if(!e)var e=window.event;var key;if(this.msie)
key=e.keyCode;else
key=e.which;return key;},ifShift:function(e)
{if(!e)var e=window.event;return e.shiftKey;},ifCtrl:function(e)
{if(!e)var e=window.event;return e.ctrlKey;},ifAlt:function(e)
{if(!e)var e=window.event;return e.altKey;},ifRightClick:function(e)
{if(!e)var e=window.event;},ifCenterClick:function(e)
{if(!e)var e=window.event;},ifLeftClick:function(e)
{if(!e)var e=window.event;},ifDoubleRightClick:function(e)
{if(!e)var e=window.event;},ifDoubleCenterClick:function(e)
{if(!e)var e=window.event;},ifDoubleLeftClick:function(e)
{if(!e)var e=window.event;},setSelectionRange:function(obj,selectionStart,selectionEnd)
{if(obj.setSelectionRange)
{obj.focus();obj.setSelectionRange(selectionStart,selectionEnd);}
else if(obj.createTextRange)
{var range=obj.createTextRange();range.collapse(true);range.moveEnd('character',selectionEnd);range.moveStart('character',selectionStart);range.select();}},setInnerHTML:function(node,content)
{if(this.ns)
{rng=document.createRange();rng.setStartBefore(node);htmlFrag=rng.createContextualFragment(content);while(node.hasChildNodes())
node.removeChild(node.lastChild);node.appendChild(htmlFrag);}
else
{while(node.hasChildNodes())
{node.removeChild(node.lastChild);}
node.innerHTML=content;}},destroyall:function(node)
{while(node.hasChildNodes())
{this.destroyall(node.lastChild);node.removeChild(node.lastChild);}
for(i in node)
{if(typeof node[i]==='function')
{node[i]=null;}}}}
browser.main();
function ajaxRequest(url,method,data,feedback,async,dosend)
{var self=this;this.url=url;this.method=method.toUpperCase();this.data=data;this.async=async;this.period=0;this.manager=null;this.uid=-1;this.free=false;this.request=null;this.parameters=new Array();this.feedback=new functionQueue();this.init=init;function init()
{try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
try{return new XMLHttpRequest();}catch(e){}
alert("XMLHttpRequest not supported");return null;}
this.start=start;function start(url,method,data,feedback,async,dosend)
{self.url=url;self.method=method.toUpperCase();self.data=data;self.async=async;if(self.request==null)
return null;if(feedback)
self.addFeedback(feedback);if(self.async)
{self.request.onreadystatechange=self.process;}
if(dosend)
self.send();}
this.clearParameters=clearParameters;function clearParameters()
{self.parameters=new Array();}
this.addParameter=addParameter;function addParameter(id,value)
{self.parameters[self.parameters.length]=id;self.parameters[self.parameters.length]=value;}
this.getParameters=getParameters;function getParameters()
{var data=self.data||'';for(var i=0;i<self.parameters.length;i+=2)
{if(data.length>0)
data+='&';data+=escape(self.parameters[i])+'='+escape(self.parameters[i+1]);}
data=data.replace(/\+/g,'%2B');return data;}
this.headers=headers;function headers()
{self.request.setRequestHeader('X-Requested-With','XMLHttpRequest - WebAbility(r) v4');if(self.method=='POST')
{self.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(self.request.overrideMimeType)
self.request.setRequestHeader("Connection","close");self.request.setRequestHeader("Method","POST "+url+"HTTP/1.1");}}
this.send=send;function send()
{try
{var url=self.url;var parameters=self.getParameters();if(self.method=='GET'&&parameters.length>0)
url+=(url.match(/\?/)?'&':'?')+parameters;self.request.open(self.method,url,self.async);self.headers();self.request.send(self.method=='POST'?parameters:null);}
catch(e)
{}}
this.waiting=waiting;function waiting()
{}
this.process=process;function process()
{try
{if(self.request.readyState==4)
{if(self.request.status==200)
{if(self.feedback)
self.feedback.call(self.request);else
{}}
else
{}
if(self.period)
{}
else
{self.request.onreadystatechange=function(){};self.parameters=null;self.feedback.destroy();self.url=null;self.method=null;self.data=null;self.async=null;self.free=true;}}
else
{self.waiting();}}
catch(e)
{}}
this.setPeriod=setPeriod;function setPeriod(timeout)
{self.period=timeout;}
this.addFeedback=addFeedback;function addFeedback(feedback)
{self.feedback.registerFunction(feedback);}
self.request=self.init();self.start(url,method,data,feedback,async,dosend);}
var ajaxManager={ajaxRequests:new Array(),uid:0,registerRequest:function(r)
{r.manager=this;r.uid=this.uid++;this.ajaxRequests.push(r);},unregisterRequest:function(uid)
{for(var i=0,l=this.ajaxRequests.length;i<l;i++)
{if(this.ajaxRequests[i].uid==uid)
{this.ajaxRequests.splice(i,1);}}},createRequest:function(url,method,data,feedback,async,dosend)
{var found=false;var r=null;for(var i=0,l=this.ajaxRequests.length;i<l;i++)
{if(this.ajaxRequests[i].free)
{r=this.ajaxRequests[i];r.start(url,method,data,feedback,async,dosend);}}
if(!found)
{r=new ajaxRequest(url,method,data,feedback,async,dosend);if(r)
{this.registerRequest(r);}}
return r;},createPeriodicRequest:function(timeout,url,method,data,feedback,async,dosend)
{var found=false;var r=null;for(var i=0,l=this.ajaxRequests.length;i<l;i++)
{if(this.ajaxRequests[i].free)
{r=this.ajaxRequests[i];r.setPeriod(timeout);r.start(url,method,data,feedback,async,dosend);}}
if(!found)
{r=new ajaxRequest(url,method,data,feedback,async,dosend);if(r)
{r.setPeriod(timeout);this.registerRequest(r);}}
return r;}}
function animSprite(id,callback,timing)
{var self=this;this.id=id;this.feedback=new functionQueue();this.timing=timing;this.xinit=null;this.yinit=null;this.xend=null;this.yend=null;this.winit=null;this.hinit=null;this.wend=null;this.hend=null;this.rinit=null;this.ginit=null;this.binit=null;this.rend=null;this.gend=null;this.bend=null;this.brinit=null;this.bginit=null;this.bbinit=null;this.brend=null;this.bgend=null;this.bbend=null;this.tinit=null;this.tend=null;this.starttime=null;this.getHex=getHex;function getHex(v)
{if(v<0)v=0;if(v>255)v=255;var s=v.toString(16).toUpperCase();if(s.length<2)
s='0'+s;return s;}
this.setPosition=setPosition;function setPosition(xinit,yinit,xend,yend)
{self.xinit=xinit;self.yinit=yinit;self.xend=xend;self.yend=yend;}
this.setSize=setSize;function setSize(winit,hinit,wend,hend)
{self.winit=winit;self.hinit=hinit;self.wend=wend;self.hend=hend;}
this.setColor=setColor;function setColor(rinit,ginit,binit,rend,gend,bend)
{self.rinit=rinit;self.ginit=ginit;self.binit=binit;self.rend=rend;self.gend=gend;self.bend=bend;}
this.setBackgroundColor=setBackgroundColor;function setBackgroundColor(brinit,bginit,bbinit,brend,bgend,bbend)
{self.brinit=brinit;self.bginit=bginit;self.bbinit=bbinit;self.brend=brend;self.bgend=bgend;self.bbend=bbend;}
this.setTransparency=setTransparency;function setTransparency(tinit,tend)
{self.tinit=tinit;self.tend=tend;}
this.start=start;function start()
{var d=new Date();self.starttime=d.getTime();setTimeout(self.anim,10);}
this.anim=anim;function anim()
{var d=new Date();starttime=d.getTime();var diff=d-self.starttime;if(diff>self.timing)
{if(self.xend!=null)
$(self.id).style.left=self.xend+'px';if(self.yend!=null)
$(self.id).style.top=self.yend+'px';if(self.wend!=null)
$(self.id).style.width=self.wend+'px';if(self.hend!=null)
$(self.id).style.height=self.hend+'px';if(self.rend!=null)
{$(self.id).style.color='#'+self.getHex(self.rend)+self.getHex(self.gend)+self.getHex(self.bend);}
if(self.brend!=null)
{$(self.id).style.backgroundColor='#'+self.getHex(self.brend)+self.getHex(self.bgend)+self.getHex(self.bbend);}
if(self.tend!=null)
{$(self.id).style.opacity=self.tend/100;$(self.id).style.filter='alpha(opacity: '+self.tend+')';}
self.feedback.call();}
else
{if(self.xend!=null)
{var x=self.xinit+Math.ceil((self.xend-self.xinit)/self.timing*diff);$(self.id).style.left=x+'px';}
if(self.yend!=null)
{var y=self.yinit+Math.ceil((self.yend-self.yinit)/self.timing*diff);$(self.id).style.top=y+'px';}
if(self.wend!=null)
{var w=self.winit+Math.ceil((self.wend-self.winit)/self.timing*diff);$(self.id).style.width=w+'px';}
if(self.hend!=null)
{var h=self.hinit+Math.ceil((self.hend-self.hinit)/self.timing*diff);$(self.id).style.height=h+'px';}
if(self.rend!=null)
{var r=self.rinit+Math.ceil((self.rend-self.rinit)/self.timing*diff);var g=self.ginit+Math.ceil((self.gend-self.ginit)/self.timing*diff);var b=self.binit+Math.ceil((self.bend-self.binit)/self.timing*diff);$(self.id).style.color='#'+self.getHex(r)+self.getHex(g)+self.getHex(b);}
if(self.brend!=null)
{var br=self.brinit+Math.ceil((self.brend-self.brinit)/self.timing*diff);var bg=self.bginit+Math.ceil((self.bgend-self.bginit)/self.timing*diff);var bb=self.bbinit+Math.ceil((self.bbend-self.bbinit)/self.timing*diff);$(self.id).style.backgroundColor='#'+self.getHex(br)+self.getHex(bg)+self.getHex(bb);}
if(self.tend!=null)
{var t=self.tinit+Math.ceil((self.tend-self.tinit)/self.timing*diff);$(self.id).style.opacity=t/100;$(self.id).style.filter='alpha(opacity: '+t+')';}
setTimeout(self.anim,10);}}
this.stop=stop;function stop()
{}
this.synchronize=synchronize;function synchronize(anim)
{}
this.destroy=destroy;function destroy()
{}
this.addFeedback=addFeedback;function addFeedback(feedback)
{self.feedback.registerFunction(feedback);}
if(callback)
this.addFeedback(callback);}
var animManager={animSprites:new Array(),registerSprite:function(r)
{this.animSprites.push(r);},unregisterSprite:function(id)
{for(var i=0,l=this.animSprites.length;i<l;i++)
{if(this.animSprites[i].id==id)
{this.animSprites[i].destroy();this.animSprites.splice(i,1);return true;}}
return false;},createSprite:function(id,callback,timing)
{var r=new animSprite(id,callback,timing);if(r)
{this.registerSprite(r);}
return r;},destroySprite:function(id)
{this.unregisterSprite(id);}}
function windowTag(idtag,id,callback,manager)
{var self=this;this.myManager=manager;this.myCallback=callback;this.idtag=idtag;this.uid='';this.status=false;this.getID=getID;function getID()
{return self.uid;}
this.show=show;function show()
{$(self.uid).style.display="";if(self.myCallback)
self.myCallback(self.idtag,true);}
this.hide=hide;function hide()
{$(self.uid).style.display="none";if(self.myCallback)
self.myCallback(self.idtag,false);}
this.switchTag=switchTag;function switchTag()
{self.myManager.hideAll();self.show();}
this.disable=disable;function disable()
{dd=$(self.idtag);if(dd)
{dd.onclick=null;}}
this.enable=enable;function enable()
{dd=$(self.idtag);if(dd)
{dd.onclick=self.switchTag;}}
this.uid=id;if($(this.uid)==null)
return false;this.enable();this.status=false;return this;}
function tagContainer()
{var self=this;this.debug=false;this.tags=new Array();this.myOpenClose="";this.myCallbackClose=null;this.registerTag=registerTag;function registerTag(idtag,iddivision,callback)
{var tag=new windowTag(idtag,iddivision,callback,self);if(!tag)
return null;self.tags[self.tags.length]=tag;return tag;}
this.registerShowHideTag=registerShowHideTag;function registerShowHideTag(idtag,callback)
{dd=$(idtag);if(dd)
{dd.onclick=switchShowHideTag;}
self.myOpenClose=idtag;self.myCallbackClose=callback;}
this.switchShowHideTag=switchShowHideTag;function switchShowHideTag()
{self.hideAll();self.myCallbackClose(self.myOpenClose);}
this.hideAll=hideAll;function hideAll()
{for(var i=0;i<self.tags.length;i++)
self.tags[i].hide();}
this.showTag=showTag;function showTag(id)
{for(var i=0;i<self.tags.length;i++)
{if(self.tags[i].idtag==id)
self.tags[i].show();}}
this.disableTag=disableTag;function disableTag(id)
{for(var i=0;i<self.tags.length;i++)
{if(self.tags[i].idtag==id)
self.tags[i].disable();}}
this.enableTag=enableTag;function enableTag(id)
{for(var i=0;i<self.tags.length;i++)
{if(self.tags[i].idtag==id)
self.tags[i].enable();}}
return this;}