function $(b){if(arguments.length>1){for(var c=0,d=[],e=arguments.length;c<e;c++)d.push($(arguments[c]));return d}if(typeof b==="string")b=document.getElementById(b);return b}Function.prototype.createDelegate=function(b,c){var d=this;return function(){return d.apply(b||window,c||arguments)}};window.FSite2={};FSite2._imageMaps={};FSite2._callRef=function(b,c){return function(){b(c)}};FSite2._removeElement=function(b){b.parentNode.removeChild(b)};
FSite2._simulateClickOnSpace=function(b){if(!b)b=window.event;if(b.keyCode==32){this._image._OnClick&&this._image._OnClick(b);b.returnValue=false}};FSite2._simulateClick=function(){this._OnClick&&this._OnClick();return false};FSite2._propagateClick=function(b){if(!b)b=window.event;this._image._OnClick&&this._image._OnClick(b);b.returnValue=false;b.cancelBubble=true;return false};
FSite2._updateImageState=function(){if(this._hiddenInput.disabled){this._area.removeAttribute("href");this._area.style.cursor="default"}else{this._area.setAttribute("href","#");this._area.style.cursor="pointer"}var b;b=this._hiddenInput.disabled&&this._imageDisabledChecked&&this._imageDisabledUnchecked?this._hiddenInput.checked?this._imageDisabledChecked:this._imageDisabledUnchecked:this._hiddenInput.checked?this._imageChecked:this._imageUnchecked;if(b!==undefined){this.src=b.src;if(b.height)this.style.height=
b.height+"px";if(b.width)this.style.width=b.width+"px"}};FSite2.debugMessage=function(b){if(debugElement=document.getElementById("FSite2_debug"))debugElement.innerHTML=debugElement.innerHTML+"<p>"+b+"</p>"};
FSite2.addImageFocus=function(b,c){var d=document.createElement("map");if(FSite2._imageMaps[c]!=undefined){FSite2._imageMaps[c]++;c=c+"_"+FSite2._imageMaps[c]}else FSite2._imageMaps[c]=1;d.name=c;d.id=c;var e=document.createElement("area");e.shape="rect";e.coords="0,0,"+b.width+","+b.height;d.appendChild(e);e._image=b;b.onclick=window.FSite2._simulateClick;b._area=e;b.parentNode.insertBefore(d,b);b.onload=function(){this.style.height=this.height+"px";this.style.width=this.width+"px";this._area.coords=
"0,0,"+this.width+","+this.height};b.style.border="none";b.useMap="#"+d.name;e.onkeydown=window.FSite2._simulateClickOnSpace;e.onclick=window.FSite2._propagateClick;return e};FSite2.createElement=function(b,c){var d=document.createElement(b);FSite2.setObjectAttribs(d,c);return d};FSite2.cloneObject=function(b){if(typeof b!="object")return b;if(b==null)return b;var c={};for(var d in b)c[d]=FSite2.cloneObject(b[d]);return c};
FSite2.setObjectAttribs=function(b,c){if(typeof c=="object")for(attrib in c)if(c[attrib]!=null)if(typeof c[attrib]=="object"&&typeof b[attrib]=="object")FSite2.setObjectAttribs(b[attrib],c[attrib]);else b[attrib]=c[attrib]};FSite2.setElementClass=function(b,c){FSite2.unsetElementClass(b,c);b.className+=(b.className?" ":"")+c};FSite2.unsetElementClass=function(b,c){b.className=b.className.replace(new RegExp("\\s*\\b"+c+"\\b","gi"),"")};
FSite2.hasElementClass=function(b,c){return RegExp("\\b"+c+"\\b","gi").test(b.className)};FSite2.recursiveReplace=function(b,c,d){for(var e=0;e<b.childNodes.length;e++)if(b.childNodes[e].nodeType==3)b.childNodes[e].nodeValue=b.childNodes[e].nodeValue.replace(c,d);else b.childNodes[e].nodeType==1&&FSite2.recursiveReplace(b.childNodes[e],c,d)};FSite2.showElement=function(b){b.style.display="block";b.style.visibility="visible";b.onShow&&typeof b.onShow=="function"&&b.onShow()};
FSite2.hideElement=function(b){b.onHide&&typeof b.onHide=="function"&&b.onHide();b.style.visibility="hidden";b.style.display="none"};FSite2.toggleElement=function(b){b.style.display=="none"?FSite2.showElement(b):FSite2.hideElement(b)};
FSite2.getElementsByClassName=function(b,c,d,e,f){c||(c=document);var g,h,l=c.getElementsByTagName("*");c=0;for(g=[];h=l[c++];)FSite2.hasElementClass(h,b)&&g.push(h);if(d){l=d.getElementsByTagName("*");for(c=0;h=l[c++];)FSite2.hasElementClass(h,b)&&g.push(h)}if(e){l=e.getElementsByTagName("*");for(c=0;h=l[c++];)FSite2.hasElementClass(h,b)&&g.push(h)}if(f){l=f.getElementsByTagName("*");for(c=0;h=l[c++];)FSite2.hasElementClass(h,b)&&g.push(h)}return g};
FSite2.redirectByForm=function(b,c,d){c=document.createElement("form");if($("formid")&&$("formid").tagName=="FORM")c=$("formid");else{c=document.createElement("form");c.method="get";document.body.appendChild(c)}if(typeof d=="function")c.onsubmit=d;c.action=b;c.submit();typeof c.onsubmit=="function"&&c.onsubmit()};
FSite2.extendForm=function(b,c){var d,e,f;if(FSite2.extendImage&&c.imagesClass){if(!c.imagesInterval)c.imagesInterval=1E3;if(!c.imagesSep)c.imagesSep="|";imgs=b.getElementsByTagName("img");for(e=0;e<imgs.length;e++)RegExp("\\b"+c.imagesClass+"\\b","gi").test(imgs[e].className)&&imgs[e].alt&&FSite2.extendImage(imgs[e],c)}if(FSite2.extendCheckbox||FSite2.extendRadio||FSite2.extendCalendar||FSite2.extendAutocomplete||FSite2.fakeExtendElement){d=b.getElementsByTagName("input");for(e=0;e<d.length;e++){FSite2.extendCalendar&&
c.calendarClass&&RegExp("\\b"+c.calendarClass+"\\b","gi").test(d[e].className)&&FSite2.extendCalendar(d[e],c);FSite2.extendCheckbox&&d[e].type=="checkbox"&&c.checkboxChecked&&c.checkboxUnchecked&&FSite2.extendCheckbox(d[e],c.checkboxChecked,c.checkboxUnchecked,c.disabledCheckboxChecked,c.disabledCheckboxUnchecked);FSite2.extendRadio&&d[e].type=="radio"&&c.radioChecked&&c.radioUnchecked&&FSite2.extendRadio(d[e],c.radioChecked,c.radioUnchecked,c.disabledRadioChecked,c.disabledRadioUnchecked);FSite2.extendAutocomplete&&
d[e].type=="text"&&c.autoCompleteClass&&RegExp("\\b"+c.autoCompleteClass+"\\b","gi").test(d[e].className)&&c.autoCompleteUrl&&FSite2.extendAutocomplete(d[e],c);FSite2.fakeExtendElement&&d[e].type=="text"&&FSite2.fakeExtendElement(d[e],c)}}if(FSite2.fakeExtendElement||FSite2.extendFCKeditor){d=b.getElementsByTagName("textarea");for(e=0;e<d.length;e++){FSite2.fakeExtendElement&&FSite2.fakeExtendElement(d[e],c);FSite2.extendFCKeditor&&d[e].name&&c.FCKclass&&FSite2.extendFCKeditor(d[e],c)}}if(FSite2.extendSelect||
FSite2.extendCalendar){d=b.getElementsByTagName("select");for(e=0;e<d.length;e++){FSite2.extendCalendar&&c.calendarClass&&RegExp("\\b"+c.calendarClass+"\\b","gi").test(d[e].className)&&FSite2.extendCalendar(d[e],c);if(FSite2.extendMultiCheck&&c.multiCheckClass&&RegExp("\\b"+c.multiCheckClass+"\\b","gi").test(d[e].className))FSite2.extendMultiCheck(d[e],c);else if(FSite2.extendSelect&&(d[e].className||c.selectClass)){f=c.selectImagesClass?RegExp("\\b"+c.selectImagesClass+"\\b","gi").test(d[e].className):
false;var g=d[e].className;if(c.calendarClass)g=g.replace(new RegExp("\\s*\\b"+c.calendarClass+"\\b\\s*","gi"),"");FSite2.extendSelect(d[e],c.selectClass?c.selectClass:g,f,c.selectDisabledClass)}}if(FSite2.extendCalendar)for(cal in FSite2.calendars)FSite2.calendars[cal].oninit&&FSite2.calendars[cal].oninit()}if(FSite2.extendHelper&&c.helperClass||FSite2.getAjaxAnchorTarget&&c.ajaxTargetClass||FSite2.SlideShow&&c.slideShowClass){if(FSite2.getAjaxAnchorTarget&&b.id&&FSite2.hasElementClass(b,c.ajaxTargetClass)){d=
FSite2.getAjaxAnchorTarget(c,b.id);d.extendContent()}f=b.getElementsByTagName("*");for(e=0;g=f[e++];){if(FSite2.extendHelper&&FSite2.hasElementClass(g,c.helperClass)){if(g._helper)continue;FSite2.extendHelper(g,c)}if(FSite2.getAjaxAnchorTarget&&g.id&&FSite2.hasElementClass(g,c.ajaxTargetClass)){d=FSite2.getAjaxAnchorTarget(c,g.id);d.extendContent()}FSite2.SlideShow&&c.slideShowClass&&FSite2.hasElementClass(g,c.slideShowClass)&&new FSite2.SlideShow(g,c)}}FSite2.extendGalleries&&c.galleryClass&&FSite2.extendGalleries(b,
c);if(FSite2.extendAnchors&&(c.layerAnchorClass||c.ajaxAnchorClass||c.hashAnchorClass))FSite2.extendAnchors(b,c);FSite2.processHashParams&&c.processHash&&FSite2.processHashParams()};FSite2.updateFormState=function(b){var c,d;c=b.getElementsByTagName("input");for(d=0;d<c.length;d++)typeof c[d]._updateState=="function"&&c[d]._updateState();c=b.getElementsByTagName("select");for(d=0;d<c.length;d++)typeof c[d]._updateState=="function"&&c[d]._updateState()};
FSite2.loadScript=function(b){if(b.constructor!=Array)b=new Array(b);for(var c=0;c<b.length;c++){var d=document.getElementsByTagName("head"),e;if(d.length>0){e=document.createElement("script");e.type="text/javascript";e.src=b[c];d[0].appendChild(e)}else document.write('<script src="'+b[c]+'" type="text/javascript"><\/script>')}};
FSite2.getScriptTag=function(b){var c=document.getElementsByTagName("script"),d,e;if(b&&typeof b=="string")e=new RegExp("^(.*/)?"+b.replace(".",".")+"$");for(var f=c.length-1;f>=0;f--){b=c[f].src.split("?");if(!(e&&!e.exec(b[0]))){d=c[f];break}}return d};FSite2.getScriptBaseURL=function(b){if(b=typeof b=="object"&&b.tagName=="SCRIPT"?b:FSite2.getScriptTag(b)){b=b.src.split("?")[0].split("/");b.pop();return b.join("/")+"/"}};
FSite2.parseScriptParams=function(b){var c;c=typeof b=="object"&&b.tagName=="SCRIPT"?b:FSite2.getScriptTag(b);b={};if(c){c=c.src.split("?");if(c[1]){c=c[1].split("&");for(var d=0;d<c.length;d++){var e=c[d].split("=");b[e[0]]||(b[e[0]]=[]);b[e[0]].push(e[1])}}}return b};
FSite2.loadScriptsFromParam=function(b,c){b||(b="load");var d=FSite2.getScriptTag("FSite2.js");if(d){c||(c=FSite2.getScriptBaseURL(d));d=FSite2.parseScriptParams(d);if(d[b]){d=d[b][0].split(",");for(var e=0;e<d.length;e++)d[e]=c+d[e]+".js";FSite2.loadScript(d)}}};FSite2.loadScriptsFromParam();window.getContentHeight=function(){if(document.documentElement&&document.documentElement.scrollHeight)return document.documentElement.scrollHeight;else if(document.body&&document.body.scrollHeight)return document.body.scrollHeight;return false};window.getContentWidth=function(){if(document.documentElement&&document.documentElement.scrollWidth)return document.documentElement.scrollWidth;else if(document.body&&document.body.scrollWidth)return document.body.scrollWidth;return false};
window.getWindowHeight=function(){if(window.innerHeight)return window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)return document.body.clientHeight;return false};
window.getWindowWidth=function(){if(window.innerWidth)return window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)return document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)return document.body.clientWidth;return false};
window.getScrollX=function(){if(document.documentElement&&document.documentElement.scrollLeft)return document.documentElement.scrollLeft;else if(document.body&&document.body.scrollLeft)return document.body.scrollLeft;else if(window.pageXOffset)return window.pageXOffset;else if(window.scrollX)return window.scrollX;return 0};
window.getScrollY=function(){if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;else if(document.body&&document.body.scrollTop)return document.body.scrollTop;else if(window.pageYOffset)return window.pageYOffset;else if(window.scrollY)return window.scrollY;return 0};
window.getObjectHeight=function(b){if(!b)return false;if(b.style&&b.style.height)return b.style.height.replace(new RegExp("[^0-9]","gi"),"");else if(b.offsetHeight)return b.offsetHeight;return 0};window.getObjectWidth=function(b){if(!b)return false;if(b.style&&b.style.width)return b.style.width.replace(new RegExp("[^0-9]","gi"),"");else if(b.offsetWidth)return b.offsetWidth;return 0};
window.getMouseXY=function(b){var c=[];if(/Internet Explorer$/.test(navigator.appName)?true:false){c[0]=event.clientX+document.documentElement.scrollLeft;c[1]=event.clientY+document.documentElement.scrollTop}else{c[0]=b.pageX;c[1]=b.pageY}if(c[0]<0)c[0]=0;if(c[1]<0)c[1]=0;c.height=c[1];c.width=c[0];return c};FSite2.Layer=function(b,c,d){var e;if(d&&(e=document.getElementById(d)))this.object=e;else{this.object=document.createElement("div");if(d)this.object.id=d;document.body.appendChild(this.object)}c&&this.hide();if(b)this.object.className=b;this.object.style.position="absolute";this.object.style.left="0px";this.object.style.top="0px";return this};
FSite2.Layer.prototype.fullScreen=function(b){if(!b){b=document.getElementsByTagName("object");var c=document.getElementsByTagName("embed"),d;if(!this._hideElements){this._hideElements=true;for(d=0;d<b.length;d++){if(b[d].style.visibility!=null)b[d]._visibility=b[d].style.visibility;b[d].style.visibility="hidden"}for(d=0;d<c.length;d++){if(c[d].style.visibility!=null)c[d]._visibility=c[d].style.visibility;c[d].style.visibility="hidden"}}}this.object.style.width=window.getContentWidth()+"px";this.object.style.height=
window.getContentHeight()+"px";this.object.style.left="0px";this.object.style.top="0px"};FSite2.Layer.prototype.center=function(){this.object.style.left=window.getScrollX()+Math.round((window.getWindowWidth()-window.getObjectWidth(this.object))/2)+"px";var b=window.getScrollY()+Math.round((window.getWindowHeight()-window.getObjectHeight(this.object))/2);if(b<0)b=0;this.object.style.top=b+"px"};
FSite2.Layer.prototype.remove=function(){if(this.object){FSite2.removeCalendars&&FSite2.removeCalendars(this.object);this.object.parentNode&&this.object.parentNode.removeChild(this.object);this.object=null}if(this._hideElements){var b=document.getElementsByTagName("object"),c=document.getElementsByTagName("embed"),d;for(d=0;d<b.length;d++)if(b[d]._visibility!=null)b[d].style.visibility=b[d]._visibility;for(d=0;d<c.length;d++)if(c[d]._visibility!=null)c[d].style.visibility=c[d]._visibility;this._hideElements=
false}};FSite2.Layer.prototype.isVisible=function(){return this.object.style.display!="none"};FSite2.Layer.prototype.show=function(){this.object.style.display="block";this.center();this.object.style.visibility="visible";this.object.onShow&&typeof this.object.onShow=="function"&&this.object.onShow()};FSite2.Layer.prototype.hide=function(){this.object.onHide&&typeof this.object.onHide=="function"&&this.object.onHide();this.object.style.display="none";this.object.style.visibility="hidden"};FSite2.Location=function(b){this.href=b;this.parse()};FSite2.Location.prototype.replace=function(b){this.href=b;this.parse()};
FSite2.Location.prototype.parse=function(){var b;if(this.href){b=(new RegExp("^((http[s]?|ftp)://(([^:/?#]+)(:([0-9]+))?))?(([^?#]*)(\\?[^#]*)?(#.*)?)?$","g")).exec(this.href);this.protocol=b[2]?b[2]:"";this.host=b[3]?b[3]:"";this.hostname=b[4]?b[4]:"";this.port=b[6]?b[6]:"";this.pathname=b[8]?b[8]:"";this.search=b[9]?b[9]:"";this.parameters={};var c=this.search.replace(/\?/,"").split("&"),d;for(d=0;d<c.length;d++)if(c[d]){var e=c[d].split("=");this.parameters[e[0]]=e[1]}this.hash=b[10]?b[10]:"";
return true}this.hash=this.search=this.pathname=this.port=this.hostname=this.host=this.protocol="";return false};FSite2.Location.prototype.appendParams=function(b){if(typeof b!="object"){this.search+=(this.search?"&":"?")+b;return true}for(var c in b){this.parameters[c]=b[c];this.search+=(this.search?"&":"?")+encodeURIComponent(c)+"="+encodeURIComponent(b[c])}return true};
FSite2.Location.prototype.toString=function(){var b="";if(this.protocol&&this.host)b+=this.protocol+"://"+this.host;if(this.pathname)b+=this.pathname;if(this.search)b+=this.search;if(this.hash)b+=this.hash;return b};FSite2.proccessHrefParams=function(b){b=new FSite2.Location(b.href);var c=b.hash;b.hash=null;var d=new FSite2.Location(window.location.toString());d.hash=null;if(b.toString()==d.toString()){document._FSite2Hash=c.substr(1);FSite2.proccessHashParams();return false}return true};
FSite2.proccessHashParams=function(){if(document._FSite2Hash==null)document._FSite2Hash=window.location.hash.toString().substr(1);var b=document._FSite2Hash,c;if(b.length>=2){c=b.split(",");if(!(b=document.getElementById(c[0])))return true;if(c.length>1){for(var d=[],e=1;e<c.length;e++)d[e-1]=c[e];c=d.join(",")}else c="";document._FSite2Hash=c;if(b.rel)if((c=document.getElementById(b.rel))&&c.style.display!="none"&&c.style.visibility!="hidden"){FSite2.proccessHashParams();return false}b.onclick();
return false}};FSite2.processHashParams=FSite2.proccessHashParams;Date.prototype.getDays=function(){return 32-(new Date(this.getFullYear(),this.getMonth(),32)).getDate()};Date.prototype.getFormatted=function(){return this.getFullYear()+"-"+(this.getMonth()<9?"0":"")+(this.getMonth()+1)+"-"+(this.getDate()<10?"0":"")+this.getDate()};Date.parseString=function(b){b=Date.parse(b.replace(/-/g,"/"));if(isNaN(b))return false;return new Date(b)};FSite2._ajaxSendRequest=function(){if(this.sendIframe){this.sendIframe.target="responseIframe"+this.iframeNumber;setTimeout("document."+this.sendIframe.name+".submit()",10)}else{this.httpRequest.open(this.method&&this.method!="get"?"POST":"GET",this.location.toString(),true);if(this.method=="get"){this.httpRequest.setRequestHeader("X-Requested-With","XMLHttpRequest");this.httpRequest.send()}else{if(this.param&&this.param.length>0){this.httpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
this.httpRequest.setRequestHeader("Content-length",this.param.length)}this.httpRequest.setRequestHeader("X-Requested-With","XMLHttpRequest");this.httpRequest.send(this.param?this.param:null)}}};
FSite2.sendForm=function(b,c,d,e,f){this.elementsToString=FSite2.elementsToString;this.getFormElements=FSite2.getFormElements;requestParam=this.elementsToString(this.getFormElements(b));if(this.sendIframe)this.sendIframe=b;requestMethod=d?d=="get"?"get":"post":b.method?b.method:"get";b=new FSite2.Location(e?e:b.getAttribute("action",2)?decodeURI(b.getAttribute("action",2)):document.location.toString());requestMethod=="get"&&b.appendParams(requestParam);b.pathname=encodeURI(b.pathname);b.search=encodeURI(b.search);
b=b.toString();return new FSite2.HTTPRequest(b,c,requestMethod,requestParam,f?true:null,null,this.sendIframe)};FSite2.getFormElements=function(b){el=b.getElementsByTagName("*");els=[];for(i=0;i<el.length;i++)if(el[i].tagName=="INPUT"&&el[i].disabled!=true&&el[i].name||el[i].tagName=="SELECT"&&el[i].disabled!=true&&el[i].name||el[i].tagName=="TEXTAREA"&&el[i].disabled!=true&&el[i].name)els.push(el[i]);return els};
FSite2.elementsToString=function(b){str="";for(i=0;i<b.length;i++)if(b[i].type=="checkbox"||b[i].type=="radio"){if(b[i].checked)str+="&"+b[i].name+"="+encodeURIComponent(b[i].value)}else if(b[i].type=="file")this.sendIframe=true;else str+="&"+b[i].name+"="+encodeURIComponent(b[i].value);return str.substr(1,str.length-1)};FSite2._iframeTransports=[];
FSite2._iframeReady=function(b){responseIframe=document.getElementById(b.sendIframe.target);var c;if(responseIframe)if(responseIframe.contentDocument)c=responseIframe.contentDocument;else if(responseIframe.contentWindow)c=responseIframe.contentWindow.document;else if(responseIframe.document)c=responseIframe.document;if(c&&(!c.readyState||c.readyState=="complete")&&c.body.innerHTML.length>5){if(!b.httpRequest.getResponseHeader("X-Form-Eval")){b.httpRequest.responseText=c.body.innerHTML;b.loaded&&b.loaded()}setTimeout(function(){responseIframe.parentNode.removeChild(responseIframe);
delete responseIframe;delete b},500)}};FSite2._iframeGetResponseHeader=function(b){if(responseIframe=document.getElementById(this.sendIframe.target)){var c;if(responseIframe.contentDocument)c=responseIframe.contentDocument;else if(responseIframe.contentWindow)c=responseIframe.contentWindow.document;else if(responseIframe.document)c=responseIframe.document;var d=c.documentElement.getElementsByTagName("meta");for(c=0;c<d.length;c++)if(d[c].httpEquiv&&d[c].httpEquiv==b)return d[c].content}return null};
FSite2._ajaxReady=function(b){if(b.httpRequest.readyState==4)if(b.httpRequest.status==301||b.httpRequest.status==302){if(reply_url=b.httpRequest.getResponseHeader("Location")){reply_url=b.httpRequest.getResponseHeader("Location");reply_loaded=b.loaded;reply_method=b.method?b.method:null;reply_param=b.param?b.param:null;if(b._level<3)new FSite2.HTTPRequest(reply_url,reply_loaded,reply_method,reply_param,null,b._level?b._level:null)}}else if(b.httpRequest.status==200){b.httpRequest.getResponseHeader("X-Form-Cookie")&&
b.setCookie();b.httpRequest.getResponseHeader("X-Form-Script")&&b.executeScript();if(b.httpRequest.getResponseHeader("X-Form-Eval"))eval(b.httpRequest.responseText);else b.loaded&&b.loaded()}};
FSite2.HTTPRequest=function(b,c,d,e,f,g,h){this.ajaxSendRequest=FSite2._ajaxSendRequest;this.ajaxReady=FSite2._ajaxReady;this.iframeReady=FSite2._iframeReady;this.method=d;this.param=e;this.sendIframe=h;this.location=new FSite2.Location(b);if(g)this._level=g+1;else if(isNaN(new Number(this._level)))this._level=1;else this._level++;b="load="+(Math.random()*1E18).toString();if(this.method=="get")this.param="";this.location.search+=this.location.search?(this.location.search!="?"?"&":"")+b:"?"+b;this.loaded=
false;if(c)this.loaded=c;if(this.sendIframe){this.httpRequest={sendIframe:this.sendIframe,responseText:"",getResponseHeader:FSite2._iframeGetResponseHeader};this.iframeNumber=FSite2._iframeTransports.push(this)-1;c="responseIframe"+this.iframeNumber;if(navigator.appName.indexOf("Microsoft")!=-1)b=document.createElement('<iframe name="'+c+'">');else{b=document.createElement("iframe");b.setAttribute("name",c)}document.body.appendChild(b);b.id=c;b.style.display="none";b.iframeReady=this.iframeReady;
if(b.addEventListener)b.addEventListener("load",FSite2._callRef(this.iframeReady,this),false);else b.attachEvent&&b.attachEvent("onload",FSite2._callRef(this.iframeReady,this))}else{if(window.XMLHttpRequest){this.httpRequest=new XMLHttpRequest;this.httpRequest.overrideMimeType&&this.httpRequest.overrideMimeType("text/xml")}else if(window.ActiveXObject)try{this.httpRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(l){try{this.httpRequest=new ActiveXObject("Microsoft.XMLHTTP")}catch(m){}}if(!this.httpRequest)return false;
this.httpRequest.onreadystatechange=FSite2._callRef(this.ajaxReady,this)}f||this.ajaxSendRequest();return this};FSite2.HTTPRequest.prototype.setCookie=function(){var b;if(b=this.httpRequest.getResponseHeader("Set-Cookie"))document.cookie=b};FSite2.HTTPRequest.prototype.executeScript=function(){for(var b=this.httpRequest.responseXML.documentElement.getElementsByTagName("script"),c,d=0;d<b.length;d++)(c=b[d].getAttribute("src"))?FSite2.loadScript(c):eval(b[d].firstChild.nodeValue)};
FSite2.anchorsTarget={};FSite2.getAjaxAnchorTarget=function(b,c){FSite2.anchorsTarget[c]||(FSite2.anchorsTarget[c]=new FSite2.AjaxAnchor(b,c));return FSite2.anchorsTarget[c]};
FSite2.extendAnchors=function(b,c){var d,e=b.getElementsByTagName("a"),f=b.getElementsByTagName("area"),g=false,h,l;for(d=0;d<e.length+f.length;d++){l=d<e.length?e[d]:f[d-e.length];if(FSite2.processHrefParams&&c.hashAnchorClass&&FSite2.hasElementClass(l,c.hashAnchorClass)){if(l.onclick)l._onclick_hash=l.onclick;l.onclick=function(){var m=true;if(typeof this._onclick_hash=="function")if(this._onclick_hash()===false)m=false;if(!m)return false;return FSite2.processHrefParams(this)}}else if(c.layerAnchorClass&&
FSite2.hasElementClass(l,c.layerAnchorClass)){g||(g=new FSite2.AjaxLayer(c));g.addAnchor(l)}else if(c.ajaxAnchorClass&&FSite2.hasElementClass(l,c.ajaxAnchorClass)&&l.rel){h=FSite2.getAjaxAnchorTarget(c,l.rel);h.addAnchor(l)}}};
FSite2.removeAjaxAnchors=function(b){var c=b.getElementsByTagName("a");b=b.getElementsByTagName("area");for(var d,e=0;e<c.length+b.length;e++){d=e<c.length?c[e]:b[e-c.length];if(d._ajaxAnchor){d._ajaxAnchor._anchorsCount--;d._ajaxAnchor._anchorsCount<=0&&delete FSite2.anchorsTarget[d._ajaxAnchor.targetId];d._ajaxAnchor=null}}};
FSite2.AjaxAnchor=function(b,c){this.formClass=b.ajaxFormClass?b.ajaxFormClass:false;this.loaderId=b.ajaxLoaderId?b.ajaxLoaderId:c+"_loader";this.targetId=c;this._loaderElement=document.getElementById(this.loaderId);this._targetElement=document.getElementById(this.targetId);this._anchorsCount=0;if(this._targetElement){this._targetElement._ajaxAnchor=this;if(typeof b.ajaxOnShow=="function")this._targetElement.onShow=b.ajaxOnShow;if(typeof b.ajaxOnHide=="function")this._targetElement.onHide=b.ajaxOnHide;
if(typeof b.ajaxOnLoad=="function")this._targetElement.onLoad=b.ajaxOnLoad;if(typeof b.ajaxOnUnload=="function")this._targetElement.onUnload=b.ajaxOnUnload}if(this._loaderElement){this._loaderElement._ajaxAnchor=this;if(typeof b.ajaxLoaderOnShow=="function")this._loaderElement.onShow=b.ajaxLoaderOnShow;if(typeof b.ajaxLoaderOnHide=="function")this._loaderElement.onHide=b.ajaxLoaderOnHide}};
FSite2.AjaxAnchor.prototype.addAnchor=function(b){if(!this._targetElement)return true;if(b!=this._targetElement&&b._ajaxAnchor)return true;b._ajaxAnchor=this;this._anchorsCount++;if(b.onclick)b._onclick_ajax=b.onclick;b.onclick=function(c){if(!c)c=window.event;var d=true;if(this._onclick_ajax)if(this._onclick_ajax(c)===false)d=false;if(!d)return false;c=new FSite2.Location(this.getAttribute("href",2));c.pathname=encodeURI(c.pathname);c.search=encodeURI(c.search);c=c.toString();this.httpRequest=new FSite2.HTTPRequest(c,
function(){this._ajaxAnchor._targetElement.onUnload&&this._ajaxAnchor._targetElement.onUnload();FSite2.removeCalendars&&FSite2.removeCalendars(this._ajaxAnchor._targetElement);FSite2.removeAjaxAnchors&&FSite2.removeAjaxAnchors(this._ajaxAnchor._targetElement);this._ajaxAnchor._targetElement.innerHTML=this.httpRequest.responseText;this._ajaxAnchor.extendContent();this._ajaxAnchor._targetElement.onLoad&&this._ajaxAnchor._targetElement.onLoad();this._ajaxAnchor._loaderElement&&FSite2.hideElement(this._ajaxAnchor._loaderElement);
FSite2.showElement(this._ajaxAnchor._targetElement)},"get","",true);this._ajaxAnchor._targetElement.httpRequest=this.httpRequest;this.httpRequest._ajaxAnchor=this._ajaxAnchor;this._ajaxAnchor._loaderElement&&FSite2.showElement(this._ajaxAnchor._loaderElement);FSite2.hideElement(this._ajaxAnchor._targetElement);this.httpRequest.ajaxSendRequest();return false}};
FSite2.AjaxAnchor.prototype.extendContent=function(){for(var b=this._targetElement.getElementsByTagName("form"),c=0;c<b.length;c++)this.formClass&&!FSite2.hasElementClass(b[c],this.formClass)||this.addForm(b[c])};
FSite2.AjaxAnchor.prototype.addForm=function(b){if(!b._ajaxAnchor)if(b.tagName=="FORM"){b._ajaxAnchor=this;b._onsubmit_anchor=b.onsubmit;b.ajaxSubmit=this.sendForm;b.onsubmit=function(c){if(!c)c=window.event;if(typeof this._onsubmit_anchor=="function")if(!this._onsubmit_anchor(c))return false;this.ajaxSubmit();return false}}};
FSite2.AjaxAnchor.prototype.sendForm=function(){this.httpRequest=new FSite2.sendForm(this,function(){if(this.httpRequest.getResponseHeader("X-Form-Eval")&&this.httpRequest.getResponseHeader("X-Form-Eval"))eval(this.httpRequest.responseText);else{this._ajaxAnchor._targetElement.onUnload&&this._ajaxAnchor._targetElement.onUnload();FSite2.removeCalendars&&FSite2.removeCalendars(this._ajaxAnchor._targetElement);FSite2.removeAjaxAnchors&&FSite2.removeAjaxAnchors(this._ajaxAnchor._targetElement);this._ajaxAnchor._targetElement.innerHTML=
this.httpRequest.responseText;this._ajaxAnchor._targetElement.onLoad&&this._ajaxAnchor._targetElement.onLoad();this._ajaxAnchor.extendContent();this._ajaxAnchor._loaderElement&&FSite2.hideElement(this._ajaxAnchor._loaderElement);FSite2.showElement(this._ajaxAnchor._targetElement)}},null,null,true);this._ajaxAnchor._loaderElement&&FSite2.showElement(this._ajaxAnchor._loaderElement);FSite2.hideElement(this._ajaxAnchor._targetElement);this._ajaxAnchor._targetElement.httpRequest=this.httpRequest;this.httpRequest._ajaxAnchor=
this._ajaxAnchor;this.httpRequest.ajaxSendRequest()};
FSite2.AjaxLayer=function(b){this.backgroundId=b.layerBackgroundId?b.layerBackgroundId:"FSite2_layer_background";this.backgroundClass=b.layerBackgroundClass?b.layerBackgroundClass:"layer_background";this.loaderId=b.layerLoaderId?b.layerLoaderId:"FSite2_layer_loader";this.loaderClass=b.layerLoaderClass?b.layerLoaderClass:"layer_loader";this.contentId=b.layerContentId?b.layerContentId:null;this.contentClass=b.layerContentClass?b.layerContentClass:"layer_content";this.closeClass=b.layerCloseClass?b.layerCloseClass:
"layer_close";this.onLoad=typeof b.layerOnLoad=="function"?b.layerOnLoad:false;this.onUnload=typeof b.layerOnUnload=="function"?b.layerOnUnload:false;this.onShow=typeof b.layerOnShow=="function"?b.layerOnShow:false;this.onHide=typeof b.layerOnHide=="function"?b.layerOnHide:false};
FSite2.AjaxLayer.prototype.addAnchor=function(b){if(b._ajaxLayer)return true;b._ajaxLayer=this;if(b.onclick)b._onclick_ajax=b.onclick;b.onclick=function(c){if(!c)c=window.event;var d=true;if(this._onclick_ajax)if(this._onclick_ajax(c)===false)d=false;if(!d)return false;c=new FSite2.Location(this.getAttribute("href",2));c.pathname=encodeURI(c.pathname);c.search=encodeURI(c.search);c=c.toString();this.httpRequest=new FSite2.HTTPRequest(c,function(){this._ajaxLayer._contentLayer.object.innerHTML=this.httpRequest.responseText;
this._ajaxLayer.extendLayer();this._ajaxLayer._contentLayer.object.onLoad&&this._ajaxLayer._contentLayer.object.onLoad();this._ajaxLayer._loaderLayer.hide();this._ajaxLayer._contentLayer.show();this.contentLayer=this.loaderLayer=this.backgroundLayer=null},"get","",true);this.httpRequest._ajaxLayer=this._ajaxLayer;this.httpRequest._ajaxLayer._backgroundLayer=new FSite2.Layer(this.httpRequest._ajaxLayer.backgroundClass,true,this.httpRequest._ajaxLayer.backgroundId);this.httpRequest._ajaxLayer._backgroundLayer.show();
this.httpRequest._ajaxLayer._backgroundLayer.fullScreen();this.httpRequest._ajaxLayer._contentLayer=new FSite2.Layer(this.httpRequest._ajaxLayer.contentClass,true,this.httpRequest._ajaxLayer.contentId);this.httpRequest._ajaxLayer._contentLayer.object.httpRequest=this.httpRequest;this.httpRequest._ajaxLayer._contentLayer.object.onShow=this.httpRequest._ajaxLayer.onShow?this.httpRequest._ajaxLayer.onShow:false;this.httpRequest._ajaxLayer._contentLayer.object.onHide=this.httpRequest._ajaxLayer.onHide?
this.httpRequest._ajaxLayer.onHide:false;this.httpRequest._ajaxLayer._contentLayer.object.onLoad=this.httpRequest._ajaxLayer.onLoad?this.httpRequest._ajaxLayer.onLoad:false;this.httpRequest._ajaxLayer._contentLayer.object.onUnload=this.httpRequest._ajaxLayer.onUnload?this.httpRequest._ajaxLayer.onUnload:false;this.httpRequest._ajaxLayer._contentLayer.hide();this.httpRequest._ajaxLayer._loaderLayer=new FSite2.Layer(this.httpRequest._ajaxLayer.loaderClass,true,this.httpRequest._ajaxLayer.loaderId);
this.httpRequest._ajaxLayer._loaderLayer.show();this.httpRequest.ajaxSendRequest();return false}};
FSite2.AjaxLayer.prototype.closeLayer=function(){this._loaderLayer.remove();this._loaderLayer=null;this._contentLayer.hide();this._contentLayer.object.onUnload&&this._contentLayer.object.onUnload();FSite2.removeCalendars&&FSite2.removeCalendars(this._contentLayer.object);FSite2.removeAjaxAnchors&&FSite2.removeAjaxAnchors(this._contentLayer.object);this._contentLayer.remove();this._contentLayer=null;this._backgroundLayer.remove();this._backgroundLayer=null};
FSite2.AjaxLayer.prototype.extendLayer=function(){var b=FSite2.getElementsByClassName(this.closeClass,this._contentLayer.object),c;for(c=0;c<b.length;c++){b[c]._ajaxLayer=this;b[c].onclick=function(){this._ajaxLayer.closeLayer()}}b=this._contentLayer.object.getElementsByTagName("form");for(c=0;c<b.length;c++){b[c]._ajaxLayer=this;b[c]._onsubmit_layer=b[c].onsubmit;b[c].ajaxSubmit=this.sendForm;b[c].onsubmit=function(d){if(!d)d=window.event;if(typeof this._onsubmit_layer=="function")if(!this._onsubmit_layer(d))return false;
this.ajaxSubmit();return false}}};
FSite2.AjaxLayer.prototype.sendForm=function(){this._ajaxLayer._contentLayer.hide();this._ajaxLayer._loaderLayer.show();this.httpRequest=new FSite2.sendForm(this,function(){if(this.httpRequest.getResponseHeader("X-Form-Eval")&&this.httpRequest.getResponseHeader("X-Form-Eval"))eval(this.httpRequest.responseText);else{FSite2.removeCalendars&&FSite2.removeCalendars(this._ajaxLayer._contentLayer.object);FSite2.removeAjaxAnchors&&FSite2.removeAjaxAnchors(this._ajaxLayer._contentLayer.object);this._ajaxLayer._contentLayer.object.innerHTML=
this.httpRequest.responseText;this._ajaxLayer.extendLayer();this._ajaxLayer._contentLayer.object.onLoad&&this._ajaxLayer._contentLayer.object.onLoad();this._ajaxLayer._loaderLayer.hide();this._ajaxLayer._contentLayer.show()}},null,null,true);this._ajaxLayer._contentLayer.httpRequest=this.httpRequest;this.httpRequest._ajaxLayer=this._ajaxLayer;this.httpRequest.ajaxSendRequest()};FSite2.Anim={};FSite2.Anim.fps=25;FSite2.Anim.animations=[];FSite2.Anim._interval=null;FSite2.Anim._processAnimations=function(){var b;for(b=0;b<FSite2.Anim.animations.length;b++)FSite2.Anim.animations[b].step()&&b--;if(b==0){clearInterval(FSite2.Anim._interval);FSite2.Anim._interval=null}};FSite2.Anim.linear=function(b){if(typeof b=="object"){b.step=(b.end-b.start)/(b.time/1E3*FSite2.Anim.fps);b.value+=b.step}};
FSite2.Anim.test=function(b){if(typeof b=="object"){if(b.speed==null)b.speed=10;b.value+=(b.end-b.value)/b.speed}};FSite2.Animation=function(b,c,d,e,f){this.object=b;this.property=c;this.anim=d;this.animParams={time:1};this.valueParams={template:"#",precision:1};var g;if(e&&typeof e=="object")for(g in e)this.animParams[g]=e[g];if(f&&typeof f=="object")for(g in f)this.valueParams[g]=f[g];e.dontStart||this.start()};
FSite2.Animation.prototype.start=function(){if(typeof this.animParams.onStart=="function")if(this.animParams.onStart()===false)return;if(this.animParams.start==undefined)this.animParams.start=parseFloat(this.object[this.property]);if(this.animParams.value==undefined)this.animParams.value=this.animParams.start;this.animParams.lastValue=this.animParams.value;this.isRunning()||FSite2.Anim.animations.push(this);this.setValue();if(FSite2.Anim._interval==null)FSite2.Anim._interval=setInterval(FSite2.Anim._processAnimations,
1E3/FSite2.Anim.fps)};FSite2.Animation.prototype.isRunning=function(){for(i=0;i<FSite2.Anim.animations.length;i++)if(FSite2.Anim.animations[i]===this)return true;return false};FSite2.Animation.prototype.stop=function(){for(i=0;i<FSite2.Anim.animations.length;i++)FSite2.Anim.animations[i]===this&&FSite2.Anim.animations.splice(i,1)};
FSite2.Animation.prototype.step=function(){this.animParams.lastValue=this.animParams.value;this.anim(this.animParams);if(typeof this.animParams.onStep=="function")if(this.animParams.onStep()===false)return true;return this.setValue()};
FSite2.Animation.prototype.setValue=function(){var b=Math.round(this.animParams.value/this.valueParams.precision)*this.valueParams.precision;if(this.animParams.lastValue<=this.animParams.end&&b>=this.animParams.end||this.animParams.lastValue>=this.animParams.end&&b<=this.animParams.end)b=this.animParams.end;var c=this.valueParams.template.replace("#",b);if(this.object[this.property]!=c)this.object[this.property]=c;if(b==this.animParams.end){this.stop();if(typeof this.animParams.onComplete=="function"){b=
this.animParams.onComplete();typeof this.animParams.chainAnimation=="object"&&this.animParams.chainAnimation.constructor===FSite2.Animation&&b!==false&&this.animParams.chainAnimation.start()}this.animParams.value=undefined;this.animParams.lastValue=undefined;return true}else return false};FSite2.Anim.animatePixels=function(b,c,d,e){return new FSite2.Animation(b.style,c,d,e,{template:"#px",precision:1})};
FSite2.Anim.animateOpacity=function(b,c,d){if(window.navigator.userAgent.indexOf("MSIE")===-1)return new FSite2.Animation(b.style,"opacity",c,d,{precision:0.01});else{var e={};for(var f in d)e[f]=d[f];e.start=Math.round(e.start*100);e.end=Math.round(e.end*100);return new FSite2.Animation(b.style,"filter",c,e,{template:"alpha(opacity=#)"})}};FSite2._autoCompleteClose=function(b){if(this&&!b)b=this;if(b._autocomplete._send)b._autocomplete._stopRequest=true;if(b._autocomplete._sendtimeout)b._autocomplete._stopRequest=true;if(b._autocomplete._div){b._autocomplete._div.style.display="none";b._autocomplete._div.style.visibility="hidden";b._autocomplete._div.innerHTML="";b._autocomplete._table=null}};FSite2._autoCompleteInitClose=function(){this._timeout=setTimeout(FSite2._callRef(this.autoCompleteClose,this),200)};
FSite2._autoCompleteCancelClose=function(b){if(this&&!b)b=this;if(b._timeout){clearTimeout(b._timeout);b._timeout=null}};FSite2._autoCompleteInitCancelClose=function(){setTimeout(FSite2._callRef(FSite2._autoCompleteCancelClose,this),100)};
FSite2._autoCompleteSetSroll=function(){if(this._autocomplete._rows[this._selected<0?0:this._selected].offsetTop+this._autocomplete._rows[this._selected<0?0:this._selected].offsetHeight>this._autocomplete._div.scrollTop+this._autocomplete._div.clientHeight)this._autocomplete._div.scrollTop=this._autocomplete._rows[this._selected<0?0:this._selected].offsetTop+this._autocomplete._rows[this._selected<0?0:this._selected].offsetHeight-this._autocomplete._div.clientHeight;if(this._autocomplete._rows[this._selected<
0?0:this._selected].offsetTop<this._autocomplete._div.scrollTop)this._autocomplete._div.scrollTop=this._autocomplete._rows[this._selected<0?0:this._selected].offsetTop;return false};FSite2._autoCompleteSetClassName=function(b,c,d){cells=c.getElementsByTagName("td");for(a=0;a<cells.length;a++)cells[a].className=d?cells[a].className.replace(new RegExp("\\s*\\b"+b+"\\b\\s*","gi"),""):cells[a].className+" "+b};FSite2._autoCompleteOnClick=function(){};
FSite2._autoCompleteOnKeyDown=function(b){if(!b)b=window.event;if(b.keyCode==27)this.autoCompleteInitClose();else if(b.keyCode==13||b.keyCode==9){if(this._selected>=0&&this._selected<this._autocomplete._rows.length){td=this._autocomplete._rows[this._selected].getElementsByTagName("td");if(td.length>0)if(td[0].onclick){td[0].onclick();this.autoCompleteClose()}if(this._autocomplete._rows[this._selected].onclick){this._autocomplete._rows[this._selected].onclick();this.autoCompleteClose()}}this._autocomplete.returnFalse=
false;if(b.keyCode==13){this._autocomplete.returnFalse=true;b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}else return true}else if(b.keyCode==33){page=Math.floor(this._autocomplete._div.clientHeight/this._autocomplete._rows[0].offsetHeight);if(this._selected>=0){this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected],true);this._selected-=page;if(this._selected<0)this._selected=0;this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected]);
this.autoCompleteSetSroll()}return false}else if(b.keyCode==34){page=Math.floor(this._autocomplete._div.clientHeight/this._autocomplete._rows[0].offsetHeight);if(this._selected<0)this._selected=page-1;else if(this._selected<this._autocomplete._rows.length-1){this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected],true);this._selected+=page}if(this._selected>=this._autocomplete._rows.length)this._selected=this._autocomplete._rows.length-1;this.autoCompleteSetClassName("selected",
this._autocomplete._rows[this._selected]);this.autoCompleteSetSroll();return false}else if(b.keyCode==40){if(this._autocomplete._rows.length>0)if(this._selected<0)this._selected=0;else this._selected<this._autocomplete._rows.length-1&&this._selected++;else return false;this._selected>0&&this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected-1],true);this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected]);this.autoCompleteSetSroll();return false}else if(b.keyCode==
38){if(this._selected<0)return false;if(this._selected>this._autocomplete._rows.length)this._selected=this._autocomplete._rows.length;this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected],true);if(this._selected>0){this._selected--;this.autoCompleteSetClassName("selected",this._autocomplete._rows[this._selected])}else{this._selected=-1;this.focus()}this.autoCompleteSetSroll();return false}return true};
FSite2._autoCompleteBuildRequest=function(b){this._autocomplete._hidden=false;this.autoCompleteSendRequest(b)};FSite2._autoCompleteSetUrl=function(b){this._autocomplete._url=b;b=b.match(new RegExp(":([a-zA-Z0-9]+):","g"));for(var c=b.length,d,e=0;e<c;e++){d=b[e].toString();this._autocomplete._urlParams[d.substr(1,d.length-2)]=""}};FSite2._autoCompleteSetUrlParam=function(b,c){this._autocomplete._urlParams[b]=c};
FSite2._autoCompleteSendRequest=function(b){var c=FSite2.cloneObject(this._autocomplete._urlParams),d=this._autocomplete._url;c.value=this.value;c.name=this.name;c.id=this.id?this.id:"";c.form=this.form?this.form.name:"";for(var e in c)d=d.replace(":"+e+":",encodeURIComponent(c[e]));this.HTTPRequest=new FSite2.HTTPRequest(d,function(){this.object._autocomplete._send=false;this.object._selected=-1;this.object._autocomplete._div.innerHTML=this.httpRequest.responseText;var f=this.object._autocomplete._div.getElementsByTagName("table");
if(f.length>0){this.object._autocomplete._table=f[0];this.object._autocomplete._rows=f[0].getElementsByTagName("tr");for(r=0;r<this.object._autocomplete._rows.length;r++){this.object._autocomplete._rows[r]._number=r;this.object._autocomplete._rows[r]._object=this.object;this.object._autocomplete._rows[r].onmouseover=function(){FSite2._autoCompleteSetClassName("hover",this)};this.object._autocomplete._rows[r].onmouseout=function(){FSite2._autoCompleteSetClassName("hover",this,true)}}if(!this.object._autocomplete._stopRequest){if(this.object._autocomplete._rows.length>
0){if(b){this.object._selected=0;this.object.autoCompleteSetClassName("selected",this.object._autocomplete._rows[this.object._selected]);this.object.autoCompleteSetSroll()}if(b!=-1){this.object._autocomplete._div.style.display="block";this.object._autocomplete._div.style.visibility="visible"}}if(this.object._autocomplete._table.clientHeight>this.object._autocomplete._div.clientHeight)this.object._autocomplete._table.style.width=this.object._autocomplete._div.offsetWidth-20+"px";if(b==-1&&this.object._autocomplete._rows.length==
1){td=this.object._autocomplete._rows[this.object._selected].getElementsByTagName("td");if(td.length>0)if(td[0].onclick){td[0].onclick();this.object.autoCompleteClose()}if(this.object._autocomplete._rows[this.object._selected].onclick){this.object._autocomplete._rows[this.object._selected].onclick();this.object.autoCompleteClose()}}b!=-1&&typeof this.object.autoCompleteOnLoad=="function"&&this.object.autoCompleteOnLoad();this.object._autocomplete._rows.length==0&&this.object.autoCompleteInitClose();
return}}if(this.object._autocomplete._stopRequest){typeof this.object.autoCompleteOnCancel=="function"&&this.object.autoCompleteOnCancel();this.object._autocomplete._div.innerHTML="";this.object._autocomplete._stopRequest=false}this.object.autoCompleteInitClose()},false,false,true);if(this._autocomplete._sendtimeout){clearTimeout(this._autocomplete._sendtimeout);this._autocomplete._sendtimeout=null}this.HTTPRequest.object=this;if(b){this._autocomplete._send=true;this.HTTPRequest.ajaxSendRequest()}else this._autocomplete._sendtimeout=
setTimeout(FSite2._callRef(function(f){f._autocomplete._send=true;if(typeof f.autoCompleteOnSendRequest=="function")if(f.autoCompleteOnSendRequest()===false)return false;f.HTTPRequest.ajaxSendRequest();f._autocomplete._sendtimeout=null},this),this._autocomplete._interval)};
FSite2.extendAutocomplete=function(b,c){if(!b._autocomplete){b._autocomplete={};b._onfocus_auto=b.onfocus;b._onblur_auto=b.onblur;b._autocomplete._class=c.autoCompleteHelperClass;var d=c.autoCompleteMinChar?c.autoCompleteMinChar:0;b._autocomplete._minChar=d;b._autocomplete._interval=c.autoCompleteInterval?c.autoCompleteInterval:500;b._autocomplete._urlParams={};b._selected=-1;b._autocomplete.returnFalse=false;b._autocomplete._stopRequest=false;b.autoCompleteClose=FSite2._autoCompleteClose;b.autoCompleteInitClose=
FSite2._autoCompleteInitClose;b.autoCompleteCancelClose=FSite2._autoCompleteCancelClose;b.autoCompleteInitCancelClose=FSite2._autoCompleteInitCancelClose;b.autoCompleteBuildRequest=FSite2._autoCompleteBuildRequest;b.autoCompleteSendRequest=FSite2._autoCompleteSendRequest;b.autoCompleteOnKeyDown=FSite2._autoCompleteOnKeyDown;b.autoCompleteSetSroll=FSite2._autoCompleteSetSroll;b.autoCompleteOnClick=FSite2._autoCompleteOnClick;b.autoCompleteSetClassName=FSite2._autoCompleteSetClassName;b.autoCompleteSetUrl=
FSite2._autoCompleteSetUrl;b.autoCompleteSetUrlParam=FSite2._autoCompleteSetUrlParam;if(typeof c.autoCompleteOnSendRequest=="function")b.autoCompleteOnSendRequest=c.autoCompleteOnSendRequest;if(typeof c.autoCompleteOnLoad=="function")b.autoCompleteOnLoad=c.autoCompleteOnLoad;if(typeof c.autoCompleteOnCancel=="function")b.autoCompleteOnCancel=c.autoCompleteOnCancel;b.autoCompleteSetUrl(c.autoCompleteUrl);if(c.autoCompleteUrlDefault)for(var e in c.autoCompleteUrlDefault)b._autocomplete._urlParams[e]=
c.autoCompleteUrlDefault[e];if(!b._autocomplete._div)if(b.id)if(!b._autocomplete._div&&document.getElementById(b.id+"_autocomplete"))b._autocomplete._div=document.getElementById(b.id+"_autocomplete");else{if(!b._autocomplete._div){b._autocomplete._div=document.createElement("div");b._autocomplete._div.id=b.id+"_autocomplete";b.parentNode.appendChild(b._autocomplete._div,b)}}else{b._autocomplete._div=document.createElement("div");b.parentNode.appendChild(b._autocomplete._div,b)}b.setAttribute("autocomplete",
"off");b._autocomplete._div.setAttribute("tabindex","");b._autocomplete._div._input=b;b._autocomplete._div.className=b._autocomplete._class;b._autocomplete._div.style.display="none";b._autocomplete._div.style.visibility="hidden";b._autocomplete._div.style.overflow="auto";b.onkeydown=function(f){if(f)event=f;this._autocomplete._keydownvalue=this.value;if(this._autocomplete._table)return this.autoCompleteOnKeyDown(event);else if(event.keyCode==38||event.keyCode==40)this.value.length>=d&&this.autoCompleteBuildRequest(true)};
b.onkeyup=function(f){if(f)event=f;if(this._autocomplete._keydownvalue!=this.value&&event.keyCode!=9&&event.keyCode!=13)this.value.length>=d?this.autoCompleteBuildRequest():this.autoCompleteClose();else this.value.length<d&&this.autoCompleteClose();this._autocomplete._keydownvalue=null};b.onkeypress=function(f){if(f)event=f;if(event.keyCode==13&&this._autocomplete.returnFalse){this._autocomplete.returnFalse=false;event.cancelBubble=true;event.returnValue=false;event.preventDefault&&event.preventDefault();
return false}};b.onfocus=function(f){if(!f)f=window.event;b.autoCompleteCancelClose();b._onfocus_auto&&b._onfocus_auto(f)};b.onblur=function(f){if(!f)f=window.event;b.autoCompleteInitClose();b._onblur_auto&&b._onblur_auto(f)};b._autocomplete._div.onclick=function(){setTimeout(FSite2._callRef(b.autoCompleteOnClick,b),30)};b._autocomplete._div.onscroll=function(){b.focus();b.autoCompleteInitCancelClose()};c.autoCompleteDisableInitialRequest||b.autoCompleteSendRequest(-1);return b}};FSite2.calendars={};
FSite2.extendCalendar=function(b,c){if(!b.calendarObject){calendarID=b.getAttribute("calendar");if(!calendarID&&b.id)calendarID=b.id+"_calendar";else if(!calendarID)return;var d;if(FSite2.calendars[calendarID]){d=FSite2.calendars[calendarID];for(j=i=0;i<d.focusElements.length;i++)if(!d.focusElements[i].parentNode||!d.focusElements[i].parentNode.parentNode){d.focusElements[i]=null;j++}if(i&&j==i)d=FSite2.calendars[calendarID]=null}if(!d){d=new FSite2.Calendar(calendarID,c);FSite2.calendars[calendarID]=d}d.appendFocusElement(b);
b.calendarObject=d;if(b.onfocus)b._onfocus_cal=b.onfocus;if(b.onblur)b._onblur_cal=b.onblur;b.onfocus=function(e){if(!e)e=window.event;this.calendarObject.showCalendar();this._onfocus_cal&&this._onfocus_cal(e)};b.onblur=function(e){if(!e)e=window.event;this.calendarObject.hideCalendar();this._onblur_cal&&this._onblur_cal(e)}}};
FSite2.removeCalendars=function(b){if(!b)b=document.body;b=b.getElementsByTagName("*");for(var c=0;c<b.length;c++)if(FSite2.calendars[b[c].id])delete FSite2.calendars[b[c].id];else b[c].calendarObject&&delete FSite2.calendars[b[c].calendarObject.containerID]};
FSite2.Calendar=function(b,c){this.containerID=b;if(c.calendarClass)this.className=c.calendarClass;this.dayClasses={};this.dayAttributes={};var d=new Date;this.currentMonth=d.getMonth();this.currentYear=d.getFullYear();if(c.calendarEmptyDate)this.currentDate=undefined;else{this.currentDate=new Date;this.currentDate.setHours(0);this.currentDate.setMinutes(0);this.currentDate.setSeconds(0);this.currentDate.setMilliseconds(0)}this.calendarMonthsYearSeparator=c.calendarMonthsYearSeparator!=undefined?
c.calendarMonthsYearSeparator:", ";this.monthsNames=c.calendarMonths;if(c.calendarDays)this.daysNames=c.calendarDays;this.monthsCount=c.calendarMonthsCount?c.calendarMonthsCount:1;this.maxDate=this.minDate=null;this.focusElements=[];this.closeText=c.calendarClose?c.calendarClose:false;if(typeof c.calendarOnInit=="function"){this._oninit=c.calendarOnInit;this.oninit=function(){this._oninit_called||this._oninit();this._oninit_called=true}}if(typeof c.calendarOnMonthChange=="function")this.calendarOnMonthChange=
c.calendarOnMonthChange;if(c.calendarOnClick)this.onclick=c.calendarOnClick;if(c.calendarOnChange)this.onchange=c.calendarOnChange;return this};FSite2.Calendar.prototype.appendFocusElement=function(b){if(typeof b=="object")this.focusElements[this.focusElements.length]=b};
FSite2.Calendar.prototype.setDate=function(b,c){var d=true;if(typeof b=="object"&&b!==undefined){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);d=true;if(this.minDate&&b.valueOf()<this.minDate.valueOf())d=false;if(this.maxDate&&b.valueOf()>this.maxDate.valueOf())d=false;if(d){this.currentDate=b;this.currentMonth=this.currentDate.getMonth();this.currentYear=this.currentDate.getFullYear()}}else if(b===undefined)if(this.currentDate===undefined)d=false;else this.currentDate=b;else d=
false;d&&!c&&typeof this.onchange=="function"&&this.onchange();d&&this.container&&this.buildCalendar();return d};FSite2.Calendar.prototype.setDay=function(b){if(typeof this.currentDate=="object"){var c=new Date(this.currentDate);c.setDate(b);return this.setDate(c)}else return false};FSite2.Calendar.prototype.setMonth=function(b){if(typeof this.currentDate=="object"){var c=new Date(this.currentDate);c.setMonth(b);return this.setDate(c)}else return false};
FSite2.Calendar.prototype.setYear=function(b){if(typeof this.currentDate=="object"){var c=new Date(this.currentDate);c.setFullYear(b);return this.setDate(c)}else return false};FSite2.Calendar.prototype.setMinDate=function(b,c){if(typeof b=="object"){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);this.minDate=b;typeof this.currentDate=="object"&&this.currentDate.valueOf()<this.minDate.valueOf()&&this.setDate(this.minDate,c)}};
FSite2.Calendar.prototype.setMaxDate=function(b,c){if(typeof b=="object"){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);this.maxDate=b;typeof this.currentDate=="object"&&this.currentDate.valueOf()>this.maxDate.valueOf()&&this.setDate(this.maxDate,c)}};FSite2.Calendar.prototype.getDate=function(){if(typeof this.currentDate=="object")return new Date(this.currentDate)};
FSite2.Calendar.prototype.prevMonth=function(){this.currentMonth--;if(this.currentMonth==-1){this.currentMonth=11;this.currentYear--}if(this.container){this.buildCalendar();this.focus()}typeof this.calendarOnMonthChange=="function"&&this.calendarOnMonthChange()};FSite2.Calendar.prototype.nextMonth=function(){this.currentMonth++;if(this.currentMonth==12){this.currentMonth=0;this.currentYear++}if(this.container){this.buildCalendar();this.focus()}typeof this.calendarOnMonthChange=="function"&&this.calendarOnMonthChange()};
FSite2.Calendar.prototype.getDayElement=function(b){if(!this.container)return null;if(typeof b!="object"||b.constructor!=Date)return null;var c=b.getDate();b=this.getMonthElement(b);if(!b)return null;b=b.childNodes[1].getElementsByTagName("div");var d;for(d=0;d<b.length;d++)if(RegExp("\\bday\\b","gi").test(b[d].className)&&b[d].innerHTML==c)return b[d];return null};
FSite2.Calendar.prototype.getMonthElement=function(b){if(!this.container)return null;if(typeof b!="object"||b.constructor!=Date)return null;var c=b.getMonth();b=b.getFullYear();for(var d=0,e=this.currentMonth,f=this.currentYear,g=this.container.childNodes;d<this.monthsCount;){if(c==e&&b==f&&g[d])return g[d];d++;e++;if(e==12){e=0;f++}}return null};
FSite2.Calendar.prototype.getDayAttribute=function(b,c){if(typeof b=="object"&&b.constructor==Date){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);var d="day_"+b.valueOf();if(!(!typeof this.dayAttributes[d]||typeof this.dayAttributes[d]!="object")){if(c.toLowerCase()=="class")return this.dayClasses[d];if(!this.dayAttributes[d][c])return"";return this.dayAttributes[d][c]}}};
FSite2.Calendar.prototype.setDayAttribute=function(b,c,d){if(c.toLowerCase()=="class")this.setDayClass(b,d);else if(typeof b=="object"&&b.constructor==Date){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);var e="day_"+b.valueOf();if(!typeof this.dayAttributes[e]||typeof this.dayAttributes[e]!="object")this.dayAttributes[e]={};else this.dayAttributes[e][c]||(this.dayAttributes[e][c]="");this.dayAttributes[e][c]=d;(b=this.getDayElement(b))&&b.setAttribute(c,this.dayAttributes[e][c])}};
FSite2.Calendar.prototype.setDayClass=function(b,c){if(typeof b=="object"&&b.constructor==Date){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);this.dayClasses["day_"+b.valueOf()]=c;var d=this.getDayElement(b);if(d)d.className=d.className.replace(/^((current|normal|empty) day)(.*)$/,"$1")+" "+c}};FSite2.Calendar.prototype.showCalendar=function(){this._cancelHide();this.container||this.buildCalendar()};
FSite2.Calendar.prototype._hide=function(b){b||(b=this);if(b.container){b.container.innerHTML="";b.container.style.display="none";b.container=null}b._timeout=null};FSite2.Calendar.prototype._cancelHide=function(b){b||(b=this);if(b._timeout){clearTimeout(b._timeout);b._timeout=null}};FSite2.Calendar.prototype.hideCalendar=function(){if(!this._timeout)this._timeout=setTimeout(FSite2._callRef(this._hide,this),200)};
FSite2.Calendar.prototype.toggleCalendar=function(){if(this.container){this.container.parentNode.removeChild(this.container);this.container=null}else{this.buildCalendar();this.focus()}};FSite2.Calendar.prototype.focus=function(){if(this.focusElements.length){this.focusElements[0]._replacement?this.focusElements[0]._replacement.focus():this.focusElements[0].focus();this._cancelHide()}else this.container&&this.container.focus()};
FSite2.Calendar.prototype.blur=function(){if(this.focusElements.length)this.focusElements[0]._replacement?this.focusElements[0]._replacement.blur():this.focusElements[0].blur();else this.container&&this.container.firstChild&&this.container.firstChild.blur()};
FSite2.Calendar.prototype.buildCalendar=function(){this._cancelHide();var b=document.createElement("a");b.style.display="block";b.id=this.containerID;b.tabIndex=1E3;if(this.className)b.className=this.className;b._calendar=this;b.href="#";b.onclick=function(){this._calendar.focus();return false};b.onfocus=function(){this._calendar._cancelHide();!this._calendar.focusElements.length&&window.getSelection&&window.getSelection().removeAllRanges()};b.onblur=function(){this._calendar.focusElements.length&&
this._calendar.hideCalendar()};this._anchor=b;var c,d,e;d=this.currentMonth;e=this.currentYear;for(c=0;c<this.monthsCount;c++){var f=document.createElement("div");f.id=this.containerID+"_month"+(c?c:"");f.className="calendar_month"+(c?c:"");var g=document.createElement("div");g.id=this.containerID+"_months"+(c?c:"");g.className="calendar_months";this.buildMonths(g,d,e,c);f.appendChild(g);g=document.createElement("div");g.id=this.containerID+"_days"+(c?c:"");g.className="calendar_days";this.buildDays(g,
d,e,c);f.appendChild(g);b.appendChild(f);d++;if(d==12){d=0;e++}}if(this.closeText){c=document.createElement("div");c.className="calendar_close";c.id=this.containerID+"_close";c._calendar=this;c.innerHTML=this.closeText;c.onclick=function(h){this._calendar.blur();this._calendar._hide();if(!h)h=window.event;h.cancelBubble=true;h.preventDefault&&h.preventDefault()};b.appendChild(c)}if(c=this.container?this.container:document.getElementById(this.containerID)){c.parentNode.insertBefore(b,c);c.parentNode.removeChild(c)}else if(lastFocusElement=
this.focusElements[this.focusElements.length-1])lastFocusElement.nextSibling?lastFocusElement.parentNode.insertBefore(b,lastFocusElement.nextSibling):lastFocusElement.parentNode.appendChild(b);this.container=b};
FSite2.Calendar.prototype.buildMonths=function(b,c,d,e){if(!e){var f=document.createElement("div");f.className="month_prev";f.id=this.containerID+"_month_prev";f._calendar=this;f.onclick=function(g){this._calendar.prevMonth();if(!g)g=window.event;g.cancelBubble=true;g.preventDefault&&g.preventDefault();return false};b.appendChild(f)}f=document.createElement("div");f.className="month_current"+(e?e:"");f.id=this.containerID+"_month_current"+(e?e:"");f.innerHTML=this.monthsNames[c]+this.calendarMonthsYearSeparator+
d;b.appendChild(f);if(e==this.monthsCount-1){c=document.createElement("div");c.className="month_next";c.id=this.containerID+"_month_next";c._calendar=this;c.onclick=function(g){this._calendar.nextMonth();if(!g)g=window.event;g.cancelBubble=true;g.preventDefault&&g.preventDefault();return false};b.appendChild(c)}};
FSite2.Calendar.prototype.buildDays=function(b,c,d,e){var f=new Date;f.setFullYear(d,c,1);var g=(f.getDay()+6)%7,h=f.getDays(),l,m;if(this.daysNames){l=document.createElement("div");l.id=this.containerID+"_header"+(e?e:"");l.className="header";for(i=0;i<7;i++){m=document.createElement("div");m.id=this.containerID+"_weekday"+(e?e:"")+"_"+i;m.className="weekday";m.innerHTML=this.daysNames[i];l.appendChild(m)}b.appendChild(l)}for(i=0;i<7*Math.floor((g+h+6)/7);i++){if(!(i%7)){l=document.createElement("div");
l.id=this.containerID+"_week"+(e?e:"")+"_"+i/7;l.className="week"}if(i>=g&&i-g<h){day=i-g+1;f=new Date(d,c,day);var o;m=this.currentDate!==undefined&&f.valueOf()==this.currentDate.valueOf()?"current":this.minDate&&f.valueOf()<this.minDate.valueOf()?"disabled":this.maxDate&&f.valueOf()>this.maxDate.valueOf()?"disabled":"normal";o=this.dayClasses["day_"+f.valueOf()];m=this.buildDay(i,day,m+" day"+(o?" "+o:""),e,"day_"+f.valueOf());m._calendar=this;m._date=f;m.onclick=function(n){var p=true;if(typeof this._calendar.onclick==
"function")p=this._calendar.onclick(this);if(p){this._calendar.blur();this._calendar.focusElements.length&&this._calendar._hide();this._calendar.setDate(this._date)}if(!n)n=window.event;n.cancelBubble=true;n.preventDefault&&n.preventDefault();return false}}else m=this.buildDay(i,"","empty day",e,"day_"+f.valueOf());l.appendChild(m);i%7==6&&b.appendChild(l)}};
FSite2.Calendar.prototype.buildDay=function(b,c,d,e,f){var g=document.createElement("div");g.id=this.containerID+"_day"+(e?e:"")+"_"+b;g.className=d;g.innerHTML=c;if(!typeof this.dayAttributes[f]||typeof this.dayAttributes[f]!="object")return g;for(var h in this.dayAttributes[f])g.setAttribute(h,this.dayAttributes[f][h]);return g};FSite2._checkboxOnClick=function(){if(!this._hiddenInput.disabled){if(this._hiddenInput.checked){this.src=this._imageUnchecked.src;this.style.height=this._imageUnchecked.height+"px";this.style.width=this._imageUnchecked.width+"px"}else{this.src=this._imageChecked.src;this.style.height=this._imageChecked.height+"px";this.style.width=this._imageChecked.width+"px"}this._area.focus();var b=this._hiddenInput.checked;this._hiddenInput._click();this._hiddenInput.checked=b?false:true}};
FSite2.extendCheckbox=function(b,c,d,e,f){if(!b._image){if(b.tagName!="INPUT"||b.type!="checkbox")throw new Error("Given element is not an input of type 'checkbox'");var g=document.createElement("img");g._hiddenInput=b;g._imageChecked=new Image;g._imageChecked.src=c;g._imageUnchecked=new Image;g._imageUnchecked.src=d;if(e&&f){g._imageDisabledChecked=new Image;g._imageDisabledChecked.src=e;g._imageDisabledUnchecked=new Image;g._imageDisabledUnchecked.src=f}g._OnClick=FSite2._checkboxOnClick;g._updateState=
FSite2._updateImageState;b._updateState=function(){this._image._updateState()};b._click=b.click;b._image=g;b.click=function(h){if(!h)h=window.event;this._image._OnClick(h)};b._onfocus=b.onfocus;b.onfocus=function(h){if(!h)h=window.event;this._onblur&&this.onblur(h);this._image._imageArea.focus()};b._onblur=b.onblur;b.onblur=function(h){if(!h)h=window.event;this._onblur&&this.onblur(h);this._image._imageArea.blur()};b.parentNode.insertBefore(g,b);c=FSite2.addImageFocus(g,b.name.replace("[","").replace("]",
"")+"_"+b.value+"_map");c._hiddenInput=b;c.onfocus=function(h){if(!h)h=window.event;this._hiddenInput._onfocus&&this._hiddenInput._onfocus(h)};c.onblur=function(h){if(!h)h=window.event;this._hiddenInput._onblur&&this._hiddenInput._onblur(h)};b._updateState();b.style.display="none"}};FSite2.fakeSubmitForm=function(){var b,c;b=this.getElementsByTagName("input");for(c=0;c<b.length;c++)b[c].onsubmit&&typeof b[c].onsubmit=="function"&&b[c].onsubmit();b=this.getElementsByTagName("textarea");for(c=0;c<b.length;c++)b[c].onsubmit&&typeof b[c].onsubmit=="function"&&b[c].onsubmit()};
FSite2.fakeUnSubmitForm=function(){var b,c;b=this.getElementsByTagName("input");for(c=0;c<b.length;c++)b[c]._fakeValue&&b[c].onblur&&typeof b[c].onblur=="function"&&b[c].onblur();b=this.getElementsByTagName("textarea");for(c=0;c<b.length;c++)b[c]._fakeValue&&b[c].onblur&&typeof b[c].onblur=="function"&&b[c].onblur()};
FSite2.fakeExtendElement=function(b,c){if(!b._fakeValue){if(typeof c=="object")if(b.name&&c.fakeParams&&c.fakeParams[b.name])var d=c.fakeParams[b.name];else{if(b.className&&c.fakeClasses)for(var e in c.fakeClasses)if(FSite2.hasElementClass(b,e)){d=c.fakeClasses[e];break}}else d=c;if(typeof d!="undefined"){b._onfocus_fake=b.onfocus;b._onblur_fake=b.onblur;b.onfocus=FSite2.fakeElementFocus;b.onblur=FSite2.fakeElementBlur;b.onsubmit=FSite2.fakeElementSubmit;b._fakeValue=d;if(!b.value||b.value=="")b.value=
d;if(b.form&&!b.form.fakeSubmitForm){b.form.fakeSubmitForm=FSite2.fakeSubmitForm;if(b.form.onsubmit&&typeof b.form.onsubmit=="function")b.form._onsubmit_fake=b.form.onsubmit;b.form.onsubmit=function(f){if(!f)f=window.event;this.fakeSubmitForm();if(this._onsubmit_fake)if(!this._onsubmit_fake(f))return false;return true}}if(b.form&&!b.form.fakeUnSubmitForm)b.form.fakeUnSubmitForm=FSite2.fakeUnSubmitForm}}};
FSite2.fakeElementFocus=function(b){if(!b)b=window.event;if(this.value==this._fakeValue)this.value="";this._onfocus_fake&&this._onfocus_fake(b)};FSite2.fakeElementBlur=function(b){if(!b)b=window.event;if(!this.value||this.value=="")this.value=this._fakeValue;this._onblur_fake&&this._onblur_fake(b)};FSite2.fakeElementSubmit=function(){if(this.value==this._fakeValue)this.value=""};FSite2.galleries={};FSite2.galleryTemplates={};FSite2.extendGalleries=function(b,c){if(c.galleryClass){if(!b)b=document.body;var d=b.getElementsByTagName("a"),e,f;for(f=0;f<d.length;f++)if(RegExp("\\b"+c.galleryClass+"\\b","gi").test(d[f].className)){e=d[f].rel?d[f].rel:"FSite2_gallery";FSite2.galleries[e]||(FSite2.galleries[e]=new FSite2.Gallery(e,c));FSite2.galleries[e].addPhotoAnchor(d[f])}}};
FSite2.Gallery=function(b,c){this.photos=[];this.galleryId=b;this.backgroundId=c.galleryBackgroundId?c.galleryBackgroundId:this.galleryId+"_background";this.paramLayerId=c.galleryLayerId?c.galleryLayerId:this.galleryId;this.layerId=c.galleryLayerId?c.galleryLayerId:this.galleryId+"_layer";this.loaderId=c.galleryLoaderId?c.galleryLoaderId:this.galleryId+"_loader";this.backgroundClass=c.galleryBackgroundClass?c.galleryBackgroundClass:"gallery_background";this.layerClass=c.galleryLayerClass?c.galleryLayerClass:
"gallery_layer";this.loaderClass=c.galleryLoaderClass?c.galleryLoaderClass:"gallery_loader";this.prevClass=c.galleryPrevClass?c.galleryPrevClass:"gallery_prev";this.nextClass=c.galleryNextClass?c.galleryNextClass:"gallery_next";this.closeClass=c.galleryCloseClass?c.galleryCloseClass:"gallery_close";this.captionClass=c.galleryCaptionClass?c.galleryCaptionClass:"gallery_caption";this.captionHtml=c.galleryCaptionHtml?c.galleryCaptionHtml:false;this.navClass=c.galleryNavClass?c.galleryNavClass:"gallery_nav";
this.photoClass=c.galleryPhotoClass?c.galleryPhotoClass:"gallery_photo";this.photoNextClass=c.galleryPhotoNextClass?c.galleryPhotoNextClass:"gallery_photo_next";this.photoPrevClass=c.galleryPhotoPrevClass?c.galleryPhotoPrevClass:"gallery_photo_prev";this.disabledClass=c.galleryDisabledClass?c.galleryDisabledClass:"gallery_disabled";this.backgroundClose=c.galleryBackgroundClose?c.galleryBackgroundClose:false;this.horizontalMargin=c.galleryHorizontalMargin?c.galleryHorizontalMargin:false;this.dontScale=
c.galleryDontScale?c.galleryDontScale:false;if(typeof c.galleryOnPhotoLoad=="function")this.onPhotoLoad=c.galleryOnPhotoLoad;if(typeof c.galleryOnPhotoError=="function")this.onPhotoError=c.galleryOnPhotoError;if(typeof c.galleryOnPhotoAbort=="function")this.onPhotoAbort=c.galleryOnPhotoAbort;return this};
FSite2.Gallery.prototype.addPhotoAnchor=function(b){var c=this.addPhoto(b.href,b.title);b.galleryObject=this;b.galleryIndex=c;b.onclick=function(){this.galleryObject.showPhoto(this.galleryIndex);return false}};FSite2.Gallery.prototype.addPhoto=function(b,c){var d;for(k in this.photos)if(this.photos[k].source===b)d=Number(k);if(d==null)d=this.photos.length;this.photos[d]={source:b};if(c)this.photos[d].caption=c;return d};FSite2.Gallery.prototype.removePhoto=function(b){this.photos.splice(b,1)};
FSite2.Gallery.prototype.showPhoto=function(b){if(this.photos[b]){if(!this.backgroundLayer){this.backgroundLayer=new FSite2.Layer(this.backgroundClass,true,this.backgroundId);this.backgroundLayer.object.galleryObject=this;if(this.backgroundClose)this.backgroundLayer.object.onclick=function(){this.galleryObject.close()}}if(!this.loaderLayer)this.loaderLayer=new FSite2.Layer(this.loaderClass,true,this.loaderId);if(!this.photoLayer)this.photoLayer=this._createLayer();this.photoLayer.galleryObject!=this&&
this._extendLayer();this.backgroundLayer.isVisible()||this.backgroundLayer.show();this.backgroundLayer.fullScreen();this.photoLayer.hide();this.loaderLayer.show();this.photoElement.galleryIndex=b;this.photoElement.galleryImage=new Image;this.photoElement.galleryImage.galleryObject=this;this.photoElement.galleryImage.onload=function(){if(this.galleryObject.loaderLayer.object.style.display){var d=true;if(typeof this.galleryObject.onPhotoLoad=="function")d=this.galleryObject.onPhotoLoad();if(d){this.galleryObject.photoElement.style.backgroundImage=
'url("'+this.src+'")';if(!this.galleryObject.dontScale){this.galleryObject.photoElement.style.height=this.height+"px";this.galleryObject.photoElement.style.width=this.width+"px";this.galleryObject.photoLayer.object.style.width=this.width+(this.galleryObject.horizontalMargin?this.galleryObject.horizontalMargin:0)+"px"}if(this.galleryObject.captionElement)if(this.galleryObject.photos[b].caption)if(this.galleryObject.captionHtml)this.galleryObject.captionElement.innerHTML=this.galleryObject.photos[b].caption;
else{this.galleryObject.captionElement.innerHTML="";this.galleryObject.captionElement.appendChild(document.createTextNode(this.galleryObject.photos[b].caption))}}this.galleryObject.loaderLayer.hide();this.galleryObject.photoLayer.show()}};this.photoElement.galleryImage.onerror=function(){if(this.galleryObject.loaderLayer.object.style.display){var d=false;if(typeof this.galleryObject.onPhotoError=="function")d=this.galleryObject.onPhotoError();if(d){this.galleryObject.loaderLayer.hide();this.galleryObject.photoLayer.show()}}};
this.photoElement.galleryImage.onabort=function(){if(this.galleryObject.loaderLayer.object.style.display){typeof this.galleryObject.onPhotoAbort=="function"&&this.galleryObject.onPhotoAbort();this.galleryObject.loaderLayer.hide();this.galleryObject.loaderLayer.remove();this.galleryObject.loaderLayer=null;this.galleryObject.backgroundLayer.hide();this.galleryObject.backgroundLayer.remove();this.galleryObject.backgroundLayer=null}};this.photoElement.galleryImage.src=this.photos[b].source;if(b>0){if(this.prevElement){this.prevElement.galleryIndex=
b-1;this.prevElement.href=this.photos[b-1].source;FSite2.unsetElementClass(this.prevElement,this.disabledClass)}if(this.photoPrevElement){this.photoPrevElement.galleryIndex=b-1;this.photoPrevElement.href=this.photos[b-1].source;FSite2.unsetElementClass(this.photoPrevElement,this.disabledClass)}if(this.prevElement||this.photoPrevElement){var c=new Image;c.src=this.photos[b-1].source}}else{if(this.prevElement){this.prevElement.galleryIndex=null;this.prevElement.href=null;FSite2.setElementClass(this.prevElement,
this.disabledClass)}if(this.photoPrevElement){this.photoPrevElement.galleryIndex=null;this.photoPrevElement.href=null;FSite2.setElementClass(this.photoPrevElement,this.disabledClass)}}this.nextElement&&FSite2.unsetElementClass(this.nextElement,this.disabledClass);if(b<this.photos.length-1){if(this.nextElement){this.nextElement.galleryIndex=b+1;this.nextElement.href=this.photos[b+1].source;FSite2.unsetElementClass(this.nextElement,this.disabledClass)}if(this.photoNextElement){this.photoNextElement.galleryIndex=
b+1;this.photoNextElement.href=this.photos[b+1].source;FSite2.unsetElementClass(this.photoNextElement,this.disabledClass)}if(this.nextElement||this.photoNextElement){c=new Image;c.src=this.photos[b+1].source}}else{if(this.nextElement){this.nextElement.galleryIndex=null;this.nextElement.href=null;FSite2.setElementClass(this.nextElement,this.disabledClass)}if(this.photoNextElement){this.photoNextElement.galleryIndex=null;this.photoNextElement.href=null;FSite2.setElementClass(this.photoNextElement,this.disabledClass)}}}};
FSite2.Gallery.prototype.close=function(){if(this.photoLayer){this.photoLayer.hide();this.photoLayer.remove();this.photoLayer=null}if(this.loaderLayer){this.loaderLayer.hide();this.loaderLayer.remove();this.loaderLayer=null}if(this.backgroundLayer){this.backgroundLayer.hide();this.backgroundLayer.remove();this.backgroundLayer=null}};
FSite2.Gallery.prototype._createLayer=function(){var b=new FSite2.Layer(this.layerClass,true,this.layerId);if(b.object.innerHTML)FSite2.galleryTemplates[this.paramLayerId]=b.object.innerHTML;else if(FSite2.galleryTemplates[this.paramLayerId])b.object.innerHTML=FSite2.galleryTemplates[this.paramLayerId];this.closeElement=document.getElementById(this.paramLayerId+"_close");this.photoElement=document.getElementById(this.paramLayerId+"_photo");this.photoPrevElement=document.getElementById(this.paramLayerId+
"_photo_prev");this.photoNextElement=document.getElementById(this.paramLayerId+"_photo_next");this.navElement=document.getElementById(this.paramLayerId+"_nav");this.prevElement=document.getElementById(this.paramLayerId+"_prev");this.nextElement=document.getElementById(this.paramLayerId+"_next");this.captionElement=document.getElementById(this.paramLayerId+"_caption");if(!this.closeElement&&!this.photoElement&&!this.photoPrevElement&&!this.photoNextElement&&!this.navElement&&!this.prevElement&&!this.nextElement&&
!this.captionElement){this.closeElement=FSite2.createElement("div",{id:this.paramLayerId+"_close"});b.object.appendChild(this.closeElement);this.photoElement=FSite2.createElement("div",{id:this.paramLayerId+"_photo"});b.object.appendChild(this.photoElement);this.photoPrevElement=FSite2.createElement("a",{id:this.paramLayerId+"_photo_prev"});this.photoElement.appendChild(this.photoPrevElement);this.photoNextElement=FSite2.createElement("a",{id:this.paramLayerId+"_photo_next"});this.photoElement.appendChild(this.photoNextElement);
this.navElement=FSite2.createElement("div");b.object.appendChild(this.navElement);this.prevElement=FSite2.createElement("a",{id:this.paramLayerId+"_prev"});this.navElement.appendChild(this.prevElement);this.nextElement=FSite2.createElement("a",{id:this.paramLayerId+"_next"});this.navElement.appendChild(this.nextElement);this.captionElement=FSite2.createElement("div",{id:this.paramLayerId+"_caption"});this.navElement.appendChild(this.captionElement)}return b};
FSite2.Gallery.prototype._extendLayer=function(){this.photoLayer.object.galleryObject=this;if(this.closeElement){this.closeElement.galleryObject=this;FSite2.setElementClass(this.closeElement,this.closeClass);this.closeElement.onclick=function(){this.galleryObject.close()}}if(this.photoElement){this.photoElement.galleryObject=this;FSite2.setElementClass(this.photoElement,this.photoClass);if(this.photoPrevElement){this.photoPrevElement.galleryObject=this;this.photoPrevElement.onfocus=function(){this.blur()};
FSite2.setElementClass(this.photoPrevElement,this.photoPrevClass);this.photoPrevElement.onclick=function(){this.galleryIndex!=null&&this.galleryObject.showPhoto(this.galleryIndex);return false}}if(this.photoNextElement){this.photoNextElement.galleryObject=this;this.photoNextElement.onfocus=function(){this.blur()};FSite2.setElementClass(this.photoNextElement,this.photoNextClass);this.photoNextElement.onclick=function(){this.galleryIndex!=null&&this.galleryObject.showPhoto(this.galleryIndex);return false}}}if(this.navElement){this.navElement.galleryObject=
this;FSite2.setElementClass(this.navElement,this.navClass)}if(this.nextElement){this.nextElement.galleryObject=this;this.nextElement.onfocus=function(){this.blur()};FSite2.setElementClass(this.nextElement,this.nextClass);this.nextElement.onclick=function(){this.galleryIndex!=null&&this.galleryObject.showPhoto(this.galleryIndex);return false}}if(this.prevElement){this.prevElement.galleryObject=this;this.prevElement.onfocus=function(){this.blur()};FSite2.setElementClass(this.prevElement,this.prevClass);
this.prevElement.onclick=function(){this.galleryIndex!=null&&this.galleryObject.showPhoto(this.galleryIndex);return false}}if(this.captionElement){this.captionElement.galleryObject=this;FSite2.setElementClass(this.captionElement,this.captionClass)}};FSite2._helperInitClose=function(){if(!this._timeout)this._timeout=setTimeout(FSite2._callRef(FSite2._helperClose,this),100)};FSite2._helperCancelClose=function(b){if(this&&!b)b=this;if(b._timeout){clearTimeout(b._timeout);b._timeout=null}};FSite2._helperClose=function(b){b||(b=this);b.style.display="none";b.style.visibility="hidden";b.parentNode&&b.parentNode.removeChild(b);b._element._helpBox=null};
FSite2.extendHelpers=function(b,c){if(!b)b=document.body;var d=FSite2.getElementsByClassName(c.helperClass,b);if(!c.helperElementId)c.helperElementId="FSite2_helper";for(var e=0,f;f=d[e++];)f._helper||FSite2.extendHelper(f,c)};
FSite2.extendHelper=function(b,c){b._helper=true;if(b.getAttribute("title")){b._helpText=b.getAttribute("title");b.removeAttribute("title")}else if(b.getAttribute("alt")){b._helpText=b.getAttribute("alt");b.removeAttribute("alt")}b._helperParams={};b._helperParams.corner=c.helperCorner?c.helperCorner:"TL";b._helperParams.elementId=c.helperElementId?c.helperElementId:"FSite2_helper";b._helperParams.elementClass=c.helperElementClass?c.helperElementClass:"";b._helperParams.elementTemplate=c.helperElementTemplate?
c.helperElementTemplate:"###";b._helperParams.margin=c.helperMargin?c.helperMargin:"0";b._helperPosition=FSite2._helperPosition;if(c.helperTrackClass&&RegExp("\\b"+c.helperTrackClass+"\\b","gi").test(b.className)){b._helperTrack=true;b.onmousemove=function(d){if(this._helpText&&this._helpBox){if(!d)d=window.event;this._helperPosition(d)}}}if(typeof b.onmouseover=="function")b._onmouseover_helper=b.onmouseover;b.onmouseover=function(d){if(this._helpText){if(!d)d=window.event;var e;if(this._onmouseover_helper)e=
this._onmouseover_helper(d);if(e===false)return e;if(!(e=document.getElementById(c.helperElementId))){e=document.createElement("div");document.body.appendChild(e);e._helperInitClose=FSite2._helperInitClose;e._helperInitCancelClose=FSite2._helperInitCancelClose;e._helperCancelClose=FSite2._helperCancelClose;e._helperClose=FSite2._helperClose;e.id=this._helperParams.elementId;e.style.position="absolute";if(!this._helperTrack){e.onmouseover=function(){this._helperCancelClose()};e.onmouseout=function(){this._helperInitClose()}}}if(this._helperParams.elementClass)e.className=
this._helperParams.elementClass;this._helpBox=e;this._helpBox._element=this;this._helpBox.innerHTML=this._helperParams.elementTemplate.replace(/###/,this._helpText);this._helper=e;this._helper._helperCancelClose();b._helperPosition(d)}};if(b.onclick)b._onclick_helper=b.onclick;b.onclick=function(d){var e;if(!d)d=window.event;if(this._onclick_helper)e=this._onclick_helper(d);this._helpBox&&this._helpBox._helperClose();if(e!=null)return e};if(typeof b.onmouseout=="function")b._onmouseout_helper=b.onmouseout;
b.onmouseout=function(d){var e;if(this._onmouseout_helper)e=this._onmouseout_helper(d);if(e===false)return e;this._helper&&typeof this._helper=="object"&&this._helper._helperInitClose()}};
FSite2._helperPosition=function(b){var c=window.getWindowWidth(),d=getMouseXY(b)[0];b=getMouseXY(b)[1];var e=window.getObjectHeight(this._helpBox),f=window.getObjectWidth(this._helpBox),g,h;if(this._helperParams.corner=="TR"){g=d-f;h=b}else if(this._helperParams.corner=="BR"){g=d-f;h=b-e}else if(this._helperParams.corner=="BL"){g=d;h=b-e}else if(this._helperParams.corner=="TL"){g=d;h=b}if(g<this._helperParams.margin)g=this._helperParams.margin;else if(g+f>c-this._helperParams.margin-20)g=c-f-this._helperParams.margin-
20;this._helpBox.style.top=h+"px";this._helpBox.style.left=g+"px"};FSite2.extendImage=function(b,c){if(!b._images){srcs=b.alt.split(c.imagesSep);b._images=[];for(j=0;j<srcs.length;j++){image=document.createElement("img");image.src="/"+srcs[j];b._images[j]=image.src}b._timeInterval=c.imagesInterval;b.onmouseover=function(){if(!b._animated)b._animated=setTimeout(FSite2._callRef(FSite2._animatedImage,b),c.imagesInterval)};b.onmouseout=function(){FSite2._stopanimatedImage(b)}}};
FSite2._animatedImage=function(b){if(b._animated&&b._images.length>1){if(!b.img_roate||b.img_roate==0)b.img_roate=1;else if(b.img_roate+1<b._images.length)b.img_roate++;else b.img_roate=0;b.src=b._images[b.img_roate];b._animated=setTimeout(FSite2._callRef(FSite2._animatedImage,b),b._timeInterval)}};FSite2._stopanimatedImage=function(b){clearTimeout(b._animated);b._animated=null;b.img_roate=0;b.src=b._images[0]};FSite2.extendMultiCheck=function(b){if(!b._image){b._replacement=document.createElement("img");b._replacement.src=b.options[b.selectedIndex].label;b._replacement._OnClick=FSite2._multiCheckOnClick;b._replacement._updateState=FSite2._multiCheckUpdate;b._replacement._hiddenInput=b;b.click=function(){this._replacement._OnClick()};b.parentNode.insertBefore(b._replacement,b);var c=FSite2.addImageFocus(b._replacement,b.name.replace("[","").replace("]","")+"_"+b.value+"_map");c._hiddenInput=b;c.onfocus=
function(d){if(!d)d=window.event;this._hiddenInput._onfocus&&this._hiddenInput._onfocus(d)};c.onblur=function(d){if(!d)d=window.event;this._hiddenInput._onblur&&this._hiddenInput._onblur(d)};c._onkeydown=c.onkeydown;b._replacement._area=c;b._replacement._updateState();b._updateState=function(){this._replacement._updateState()};b.style.display="none"}};
FSite2._multiCheckOnClick=function(){if(this._hiddenInput.selectedIndex<this._hiddenInput.options.length-1)this._hiddenInput.selectedIndex++;else this._hiddenInput.selectedIndex=0;this._updateState()};
FSite2._multiCheckUpdate=function(){if(this._hiddenInput.disabled){this._area.removeAttribute("href");this._area.style.cursor="default"}else{this._area.setAttribute("href","#");this._area.style.cursor="pointer"}var b=this.src;this.src=this._hiddenInput.options[this._hiddenInput.selectedIndex].label;b!=this.src&&this._hiddenInput.onchange&&this._hiddenInput.onchange()};FSite2._radioOnClick=function(){if(!this._hiddenInput.disabled){for(var b=this._hiddenInput.form[this._hiddenInput.name],c=0;c<b.length;c++){b[c].checked=false;if(b[c]._image){b[c]._image.src=b[c]._image._imageUnchecked.src;b[c]._image.style.height=b[c]._image._imageUnchecked.height+"px";b[c]._image.style.width=b[c]._image._imageUnchecked.width+"px"}}this.src=this._imageChecked.src;this.style.height=this._imageChecked.height+"px";this.style.width=this._imageChecked.width+"px";this._hiddenInput._click();
this._hiddenInput.checked=true;this._area.focus()}};
FSite2._radioArrowKeys=function(b){if(this._image._hiddenInput.checked)if(b.keyCode==37||b.keyCode==38){b=this._image._hiddenInput.form[this._image._hiddenInput.name];var c=-1;for(i=0;i<b.length;i++)if(b[i]==this._image._hiddenInput&&i){c=i-1;break}c>=0&&b[c]._image._OnClick()}else if(b.keyCode==39||b.keyCode==40){b=this._image._hiddenInput.form[this._image._hiddenInput.name];c=-1;for(i=0;i<b.length;i++)if(b[i]==this._image._hiddenInput&&i<b.length-1){c=i+1;break}c>=0&&b[c]._image._OnClick()}};
FSite2.extendRadio=function(b,c,d,e,f){if(!b._image){if(b.tagName!="INPUT"||b.type!="radio")throw new Error("Given element is not an input of type 'radio'");var g=document.createElement("img");g._hiddenInput=b;g._imageChecked=new Image;g._imageChecked.src=c;g._imageUnchecked=new Image;g._imageUnchecked.src=d;if(e&&f){g._imageDisabledChecked=new Image;g._imageDisabledChecked.src=e;g._imageDisabledUnchecked=new Image;g._imageDisabledUnchecked.src=f}g._OnClick=FSite2._radioOnClick;g._updateState=FSite2._updateImageState;
b._updateState=function(){this._image._updateState()};b._click=b.click;b._image=g;b.click=function(h){if(!h)h=window.event;this._image._OnClick(h)};b._onfocus=b.onfocus;b.onfocus=function(h){if(!h)h=window.event;this._onblur&&this.onblur(h);this._image._imageArea.focus()};b._onblur=b.onblur;b.onblur=function(h){if(!h)h=window.event;this._onblur&&this.onblur(h);this._image._imageArea.blur()};b.parentNode.insertBefore(g,b);imageArea=FSite2.addImageFocus(g,b.name.replace(/[\[\]]/,"")+"_"+b.value+"_map");
imageArea._hiddenInput=b;imageArea.onfocus=function(h){if(!h)h=window.event;this._hiddenInput._onfocus&&this._hiddenInput._onfocus(h)};imageArea.onblur=function(h){if(!h)h=window.event;this._hiddenInput._onblur&&this._hiddenInput._onblur(h)};imageArea._onkeydown=imageArea.onkeydown;imageArea._radioArrowKeys=FSite2._radioArrowKeys;imageArea.onkeydown=function(h){if(!h)h=window.event;this._onkeydown(h);this._radioArrowKeys.apply(this,new Array(h))};b._updateState();b.style.display="none"}};FSite2._selectClose=function(b){if(this&&!b)b=this;if(b._options){b._options.style.display="none";b._options.parentNode.removeChild(b._options)}b._options=null};FSite2._selectInitClose=function(){this._timeout=setTimeout(FSite2._callRef(FSite2._selectClose,this),200)};FSite2._selectCancelClose=function(b){if(this&&!b)b=this;if(b._timeout){clearTimeout(b._timeout);b._timeout=null}};FSite2._selectInitCancelClose=function(){setTimeout(FSite2._callRef(FSite2._selectCancelClose,this),100)};
FSite2._selectCreateHeader=function(b){var c=document.createElement("tr"),d=document.createElement("th");d.innerHTML=b.label;c.appendChild(d);return c};
FSite2._selectCreateOption=function(b,c){var d=document.createElement("tr"),e=document.createElement("td");if(this._images)e.style.backgroundImage="url('"+b.text+"')";else e.innerHTML=b.text;e._option=b;e._value=b.value;if(b.selected){if(!this._hiddenInput.multiple&&c)c._selected=e;FSite2.setElementClass(e,"selected")}e.onmousedown=function(){return false};if(this._hiddenInput.multiple){e._select=this;e.onclick=function(f){if(!f)f=window.event;this._select._selectChange(this,f.ctrlKey);this._select.focus()}}else{e._dropdown=
this;e.onclick=function(){this._dropdown._selectInitClose();this._dropdown._selectChange(this)}}e.onmouseover=function(){FSite2.setElementClass(this,"hover")};e.onmouseout=function(){FSite2.unsetElementClass(this,"hover")};d.appendChild(e);return d};
FSite2._selectCreateOptions=function(b){var c=document.createElement("table"),d=document.createElement("tbody");for(i=0;i<this._hiddenInput.childNodes.length;i++)if(this._hiddenInput.childNodes[i].nodeType==1){if(this._hiddenInput.childNodes[i].tagName=="OPTION")d.appendChild(this._selectCreateOption(this._hiddenInput.childNodes[i],b));else this._hiddenInput.childNodes[i].tagName=="OPTGROUP"&&d.appendChild(this._selectCreateHeader(this._hiddenInput.childNodes[i]));if(this._hiddenInput.childNodes[i].tagName==
"OPTGROUP"){var e;for(e=0;e<this._hiddenInput.childNodes[i].childNodes.length;e++)if(this._hiddenInput.childNodes[i].childNodes[e].nodeType==1&&this._hiddenInput.childNodes[i].childNodes[e].tagName=="OPTION"){var f=this._selectCreateOption(this._hiddenInput.childNodes[i].childNodes[e],b);FSite2.setElementClass(f.firstChild,"grouped");d.appendChild(f)}}}c.appendChild(d);b&&b.appendChild(c);return c};
FSite2._selectOnDrop=function(b){if(!b)b=window.event;if(typeof this._hiddenInput.onclick=="function")if(this._hiddenInput.onclick()===false)return false;if(this._hiddenInput.disabled)return false;if(this._options){this._selectClose();if(b)b.cancelBubble=true;return false}this._selectCancelClose();var c=document.createElement("div");c._dropdown=this;c.className=this.className;c.style.position="absolute";c.style.overflow="auto";c.onscroll=function(){this._dropdown.focus()};var d=this._selectCreateOptions(c);
this.parentNode.insertBefore(c,this);this.parentNode.removeChild(this);c.parentNode.insertBefore(this,c);c.style.display="block";if(d.clientHeight>c.clientHeight)d.style.width=c.offsetWidth-20+"px";this._options=c;this._selectScrollToSelected();this.focus();this._selectCancelClose();this._selectInitCancelClose();if(b)b.cancelBubble=true;return false};
FSite2._selectUpdateLabel=function(){if(this._hiddenInput.selectedIndex>=0&&this._label){var b=this._hiddenInput.options[this._hiddenInput.selectedIndex].text;if(this._images&&this._label.style.backgroundImage!="url('"+b+"')")this._label.style.backgroundImage="url('"+b+"')";else if(!this._images&&this._label.innerText!=b&&(!this._hiddenInput.options[this._hiddenInput.selectedIndex]._HTML||this._label._innerHTML!=this._hiddenInput.options[this._hiddenInput.selectedIndex]._HTML))if(this._label.offsetWidth&&
this._label.parentNode.offsetHeight){if(!this._label.style.width||!this._label.style.height||!this._label.style.lineHeight){this._label.style.width=this._label.offsetWidth+"px";var c=this._label.parentNode.offsetHeight;this._label.style.height=c+"px";this._label.style.lineHeight=c+"px"}if(b!=this._label._innerHTML){this._label.innerHTML=b;FSite2.recursiveReplace(this._label,/ /g,"\u00a0");this._label._innerHTML=b}}}if(this._disabledClassName)if(this._hiddenInput.disabled&&!RegExp("\\b"+this._disabledClassName+
"\\b","gi").test(this.className))this.className=this.className+" "+this._disabledClassName;else if(!this._hiddenInput.disabled&&RegExp("\\b"+this._disabledClassName+"\\b","gi").test(this.className))this.className=this.className.replace(new RegExp("\\s*\\b"+this._disabledClassName+"\\b\\s*","gi"),"")};
FSite2._selectChange=function(b,c){if(this._options&&b._option){var d=false;if(c){if(b._option.selected){FSite2.unsetElementClass(b,"selected");b._option.selected=false}else{FSite2.setElementClass(b,"selected");b._option.selected=true}d=true}else{b._option.selected||(d=true);var e=this._selectDeselectAll();if(!d&&e>1)d=true;else if(d&&e>0)d=true;b._option.selected=true;FSite2.setElementClass(b,"selected")}this._options._selected=b;this._selectScrollToSelected();this._hiddenInput.onchange&&d&&this._hiddenInput.onchange();
this.focus()}this._updateState&&this._updateState()};FSite2._selectDeselectAll=function(){var b=this._options.firstChild.firstChild.childNodes,c=0;for(i=0;i<b.length;i++){var d=b[i].firstChild;if(d._option){FSite2.unsetElementClass(d,"selected");d._option.selected&&c++;d._option.selected=false}}return c};
FSite2._selectScrollToSelected=function(){if(this._options._selected){if(this._options._selected.offsetTop+this._options._selected.offsetHeight>this._options.scrollTop+this._options.clientHeight)this._options.scrollTop=this._options._selected.offsetTop+this._options._selected.offsetHeight-this._options.clientHeight;if(this._options._selected.offsetTop<this._options.scrollTop)this._options.scrollTop=this._options._selected.offsetTop}};
FSite2._selectOptionOnClick=function(){this._dropdown._selectInitClose();this._dropdown._selectChange(this)};
FSite2._selectOnKeyDown=function(b){if(!b)b=window.event;var c=/[A-Z]|\d/;this._lastKeyNonChar=true;if(b.keyCode==32){this._label&&this.onclick();b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}else if(this._label&&(b.keyCode==27||b.keyCode==9)&&this._options)this.onclick();else if(b.keyCode==36){!this._options&&this._label&&this.onclick();this._selectInitCancelClose&&this._selectInitCancelClose();for(var d=this._options.firstChild.firstChild.firstChild;d&&
!d.firstChild._option;)d=d.nextSibling;d&&this._selectChange(d.firstChild);b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}else if(b.keyCode==35){!this._options&&this._label&&this.onclick();this._selectInitCancelClose&&this._selectInitCancelClose();for(d=this._options.firstChild.firstChild.lastChild;d&&!d.firstChild._option;)d=d.previousSibling;d&&this._selectChange(d.firstChild);b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();
return false}else if(b.keyCode==34){!this._options&&this._label&&this.onclick();this._selectInitCancelClose&&this._selectInitCancelClose();if(d=this._options._selected?this._options._selected.parentNode:this._options.firstChild.firstChild.firstChild){c=Math.floor(this._options.clientHeight/d.offsetHeight);var e;for(e=0;e<c&&d.nextSibling;e++)d=d.nextSibling;for(;d.nextSibling&&!d.firstChild._option;)d=d.nextSibling;d&&this._selectChange(d.firstChild)}b.cancelBubble=true;b.returnValue=false;b.preventDefault&&
b.preventDefault();return false}else if(b.keyCode==33){!this._options&&this._label&&this.onclick();this._selectInitCancelClose&&this._selectInitCancelClose();if(d=this._options._selected?this._options._selected.parentNode:this._options.firstChild.firstChild.lastChild){c=Math.floor(this._options.clientHeight/d.offsetHeight);for(e=0;e<c&&d.previousSibling;e++)d=d.previousSibling;for(;d.previousSibling&&!d.firstChild._option;)d=d.previousSibling;d&&this._selectChange(d.firstChild)}b.cancelBubble=true;
b.returnValue=false;b.preventDefault&&b.preventDefault();return false}else if(b.keyCode==39||b.keyCode==40){!this._options&&this._label&&this.onclick();this._selectInitCancelClose&&this._selectInitCancelClose();for(d=this._options._selected?this._options._selected.parentNode.nextSibling:this._options.firstChild.firstChild.firstChild;d&&!d.firstChild._option;)d=d.nextSibling;d&&this._selectChange(d.firstChild);b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}else if(b.keyCode==
37||b.keyCode==38){!this._options&&this._label&&this.onclick();this._selectInitCancelClose&&this._selectInitCancelClose();for(d=this._options._selected?this._options._selected.parentNode.previousSibling:this._options.firstChild.firstChild.lastChild;d&&!d.firstChild._option;)d=d.previousSibling;d&&this._selectChange(d.firstChild);b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}else if(c.test(String.fromCharCode(b.keyCode))&&!b.ctrlKey&&!b.altKey){this._lastKeyNonChar=
false;if(!this._options&&this._label){this.onclick();d=true}for(c=this._options._selected?this._options._selected.parentNode:this._options.firstChild.firstChild.firstChild;c=c.nextSibling;)if(c.firstChild._option&&c.firstChild.innerHTML.replace(new RegExp("<[^>]*>|s+|(&nbsp;)+","g"),"").substring(0,1).toLowerCase()==String.fromCharCode(b.keyCode).toLowerCase()){this._selectChange(c.firstChild);break}if(!c&&!d){c=this._options.firstChild.firstChild.firstChild;do{if(c.firstChild==this._options._selected)break;
if(c.firstChild._option&&c.firstChild.innerHTML.substring(0,1).toLowerCase()==String.fromCharCode(b.keyCode).toLowerCase()){this._selectChange(c.firstChild);break}}while(c=c.nextSibling)}this._selectInitCancelClose&&this._selectInitCancelClose();this.focus();b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}return true};
FSite2._selectOnKeyPress=function(b){if(!b)b=window.event;var c=b.charCode?b.charCode:b.keyCode,d=/\w|\d/;if(b.keyCode==36||b.keyCode==35||b.keyCode==39||b.keyCode==40||b.keyCode==37||b.keyCode==38||b.keyCode==33||b.keyCode==34||b.keyCode==20||!this._lastKeyNonChar&&d.test(String.fromCharCode(c))){this._selectInitCancelClose&&this._selectInitCancelClose();this.focus();b.cancelBubble=true;b.returnValue=false;b.preventDefault&&b.preventDefault();return false}return true};
FSite2._selectConvertOptions=function(b){htmlConverter=document.createElement("div");htmlConverter.style.display="none";document.body.appendChild(htmlConverter);for(var c=0;c<b.options.length;c++){htmlConverter.innerHTML=b.options[c].text;b.options[c]._HTML=htmlConverter.innerHTML}document.body.removeChild(htmlConverter)};FSite2.selects=[];FSite2._selectsTimerProc=function(){var b;for(b=FSite2.selects.length-1;b>=0;b--)FSite2.selects[b]._replacement._updateState()};
FSite2.extendSelect=function(b,c,d,e){b._replacement||(b.multiple?FSite2.extendMultipleSelect(b,c,d,e):FSite2.extendSingleSelect(b,c,d,e))};
FSite2.extendSingleSelect=function(b,c,d,e){if(b.tagName!="SELECT")throw new Error("Given element is not a select element");var f=document.createElement("a");b._replacement=f;b._onfocus=b.onfocus;b.onfocus=function(l){if(!l)l=window.event;this._onblur&&this.onblur(l);this._replacement.focus()};b._onblur=b.onblur;b.onblur=function(l){if(!l)l=window.event;this._onblur&&this.onblur(l);this._replacement.blur()};f._hiddenInput=b;f._images=d;f.className=c;f._disabledClassName=e;f.style.display="block";
f.style.cursor="default";f.style.textDecoration="none";f.href="#";f.onmouseover=function(){return false};f.onkeydown=function(l){if(!l)l=window.event;FSite2._selectOnKeyDown.apply(this,new Array(l))};f.onkeypress=function(l){if(!l)l=window.event;FSite2._selectOnKeyPress.apply(this,new Array(l))};f.onkeyup=function(){this.focus();this._lastKeyNonChar=true};f.onfocus=function(l){if(!l)l=window.event;this._selectCancelClose();this._hiddenInput._onfocus&&this._hiddenInput._onfocus(l)};f.onblur=function(l){if(!l)l=
window.event;this._selectInitClose();this._hiddenInput._onblur&&this._hiddenInput._onblur(l)};f.onclick=FSite2._selectOnDrop;f._selectClose=FSite2._selectClose;f._selectInitClose=FSite2._selectInitClose;f._selectCancelClose=FSite2._selectCancelClose;f._selectInitCancelClose=FSite2._selectInitCancelClose;f._selectCreateOptions=FSite2._selectCreateOptions;f._selectCreateHeader=FSite2._selectCreateHeader;f._selectCreateOption=FSite2._selectCreateOption;f._selectChange=function(l){FSite2._selectChange.apply(this,
new Array(l))};f._selectDeselectAll=function(){FSite2._selectDeselectAll.apply(this)};f._selectScrollToSelected=FSite2._selectScrollToSelected;f._updateState=FSite2._selectUpdateLabel;c=document.createElement("table");d=document.createElement("tbody");e=document.createElement("tr");var g=document.createElement("td"),h=document.createElement("div");h.innerHTML="&nbsp;";h.style.overflow="hidden";g.appendChild(h);g.className="text";f._label=h;e.appendChild(g);g=document.createElement("td");g.className=
"drop";g.innerHTML=" ";f._drop=g;e.appendChild(g);d.appendChild(e);c.appendChild(d);f.appendChild(c);f._hiddenInput=b;b.style.display="none";b.parentNode.insertBefore(f,b);b._updateState=function(){this._replacement._updateState()};FSite2._selectConvertOptions(b);FSite2.selects[FSite2.selects.length]=b;if(!FSite2._selectsTimer)FSite2._selectsTimer=setInterval(FSite2._selectsTimerProc,250)};
FSite2.extendMultipleSelect=function(b,c,d,e){if(b.tagName!="SELECT")throw new Error("Given element is not a select element");var f=document.createElement("a");b._replacement=f;b._onfocus=b.onfocus;b.onfocus=function(g){if(!g)g=window.event;this._onblur&&this.onblur(g);this._replacement.focus()};b._onblur=b.onblur;b.onblur=function(g){if(!g)g=window.event;this._onblur&&this.onblur(g);this._replacement.blur()};f._hiddenInput=b;f._images=d;f.className=c;f._disabledClassName=e;f.href="#";f.style.cursor=
"default";f.style.display="block";f.style.textDecoration="none";f.onfocus=function(g){if(!g)g=window.event;window.getSelection&&window.getSelection().removeAllRanges();this._hiddenInput._onfocus&&this._hiddenInput._onfocus(g);return false};f.onblur=function(g){if(!g)g=window.event;this._hiddenInput._onblur&&this._hiddenInput._onblur(g);return false};f.onclick=function(g){if(!g)g=window.event;g.cancelBubble=true;return false};c=document.createElement("div");f._options=c;f.onkeydown=FSite2._selectOnKeyDown;
f.onkeypress=FSite2._selectOnKeyPress;f.onkeyup=function(){this.focus();this._lastKeyNonChar=true};c.onmousedown=function(g){if(!g)g=window.event;g.cancelBubble=true;return false};f._selectCreateOptions=FSite2._selectCreateOptions;f._selectCreateHeader=FSite2._selectCreateHeader;f._selectCreateOption=FSite2._selectCreateOption;f._selectChange=function(g,h){FSite2._selectChange.apply(this,h?new Array(g,h):new Array(g))};f._selectDeselectAll=function(){return FSite2._selectDeselectAll.apply(this)};
f._selectScrollToSelected=FSite2._selectScrollToSelected;d=f._selectCreateOptions(c);f.appendChild(c);b.style.display="none";b.parentNode.insertBefore(f,b);if(d.clientHeight>f.clientHeight)d.style.width=f.offsetWidth-20+"px"};FSite2.SlideShow=function(b,c){if(!b._slideShow){this.container=b;this.container._slideShow=this;this.nextClass=c.slideShowNextClass?c.slideShowNextClass:"slideshow_next";this.prevClass=c.slideShowPrevClass?c.slideShowPrevClass:"slideshow_prev";this.playClass=c.slideShowPlayClass?c.slideShowPlayClass:"slideshow_play";this.stopClass=c.slideShowStopClass?c.slideShowStopClass:"slideshow_stop";this.disabledClass=c.slideShowDisabledClass?c.slideShowDisabledClass:"slideshow_disabled";this.scrollClass=c.slideShowScrollClass?
c.slideShowScrollClass:"slideshow_scroll";this.slideClass=c.slideShowSlideClass?c.slideShowSlideClass:"slideshow_slide";this.loop=c.slideShowLoop?c.slideShowLoop:false;this.transType=c.slideShowTransType?c.slideShowTransType:"opacity";this.transAnim=c.slideShowTransAnim?c.slideShowTransAnim:FSite2.Anim.linear;this.transTime=c.slideShowTransTime?c.slideShowTransTime:1E3;this.waitTime=c.slideShowWaitTime?c.slideShowWaitTime:2E3;if(typeof c.slideShowOnShowSlide=="function")this.onShowSlide=c.slideShowOnShowSlide;
var d=FSite2.getElementsByClassName(this.scrollClass,this.container);this.scrollElement=d.length?d[0]:this.container;this.slides=FSite2.getElementsByClassName(this.slideClass,this.container);this.prevControls=FSite2.getElementsByClassName(this.prevClass,this.container);this.nextControls=FSite2.getElementsByClassName(this.nextClass,this.container);this.playControls=FSite2.getElementsByClassName(this.playClass,this.container);this.stopControls=FSite2.getElementsByClassName(this.stopClass,this.container);
this._extendContent();this.playTimeout=undefined;if(c.slideShowCurrent!==undefined)this.showSlide(c.slideShowCurrent);else this.currentSlide=undefined}};
FSite2.SlideShow.prototype._extendContent=function(){var b;for(b=0;b<this.prevControls.length;b++){if(typeof this.prevControls[b].onclick=="function")this.prevControls[b]._onclick_slideshow=this.prevControls[b].onclick;this.prevControls[b]._slideshow=this;this.prevControls[b].onclick=function(c){if(!c)c=window.event;if(typeof this._onclick_slideshow=="function")if(this._onclick_slideshow(c)===false)return false;this._slideshow.prev();return false}}for(b=0;b<this.nextControls.length;b++){if(typeof this.nextControls[b].onclick==
"function")this.nextControls[b]._onclick_slideshow=this.nextControls[b].onclick;this.nextControls[b]._slideshow=this;this.nextControls[b].onclick=function(c){if(!c)c=window.event;if(typeof this._onclick_slideshow=="function")if(this._onclick_slideshow(c)===false)return false;this._slideshow.next();return false}}for(b=0;b<this.playControls.length;b++){if(typeof this.playControls[b].onclick=="function")this.playControls[b]._onclick_slideshow=this.playControls[b].onclick;this.playControls[b]._slideshow=
this;this.playControls[b].onclick=function(c){if(!c)c=window.event;if(typeof this._onclick_slideshow=="function")if(this._onclick_slideshow(c)===false)return false;this._slideshow.play();return false}}for(b=0;b<this.stopControls.length;b++){if(typeof this.stopControls[b].onclick=="function")this.stopControls[b]._onclick_slideshow=this.stopControls[b].onclick;this.stopControls[b]._slideshow=this;this.stopControls[b].onclick=function(c){if(!c)c=window.event;if(typeof this._onclick_slideshow=="function")if(this._onclick_slideshow(c)===
false)return false;this._slideshow.stop();return false}}};FSite2.SlideShow.prototype._canShowNext=function(){if(this.currentSlide===undefined)return false;switch(this.transType){case "scroll":return this.currentSlide>=this.slides.length-1||this.slides[this.currentSlide+1].offsetLeft+this.scrollElement.offsetWidth>this.scrollElement.scrollWidth?false:true;case "opacity":default:return this.currentSlide==this.slides.length-1?false:true}};
FSite2.SlideShow.prototype._updateControls=function(){var b;if(!this.loop){var c=this._canShowNext();for(b=0;b<this.nextControls.length;b++)c?FSite2.unsetElementClass(this.nextControls[b],this.disabledClass):FSite2.setElementClass(this.nextControls[b],this.disabledClass);for(b=0;b<this.prevControls.length;b++)this.currentSlide===0?FSite2.setElementClass(this.prevControls[b],this.disabledClass):FSite2.unsetElementClass(this.prevControls[b],this.disabledClass)}for(b=0;b<this.playControls.length;b++)this.playTimeout?
FSite2.setElementClass(this.playControls[b],this.disabledClass):FSite2.unsetElementClass(this.playControls[b],this.disabledClass);for(b=0;b<this.stopControls.length;b++)this.playTimeout===undefined?FSite2.setElementClass(this.stopControls[b],this.disabledClass):FSite2.unsetElementClass(this.stopControls[b],this.disabledClass)};
FSite2.SlideShow.prototype.next=function(b){if(this._canShowNext())return this.showSlide(this.currentSlide+1,b);else if(this.currentSlide===undefined&&this.slides.length>0||this.loop)return this.showSlide(0,b);return false};FSite2.SlideShow.prototype.prev=function(b){if(this.currentSlide!==undefined&&this.currentSlide>0)return this.showSlide(this.currentSlide-1,b);else if(this.currentSlide===undefined&&this.slides.length>0||this.loop)return this.showSlide(this.slides.length-1,b);return false};
FSite2.SlideShow.prototype.getCount=function(){return this.slides.length};
FSite2.SlideShow.prototype._showSlideOpacity=function(b,c){if(this.currentSlide!==undefined){this.locked=true;var d=FSite2.Anim.animateOpacity(this.slides[b],this.transAnim,{start:0,end:1,time:this.transTime,slideShow:this,dontStart:true,onFinalComplete:c?c:undefined,onComplete:function(){this.slideShow.locked=undefined;typeof this.slideShow.onShowSlide=="function"&&this.slideShow.onShowSlide();typeof this.onFinalComplete=="function"&&this.onFinalComplete()}});FSite2.Anim.animateOpacity(this.slides[this.currentSlide],
this.transAnim,{start:1,end:0,time:this.transTime,slideShow:this,chainAnimation:d,onComplete:function(){FSite2.hideElement(this.slideShow.slides[this.slideShow.currentSlide]);this.slideShow.currentSlide=b;this.slideShow._updateControls();FSite2.showElement(this.slideShow.slides[this.slideShow.currentSlide])}})}else{this.locked=true;this.currentSlide=b;FSite2.showElement(this.slides[this.currentSlide]);FSite2.Anim.animateOpacity(this.slides[this.currentSlide],this.transAnim,{start:0,end:1,time:this.transTime,
slideShow:this,onFinalComplete:c?c:undefined,onComplete:function(){this.slideShow.locked=undefined;typeof this.slideShow.onShowSlide=="function"&&this.slideShow.onShowSlide();typeof this.onFinalComplete=="function"&&this.onFinalComplete()}});this._updateControls()}};
FSite2.SlideShow.prototype._showSlideScroll=function(b,c){this.locked=true;this.currentSlide=b;new FSite2.Animation(this.scrollElement,"scrollLeft",this.transAnim,{start:this.scrollElement.scrollLeft,end:this.slides[this.currentSlide].offsetLeft,time:this.transTime,slideShow:this,onFinalComplete:c?c:undefined,onComplete:function(){this.slideShow.locked=undefined;typeof this.slideShow.onShowSlide=="function"&&this.slideShow.onShowSlide();typeof this.onFinalComplete=="function"&&this.onFinalComplete()}});
this._updateControls()};FSite2.SlideShow.prototype.showSlide=function(b,c){if(this.locked!==undefined)return false;if(b<0||b>=this.slides.length)return false;switch(this.transType){case "scroll":this._showSlideScroll(b,c);break;case "opacity":default:this._showSlideOpacity(b,c);break}return true};
FSite2.SlideShow.prototype._wait=function(){this.playTimeout=this.playTimeout!==undefined&&(this.loop||this.currentSlide!=this.slides.length-1)?setTimeout(this.next.createDelegate(this,[this._wait.createDelegate(this)]),this.waitTime):undefined;this._updateControls()};FSite2.SlideShow.prototype.play=function(b){var c=this._wait.createDelegate(this);if(b!==undefined)this.showSlide(b,c);else!this.loop||this.currentSlide!=this.slides.length-1?this.next(c):this.rewind(c);this.playTimeout=null;this._updateControls()};
FSite2.SlideShow.prototype.stop=function(){clearTimeout(this.playTimeout);this.playTimeout=undefined;this._updateControls()};FSite2.SlideShow.prototype.rewind=function(b){return this.showSlide(0,b)};

