
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function isIE(){
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function printPage( url ){

	var printWin = window.open(url,"print", "width=700,toolbars=1,menubar=1,resizeable=1,scrollbars=1", false );
	printWin.onload = setTimeout( window.print, 10000 );

}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function findPosX(obj){
	var curleft = 0;
    
    if (obj.offsetParent) {
		while (obj.offsetParent){
			curleft += obj.offsetLeft
            obj = obj.offsetParent;
		}
	}
	else if (obj.x){
		curleft += obj.x;
    }
    
    return curleft;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function findPosY(obj){
	var curtop = 0;
		if (obj.offsetParent){
			while (obj.offsetParent){
				curtop += obj.offsetTop;
				obj = obj.offsetParent;
			}
		} else if (obj.y){
       	curtop += obj.y;
    }
	return curtop;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function adjustHeight(){

	var pageHeight = parseInt( findPosY( document.getElementById( "pageBottom" )));
	var navHeight  = parseInt( findPosY( document.getElementById( "navBottom" )));	

	//alert('page: ' + pageHeight);
	//alert('nav: ' + navHeight);	

	if ( pageHeight > navHeight ){
		navHeight = pageHeight;
	}else{
		pageHeight = navHeight;
	}

	if(isIE()){	
		document.getElementById("mainContent").style.height =  pageHeight + 34 - 90 + "px";
		document.getElementById("navigation").style.height = navHeight - 75 + "px";
	} else {
		document.getElementById("mainContent").style.height =  pageHeight + 34 - 75 + "px";
		document.getElementById("navigation").style.height = navHeight - 75 + "px";
	}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function TimedadjustHeight(){
	setTimeout(adjustHeight,1000);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//Event.observe(window, 'load', adjustHeight, false);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
