 var u=navigator.userAgent.toLowerCase(); isIE=u.indexOf("msie")!=-1 && u.indexOf("opera") == -1 && u.indexOf("webtv") == -1; isWin=u.indexOf('win')!=-1; isFF =u.indexOf('firefox')!=-1; isGecko=u.indexOf('gecko') != -1; isNS = (u.isGecko) ? u.indexOf('netscape') != -1 : (u.indexOf('mozilla') != -1) && (u.indexOf('spoofer') == -1) && (u.indexOf('compatible') == -1) && (u.indexOf('opera') == -1) && (u.indexOf('webtv') == -1) && (u.indexOf('hotjava') == -1); un='undefined'; jV='javascript:void(0)'; N=null;  cBxEv=N;  ldbx=N;  EV={};
 function ge(id){return document.getElementById(id);}
 function g(id){return ge(id);}
 function ce(tg){return document.createElement(tg);}
 function gt(tg){return document.getElementsByTagName(tg);}
 function sI(f,i,p){return setInterval(f,i);}
 function sO(f,i){return setTimeout(f,i);}
 function cI(i){return clearInterval(i);}
 function nw_ajx(){var C=N;try{C=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{C=new ActiveXObject("Microsoft.XMLHTTP");}catch(sc){C=N;}}if(!C&&typeof XMLHttpRequest!=un){C=new XMLHttpRequest();}return C;}
 function nDrg(o){o.onmousedown=function(){return false;}; o.ondrag=function(){return false;};}
 function B(){return document.body;}
 function cls(){try{if(document.selection){document.selection.empty();}else if(window.getSelection){window.getSelection().removeAllRanges();}}catch(e){}}	 
 function addevent(o,e,f){if(o.attachEvent){o.attachEvent(e,f);}else{o.addEventListener(e.replace('on',''),f,1);}}
 function attev(o,e,f){if(!o[e] || typeof(o[e])==un){o[e]=f; return true;}else{addevent(o,e,f); return true;}}
 function addevarry(obj,arry,funct){for(var k in arry){addevent(obj,String(arry[k]),funct);}}
 function MkEv(e,ev){try{var e=e||window.event; if(!e && ev)e=ev; return {event:e,obj:(e.srcElement)?e.srcElement:e.target,key:e.keyCode,cursor:getCur(e),but:e.which || e.button,type:e.type,ctrl:e.ctrlKey,alt:e.altKey}; }catch(e){} }
 function isu(s){return typeof s==un;}
 function getCur(e){e=e||window.event; var c={x:0,y:0}; if(e.pageX || e.pageY) {c.x=e.pageX; c.y=e.pageY;}else{var de = document.documentElement; var b=B(); c.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft || 0); c.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||0);} return c;}
 function stAlp(obj,i,bg,m){if(isIE){var tg= gt('base'); tg=[]; obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+(tg.length>0?tg[0].href:'')+i+"', sizingMethod='"+(m||'scale')+"')"; }else obj.style.backgroundImage=(bg)? 'url('+bg+')': 'url('+i+')';}
 function gt(tg){return document.getElementsByTagName(tg);}
 function dE(p){var ch=p.getElementsByTagName('*'),k; for(k=0;k<ch.length;k++){ch[k].parentNode.removeChild(ch[k]);} ch=N;}
 function cls(){try{if(document.selection){document.selection.empty();}else if(window.getSelection){window.getSelection().removeAllRanges();}}catch(e){}}
 function setAlpha(ob,e){with(ob.style){opacity=e*0.01; mozOpacity=e*0.01; filter='alpha(opacity='+e+', finishopacity=0, style=0);';}}
 
 Array.prototype.find=function(txt,gK){for(var i=0;i<this.length;i++){if(this[i]==txt)return !gK?true:i;}return false;}

 function is_clicked(o,f){
	 if(f(o)){return true;}else if(o.parentNode){return is_clicked(o.parentNode,f);} 
  }
  
 function MkEf(o,ntb){if(!ntb){o.innerHTML='<table><tr><td></td></tr></table>';}var c,k,a=ntb?o:o.firstChild.rows[0].cells[0]; 
   for(k=0;k<5;k++){c=ce('div'); if(k!=2){with(c.style){height='1px';lineHeight='1px';fontSize='1px'; clear='both';} c.className='t';c.innerHTML='&nbsp;';} if(k==0||k==4){c.style.margin='0px 2px';}else if(k==1||k==3){c.style.margin='0px 1px';}else{c.className='m';o.cn=c;} a.appendChild(c);} return o;
 }

 function rmpl_param(p,v,u,l){
	 var u=u||location.href;
	 eval('var r=/(\\?|\&)'+p+'=([^\&]*)/gi');
	 u=r.test(u)?u.replace(r,'$1'+p+'='+v):((u.indexOf('?')==-1)? u+'?'+p+'='+v:u+'&'+p+'='+v);
	 if(l)location.href=u;
	 return u;
  }

 function getChildByType(o,f,t){var n=[],t=t||1,f=f||function(o){return o.nodeType==t;};
		if(typeof o.childNodes==un)return N;
	      for(var i=0; i<o.childNodes.length; i++){
			  if(f(o.childNodes[i])){n.push(o.childNodes[i]);}
		  }
	   return n;
	 }

 function toAjax(o,oA){
	 o=o||{};
	 if(!o.method)o.method='GET';
	 if(isu(o.reportE))o.reportE=true;
	 if(!o.url)o.url=rmpl_param('ajx',1,location.href,false); 

	 if(!o.param)o.param=''; 
     o.method=o.method.toUpperCase();
	 o.url=rmpl_param('tmn',new Date().getTime(),o.url,false); 
	
	 var r={ab:0,abort:function(){r.ab=1; try{r.o.abort();}catch(e){}},o:oA||nw_ajx()},a=r.o;

	 a.open(o.method,o.url);
	 a.onreadystatechange=function(){if(r.ab)return;
			  if(a.readyState==4){
				    if(a.status=='200'){
					  if(typeof o.func=='function')o.func(a.responseText,a.getAllResponseHeaders(),a);
					}else{
					  if(o.reportE)alert('return: \nstatus:'+a.status+', msg:'+a.statusText);
					}
				}
			 }
	  if(o.method=='POST'){a.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');a.send(o.param);}
	  else{a.send(N);}
	 return r;
	 }	 
	 
 function gSzW(d){
	var t=[0,0],d=d||[document,window]; 
	if(d[0].body && ( d[0].body.clientWidth || d[0].body.clientHeight)){
		t=[d[0].body.clientWidth,d[0].body.clientHeight];
	}else if(typeof(d[1].innerWidth)=='number' && 0){
		t=[d[1].innerWidth,d[1].innerHeight];
	}else if(d[0].documentElement && (d[0].documentElement.clientWidth||d[0].documentElement.clientHeight)){ 
		t=[d[0].documentElement.clientWidth,d[0].documentElement.clientHeight];
	}
		return t;
}

 function cancellsl(o,u){
	if(u){o.style.MozUserSelect=''; o.onselectstart=function(){};}
	else{o.style.MozUserSelect='none'; o.onselectstart=function(){return false;};}
 }
	
 function iS(o,isPNG){
   var O=typeof(o.o)=='string'?ge(o.o):o.o,t=O.tagName.toUpperCase(),c,i; if(isIE && o.i&&o.i==iBtn){isPNG=true; o.W=115; o.H=63;}
   if(t=='IMG'){c=ce('div'); O.parentNode.insertBefore(c,O); if(!isPNG){c.appendChild(O);}else{O.parentNode.removeChild(O);}} 
   else if(t!='DIV'||o.mk){c=ce('div'); O.appendChild(c);}else c=O;
   if(!(i=c.firstChild)||!i.mk){if(!i){i=ce(isPNG?'div':'IMG'); nDrg(i);} with(c.style){overflow='hidden';padding='0px';if(!o.nmrg)margin='auto';} i.style.position='relative'; if(isPNG){with(i.style){width=o.W+'px'; height=o.H+'px';} stAlp(i,o.i,0,'image');}else{i.src=o.i;}if(!c.firstChild)c.appendChild(i); i.mk=1;}
   if(!o.nsz){if(o.w)c.style.width=(o.w)+'px'; if(o.h)c.style.height=(o.h)+'px';}
   with(i.style){if(isPNG){width=o.W+'px'; height=o.H+'px';} if(!isu(o.t))top=(o.t)+'px'; if(!isu(o.l))left=(o.l)+'px'; if(!isu(o.r))right=(o.r)+'px'; if(!isu(o.b))bottom=(o.b)+'px';}
   o.bx=i; return [c,i];
 }
 
 function ld(m,b){if(!nLoaded)return; var w,o,O,k,p;
	  if(!ldbx && b){ldbx=new dv; o=ldbx.obj; /*ldbx.autoHideClick=false;*/ o.className='l'; MkEf(o);}
	 if(b){if(!o)o=ldbx.obj; o.cn.innerHTML=m; 
	   ldbx.rS(function(){w=o.offsetWidth;});
	   ldbx.display({x:(gSzW()[0]-w)/2,b:5}); 
	 }else{
	 	if(ldbx)ldbx.hidden(); hBxR(1);
	 }
   }
   
 function aEv(ev,f){var arry;
	if(!EV[ev]){
		EV[ev]=[]; arry=EV[ev];
		attev(document,ev,function(){for(var i=0;i<arry.length;i++)arry[i].f.apply(N,arguments);});
	}else arry=EV[ev];
		 
	var o={k:arry.length,arry:arry,f:f,stop:function(){arry.splice(this.k,1); for(var k=0;k<arry.length;k++)arry[k].k=k;}};
	arry.push(o);
	return o;
 }	 
   
  function dv(a,o){
	    if(B()==N)return false; 
		this.append=a||B();
		var call=this,_doc_=this.append.ownerDocument;
		if(!this.append || !this.append.ownerDocument)return;
		
		if(typeof dvE==un)dvE=[];
		
		this.visible=false;
		if(o)this.obj=o;
		else this.obj=_doc_.createElement('DIV'); this.append.appendChild(this.obj);

		
		this.id='dv'+Math.round(Math.random()*100);
		this.obj.id=this.id;
		with(this.obj.style){display='none';position='absolute';overflow='hidden';}
	
		this.autoHideClick = true;
		this.hiddenClicked = false;
		this.nid =[];
		this.hDt=0; this.hdH=N;
					
		this.onhidden = function(){return true;};
    
		this.rS=function(f){var o=this.obj; o.style.visibility='hidden'; o.style.display='';f.apply(this,arguments);o.style.display='none'; o.style.visibility='visible';}
		this.clH=function(){if(this.hdH){cI(this.hdH);this.hdH=N;}}
		
		this.display=function(pos){this.clH();
		   if(this.obj==N)return false;
			if(typeof pos!='object')return false; var o=this.obj;
			
			 if(isu(pos.x) && isu(pos.y) && isu(pos.b) && isu(pos.r)){
			   if(pos.nodeType==1)pos=PosObj(pos);
			   else pos={x:0,y:0};
		     }else{    
			  if(typeof pos.ob!=un){var tmp=PosObj(pos.ob); pos.x+=tmp.x; pos.y+=tmp.y;}
			 }

			if(!isu(pos.x))o.style.left=(pos.x=='auto')?pos.x:pos.x+'px';
			if(!isu(pos.y))o.style.top=(pos.y=='auto')?pos.y:pos.y+'px';
			if(!isu(pos.r))o.style.right=(pos.r=='auto')?pos.r:pos.r+'px';
			if(!isu(pos.b))o.style.bottom=(pos.b=='auto')?pos.b:pos.b+'px';
			o.style.display='block';
			
			this.visible=true;
			return pos;
		}
			
	     this.hidden=function(n){if(!call.visible)return; var f=function(){if(call.onhidden()){call.obj.style.display='none'; call.visible=false; call.hdH=N;}};
		  if(this.hDt==0||n){f();}else{this.hdH=sO(f,this.hDt);}
		 }
		
		this.free=function(){
		 if(this.obj==N)return;
		  try{this.obj.parentNode.removeChild(this.obj); this.obj=N; dvE.splice(this.l,1);for(var i=0; i<dvE.length; i++){dvE[i].l=i;}}catch(e){}
		};
	
	    if(!cBxEv){cBxEv=true;
	     addevent(_doc_,'onmousedown',function(e){var e=MkEv(e),o=e.obj,n,d;
	         for(n=0;n<dvE.length;n++){d=dvE[n]; if(!d.visible || !d.autoHideClick)continue;
			     if(!d.hiddenClicked){if(is_clicked(o,function(o){return(o.id==d.obj.id || d.nid.find(o.id));}))continue;}
			    d.hidden();
			 }
			});
		}
		this.l=dvE.length;
        dvE.push(this);
		return true;
    }
	
