// Detect browser & platform, then use the correct stylesheet
var platform = navigator.platform;
var browser = navigator.appName;
var version = navigator.appVersion;

if (-1 < version.indexOf("MSIE")) {
	version = parseInt(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE") + 5,(navigator.appVersion.length)));
} else {
	version = parseInt(version);
} // if

if (-1 < platform.indexOf("Mac")) {
	if (-1 < browser.indexOf("Netscape")) 
		document.write("<LINK REL=\"stylesheet\" HREF=\"/Webhost_mac_ns.css\" TYPE=\"text/css\">");
	else
		document.write("<LINK REL=\"stylesheet\" HREF=\"/Webhost_mac_ie.css\" TYPE=\"text/css\">");
} else {
	if (-1 < browser.indexOf("Netscape")) 
		document.write("<LINK REL=\"stylesheet\" HREF=\"/Webhost_win_ns.css\" TYPE=\"text/css\">");
	else
		document.write("<LINK REL=\"stylesheet\" HREF=\"/Webhost_win_ie.css\" TYPE=\"text/css\">");
} // switch


//=============================================================================
// newImage(arg)
// creates a new image object
//
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

//=============================================================================
// changeImages()
// changes the image src of an image to a new image
//
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

//=============================================================================

//=============================================================================
// Preload these images so they are available for the rollover states
//
var preloadFlag = false;
if (document.images) {
	preloadFlag = true;
}

//=============================================================================
// openWindow(url,name,width,height)
// open URL in popup window
//
function openWindow(url,name,width,height,scroll){
	params = "width="+width+",height="+height+",toolbar=no,scrollbars="+scroll+",directories=no,menu=no,location=no";
	popup = window.open(url,name,params);
}

//=============================================================================
// jumpToUrl()
// Jump to the selected URL
//
function jumpToUrl(form){
	window.location.href=form.options[form.selectedIndex].value;
}
