function addEvent(D,C,B){if(D.addEventListener){D.addEventListener(C,B,false)}else{if(D.attachEvent){var A=(arguments.length==4)?arguments[3]:false;if((D==window)&&(C=="load")&&(!A)){_onloads.push(B)}else{D.attachEvent("on"+C,B)}}}return(true)}_onloads=[];addEvent(window,"load",function(){for(var A=0;A<_onloads.length;A++){_onloads[A]()}},true);var screenheight=0;var screenwidth=0;var pageheight=0;var pagewidth=0;var centerx=0;var centery=0;function pageinfo(){var A=document.body;if(document.documentElement){if((document.body.clientHeight==document.body.offsetHeight)&&(document.body.offsetHeight==document.body.scrollHeight)){A=document.documentElement}if((document.body.clientHeight==0)&&(document.documentElement.clientHeight>0)){A=document.documentElement}}screenheight=A.clientHeight;screenwidth=A.clientWidth;pageheight=A.scrollHeight;pagewidth=A.scrollWidth;centerx=(screenwidth/2);centery=(screenheight/2)}addEvent(window,"load",pageinfo);addEvent(window,"resize",pageinfo);var screenx=0;var screeny=0;var pagex=0;var pagey=0;var scrollx=0;var scrolly=0;var centerx=0;var centery=0;function mouseinfo(D){if(!D){var D=window.event}var C=document.body;if(document.documentElement){if((document.documentElement.scrollTop>0)||(document.documentElement.scrollLeft>0)){C=document.documentElement}}var B=C.scrollLeft;var A=C.scrollTop;if(D.pageX||D.pageY){pagex=D.pageX;pagey=D.pageY}else{if(D.clientX||D.clientY){pagex=D.clientX+B;pagey=D.clientY+A}}scrollx=B;scrolly=A;screenx=pagex-scrollx;screeny=pagey-scrolly;centerx=(screenwidth/2)+scrollx;centery=(screenheight/2)+scrolly}addEvent(window,"load",function(){addEvent((document.all)?document:window,"mousemove",mouseinfo)});function setField(C,A,B){if(document.forms[C]){if(document.forms[C].elements[A]){document.forms[C].elements[A].value=B}}}function setFieldIndex(C,A,B){if(document.forms[C]){if(document.forms[C].elements[A]){if(document.forms[C].elements[A].type=="select-one"){document.forms[C].elements[A].selectedIndex=B}}}}function submitForm(A){document.forms[A].submit()}function changeFieldColor(C,B,A){if(document.forms[C]){document.forms[C].elements[B].style.backgroundColor=A}}function hex2rgb(C){var D=new RegExp("^#?([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$");var B=C.toLowerCase().match(D);if(B){var A=new Array(parseInt(B[1],16),parseInt(B[2],16),parseInt(B[3],16));return(A)}else{return(null)}}function rgb2hex(H,G,A){var F=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");var D=new Array();var B=0;for(var E=0;E<16;E++){for(var C=0;C<16;C++){D[B]=F[E]+F[C];B++}}return("#"+D[H]+D[G]+D[A])}function sortarray(A){return A.sort(function(C,B){return(C.match(/\d+/)-B.match(/\d+/))})}function setVariableAndSubmitForm(B,C,A){document.getElementById(C).value=A;document.getElementById(B).submit()};
