function Ajax(url,data,raw){var xmlHttp=null;var onSuccessCbF='';var onSuccessMth='';var onFailureCbF='';var onLoadingCbF='';var onLoadedCbF='';var onSuccessArg='';var onFailureArg='';var onLoadingArg='';var onLoadedArg='';var notrun=true;if(typeof(raw)=="undefined"){raw=false;} function init(){if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest();}else if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}} this.doRequest=function(nodes){init();var encoded=JSON.stringify(data);var method=getMethod(encoded,url);if(method=="GET"){encoded=_URLEncode(encoded);if(url.indexOf("?")>=0){url=url+"&ajaxget="+encoded;}else{url=url+"?ajaxget="+encoded;}} xmlHttp.onreadystatechange=getResponse;xmlHttp.open(method,url,true);if(!this.raw){xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");} if(typeof(nodes)=="object"&&typeof(nodes.join)!="undefined"){xmlHttp.setRequestHeader("HTML-Nodes",nodes.join(";"));} if(method!="GET"){xmlHttp.send(encoded);}else{xmlHttp.send(null);}};function getMethod(data,url){if(data.length>800){return"POST";} var encoded=_URLEncode(data);var length=encoded.length+url.length;if(length>1000){return"POST";} return"GET";} function _URLEncode(str){var histogram={},tmp_arr=[];var ret=str.toString();var replacer=function(search,replace,str){var tmp_arr=[];tmp_arr=str.split(search);return tmp_arr.join(replace);};histogram["'"]='%27';histogram['(']='%28';histogram[')']='%29';histogram['*']='%2A';histogram['~']='%7E';histogram['!']='%21';histogram['%20']='+';ret=encodeURIComponent(ret);for(search in histogram){replace=histogram[search];ret=replacer(search,replace,ret);} return ret.replace(/(\%([a-z0-9]{2}))/g,function(full,m1,m2){return"%"+m2.toUpperCase();});return ret;} function getResponse(){switch(xmlHttp.readyState){case 1:_onLoading();break;case 2:_onLoaded();break;case 4:if(xmlHttp.status==200){_onSuccess();}else{_onFailure();} break;default:break;}} function getXmlResponse(){return xmlHttp.responseXML;} function getTextResponse(){return xmlHttp.responseText;} function _onSuccess(){if(onSuccessCbF==''){delete xmlHttp;return false;} var output='';switch(onSuccessMth){default:case"text":output=getTextResponse();break;case"xml":output=getXmlResponse();break;} if(!raw){try{output=eval("("+output+")");}catch(e){alert(output);}} eval("onSuccessCbF(output,onSuccessArg)");delete xmlHttp;return true;} function _onFailure(){var output=getTextResponse();if(onFailureCbF==''){alert(output);}else{eval("onFailureCbF(output,onFailureArg)");}delete xmlHttp;return true;} function _onLoading(){if(notrun){notrun=false;if(onLoadingCbF==''){delete xmlHttp;return false;} eval("onLoadingCbF(onLoadingArg)");delete xmlHttp;return true;}} function _onLoaded(){if(onLoadedCbF==''){delete xmlHttp;return false;} eval("onLoadedCbF(onLoadedArg)");delete xmlHttp;return true;};this.onSuccess=function(callback_fce,arg){if(typeof callback_fce=="string"){callback_fce=eval(callback_fce);} onSuccessCbF=callback_fce;onSuccessMth="text";onSuccessArg=arg;};this.onFailure=function(callback_fce,arg){if(typeof callback_fce=="string"){callback_fce=eval(callback_fce);} onFailureCbF=callback_fce;onFailureArg=arg;};this.onLoading=function(callback_fce,arg){if(typeof callback_fce=="string"){callback_fce=eval(callback_fce);} onLoadingCbF=callback_fce;onLoadingArg=arg;};this.onLoaded=function(callback_fce,arg){if(typeof callback_fce=="string"){callback_fce=eval(callback_fce);} onLoadedCbF=callback_fce;onLoadedArg=arg;}} JSON=function(){function f(n){return n<10?'0'+n:n;} Date.prototype.toJSON=function(){return this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z';};var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;function quote(string){return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;} c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"':'"'+string+'"';} function is_assoc(array){var len=array.length;var real_len=0;for(var key in array){real_len++;}if(len==real_len){return false;}else{return true;}}function stringify(key,holder,replacer){var i,k,v,length,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}if(typeof replacer==='function'){value=replacer.call(holder,key,value);}switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}partial=[];if(!is_assoc(value)){length=value.length;for(i=0;i1){this.button_height=(height-32)/(this.scroll_content.scrollHeight/height);if(this.button_height<10){this.button_height=10;} var maxMargin=(this.dimensions[1]-32)-this.button_height;this.ratio=maxScroll/maxMargin;this.scroll_content.style.width=(width-21)+"px";this.scroll_content.style.height=c_height;this.scroll_bar.style.height=height+"px";this.scroll_bar.style.margin="-"+height+"px 0 0 "+(width-16)+"px";this.scroll_bar.style.display="block";this.track.style.height=(height-32)+"px";this.scroll_button.style.height=(this.button_height)+"px";if(this.scroll_content.scrollTop>0){this.fixPosition(this.scroll_content.scrollTop);} if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");var rv=6;if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1);} if(rv<=7){b_part.style.marginTop=(this.button_height-10)+"px";}}}else{this.scroll_content.style.width=(width-21)+"px";this.scroll_content.style.height=c_height;this.scroll_bar.style.height="1px";this.scroll_bar.style.margin="0";this.scroll_bar.style.display="none";if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");var rv=6;if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1);} if(rv<=7){b_part.style.marginTop="0px";}}}};this.fixPosition=function(scroll){if(this.scroll_content.scrollTop>0){var pos=this.scroll_content.scrollTop/this.ratio;this.scrollTo(pos);}};this.createElement=function(nodename,select){var elem=document.createElement(nodename);elem.id=this.id+"_"+this.elem_counter;elem.style.display="block";if(!select){elem.onselectstart=function(){return false;};elem.onmousedown=function(){return false;};} this.elem_counter++;return elem;};this.scrollUp=function(){this.scroll(-1);this.scroll_timer=setInterval("custom_scrolls['"+this.id+"'].scroll(-1);",100);};this.scrollDown=function(){this.scroll(1);this.scroll_timer=setInterval("custom_scrolls['"+this.id+"'].scroll(1);",100);};this.stopScroll=function(){if(this.scroll_timer!=null){clearInterval(this.scroll_timer);} this.scroll_timer=null;this.dragging=false;};this.scroll=function(dist){var maxMargin=(this.dimensions[1]-32)-this.button_height;var val=this.act_scroll_pos+dist;if(val<0){val=0;} if(val>maxMargin){val=maxMargin;} this.scrollTo(val);};this.scrollTo=function(val){var height=this.dimensions[1];var width=this.dimensions[0];var maxMargin=(height-32)-this.button_height;if(val<0){val=0;} if(val>maxMargin){val=maxMargin;} this.act_scroll_pos=val;this.scroll_content.scrollTop=this.act_scroll_pos*this.ratio;this.scroll_button.style.margin=val+"px 0 0 0";};this.scrollBy=function(val){val=this.act_scroll_pos+val;this.scrollTo(val);};this.dragScroll=function(e){if(e==null){e=window.event};this.scroll_cursor_pos=[e.clientX,e.clientY];this.dragging_point=this.act_scroll_pos;this.dragging=true;};this.scrollDragMove=function(e){if(this.dragging){if(e==null){e=window.event};var pos=[e.clientX,e.clientY];var dist=this.dragging_point+(pos[1]-this.scroll_cursor_pos[1]);this.scrollTo(dist);}};this.wheelScroll=function(e){var delta=0;if(e.wheelDelta){delta=e.wheelDelta/120;}else if(e.detail){delta=-e.detail/3;} this.scrollBy((-delta)*(this.ratio*5));};this.getScrollDimensions=function(){var width=0;var height=0;width=getRenderedWidth(this.full_content);height=getRenderedHeight(this.full_content);if(width<30){width=30;} if(height<67){height=67;} return[width,height];};this.construct();} function setCustomizeHandlers(){if(!custom_handlers_init){original_function_u=document.onmouseup;original_function_c=document.onclick;original_function_m=document.onmousemove;original_function_o=window.onload;document.onmouseup=cancelActionU;document.onclick=cancelActionC;document.onmousemove=scrollDragMove;window.onload=onloadReset;} custom_handlers_init=true;} function onloadReset(e){for(var key in custom_scrolls){if(typeof(custom_scrolls[key].fixPosition)!="undefined"){custom_scrolls[key].fixPosition();}} if(typeof(original_function_o)=="function"){return original_function_o(e);}else{}} function scrollDragMove(e){for(var key in custom_scrolls){if(typeof(custom_scrolls[key].scrollDragMove)!="undefined"){custom_scrolls[key].scrollDragMove(e);}} if(typeof(original_function_m)=="function"){return original_function_m(e);}else{}} function cancelActionU(e){for(var key in custom_scrolls){if(typeof(custom_scrolls[key].stopScroll)!="undefined"){custom_scrolls[key].stopScroll();}} if(typeof(original_function_u)=="function"){return original_function_u(e);}else{}} function cancelActionC(e){for(var key in custom_scrolls){if(typeof(custom_scrolls[key].stopScroll)!="undefined"){custom_scrolls[key].stopScroll();}} if(active_select_options!=null&&!cancel_options_hide){active_select_options.style.display="none";active_select_options=null;} cancel_options_hide=false;if(typeof(original_function_c)=="function"){return original_function_c(e);}else{}} function CustomSelect(elem,f_width){if(typeof(elem)!="object"){this.element=document.getElementById(elem);}else{this.element=elem;} this.id=null;if(this.element.id==null){return null;}else{this.id=this.element.id;} this.construct=function(f_width){this.height=getRenderedHeight(this.element);var w_const=5;var w_const2=5;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");var rv=6;if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1);} if(rv<=7){w_const=24;w_const2=10;}} if(f_width!=null){this.width=f_width;}else{this.width=this.element.clientWidth;} if(this.width==0||this.height==0){var clone=this.element.cloneNode(true);clone.style.position="absolute";clone.style.top="-500px";clone.style.left="-500px";clone.style.display="block";var body=document.getElementsByTagName('BODY')[0];body.appendChild(clone);if(this.width==0){this.width=clone.clientWidth+w_const2;} if(this.height==0){this.height=getRenderedHeight(clone);} body.removeChild(clone);} if(f_width==null){this.width+=w_const;} setCustomizeHandlers();this.container=document.createElement("DIV");this.options=document.createElement("DIV");this.label=document.createElement("A");var value="";for(var i=0;i1){this.label.onmouseup=function(){if(active_select_options==null){custom_selects[this.rel].openOptions();cancel_options_hide=true;}else{custom_selects[this.rel].closeOptions();} return false;};} this.container.className="custom_select";this.container.appendChild(this.label);this.container.appendChild(this.options);this.element.parentNode.appendChild(this.container);this.options.style.width=(this.width-2)+"px";this.options.className="select_options";if(f_width==null&&this.options.scrollWidth>this.width){this.width=this.options.scrollWidth;} this.container.style.width=(this.width-2)+"px";this.container.style.minHeight=(this.height-2)+"px";this.label.style.width=(this.width-2)+"px";this.label.style.minHeight=(this.height-2)+"px";if(this.element.options.length>10){this.options.style.height=(150)+"px";this.options.className+=" options_scroll";}else{this.options.className+=" options_noscroll";} this.options.style.width=(this.width-2)+"px";this.options.style.display="none";this.label.className="select_label";this.element.style.display="none";custom_selects[this.id]=this;};this.selectOption=function(i){this.element.selectedIndex=i;this.closeOptions();this.label.firstChild.data=this.element.options[i].text;if(this.element.onchange!=null){this.element.onchange();}};this.openOptions=function(){for(var key in custom_selects){if(custom_selects[key]!=null&&typeof(custom_selects[key].closeOptions)!="undefined"){custom_selects[key].closeOptions();}} this.options.style.display="";active_select_options=this.options;if(this.element.onclick!=null){this.element.onclick();}};this.closeOptions=function(){this.options.style.display="none";this.options.scrollTop=0;active_select_options=null;};if(typeof(f_width)!="undefined"){this.construct(f_width);}else{this.construct(null);};} function CustomCheckbox(elem){this.original=null;this.element=null;this.checked=false;this.init=function(orig){if(typeof(orig)=="string"){this.original=document.getElementById(orig);}else{this.original=orig;} var title="x";if(orig.id!=""){var labels=document.getElementsByTagName("LABEL");for(var i=0;i=0){if(elem.parentNode){var i=parseInt(width.replace("%",""))/100;width=i*getRenderedWidth(elem.parentNode)-padding;}else{width=elem.scrollWidth;}}else{width=parseInt(width.replace("px",""))-padding;}}else if(elem.parentNode){width=getRenderedWidth(elem.parentNode)-padding;}else{width=elem.scrollWidth;} return width;} function getRenderedHeight(elem){var height=getStyle(elem,"height");var padding=parseInt(getStyle(elem,"padding-top").replace("px",""))+parseInt(getStyle(elem,"padding-bottom").replace("px",""));if(height!=null&&height!="auto"){if(height.indexOf("%")>=0){if(elem.parentNode){var i=parseInt(height.replace("%",""))/100;height=i*getRenderedHeight(elem.parentNode)-padding;}else{height=elem.scrollHeight;}}else{height=parseInt(height.replace("px",""))-padding;}}else{height=elem.scrollHeight;} return height;} function getStyle(oElm,strCssRule){var strValue=null;var style=null;if(typeof(document.defaultView)!="undefined"&&typeof(document.defaultView.getComputedStyle)!="undefined"){style=document.defaultView.getComputedStyle(oElm,null);}else if(typeof(document.getComputedStyle)!="undefined"){style=document.getComputedStyle(oElm,null);} if(style!=null){if(!window.opera&&typeof(style.getPropertyCSSValue)!="undefined"&&style.getPropertyCSSValue(strCssRule)!=null){strValue=style.getPropertyCSSValue(strCssRule).cssText;}else if(typeof(style.getPropertyValue)!="undefined"){strValue=style.getPropertyValue(strCssRule);}}else if(oElm.currentStyle){strCssRule=strCssRule.replace(/\-(\w)/g,function(strMatch,p1){return p1.toUpperCase();});strValue=oElm.currentStyle[strCssRule];} return strValue;}} var floating_object=null;var floating_timer=null;var original_f_onresize_function=null;function setFloatingPosition(resize){if(floating_object!=null){var pY=0;var pX=0;var pH=0;var pW=0;var overlay=null;if(resize){var overlay=document.getElementById('floating_object_overlay');if(overlay!=null){overlay.style.display="none";}} if(navigator.appName.indexOf("Netscape")!=-1){pY=Math.round(pageYOffset+(innerHeight/2));pX=Math.round(pageXOffset+(innerWidth/2));pW=innerWidth+pageYOffset;pH=innerHeight+pageXOffset;}else{if(document.body.scrollTop){pY=Math.round(document.body.scrollTop+(document.body.clientHeight/2));pX=Math.round(document.body.scrollLeft+(document.body.clientWidth/2));pH=document.body.scrollTop+document.body.clientHeight;pW=document.body.scrollLeft+document.body.clientWidth;}else{pY=Math.round(document.documentElement.scrollTop+(document.documentElement.clientHeight/2));pX=Math.round(document.documentElement.scrollLeft+(document.documentElement.clientWidth/2));pH=document.documentElement.scrollTop+document.documentElement.clientHeight;pW=document.documentElement.scrollLeft+document.documentElement.clientWidth;}} if(typeof(floating_object.x)!="undefined"){var width=floating_object.clientWidth;var height=floating_object.clientHeight;floating_object.y+=Math.round((pY-Math.round(height/2)-floating_object.y)/8);floating_object.x+=Math.round((pX-Math.round(width/2)-floating_object.x)/8);}else{var width=floating_object.clientWidth;var height=floating_object.clientHeight;floating_object.y=Math.round(pY-Math.round(height/2));floating_object.x=Math.round(pX-Math.round(width/2));} if(floating_object.style.left==floating_object.x+"px"&&floating_object.style.top==floating_object.y+"px"){clearInterval(floating_timer);floating_timer=null;}else{floating_object.style.left=floating_object.x+"px";floating_object.style.top=floating_object.y+"px";if(floating_timer==null){floating_timer=setInterval("setFloatingPosition(false)",20);}} if(resize&&overlay!=null){if(navigator.appName=='Microsoft Internet Explorer'||(typeof(opera)!="undefined"&&opera)){var node=document.getElementsByTagName('HTML')[0];pW=node.scrollWidth;if(node.scrollHeight>pH){pH=node.scrollHeight;}}else if(typeof(document.documentElement)!="undefined"){pH=document.documentElement.scrollHeight;pW=document.documentElement.scrollWidth;} overlay.style.width=pW+"px";overlay.style.height=pH+"px";overlay.style.display="";}}} function openFloat(elem,overlay){closeFloat();if(typeof(elem)=='string'){elem=document.getElementById(elem);} if(typeof(overlay)=='undefined'){overlay=false;} if(overlay){openFloatingOverlay();} floating_object=elem;floating_object.style.display="";floating_object.style.position="absolute";floating_object.style.top=0;floating_object.style.zIndex=999;setFloatingPosition(true);if(floating_timer==null){floating_timer=setInterval("setFloatingPosition(false)",20);}} function closeFloat(){var overlay=document.getElementById('floating_object_overlay');if(overlay!=null){overlay.style.display="none";} if(floating_object!=null){floating_object.style.display="none";floating_object.style.zIndex="";floating_object=null;} if(floating_timer!=null){clearInterval(floating_timer);} floating_timer=null;} function openFloatingOverlay(){var overlay=document.getElementById('floating_object_overlay');if(overlay==null){overlay=document.createElement('DIV');overlay.id='floating_object_overlay';overlay.style.background="Black";overlay.style.position="absolute";overlay.style.zIndex=998;overlay.innerHTML=" ";overlay.style.top=0;overlay.style.left=0;overlay.onclick=closeFloat;if(typeof(overlay.style.opacity)!="undefined"){overlay.style.opacity=60/100;} if(typeof(overlay.style.mozOpacity)!="undefined"){overlay.style.mozOpacity=60/100;} if(typeof(overlay.style.filter)!="undefined"){overlay.style.filter='alpha(opacity=60)';} document.getElementsByTagName('BODY')[0].appendChild(overlay);}} if(window.onresize!=null){original_f_onresize_function=window.onresize;} window.onresize=function(e){if(navigator.appName=='Microsoft Internet Explorer'){setTimeout("setFloatingPosition(true)",50);}else{setFloatingPosition(true);} if(typeof(original_f_onresize_function)=="function"){return original_f_onresize_function(e);}else{}}