timerHide="";
timerKeep="";
timerShow="";
oldDiv="";
					
function showImgInfo(divID,divx,divy) {
	valA = divID;
	valB = divx;
	valC = divy;
	// delayed activation of our div
	if(valA==oldDiv && document.getElementById(valA).style.visibility=="visible") {
		window.clearTimeout(timerHide);
	}
	else {
		timerShow=window.setTimeout("doShowImgInfo(valA,valB,valC)",750);
	}
}

function doShowImgInfo(divID,divx,divy) {
	valA = divID;
	valX = divx;
	valY = divy;

	window.clearTimeout(timerKeep);
	window.clearTimeout(timerHide);
	
	//kill old div
	doHideImgInfo(oldDiv);
	//show new
	document.getElementById(valA).style.visibility="visible";

	timerKeep=window.setTimeout("doHideImgInfo(valA);",1800);
	oldDiv=valA;
}

function hideImgInfo(divID) {
	valA=divID;
	timerHide=window.setTimeout("doHideImgInfo(valA);",50);
	window.clearTimeout(timerShow);
}

function doHideImgInfo(divID) {
	try {
		document.getElementById(divID).style.visibility="hidden";
	} catch(e) { }
}

function winDimX () {
	  if (window.innerWidth) {
	    return window.innerWidth;
	  } else if (document.body && document.body.offsetWidth) {
	    return document.body.offsetWidth/3;
	  } else {
	    return 0;
	  }
}

function winDimY () {
	  if (window.innerHeight) {
	    return window.innerHeight;
	  } else if (document.body && document.body.offsetHeight) {
	    return document.body.offsetHeight/3;
	  } else {
	    return 0;
	  }
}

function entervalues() {
	 document.getElementsByName("winx")[0].value = winDimX();
	 document.getElementsByName("winy")[0].value = winDimY();
}
