function css_detect(param) {
	var version_msg = "Version info:\n" +
		"css_detect $Id: css.js,v 1.1.1.1 2005/06/30 08:30:39 hillebrand Exp $\n";
	var usage_url = "css_detect_usage.txt";
	var compat_url = "css_detect_compatibility.txt";
	
	// Define default properties, undefined values not allowed:
	var def = {
		base: "",
		debug: 0,
		version: null,
		help: null,
		compat: null
	}
	
	// Warn for the use of unused properties in the call:
	for (var prop in param) {
		eval(
			"if (typeof def." + prop + "== 'undefined') " +
			"alert('Warning: \"" + prop + "\" is an unused property.')"
		);
	}
		
	// Generate local variable based on the properties used for this function:
	var p = {};
	for (prop in def) {
		p[prop] = (typeof param[prop] == 'undefined') ? def[prop] : param[prop];
	}

	// Display info when needed:
	if (p.version != null) alert(version_msg);
	var pop_opts = 'resizable=yes,scrollbars=yes';
	if (p.help != null) {
		window.open(usage_url,'css_detect',pop_opts);
		return;
	}
	else if (p.compat != null) {
		window.open(compat_url,'css_detect',pop_opts);
		return;
	}

	// Payload here:
	
	var ua = navigator.userAgent;
	var css = "default";
	if (
		(ua.indexOf("MSIE") == -1)
		&& (ua.indexOf("/4.") != -1)
	) {
		css = "ns4x" + ((ua.indexOf("Win") != -1) ? "win" : "mac");
	}
	if (navigator.userAgent.indexOf("Gecko") != -1) {
		css = "gecko";
	}

	if (p.base != "" && p.base.lastIndexOf("/") != p.base.length - 1) {
		p.base += "/";
	}
	out = "<link href='" + p.base + css + ".css' rel=stylesheet type='text/css'>";
	document.write(out);
}
