function dansradio() {
	window.open('http://www.dans-web.nu/radio.html','Radio','left=10,top=20,screenX=300,screenY=200,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,width=385,height=360');
}

	
function _popup(win,w,h){
//	if bakom == '' then
	thiswin=window.open(win, 'thiswin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=100,top=100,screenX=100,screenY=100,width='+w+',height='+h);
//	thiswin=window.open(win, "thiswin", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=100,top=100,width="+w+",height="+h+"");
//	thiswin=window.open(win, "thiswin", "toolbar=no,location=yes,directories=yes,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=100,top=100,width=250,height=350");
//	window.open(win, "thiswin", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=100,top=100,width="+w+",height="+h+"");
	thiswin.focus();
}




// ******************************************************
function checkEmailAddress(email){
	if (!(isEmailAddress(email))){
			alert('Email-adressen du har angivit verkar inte vara korrekt.\nVänligen kontrollera att du skrivit i rätt.');
			return false;
	} else {
			return true;
	}
}
	



// ******************************************************

function isEmailAddress(str_){
		// verifies that str_ contains character "@" followed by at least
		// one dot and that the highest domain is 2 or 3 characters.
		
		var str = new String;
		var valid = true;
		
		str = str_;

		if (str.indexOf("@", 0) == -1)
			valid = false;
		else
			if (str.indexOf(".", str.indexOf("@", 0)) == -1)
				valid = false;

		if (valid)
			if ((str.length - getLastDotIndex(str)) < 2 || (str.length - getLastDotIndex(str)) > 3 || (str.length - getLastDotIndex(str)) > 4)
				valid = false;
		return valid;
	}

	// ******************************************************

	function getLastDotIndex(str_)
	{
		for (var i = str_.length; i--; i > 0)
			if (str_.substr(i, 1) == ".")
				return i + 1;
		return -1;
	}

	// ******************************************************

	

	function validate_char(field)
	{
		var valid = "abcdeéfghijklmnopqrstuvwxyzåäöABCDEÉFGHIJKLMNOPQRSTUVXYZÅÄÖ"
		var ok = "yes";
		var temp;
		
		for (var i=0; i < field.value.length; i++)
		{
			temp = "" + field.value.substring(i, i+1);
			if (valid.indexOf(temp) == "-1")
				ok = "no";
		}
		if (ok == "no")
		{
			alert("I detta fält kan du bara använda bokstäver.");
			field.focus();
			field.select();
		}
	}
	
	// ******************************************************

	function validate_num(field)
	{
		var valid = " -+0123456789"
		var ok = "yes";
		var temp;
		for (var i=0; i < field.length; i++)
		{
			temp = "" + field.substring(i, i+1);
			if (valid.indexOf(temp) == "-1") ok = "no";
		}
		if (ok == "no")
		{
			return false;
		}
		else
			return true;
	}
	

	
