/**
 * sets hover functions and un-hover functions to allow for support for suckerfish dropdowns in IE6.
 */
function doIENavPrep() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}

/**
 * returns true if the browser is IE6 or false
 */
function isIE6() {
	var nav = navigator;
	var ie6regex = new RegExp(/MSIE 6.0/);
	if ( (nav.appName == "Microsoft Internet Explorer") && (ie6regex.test(nav.appVersion)) ) {
		return true;
	} else {
		return false;
	}
}

function isIE() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		return true;
	} else {
		return false;
	}
}

/**
 * this is to fix the CSS failures of Internet Explorer
 */
function fixPressReleases() {
	if (document.innerHTML || isIE()) {
//		window.status = "Running CSSfix";
		var obj = document.getElementById("press_releases");
		if (obj) {
			obj.style.position = "absolute";
			obj.style.top = "460px";
			obj.style.left = "185px";
			return true;
		}
	}
	return false;
}

function addRepId() {
	var div = document.getElementById('repid_fields');
	if (div) {
		var ins = div.getElementsByTagName('input');
		var el = ins[0].cloneNode(true);
		el.value=window.prompt('Enter a RepID (3 digits)');
		div.appendChild(el);
	}
}