var st=0;
var hl=0;
var ib = '';

function ge(x){
	location = 'eventdetail.php?id='+x;
}

function hd(x){
	x.style.visible = 'hidden';
}

function sd(x){
	x.style.visible = 'visible';
}

function sI(x){
	ib=eval('document.all.nav_div');
	ob = ib.children[0];
	i = ob.children[0].children[0];
	hd(i);
	if(x){
		if(iB[x]){
			i.src = iB[x];
			ob.style.top = iT[x];
			ob.style.left = iL[x];
			i.height = iH[x];
			i.width = iW[x];
		} else {
			i.src = nis;
			ob.style.top = nit;
			ob.style.left = nil;
			i.height = nph;
			i.width = npw;
		}
	} else {
		i.src = nis;
		ob.style.top = nit;
		ob.style.left = nil;
		i.height = nph;
		i.width = npw;
	}
	sd(i);
}


function hi(x){
	if(! hl){
		z=eval('document.all.r'+x);
		st = z.style.backgroundColor;
		z.style.backgroundColor = '#FFFFAA';
		hl=1;
		sI(x);
	}
}

function lo(x){
	if(hl){
		z=eval('document.all.r'+x);
		z.style.backgroundColor = st;
		hl=0;
		sI(0);
	}
}

function pi(x){
		z=eval('document.all.pc_'+x);
		h=eval('document.all.ps_'+x);
		y=eval('document.all.pc_'+x+'_div');
		i = eval('document.all.day_'+x);
		i.height=h.height + 14;
		y.style.top = offY(z);
		y.style.left = offX(z);
}


function offX(z) { return (z.x) ? z.x : absPos(z,"Left"); }
function offY(z) { return (z.y) ? z.y : absPos(z,"Top"); }

function absPos(z,which) {
	iPos = 0;
	while (z != null) {
		iPos += z["offset" + which];
		z = z.offsetParent;
	}
	return iPos;
}
