// **** VARIABLES ****
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

// **** FUNCTIONS ****

// Pick appropriate style sheet
function getStyleSheet() {
	var url = window.location.toString();
	if ((browserName == "Netscape") && (browserVer <= 4) ) {
		document.write("<link rel=\"stylesheet\" href=\"/offices/europe/belux/lib/sas_netscape.css\" type=\"text/css\">");
	}
	else {
		document.write("<link rel=\"stylesheet\" href=\"/offices/europe/belux/lib/css/sas.css\" type=\"text/css\">");
	}
}

// Fix Netscape 4 bug which loses CSS info with window resize
function fixNetscapeCSS() {
	if (document.debug.fixNetscapeCSS.initWindowWidth != window.innerWidth ||  document.debug.fixNetscapeCSS.initWindowHeight != window.innerHeight) {
		document.location = document.location;
	}
}

// Set all resize events to be handled by the fixNetscapeCSS() function
function fixNetscapeCSS_Init() {
	if ((browserName == 'Netscape') && (browserVer == 4)) {
		if (typeof document.debug == 'undefined'){
			document.debug = new Object;
		}
		if (typeof document.debug.scaleFont == 'undefined') {
			document.debug.fixNetscapeCSS = new Object;
			document.debug.fixNetscapeCSS.initWindowWidth = window.innerWidth;
			document.debug.fixNetscapeCSS.initWindowHeight = window.innerHeight;
		}
		window.onresize = fixNetscapeCSS;
	}
}

// **** INITIALIZATION ****
getStyleSheet();
fixNetscapeCSS_Init();
document.writeln(""); // Netscape's workaround for their resize bug