var ie=document.all;var ns6=document.getElementById&&!document.all;var opera=(window.opera);if(opera){browserleftcorrection=-5;browserwidthcorrection=0}else{if(ie){browserleftcorrection=0;browserwidthcorrection=0}else{if(ns6){browserleftcorrection=-5;browserwidthcorrection=0}}}function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function clearbrowseredge(e,d,b){var a="";if(b=="rightedge"){var c=ie&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-30:window.pageXOffset+window.innerWidth-40;e.contentmeasure=e.offsetWidth;if(c-e.x<e.contentmeasure){a=e.contentmeasure+d.offsetWidth}}else{var c=ie&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18;e.contentmeasure=e.offsetHeight;if(c-e.y<e.contentmeasure){a=e.contentmeasure-d.offsetHeight}}return a}function getpageoffset(a){if(a=="left"){var a=ie&&!window.opera?iecompattest().scrollLeft:window.pageXOffset;return a}else{a=ie&&!window.opera?iecompattest().scrollTop:window.pageYOffset;return a}}function getposOffset(d,c){var b=(c=="left")?d.offsetLeft:d.offsetTop;var a=d.offsetParent;while(a!=null){b=(c=="left")?b+a.offsetLeft:b+a.offsetTop;a=a.offsetParent}return b}function getpageheight(){return(ie&&!window.opera)?iecompattest().clientHeight:window.innerHeight}function load_script(a){var c="/scripts/"+a+".js";var b=document.getElementsByTagName("head")[0];script=document.createElement("script");script.type="text/javascript";script.src=c;b.appendChild(script)}function add_options(h,f){var a,d,g,c,e=0;var b=new Array();do{a=(/<optgroup[^>]*?label="(.*?)"[^>]*?>(.*?)<\/optgroup>/gi).exec(f);if(a!=null){b[e]=new Array(a[1]);do{d=(/<option[^>]*?value="(.+?)"[^>]*?>(.+?)<\/option>/gi).exec(a[2]);if(d!=null){b[e].push(d[2]);b[e].push(d[1]);a[2]=a[2].replace(d[0],"")}}while(d!=null);f=f.replace(a[0],"");e++}}while(a!=null);c=0;do{d=(/<option[^>]*?value="(.+?)"[^>]*?>(.+?)<\/option>/gi).exec(f);if(d!=null){h.options.add(new Option(d[2],d[1]));if(d[0].indexOf("selected")!=-1){h.options[h.options.length-1].selected=true}f=f.replace(d[0],"")}c++}while(d!=null);for(c=0;c<e;c++){g=document.createElement("optgroup");g.label=b[c][0];h.appendChild(g);for(j=1;j<b[c].length;j+=2){h.options.add(new Option(b[c][j],b[c][j+1]))}}}var loads=new Array();function add_load(a){for(i=0;i<loads.length;i++){if(loads[i]==a){return}}loads.push(a)}function global_load(){var a;for(i=0;i<loads.length;i++){loads[i]()}}function show_gray_bg(){greyscr=document.getElementById("greyscreen");greyscr.style.width=document.body.clientWidth;greyscr.style.height=document.body.scrollHeight;greyscr.style.visibility="visible"}function hide_gray_bg(){document.getElementById("greyscreen").style.visibility="hidden"}function center_element(c,a,b){c.style.top=document.body.scrollTop+document.body.clientHeight/2-a;c.style.left=document.body.clientWidth/2-b;c.style.visibility="visible"}function $(a){return document.getElementById(a)}function offsetTop(b){var a=0;while(b!=null){a+=b.offsetTop;b=b.offsetParent}return a}function offsetLeft(b){var a=0;while(b!=null){a+=b.offsetLeft;b=b.offsetParent}return a};