function overlay(id) {
	var c = document.cookie.split(';');
	for(var i=0;i<c.length;i++) {
		if(c[i].replace(/^\s+|\s+$/g, '') == 'overlay='+id) { return; }
	}

	var div = document.getElementById(id);
	var ww = 0, wh = 0;
	if(typeof(window.innerWidth) == 'number') {
    ww = window.innerWidth;
    wh = window.innerHeight;
  } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
    ww = document.documentElement.clientWidth;
    wh = document.documentElement.clientHeight;
  } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
    ww = document.body.clientWidth;
    wh = document.body.clientHeight;
  }

	div.style.top = "-1000px";
	div.style.display = "inline";

	//div.style.left = Math.round((ww / 2) - (div.offsetWidth / 2))+'px';
	//div.style.top = Math.round((wh / 2) - (div.offsetHeight / 2))+'px';

	div.style.top = 0;
	div.style.right = 0;

	document.cookie = 'overlay='+id+'; path=/';
}
function overlayClose(id) {
	var div = document.getElementById(id);
	div.style.display = "none";
}