Array.prototype.inArray=function(b){var a;for(a=0;a<this.length;a++){if(this[a]===b){return true}}return false};function addEvent(d,b,a){if(d.addEventListener){d.addEventListener(b,a,false);EventCache.add(d,b,a)}else{if(d.attachEvent){d["e"+b+a]=a;d[b+a]=function(){d["e"+b+a](window.event)};d.attachEvent("on"+b,d[b+a]);EventCache.add(d,b,a)}else{d["on"+b]=d["e"+b+a]}}}var EventCache=function(){var a=[];
return{listEvents:a,add:function(b,e,d){a.push(arguments)},flush:function(){var b,d;for(b=a.length-1;b>=0;b=b-1){d=a[b];if(d[0].removeEventListener){d[0].removeEventListener(d[1],d[2],d[3])}if(d[1].substring(0,2)!="on"){d[1]="on"+d[1]}if(d[0].detachEvent){d[0].detachEvent(d[1],d[2])}d[0][d[1]]=null}}}}();addEvent(window,"unload",EventCache.flush);var sweetTitles={xCord:0,yCord:0,tipElements:["a","abbr","acronym","input","select"],obj:Object,tip:Object,active:0,init:function(){if(!document.getElementById||!document.createElement||!document.getElementsByTagName){return
}var d,b;this.tip=document.createElement("div");this.tip.id="toolTip";document.getElementsByTagName("body")[0].appendChild(this.tip);this.tip.style.top="0";this.tip.style.visibility="hidden";var a=this.tipElements.length;for(d=0;d<a;d++){var f=document.getElementsByTagName(this.tipElements[d]);var e=f.length;for(b=0;b<e;b++){if(f[b].id!="submitter"){addEvent(f[b],"mouseover",this.tipOver);addEvent(f[b],"mouseout",this.tipOut);
f[b].setAttribute("tip",f[b].title);f[b].removeAttribute("title")}}}},updateXY:function(a){if(document.captureEvents){sweetTitles.xCord=a.pageX;sweetTitles.yCord=a.pageY}else{if(window.event.clientX){sweetTitles.xCord=window.event.clientX+document.documentElement.scrollLeft;sweetTitles.yCord=window.event.clientY+document.documentElement.scrollTop}}},tipOut:function(){if(window.tID){clearTimeout(tID)
}if(window.opacityID){clearTimeout(opacityID)}sweetTitles.tip.style.visibility="hidden"},checkNode:function(){var a=this.obj;if(this.tipElements.inArray(a.nodeName.toLowerCase())){return a}else{return a.parentNode}},tipOver:function(a){sweetTitles.obj=this;tID=window.setTimeout("sweetTitles.tipShow()",500);sweetTitles.updateXY(a)},tipShow:function(){var g=Number(this.xCord);var e=Number(this.yCord);
var h=parseInt(e+15);var d=parseInt(g+10);var b=this.checkNode();var f="";var a="";if(b.nodeName.toLowerCase()=="a"){if(b.href.indexOf("javascript://")==-1){f=(b.href.length>35?b.href.toString().substring(0,35)+"...":b.href)}var a=(b.accessKey?" <span>["+b.accessKey+"]</span> ":"")}else{if(b.firstChild){f=b.firstChild.nodeValue}}this.tip.innerHTML="<p>"+b.getAttribute("tip")+"</p>";if(parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft)<parseInt(this.tip.offsetWidth+d)){this.tip.style.left=parseInt(d-(this.tip.offsetWidth+10))+"px"
}else{this.tip.style.left=d+"px"}if(parseInt(document.documentElement.clientHeight+document.documentElement.scrollTop)<parseInt(this.tip.offsetHeight+h)){this.tip.style.top=parseInt(h-(this.tip.offsetHeight+10))+"px"}else{this.tip.style.top=h+"px"}this.tip.style.visibility="visible";this.tip.style.opacity=".4";this.tipFade(10)},tipFade:function(b){var d=parseInt(b);var a=parseInt(d+10);if(a<80){this.tip.style.opacity="."+a;
this.tip.style.filter="alpha(opacity:"+a+")";opacityID=window.setTimeout("sweetTitles.tipFade('"+a+"')",20)}else{this.tip.style.opacity=".80";this.tip.style.filter="alpha(opacity:80)"}}};function pageLoader(){sweetTitles.init()}addEvent(window,"load",pageLoader);var clickHeatGroup="";var clickHeatSite="";var clickHeatServer="";var clickHeatLastIframe=-1;var clickHeatTime=0;var clickHeatQuota=-1;var clickHeatBrowser="";
var clickHeatDocument="";var clickHeatWait=500;var clickHeatLocalWait=0;var clickHeatDebug=(window.location.href.search(/debugclickheat/)!==-1);function showClickHeatDebug(b){if(clickHeatDebug===true){document.getElementById("clickHeatDebuggerSpan").innerHTML=b;document.getElementById("clickHeatDebuggerDiv").style.display="block"}}function catchClickHeat(w){try{showClickHeatDebug("Gathering click data...");
if(clickHeatQuota===0){showClickHeatDebug("Click not logged: quota reached");return true}if(clickHeatGroup===""){showClickHeatDebug("Click not logged: group name empty (clickHeatGroup)");return true}if(w===undefined){w=window.event;c=w.button;element=w.srcElement}else{c=w.which;element=null}if(c===0){showClickHeatDebug("Click not logged: no button pressed");return true}if(element!==null&&element.tagName.toLowerCase()==="iframe"){if(element.sourceIndex===clickHeatLastIframe){showClickHeatDebug("Click not logged: same iframe (a click on iframe opens a popup and popup is closed => iframe gets the focus again)");
return true}clickHeatLastIframe=element.sourceIndex}else{clickHeatLastIframe=-1}var t=w.clientX;var u=w.clientY;var s=clickHeatDocument.clientWidth!==undefined?clickHeatDocument.clientWidth:window.innerWidth;var x=clickHeatDocument.clientHeight!==undefined?clickHeatDocument.clientHeight:window.innerHeight;var y=window.pageXOffset===undefined?clickHeatDocument.scrollLeft:window.pageXOffset;var z=window.pageYOffset===undefined?clickHeatDocument.scrollTop:window.pageYOffset;
if(t>s||u>x){showClickHeatDebug("Click not logged: out of document (should be a click on scrollbars)");return true}clickTime=new Date();if(clickTime.getTime()-clickHeatTime<1000){showClickHeatDebug("Click not logged: at least 1 second between clicks");return true}clickHeatTime=clickTime.getTime();if(clickHeatQuota>0){clickHeatQuota=clickHeatQuota-1}params="s="+clickHeatSite+"&g="+clickHeatGroup+"&x="+(t+y)+"&y="+(u+z)+"&w="+s+"&b="+clickHeatBrowser+"&c="+c+"&random="+Date();
showClickHeatDebug("Ready to send click data...");var v=false;if(clickHeatServer.substring(0,4)!=="http"){var B=false;try{B=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{B=new ActiveXObject("Microsoft.XMLHTTP")}catch(D){B=null}}if(!B&&typeof XMLHttpRequest!==undefined){B=new XMLHttpRequest()}if(B){if(clickHeatDebug===true){B.onreadystatechange=function(){if(B.readyState===4){if(B.status===200){showClickHeatDebug("Click recorded at "+clickHeatServer+" with the following parameters:<br />x = "+(t+y)+" ("+t+"px from left + "+y+"px of horizontal scrolling)<br />y = "+(u+z)+" ("+u+"px from top + "+z+"px of vertical scrolling)<br />width = "+s+"<br />browser = "+clickHeatBrowser+"<br />click = "+c+"<br />site = "+clickHeatSite+"<br />group = "+clickHeatGroup+"<br /><br />Server answer: "+B.responseText)
}else{if(B.status===404){showClickHeatDebug("click.php was not found at: "+(clickHeatServer!==""?clickHeatServer:"/clickheat/click.php")+" please set clickHeatServer value")}else{showClickHeatDebug("click.php returned a status code "+B.status+" with the following error: "+B.responseText)}}clickHeatLocalWait=0}}}B.open("GET",clickHeatServer+"?"+params,true);B.setRequestHeader("Connection","close");B.send(null);
v=true}}if(v===false){if(clickHeatDebug===true){showClickHeatDebug("Click recorded at "+clickHeatServer+" with the following parameters:<br />x = "+(t+y)+" ("+t+"px from left + "+y+"px of horizontal scrolling)<br />y = "+(u+z)+" ("+u+"px from top + "+z+"px of vertical scrolling)<br />width = "+s+"<br />browser = "+clickHeatBrowser+"<br />click = "+c+"<br />site = "+clickHeatSite+"<br />group = "+clickHeatGroup+'<br /><br />Server answer:<br /><iframe src="'+clickHeatServer+"?"+params+'" width="700" height="60"></iframe>')
}else{var h=new Image();h.src=clickHeatServer+"?"+params}}var C=new Date();clickHeatLocalWait=C.getTime()+clickHeatWait;while(clickHeatLocalWait>C.getTime()){C=new Date()}}catch(A){showClickHeatDebug("An error occurred while processing click (Javascript error): "+w.message)}return true}function initClickHeat(){if(clickHeatDebug===true){document.write('<div id="clickHeatDebuggerDiv" style="padding:5px; display:none; position:absolute; top:10px; left:10px; border:1px solid #888; background-color:#eee; z-index:99;"><strong>ClickHeat debug: <a href="#" onmouseover="document.getElementById(\'clickHeatDebuggerDiv\').style.display = \'none\'; return false">Rollover to close</a></strong><br /><br /><span id="clickHeatDebuggerSpan"></span></div>')
}if(clickHeatGroup===""||clickHeatServer===""){showClickHeatDebug("ClickHeat NOT initialised: either clickHeatGroup or clickHeatServer is empty");return false}domain=window.location.href.match(/http:\/\/[^/]+\//);if(domain!==null&&clickHeatServer.substring(0,domain[0].length)===domain[0]){clickHeatServer=clickHeatServer.substring(domain[0].length-1,clickHeatServer.length)}if(document.addEventListener){document.addEventListener("mousedown",catchClickHeat,false)
}else{if(document.attachEvent){document.attachEvent("onmousedown",catchClickHeat)}}iFrames=document.getElementsByTagName("iframe");for(i=0;i<iFrames.length;i++){if(document.addEventListener){iFrames[i].addEventListener("focus",catchClickHeat,false)}else{if(document.attachEvent){iFrames[i].attachEvent("onfocus",catchClickHeat)}}}clickHeatDocument=(document.documentElement!==undefined&&document.documentElement.clientHeight!==0)?document.documentElement:document.body;
var b=navigator.userAgent!==undefined?navigator.userAgent.toLowerCase().replace(/-/g,""):"";clickHeatBrowser=b.replace(/iceweasel/,"firefox").replace(/^.*(firefox|kmeleon|safari|msie|opera).*$/,"$1");if(b===clickHeatBrowser||clickHeatBrowser===""){clickHeatBrowser="unknown"}showClickHeatDebug("ClickHeat initialised with:<br />site = "+clickHeatSite+"<br />group = "+clickHeatGroup+"<br />server = "+clickHeatServer+"<br />quota = "+(clickHeatQuota===-1?"unlimited":clickHeatQuota)+"<br /><br />browser = "+clickHeatBrowser)
}var FormValidator=Class.create();FormValidator.prototype={initialize:function(a){if(typeof(a)!="object"){a={}}this.form=a.form||null;this.successCallback=a.onSuccess||Prototype.emptyFunction;this.failureCallback=a.onFailure||Prototype.emptyFunction;this.onValidateAllCallback=a.onValidateAll||Prototype.emptyFunction;this.event=a.event||"none";this.onSubmit=a.onSubmit||null;this.invalid=[];this.successCallback=this.successCallback.bind(this);
this.failureCallback=this.failureCallback.bind(this);this.onValidateAllCallback=this.onValidateAllCallback.bind(this);this.counter=0;if(this.form){this.form=$(this.form);Event.observe(this.form,"submit",this.submitter.bindAsEventListener(this))}this.validatorTypes=$H({email:this.emailValidator,length:this.lengthValidator,numeric:this.numericValidator,number:this.numberValidator,alpha:this.alphaValidator,alnum:this.alphaNumValidator,username:this.usernameValidator,size:this.sizeValidator,required:this.requiredValidator,equals:this.equalsValidator,regexp:this.regexpValidator,least:this.leastValidator});
this.validators=$H({})},submitter:function(a){var b=this.validateAll();if(!b&&a){a.stop()}if(b&&this.onSubmit){if(a){a.stop()}this.onSubmit()}},add:function(e){if(typeof($(e.id))=="undefined"&&typeof($(e.name))=="undefined"){throw"id or name of the validator is mandatory";return}if(typeof(e.type)=="undefined"){throw"type of the validator is mandatory"}var a=new Array();if(e.id){a=a.concat(e.id)}if(e.name){a=a.concat(e.name)
}var n=new Array();n=n.concat(e.message);if(Object.isFunction(e.type)){this.register("custom"+this.counter,e.type);e.type=["custom"+this.counter];this.counter++}var k=new Array();k=k.concat(e.type);var q=e.parameters||{};for(var j=0;j<a.length;j++){var d=a[j];var b=null;for(var p=0;p<k.length;p++){var l=k[p];var s=l.indexOf("|");if(s!=-1){var o=l.split("|");l=o[0];for(var h=1;h<o.length;h++){var r=o[h].indexOf("=");
var g=new Object();g[o[h].substr(0,r)]=o[h].substr(r+1);q=Object.extend(q,g)}}var f=n[p]=="undefined"?" ":n[p];if(typeof(this.validators.get(d))=="undefined"){b=$H({id:d,types:[l],successCallback:e.onSuccess||this.successCallback,failureCallback:e.onFailure||this.failureCallback,parameters:q||{},event:e.event||this.event,message:[f]})}else{b=this.validators.get(d);b.set("event",e.event||b.get("event"));
b.get("types").push(l);b.get("message").push(f);b.set("parameters",Object.extend(b.get("parameters"),q))}this.validators.set(d,b)}if(b.get("event")!="none"){Event.observe(d,b.get("event"),function(){this.validate(d)}.bind(this))}}},remove:function(a){this.validators.unset(a)},validate:function(g){var d=this.validators.get(g);for(ii=0;ii<d.get("types").length;ii++){var e=this.validatorTypes.get(d.get("types")[ii]);
try{var a=e(g,d.get("parameters"))}catch(b){if(window.console){window.console.log(b)}}if(a){try{d.get("successCallback")(g,ii)}catch(b){alert("Success callback error:"+b.message)}}else{var f=d.get("message")[ii];try{d.get("failureCallback")(g,f,ii)}catch(b){if(window.console){window.console.log(b)}}return false}}return true},validateAll:function(){this.invalid.clear();var b=this.validators.keys();if(!b.length){return true
}this.onValidateAllCallback(b);var a=true;for(var e=0;e<b.length;e++){good=this.validate(b[e]);if(!good){a=false}}if(this.invalid.length){var d=$(this.invalid[0]);if(Element.viewportOffset(d).top<150){d.focus();window.scrollBy(0,-150)}else{window.scrollBy(0,150);d.focus()}}return a},forceSuccess:function(a){a.each(function(b){this.validators.get(b).get("successCallback")(b)})},forceFailure:function(a){a.each(function(b){this.validators.get(b).get("failureCallback")(b)
})},register:function(b,a){this.validatorTypes.set(b,a)},$:function(a){var b=$A(document.getElementsByName(a));if(count(b)){return b[0]}else{return $(a)}},emailValidator:function(g,b){emailStr=$(g).value;if(!emailStr.length){return true}var f=emailStr.match("^(.+)@(.+)$");if(f==null){return false}if(f[1]!=null){var e=/^\"?[\w-_\.]*\"?$/;if(f[1].match(e)==null){return false}}if(f[2]!=null){var d=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
if(f[2].match(d)==null){var a=/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;if(f[2].match(a)==null){return false}}return true}return false},lengthValidator:function(b,a){if(a.max&&$(b).value.length>a.max){return false}if(a.min&&$(b).value.length<a.min){return false}return true},numericValidator:function(e,b){var a=/[^0-9]/;var d=$(e).value.search(a);if($(e).value.length>0&&d>=0){return false}return true
},numberValidator:function(){var a=$(id).value;if(a.length>0&&isNaN(a)){return false}return true},alphaValidator:function(e,b){var a=/[^a-z]/i;var d=$(e).value.search(a);if($(e).value.length>0&&d>=0){return false}return true},alphaNumValidator:function(e,b){var a=/[a-z]{1}[^a-z0-9]/i;var d=$(e).value.search(a);if($(e).value.length>0&&d>=0){return false}return true},usernameValidator:function(d,a){var b=/^[a-z]+[a-z0-9_]*$/i;
if(!$(d).value.match(b)){return false}return true},sizeValidator:function(d,a){var b=parseFloat($(d).value);if(b.length==0||isNaN(b)){return false}if(typeof(a.max)!="undefined"&&b>a.max){return false}if(typeof(a.min)!="undefined"&&b<a.min){return false}return true},requiredValidator:function(e,d){var a=$(e);var b=a.type;if(b=="checkbox"&&!a.checked){return false}if($F(e).length==0){return false}return true
},equalsValidator:function(d,b){var a=$(d);if(a.value!=$(b.id).value){return false}return true},leastValidator:function(d,a){var b=$A(document.getElementsByName(a.name));good=false;b.each(function(e){e=$(e);if(e.checked==true){good=true}});return good},regexpValidator:function(d,b){if($(d).value.length>0){var a;if(typeof(b.modifier)!="undefined"){a=new RegExp(b.pattern,b.modifier)}else{a=new RegExp(b.pattern)
}if(!a.match($(d).value)){return false}}return true}};