function getFirstParam(){
	var pair = window.location.search.substring( 1 );
	var parts = pair.split( '=' );
	var param = parseInt( parts[1] );
	return param;
};
function getHeightCrossBrowser() {
    return Math.max(
        Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
        Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
        Math.max(document.body.clientHeight, document.documentElement.clientHeight)
    );
};
function loadHiddenIframe(path) {
	//var height = Math.max( document.body.offsetHeight, document.body.scrollHeight );
	var height = getHeightCrossBrowser();
	// Make sure i frame is hight enough - so add some extra pixels
	height = height + 200;
	//this loads the hidden page into the iFrame hidden inside the inner page, with height as a url parameter.
	var iframe = document.getElementById( 'HiddenIframe' );
	iframe.src = path + '?height=' + height;
	iframe.style.position="relative";
	iframe.style.top="auto";
	iframe.style.left="auto";
	iframe.setAttribute("width","1");
	iframe.setAttribute("height","1");
};


