//common javascript
function changeClass(id,theClass){
	document.getElementById(id).className=theClass;
}


// Get IE browser version 
var brVer = navigator.userAgent; var brNum; var reg = new RegExp('/');
var brVerId = brVer.indexOf('MSIE');
brNum = brVer.substr(brVerId,8);

//Set height on content_wrapper div
function getWindowHeight(minus) {
	//Set browser window height
	var myHeight = "";
	var resize = "";
	if(navigator.appVersion.indexOf('Mac') != -1){//Do nothing
	}
	else if( brNum == "MSIE 6.0") {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.body.clientHeight;
		resize = eval(myHeight - minus);
		document.getElementById('content_wrapper').style.height = resize;
	} 
	else if( brNum == "MSIE 5.5") {
		//IE 5.5 compatible
		myHeight = document.body.clientHeight;
		resize = eval(myHeight - minus);
		document.getElementById('content_wrapper').style.height = resize;
	}
	else if( brNum == "MSIE 5.0") {
		//IE 5.0 compatible
		myHeight = document.body.clientHeight;
		resize = eval(myHeight - minus)-20;
		document.getElementById('content_wrapper').style.height = resize;
	}
}

// Menu Browser Fix
var browserName=navigator.appName
function fix_navigation(){
if(navigator.appVersion.indexOf('Mac') != -1){// Mac IE styles
		if (browserName=="Microsoft Internet Explorer"){
			document.write('<div id="top_navigation" style="width: 773px; margin-top: -1px;"><ul><li id="top_navigation_arrows" style="background-color:#6A6760; color:#cccccc; border-right: #ffffff solid 1px; width: 25px; height: 17px; padding-top: 4px; padding-bottom: 3px"><img src="images/nav_arrows.gif"></li>');
				} 
			else {// Mac Netscape styles
			document.write('<div id="top_navigation"><ul><li id="top_navigation_arrows" style="background-color:#6A6760; color:#cccccc; border-right: #ffffff solid 1px; width: 20px; margin-left: -40px;"><img src="images/nav_arrows.gif"></li>'); 
			}	
	}			
		else if (browserName=="Microsoft Internet Explorer"){// PC IE styles
	document.write('<div id="top_navigation"><ul><li id="top_navigation_arrows" style="background-color:#6A6760; color:#cccccc; border-right: #ffffff solid 1px;"><img src="images/nav_arrows.gif"></li>');
		} 
		else { // PC Netscape styles
			document.write('<div id="top_navigation"><ul><li id="top_navigation_arrows" style="background-color:#6A6760; color:#cccccc; border-right: #ffffff solid 1px; width: 20px; margin-left: -40px;"><img src="images/nav_arrows.gif"></li>'); 
		//alert("pc ns");
		}
}

function viewpic (picName,width,height)
{
	newWindow = window.open(picName,'newWin','toolbar=no,width='+width+',height='+height);
	newWindow.document.write('<html><head><title>Walter Wangerin Jr.</title></head><body  leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"><a href="javascript: window.close();"><img src="'+picName+'" width='+width+' height='+height+' border=0></a></body></html>');
	newWindow.focus();
} 

var prev = "tab_general";
function doTabNav (divName) 
{
	document.getElementById(prev).className = 'invisible';	
	document.getElementById(divName).className = 'visible';
	prev = divName;
}

