function $(){var i=[];for(var I=0;I<arguments.length;I++){var l=arguments[I];if(typeof l=='string')l=document.getElementById(l);if(arguments.length==1)return l;i.push(l)}return i}
function addEvent(l,I,i){if(typeof l=='string')l=$(l);if(l.addEventListener){l.addEventListener(I,i,false)}else if(l.attachEvent){l.attachEvent('on'+I,i)}}
function $byclass(o,c,v){var I=[];if(c==null)c=document;if(v==null)v='*';var O=c.getElementsByTagName(v),l=O.length;var C=new RegExp('(^|\\\\s)'+o+'(\\\\s|$)');for(i=0,j=0;i<l;i++){if(C.test(O[i].className)){I[j]=O[i];j++}}return I}
function toggle(i){if(typeof i=='string')i=$(i);if(i.style.display!='none'){i.style.display='none'}else{i.style.display=''}}
function $size(i){if(typeof i=='string'){i=$(i)}return[i.offsetWidth,i.offsetHeight]}
function $pos(I){if(typeof I=='string'){I=$(I)}var i=ct=0;if(I.offsetParent){do{i+=I.offsetLeft;ct+=I.offsetTop}while(I=I.offsetParent)}return[i,ct]}
function winSize(){var i=h=0;if(self.innerWidth){i=self.innerWidth;h=self.innerHeight}else if(document.documentElement&&document.documentElement.clientWidth){i=document.documentElement.clientWidth;h=document.documentElement.clientHeight}else if(document.body){i=document.body.clientWidth;h=document.body.clientHeight}return[i,h]}
function scrollOffset(){var i=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body,I=document.all?i.scrollLeft:pageXOffset,l=document.all?i.scrollTop:pageYOffset;return[I,l]}
function pageSize(){var i=yw=0;if(window.innerHeight&&window.scrollMaxY){yw=window.innerHeight+window.scrollMaxY;i=window.innerWidth+window.scrollMaxX}else if(document.body.scrollHeight>document.body.offsetHeight){yw=document.body.scrollHeight;i=document.body.scrollWidth}else{yw=document.body.offsetHeight;i=document.body.offsetWidth}return[i,yw]}
function collect(l,O){var o=[];for(var I=0;I<l.length;I++){var i=O(l[I]);if(i!=null)o.push(i)}return o};ajax={};ajax.x=function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest}}};ajax.send=function(I,i,l,O){var o=ajax.x();o.open(l,I,true);o.onreadystatechange=function(){if(o.readyState==4)i(o.responseText)};if(l=='POST')o.setRequestHeader('Content-type','application/x-www-form-urlencoded');o.send(O)};ajax.sendxml=function(I,i,l,O){var o=ajax.x();o.open(l,I,true);o.onreadystatechange=function(){if(o.readyState==4)i(o.responseXML)};if(l=='POST')o.setRequestHeader('Content-type','application/x-www-form-urlencoded');o.send(O)};ajax.get=function(I,i){ajax.send(I,i,'GET')};ajax.getxml=function(I,i){ajax.sendxml(I,i,'GET')};ajax.gets=function(i){var I=ajax.x();I.open('GET',i,false);I.send(null);return I.responseText};ajax.post=function(l,I,i){ajax.send(l,I,'POST',i)};ajax.postxml=function(l,I,i){ajax.sendxml(l,I,'POST',i)};ajax.update=function(I,i){var o=$(i),l=function(i){o.innerHTML=i};ajax.get(I,l)};ajax.submit=function(i,I,l){var O=$(I),o=function(i){O.innerHTML=i};ajax.post(i,o,ajax.serialize(l))};function openLightbox(l){var i=$('lightbox'),I=winSize();p=pageSize(),i.innerHTML='<div class="lbclose" onClick="closeLightbox()">Close [X]</div><div id="lightboxcontent">-</div>';$('lightboxcontent').innerHTML=l;$('blackbox').style.width=((p[0]>I[0])?p[0]:I[0])+'px';$('blackbox').style.height=((p[1]>I[1])?p[1]:I[1])+'px';$('blackbox').style.display='block';i.style.display='block';i.style.width='auto';i.style.height='auto';i.style.left=(((I[0]-$size('lightbox')[0])/2)+scrollOffset()[0])+'px';i.style.top=(((I[1]-$size('lightbox')[1])/2)+scrollOffset()[1])+'px';document.body.className='noscroll'}
function refreshLightbox(l){$('lightboxcontent').innerHTML=l;var i=$('lightbox'),I=winSize();$('lightbox').style.left=(((I[0]-$size('lightbox')[0])/2)+scrollOffset()[0])+'px';$('lightbox').style.top=(((I[1]-$size('lightbox')[1])/2)+scrollOffset()[1])+'px';document.body.className='noscroll'}
function closeLightbox(){$('lightbox').style.display='none';$('blackbox').style.display='none';document.body.className='scroll'}
function gotoUrl(i){window.location=i}
function popupWindow(u,w,h){window.open(u,null,'width='+w+'px,height='+h+'px,resizable=no,addressbar=no,toolbar=no,status=no,location=no');}
function isIE(){if((navigator.appVersion.indexOf('MSIE')>0)&&(navigator.appVersion.indexOf('MSIE 8')<1)){return true}else{return false}}
function ShowTip(I,l){var i=document.createElement('div');i.id='tooltip';i.style.position='absolute';i.style.left=($pos(I)[0]+$size(I)[0]+6)+'px';i.innerHTML=l;document.body.appendChild(i);$('tooltip').style.top=(($pos(I)[1]-(($size('tooltip')[1]-$size(I)[1])/2))+1)+'px';addEvent(I,'keypress',function(){HideTip()})}
function HideTip(){if($('tooltip'))document.body.removeChild($('tooltip'))}
