var Main={};Main.debug=false;Main.allowAlert=true;Main.IE5=navigator.appVersion.indexOf("MSIE 5")!=-1?true:false;Main.IE6=navigator.appVersion.indexOf("MSIE 6")!=-1?true:false;Main.IE7=navigator.appVersion.indexOf("MSIE 7")!=-1?true:false;Main.eventCache=function(){var A=[];if(Array.prototype.push==null){Array.prototype.push=function(){for(var B=0;B<arguments.length;B++){this[this.length]=arguments[B]}return this.length}}return{listEvents:A,add:function(C,E,D,B){A.push(arguments)},flush:function(){var B,C;for(B=A.length-1;B>=0;B=B-1){C=A[B];if(C[0].removeEventListener){}if(C[1].substring(0,2)!="on"){C[1]="on"+C[1]}if(C[0].detachEvent){C[0].detachEvent(C[1],C[2])}C[0][C[1]]=null}}}}();Main.addEvent=function(C,A,B){if(C.addEventListener){C.addEventListener(A,B,false)}else{if(C.attachEvent){C.attachEvent("on"+A,B)}}};Main.removeEvent=function(C,A,B){if(C.removeEventListener){C.removeEventListener(A,B,false)}else{if(C.detachEvent){C.detachEvent("on"+A,B)}}};Main.addStyleSheet=function(C){if(document.getElementsByTagName("head")){var A=document.getElementsByTagName("head")[0];var B=document.createElement("link");B.setAttribute("type","text/css");B.setAttribute("rel","stylesheet");B.setAttribute("href",C);A.appendChild(B)}};Main.findElementPosition=function(A){var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return[B,curtop]};Main.debugAlert=function(A){if(Main.allowAlert&&Main.debug){Main.allowAlert=confirm(A)}};Main.errHandler=function(C){var A="";for(var B in C){A+=B+"="+C[B]+"\n"}Main.debugAlert("An error has occured: \n\n"+A+"\nSee Firefox browser for correct linenumbers.");return true};Main.addSubmitRollOver=function(){var A=document.getElementsByTagName("input");for(var B=0;B<A.length;B++){if(A[B].type!="submit"){continue}A[B].onmouseover=function(){this.className=this.className+"-hover"};Main.eventCache.add(A[B],"onmouseover",function(){this.className=this.className+"-hover"},false);A[B].onmouseout=function(){this.className=this.className.replace("-hover","")};Main.eventCache.add(A[B],"onmouseout",function(){this.className=this.className.replace("-hover","")},false)}};Main.trim=function(A){return A.replace(/^\s+|\s+$/g,"")};$=function(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C};Main.getElementsByClassName=function(B,A,C){return getElementsByClassName(B,A,C)};getElementsByClassName=function(H,I,G){var B=new RegExp("(^|\\s)"+H+"(\\s|$)");var I=I||"*";var G=G||document;if(typeof (G)=="string"){G=document.getElementById(G)}var A=(I=="*"&&G.all)?G.all:G.getElementsByTagName(I);var D=[];var F;var C=A.length;for(var E=0;E<C;E++){F=A[E];if(B.test(F.className)){D.push(F)}}return D};getElementsByTagNames=function(G,H){if(!H){var H=document}var A=G.split(",");var F=new Array();for(var E=0;E<A.length;E++){var D=H.getElementsByTagName(A[E]);for(var C=0;C<D.length;C++){F.push(D[C])}}var B=F[0];if(!B){return[]}if(B.sourceIndex){F.sort(function(J,I){return J.sourceIndex-I.sourceIndex})}else{if(B.compareDocumentPosition){F.sort(function(J,I){return 3-(J.compareDocumentPosition(I)&6)})}}return F};addClass=function(A,B){this.removeClass(A,B);return A&&(A.className+=(A.className.length>0?" ":"")+B)};removeClass=function(A,B){return A&&(A.className=A.className.replace(new RegExp("^"+B+"\\b\\s*|\\s*\\b"+B+"\\b","g"),""))};hasClass=function(A,B){return(!A||!A.className)?false:(new RegExp("\\b"+B+"\\b")).test(A.className)};swapClass=function(B,A,C){this.removeClass(B,A);this.addClass(B,C)};Main.getNextElement=function(A){do{A=A.nextSibling}while(A&&A.nodeType!=1);return A};Main.getPreviousElement=function(A){do{A=A.previousSibling}while(A&&A.nodeType!=1);return A};Math.roundDec=function(A,B){return Math.round(A*Math.pow(10,B))/Math.pow(10,B)};Main.addEvent(window,"unload",Main.eventCache.flush);