<!--
function templateforsubmit(overwritetext, writeanametext) 
{
	if(document.templateform.newtitle.value == '')
	{
		alert(writeanametext);
		document.templateform.newtitle.focus();
		return false;
	}
	else
	{
		if(document.templateform.newtitle.value == document.templateform.oldtitle.value)
		{
			if(confirm(overwritetext))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else return true;
	}
	
}
function checkforname(text) 
{
	if(document.templateform.title.value == '')
	{
		alert(text);
		document.templateform.title.focus();
		return false;
	}	
}
function oknosave(alerttext)
{
	if(confirm(alerttext))
	{
		//window.location.href = 'editemails.php?sub=newemailtemplate';
		winTop = (screen.height - 600) / 2;
    	winLeft = (screen.width - 800) / 2;
		window.open("newemailtemplate.php","Emailtemplate","width=800,height=600,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
	}
}
function newwindow(page)
{
	winTop = (screen.height - 700) / 2;
    winLeft = (screen.width - 950) / 2;
	window.open(page,"Adminlogin","width=950,height=700,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,status=yes,location=yes");
}
function opensearch()
{
	winTop = (screen.height - 480) / 2;
    winLeft = (screen.width - 640) / 2;
	nytvindue = window.open("searchcompid.php","Search","width=640,height=480,top="+winTop+",left="+winLeft+",resizable=no,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function poppage(page)
{
	winTop = (screen.height - 650) / 2;
    winLeft = (screen.width - 800) / 2;
	window.open(page,"Title","width=800,height=650,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function popNotes(page)
{
	winTop = (screen.height - 650) / 2;
    winLeft = (screen.width - 800) / 2;
	window.open(page,"Title","width=400,height=350,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function pop(page)
{
	winTop = (screen.height - 400) / 2;
    winLeft = (screen.width - 600) / 2;
	window.open(page,"Akajob","width=600,height=400,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function requestinfopop(page)
{
	winTop = (screen.height - 360) / 2;
    winLeft = (screen.width - 600) / 2;
	window.open(page,"Requestinfo","width=600,height=360,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function suggestcomp(page)
{
	winTop = (screen.height - 200) / 2;
    winLeft = (screen.width - 600) / 2;
	window.open(page,"Title","width=600,height=200,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function poptipafriend(page)
{
	winTop = (screen.height - 200) / 2;
    winLeft = (screen.width - 600) / 2;
	window.open(page,"Title","width=600,height=200,top="+winTop+",left="+winLeft+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
}
function checknewcategoryform(alerttextnodanish, alertteextnoenglish)
{
	var alarmtext = '';

	if(document.newcategoryform.newcategorynamedanish.value == '')
	{
		alarmtext += alerttextnodanish;
	}
	if(document.newcategoryform.newcategorynameenglish.value == '')
	{
		alarmtext += '\n' + alerttextnoenglish;
	}
	if(alarmtext == '')
	{
		return true;
	}
	else
	{
		alert(alarmtext);
		return false;
	}
}
function gotourl(url)
{
	// Function to go to url passed to the function
	window.location.href = url;
}
function ckeckall(field)
{
	//  Called by editgroups.php to check all events as allowed
	alert('Denne funktion skal lige laves!! :)');
	field = 'document.eventform.allowbox';
	for (i = 0; i < field.length; i++) field[i].checked = true;
}
-->
