var tgt = 0;

function supahsize(_tgt){
	if(document.getElementById("img"+_tgt)){
		shrank();
		tgt = _tgt;		
		document.getElementById("img"+tgt).style.visibility = "visible";
		
		document.getElementById("img"+tgt).style.marginTop = (getH("lilimg"+tgt, true) - getH("img"+tgt, false))/2 + "px";
		document.getElementById("img"+tgt).style.marginLeft = (getW("lilimg"+tgt, true) - getW("img"+tgt, false))/2 + "px";
		
		document.getElementById("img"+tgt).onmouseout = shrank;
		document.onclick = shrank;
	}
}

function shrank(){ 
	if(document.getElementById("img"+tgt)){
		document.getElementById("img"+tgt).style.visibility = "hidden";
		document.getElementById("img"+tgt).onmouseout = null;
		document.onclick = null;
	}
}

function getW(_tgt, _img){
	var theObj;
	if(_img){
		theObj = document.getElementById(_tgt);
	} else {
		theObj = document.getElementById(_tgt).getElementsByTagName("img")[0];
	}
	return theObj.width;
}

function getH(_tgt, _img){
	var theObj;
	if(_img){
		theObj = document.getElementById(_tgt);
	} else {
		theObj = document.getElementById(_tgt).getElementsByTagName("img")[0];
	}
	return theObj.height;
}