function new_window(url){
	link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=430,height=350,left=80,top=180");
}

function openWin(url, name){
	openNew = window.open(url, name, 'width=465,height=390,resize=yes,resizable=yes,scroll=no,scrollbars=no,location=no,toolbar=no,menubar=no,status=yes,left=20,top=20');
}

// SECTION: Checking form fields
var errfound = false;

function error(elem, text) {
	if (errfound) return;
	window.alert(text);
	elem.select();
	elem.focus();
	errfound = true;
}

function loginCheck(f) {

	errfound = false;

	//if (f.userid.value == "")
	//	error(f.userid,"Please enter your user ID!");

	if (f.passwd.value == "")
	   error(f.passwd,"Please enter your password!");
	
  	return ! errfound;
}

function hidePromo(){
	var promo = document.getElementById('promo');
	if(promo) promo.style.display = 'none';
}

var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]){
	var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=4)
	UseFlash = 1;
}
else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) UseFlash = 1;
	
	
function removeHTMLTags(strInputCode){
 	strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
	 	return (p1 == "lt")? "<" : ">";
	});
	var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
	return strTagStrippedText;
}