// $Revision:   1.0  $
// $Revision:   1.1  $ 

// Check if user is using IE
var version = get_ie_version();

if (version > -1) {
	if (version === 6) {
		include_css('/static_assets/css', 'picklist-style-ie6.css');
	} else {
		include_css('/static_assets/css', 'picklist-style.css');
	}
} else { // any non-ie browser.
	include_css('/static_assets/css', 'picklist-style.css');
}
		
// Get the version of IE
function get_ie_version() {
	var ie = -1;

	if (navigator.appName == 'Microsoft Internet Explorer') {
		var browser = navigator.userAgent;
		var regEx   = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	
		if (regEx.exec(browser) != null) {
			ie = parseInt(RegExp.$1)
		}
	}

	return ie;
}

function include_css(path, filename) {
	var location = path + "/" + filename;
	var head_dom = document.getElementsByTagName('head').item(0);
	var css  = document.createElement('link');
	css.rel  = 'stylesheet';
	css.href = location;
	head_dom.appendChild(css);
}

function popUp(thing) {
	var win;
	win = window.open(thing, "helpwin", "scrollbars=yes,resizable=yes,dependent=yes,width=520,height=470");
	win.focus();
	if (navigator.appName == "Netscape") {
		if (navigator.appVersion.indexOf ("Mac") != -1) {
			window.open(thing, "helpwin", "scrollbars=yes,resizable=yes,dependent=yes,width=520,height=470");
		}
		win.focus();
	}
}

