	function getwindowheight() {
	  var myHeight = 0;
	  if( typeof( window.innerHeight ) == 'number' ) {
		//Non-IE
		myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	  }
	  return myHeight;
	}
	function get_object(id) {
	  var object = null;
	    if (document.layers) {
	      object = document.layers[id];
	    } else if (document.all) {
	      object = document.all[id];
	    } else if (document.getElementById) {
	      object = document.getElementById(id);
	    }
	  return object;
	}
	function applycontentmargin() {
		var contentheight = get_object('wrapper1').offsetHeight;
		var calculatemargin = (getwindowheight() - contentheight)/2;
		
		if(calculatemargin > 0 ) {
			element = document.getElementById ('wrapper1');
			element.style.marginTop = calculatemargin+"px";
		}
	}
	applycontentmargin();