	var scrollT;
	var scrollL;
	var winW;
	var winH;
	var curtop=0;
	var curleft=0;
	var act;
	function widthfn(){
		if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
		winW = window.innerWidth;
		winH = window.innerHeight;
		scrollT = document.body.scrollTop;
		scrollL = document.body.scrollLeft;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
		winW = document.documentElement. clientWidth;
		winH = document.documentElement. clientHeight;
		scrollT = document.documentElement.scrollTop;
		scrollL = document.documentElement.scrollLeft;
		}
		}
	}
/*-------------------------------------------*/	
	
function findPosX(obj)
  {
	  
    if(obj.offsetParent)
        while(1){
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;}
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }
  function findPosY(obj){
    if(obj.offsetParent)
        while(1){
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

/*-------------------------------------------*/
	var div_y=0;
	var divv;
	var typ;
	var planediv;
	var innerdiv;
/*-------------------------------------------*/
	function cale_hover(a,g,h,i,k,l,m,c){
		
		hhh=g.split("-");
	immm=h.split("-");
	conn=i.split("-");
	iddd=l.split("-");
	hl=hhh.length;
	if(k=='h'){ var lin='';
	
	}
	else if(k=='n'){ var lin='../'; 
	
	}else if(k=='m'){ var lin='../'; }
		
		act=c;
		if(planediv){
			planediv.style.display="none";
			}
		divv=a;
		innerdiv=document.getElementById(divv);
		if(planediv){
		planediv.style.display="none";
		}
		innerdiv.style.display="";
		document.getElementById('divcontent_cale').innerHTML='';
		for(i=0; i < hl; i++)
		{
				if(k=='h' || k=='n'){ 	
		var onc=" onclick=window.location.href='"+lin+"events/?evtid="+iddd[i]+"'";}else if(k=='m'){ var onc=" onclick=\"return evelis('"+iddd[i]+"','a');\"";}
			if(i>=1){ var brd='border-top:dashed 1px #000000; margin-top:7px;  padding-top:7px;';}else{ var brd='';}
		document.getElementById('divcontent_cale').innerHTML+='<div style="width:100%; float:left; cursor:pointer;'+brd+'" class="big_green"'+onc+'>'+hhh[i]+'<span style="float:right; font-size:10px; font-family:Thahoma,Arial; line-height:16px; color:#999999;" class="black_normal">'+m+'</span></div><div style="width:100%; float:left; font-size:10px; font-family:Thahoma,Arial; line-height:16px; cursor:pointer;" class="black_normal"'+onc+'><img src="'+lin+'events/images/'+immm[i]+'" width="70px;" align="right" />'+conn[i]+'</div>';
		}
		
		
		typ='none'
		divalign('innerdiv');
	}
	
/*-------------------------------------------*/	
function divalign(a){
	widthfn();
	findPosX(act)
	findPosY(act)
	var divheight=document.getElementById(a).offsetHeight;
	var divwidth=document.getElementById(a).offsetWidth;
	var divH=act.offsetHeight;
	var divW=act.offsetWidth;
	if((curtop+divheight)>winH){
		curtop=curtop-divheight;
		}else{
			curtop=curtop+(divH-5);
			}
	if((curleft+divwidth)>winW){
		curleft=(curleft-divwidth)+(divW-5);
		}else{
			curleft=curleft;
			}
	document.getElementById(a).style.top=(curtop)+'px';
	document.getElementById(a).style.left=(curleft)+'px';
	curtop=0;
	curleft=0;
}
	
	
	
/*-------------------------------------------*/
setInterval("cale_out()",300);
	var tt=3;
	var ss=0;
	function cale_out(){
	
	}
function cale_out(){
	if(tt>0){
			tt--;
		}
		if((tt<=1)&&(ss>0)){
			div_y=0;
			if(typ=='plane'){
			planediv.style.display="none";
			}else{
			innerdiv.style.display="none";
			}
			ss=0;
		}
}

/*-------------------------------------------*/
function div_hover(a,b,c){
	act=c;
	if(innerdiv){
	innerdiv.style.display="none";
	}
	typ='plane';
	divv='help_'+a;
	planediv=document.getElementById(divv);
	planediv.style.display="";
	document.getElementById('divcontent_plane').innerHTML=b;
	divalign(divv);
	}
/*-------------------------------------------*/
/*-------------------------------------------*/
function gallerydivup(a){
	document.getElementById(a).style.display='';
	}
function gallerydivdown(a){
	document.getElementById(a).style.display='none';
	}
	
