function PopupService(url, width, height) {
		remote = window.open('', 'PopupService', 'width='+width+',height='+height+',resizable=yes,scrollbars=yes');
		if( remote != null)
			{
			if( remote.opener == null)
				remote.opener = self;
			remote.location.href = url
			remote.focus();
			}
}

function checkData() {
	var f1 = document.forms[0];
	var wm = "<?PHP echo $strJSHello; ?>\n\r\n";
	var noerror = 1;

	// --- entered_login ---
	var t1 = f1.entered_login;
	if (t1.value == "" || t1.value == " ") {
		wm += "<?PHP echo $strLogin; ?>\r\n";
		noerror = 0;
	}

	// --- entered_password ---
	var t1 = f1.entered_password;
	if (t1.value == "" || t1.value == " ") {
		wm += "<?PHP echo $strPassword; ?>\r\n";
		noerror = 0;
	}

	// --- check if errors occurred ---
	if (noerror == 0) {
		alert(wm);
		return false;
	}
	else return true;
}

function browserName() {
  // IE
  if (navigator.appName == "Microsoft Internet Explorer")
    return 1;

  // Netscape
  if (navigator.appName == "Netscape")
    return 2;

  // Andre browsere
  return 0;
}

function ValidateLoginForm(formular){
	if(!formular.navn.value) {
		alert("Hey hey! Husk at angive dit brugernavn. Ellers kan du ikke logge ind!");
		formular.navn.focus();
		return false;
	}
	if(!formular.password.value) {
		alert("Hmmm. Du skal huske at indtaste dit password!");
		formular.password.focus();
		return false;
	}
	return true;
}
