/*HANDLE ALL STYLESHEETS*/
var opsys = navigator.platform;
var browser = navigator.appName;
var version = navigator.appVersion;

if (browser != "Netscape") { 
	writeStyles();
	if (opsys.indexOf('Mac') != -1) {
		if (browser.indexOf('Microsoft') != -1) {
			writeIEFix();
		}
	}
} else { 
	if (version >= "5.0") {
		writeStyles();
	}
}

function writeStyles() {
	var s = "";
	s += '<link rel="stylesheet" href="includes/shared.css" media="screen, print" /> \n'
	s += '<link rel="stylesheet" title="Standard Text" href="includes/standard_text.css" media="screen, print" /> \n'
	s += '<link rel="alternate stylesheet" title="Larger Text" href="includes/large_text.css" media="screen, print" /> \n'
//	alert(s);
	document.write(s);
}

function writeIEFix() {
//	alert("writeIEFix");
	var s = "";
	s += '<link rel="stylesheet" href="includes/ie_mac_fix.css" media="screen" />';
	document.write(s);
}
/*END STYLESHEET SCRIPTS*/

//	open a new window
function newWin(pageToLoad,name,attributes) {
	var	newWindow = window.open(pageToLoad,name,attributes);
	newWindow.focus();
	newWindow.location.reload();
	newWindow.location = pageToLoad;
}

//	automatically size the new window
function autoSize() {
//	var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var screenHeight = screen.availHeight;
	var screenWidth = screen.availWidth;
	var arSizes = new Array();
	arSizes[0] = screenHeight - 250;
	arSizes[1] = screenWidth - 100;
	return arSizes;
}

function openSurvey() {
	var URL = '/arsurvey2006/surveyForm';
	var name = 'survey';
	var attributes = 'menubar=no,toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=700,height=420';	
	newWin(URL,name,attributes);
}

function openInParent(whatPage) {
	window.parent.opener.location=whatPage;
	window.parent.opener.focus();
//	window.parent.close();
}