<!--
function openAWindow( pageToLoad, winName, width, height, center) 
{
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center))
	{
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	args = "width=" + width + "," 
	+ "height=" + height + "," 
	+ "channelmode=0,"
	+ "directories=0,"
	+ "fullscreen=0,"
	+ "location=0,"
	+ "menubar=0,"
	+ "resizable=0,"
	+ "scrollbars=0,"
	+ "status=1,"
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + ","
	+ "screeny=" + yposition + ","
	+ "left=" + 0 + ","
	+ "top=" + 0 + ","
	window.open( pageToLoad,winName,args );
}

function openAdmin( pageToLoad, winName, width, height, center) 
{
	xposition=0; yposition=0;hojd=screen.height - 120;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center))
	{
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	args = "width=" + width + "," 
	+ "height=" + hojd + "," 
	+ "channelmode=0,"
	+ "directories=0,"
	+ "fullscreen=0,"
	+ "location=0,"
	+ "menubar=0,"
	+ "resizable=0,"
	+ "scrollbars=1,"
	+ "status=0,"
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + ","
	+ "screeny=" + yposition + ","
	+ "left=" + xposition + ","
	+ "top=0"
	window.open( pageToLoad,winName,args );
}

function high(which2){
	theobject=which2
	highlighting=setInterval("highlightit(theobject)",50)
}

function low(which2){
	clearInterval(highlighting)
	which2.filters.alpha.opacity=60
}

function highlightit(cur2){
	if (cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=5
	else if (window.highlighting)
		clearInterval(highlighting)
}

function check_string(str){
	 var index;
	str = str.toLowerCase ();
	for (index = 0; index < str.length; ++index)
		if ('abcdefghijklmnopqrstuvwxyzåäö'.indexOf
			(str.substring (index, index + 1)) == -1)
		return false;
	return true;
}

function check_int(str){
	var index;
	for (index = 0; index < str.length; ++index)
		if ('0123456789'.indexOf (str.substring
			(index, index + 1)) == -1)
		 return false;
	return true;
}

function check_form(form){
	if (form.fornamn.value.length == 0)
		alert ('Vänligen fyll i ditt förnamn.');
	else if (!check_string(form.fornamn.value))
		alert ('Det finns ogiltiga tecken i förnamnet.');
	else if (form.efternamn.value.length == 0)
		alert ('Vänligen fyll i ditt efternamn.');
	else if (!check_string(form.efternamn.value))
		alert ('Det finns ogiltiga tecken i efternamnet.');
	else if (form.telefonnummer.value.length == 0)
		alert ('Vänligen fyll i ditt telefonnummer.');
	else if (!check_int(form.telefonnummer.value))
		alert ('Det finns ogiltiga tecken i telefonnummret.');
	else
		return true;
	 return false;
}
//-->
