// JavaScript Document
// CODE PROTECTED BY COPYRIGHT
// AUTHOR: Mike Laye - http://www.image-access.net - mail@image-access.net
// CODE PROTECTED BY COPYRIGHT

// FUNCTION THAT CHECKS THE DOM 
function getObj(name){
if (document.getElementById)
{this.obj = document.getElementById(name);}
else if (document.all)
{this.obj = document.all[name];}
else if (document.layers)
{this.obj = document.layers[name];}
}
// CENTER WINDOW //
function getWindowHeight() {
var windowHeight=0;
if (typeof(window.innerHeight) == 'number') {
windowHeight = window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight = document.body.clientHeight;
}
}
}
return windowHeight;
}

function setSpacing() {
if (document.getElementById) {
var windowHeight = getWindowHeight();
if (windowHeight > 0) {
var contentElement = new getObj('wrapper');
var contentHeight = contentElement.obj.offsetHeight;
//alert(windowHeight + " \/ " +  contentHeight);
if (windowHeight - contentHeight > 0) {	
contentElement.obj.style.position = 'relative';
contentElement.obj.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
}
else {
contentElement.obj.style.position = 'relative';
contentElement.obj.style.top = "0px";
}
}
}
} 

YAHOO.util.Event.onDOMReady(function() { 
	  setSpacing();
	  goHome('home_area');
	 // var thisObject = new getObj('home_area');
	  	 // var thisObject = new getObj('wrapper');
	//  var thisAction = goHome('home_area');
//	YAHOO.util.Event.addListener(thisObject.obj, "click", thisAction);
});

window.onresize = function() {
  setSpacing();
}