var winWidth = window.innerWidth;
var winHeight = window.innerHeight;
if (typeof winHeight == 'undefined' || winHeight==0)
{
	var winWidth = document.documentElement.clientWidth;
	var winHeight = document.documentElement.clientHeight;
}
if (typeof winHeight == 'undefined' || winHeight==0)
{
	var winWidth = document.documentElement.clientWidth;
	var winHeight = document.documentElement.clientHeight;
}
if (typeof winHeight == 'undefined' || winHeight==0)
{
	var winWidth=1000;
	var winHeight=500;
}

var y1 = Math.round((winHeight-308)/5);   

(document.getElementById) ? dom = true : dom = false;

function hideIt() {
  if (dom) {document.getElementById("layer1").style.visibility='hidden';}
}

function showIt() {
  if (dom) {document.getElementById("layer1").style.visibility='visible';}
}

function placeIt() {
  document.getElementById("layer1").style.left = Math.round((winWidth-750)/2) + "px";
  if (dom && !document.all) {document.getElementById("layer1").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)) + "px";}
  if (document.all) {document.all["layer1"].style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1)) + "px";}
  window.setTimeout("placeIt()", 10); 
}
