
function loadPage(bRotateHeader)
{
	setsize();
	if (bRotateHeader) {
		rotateImage('rImage');
	}
}


function setsize()
{
	var wh, ip, hh, fh;
//							alert("test");
	wh = getHeight();
//							alert(document.body.clientWidth);
	ip = getElement("header");
	if (ip) {
		hh = ip.offsetHeight;
	} else {
		hh = 0;
	}
//							alert(hh);
	ip = getElement("footer");
	if (ip) {
		fh = ip.offsetHeight;
	} else {
		fh = 0;
	}
//							alert(fh);
	ip = getElement("content");
	if (ip) {
		ip.style.height = (wh - (hh+fh)) + 'px';
	}
//							alert(ip.height);

	ip = getElement("Picture_1");
	if (ip && ip.width == 300) {
		ip = getElement("media");
		if (ip)
			ip.style.width = '300px';
	}
}

function getHeight() {
	var myWidth = 0, myHeight = 0;
	var myType = ' ';
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myType = 'Non-IE';
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myType = 'IE 6+';
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myType = 'IE 4 compatible';
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
//    window.alert( 'Browser = ' + myType + ' Width = ' + myWidth +  ' Height = ' + myHeight );
	return myHeight;
}

function testJoe()
{
	var ip = getElement("joe");
	alert( "orgdata by getAttr: " + ip.getAttribute("orgdata") + " by dot: " + ip.orgdata);
	alert( "value by getAttr: " + ip.getAttribute("value") + " by dot: " + ip.value);
	alert( "jodata by getAttr: " + ip.getAttribute("jodata") + " by dot: " + ip.jodata);
}

function setJoe()
{
	var ip = getElement("joe");
	ip.setAttribute("orgdata", "not bye");
	ip.value='testing';
	ip.setAttribute("value","test it");
	ip.setAttribute("jodata", "hi now");
}

function getElement(id){
	if(document.getElementById){
		getElement = function(id){ return document.getElementById(id); }
	}else if(document.all){
		getElement = function(id){ return document.all[id]; };
	}else if(document.layers){
		getElement = function(id){ return document.layers[id]; };
	}else{
		getElement = function() { return null; }
	}

	// When we get here, the getElement function has been replaced.
	// So we return the result of the new function.
	return getElement(id);
}

