<!--

function checkTip()
{
	var errorMess = "";
	if (document.frmTip.strFName.value.length < 2)
	{
		document.frmTip.strFName.style.backgroundColor='#FFF0B3';
		errorMess += '# Din vens namn må indenholde minds 2 tegn.\n';
	}
	else
	{
		document.frmTip.strFName.style.backgroundColor='#FFFFFF';
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.frmTip.strFEmail.value)))
	{
		document.frmTip.strFEmail.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet en gyldig E-mail adresse for din ven.\n';
	}
	else
	{
		document.frmTip.strFEmail.style.backgroundColor='#FFFFFF';
	}
	if (document.frmTip.strYName.value.length < 2)
	{
		document.frmTip.strYName.style.backgroundColor='#FFF0B3';
		errorMess += '# Dit navn skal indeholde minds 2 tegn.\n';
	}
	else
	{
		document.frmTip.strYName.style.backgroundColor='#FFFFFF';
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.frmTip.strYEmail.value)))
	{
		document.frmTip.strYEmail.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet en gyldig E-mail adresse.\n';
	}
	else
	{
		document.frmTip.strYEmail.style.backgroundColor='#FFFFFF';
	}

	if (document.frmTip.intProtect.value.length < 1)
	{
		document.frmTip.intProtect.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen kode.\n';
	}
	else
	{
		document.frmTip.intProtect.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function checkMessage()
{
	var errorMess = "";
	if (document.frmMessage.strName.value.length < 2)
	{
		document.frmMessage.strName.style.backgroundColor='#FFF0B3';
		errorMess += '# Dit navn skal indeholde minds 2 tegn.\n';
	}
	else
	{
		document.frmMessage.strName.style.backgroundColor='#FFFFFF';
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.frmMessage.strEmail.value)))
	{
		document.frmMessage.strEmail.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet en gyldig E-mail adresse.\n';
	}
	else
	{
		document.frmMessage.strEmail.style.backgroundColor='#FFFFFF';
	}
	if (document.frmMessage.strMessage.value.length < 10)
	{
		document.frmMessage.strMessage.style.backgroundColor='#FFF0B3';
		errorMess += '# Din tekst skal indeholde mindst 10 tegn.\n';
	}
	else
	{
		document.frmMessage.strMessage.style.backgroundColor='#FFFFFF';
	}
	if (document.frmMessage.intProtect.value.length < 1)
	{
		document.frmMessage.intProtect.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen kode.\n';
	}
	else
	{
		document.frmMessage.intProtect.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function checkNewWork()
{
	var errorMess = "";
	if (document.frmWork.intWorkArea.value == 0)
	{
		document.frmWork.intWorkArea.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen jobkategori.\n';
	}
	else
	{
		document.frmWork.intWorkArea.style.backgroundColor='#FFFFFF';
	}
	if (document.frmWork.strWork.value.length < 2 || document.frmWork.strWork.value.length > 40)
	{
		document.frmWork.strWork.style.backgroundColor='#FFF0B3';
		errorMess += '# Arbejdet må indeholde 2-40 bogstaver.\n';
	}
	else
	{
		document.frmWork.strWork.style.backgroundColor='#FFFFFF';
	}
	if (document.frmWork.intProtect.value.length < 1)
	{
		document.frmWork.intProtect.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen kode.\n';
	}
	else
	{
		document.frmWork.intProtect.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function checkSearch()
{
	var errorMess = "";
	if (document.frmSearch.strSearch.value.length < 2 || document.frmSearch.strSearch.value.length > 30)
	{
		document.frmSearch.strSearch.style.backgroundColor='#FFF0B3';
		errorMess += '# Ditt søkord må indeholde mindst 2-30 bogstaver.\n';
	}
	else
	{
		document.frmSearch.strSearch.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function checkSalary()
{
	var errorMess = "";
	if (document.frmSalary.intArea.value == 0)
	{
		document.frmSalary.intArea.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen område.\n';
	}
	else
	{
		document.frmSalary.intArea.style.backgroundColor='#FFFFFF';
	}
	if (document.frmSalary.intWorkArea.value == 0)
	{
		document.frmSalary.intWorkArea.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen jobkategori.\n';
	}
	else
	{
		document.frmSalary.intWorkArea.style.backgroundColor='#FFFFFF';
	}
	if (document.frmSalary.intWork.value == 0)
	{
		document.frmSalary.intWork.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet dit arbejde.\n';
	}
	else
	{
		document.frmSalary.intWork.style.backgroundColor='#FFFFFF';
	}
	if ((document.frmSalary.intSalary.value.length < 4) || (document.frmSalary.intSalary.value.length > 6))
	{
		document.frmSalary.intSalary.style.backgroundColor='#FFF0B3';
		errorMess += '# Din månedsløn skal bestå av 4-6 cifre.\n';
	}
	else
	{
		if ((document.frmSalary.intSalary.value < 7000) || (document.frmSalary.intSalary.value > 400000))
		{
			document.frmSalary.intSalary.style.backgroundColor='#FFF0B3';
			errorMess += '# Din månedsløn må vare 7000-400000 kr.\n';
		}
		else
		{
			document.frmSalary.intSalary.style.backgroundColor='#FFFFFF';
		}
	}
	if (parseInt(document.frmSalary.intExperience.value) > parseInt(document.frmSalary.intAge.value - 16))
	{
		document.frmSalary.intExperience.style.backgroundColor='#FFF0B3';
		errorMess += '# Erfarenheden ær før stor i førhållandet til din ålder.\n';
	}
	else
	{
		document.frmSalary.intExperience.style.backgroundColor='#FFFFFF';
	}
	if (document.frmSalary.intEducation.value == 0)
	{
		document.frmSalary.intEducation.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet noget uddannelsesniveau.\n';
	}
	else
	{
		document.frmSalary.intEducation.style.backgroundColor='#FFFFFF';
	}
	if (document.frmSalary.intSector.value == 0)
	{
		document.frmSalary.intSector.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen sektor.\n';
	}
	else
	{
		document.frmSalary.intSector.style.backgroundColor='#FFFFFF';
	}
	if (document.frmSalary.intSex.value == 0)
	{
		document.frmSalary.intSex.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet noget køn.\n';
	}
	else
	{
		document.frmSalary.intSex.style.backgroundColor='#FFFFFF';
	}
	if (document.frmSalary.intProtect.value.length < 1)
	{
		document.frmSalary.intProtect.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har ikke angivet nogen kode.\n';
	}
	else
	{
		document.frmSalary.intProtect.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function onlyLettersNewWork()
{
	if (!(/^[\D]*$/.test(document.frmWork.strWork.value)))
	{
		document.frmWork.strWork.value = "";
	}
}

function onlyLettersSalary()
{
	if (!(/^[\D]*$/.test(document.frmSearch.strSearch.value)))
	{
		document.frmSearch.strSearch.value = "";
	}
}

function onlyDigitsNewWork()
{
	if (!(/^\d+$/.test(document.frmWork.intProtect.value)))
	{
		document.frmWork.intProtect.value = "";
	}
}

function onlyDigitsContact()
{
	if (!(/^\d+$/.test(document.frmMessage.intProtect.value)))
	{
		document.frmMessage.intProtect.value = "";
	}
}

function onlyDigitsCompare()
{
	if (!(/^\d+$/.test(document.frmCompare.strSearch.value)))
	{
		document.frmCompare.strSearch.value = "";
	}
}

function onlyDigitsYourSalary()
{
	if (!(/^\d+$/.test(document.frmSalary.intSalary.value)))
	{
		document.frmSalary.intSalary.value = "";
	}
	if (!(/^\d+$/.test(document.frmSalary.intProtect.value)))
	{
		document.frmSalary.intProtect.value = "";
	}
}

function popup(URL,width,height,scroll){
	if (parseInt(navigator.appVersion) >= 3){
		if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)<5){
			var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
			screen=tools.getScreenSize();
		}
		x = screen.width;
		y = screen.height;
	}
	window.open(URL,"dummy","top=" + parseInt(y/2-height/2-16) + ",left=" + parseInt(x/2-width/2-5) + ",width=" + width + ",height=" + height + ",scrollbars=" + scroll);
}

function progress(layer){
	var myLayer = document.getElementById(layer).style.display;
	if(myLayer=="none"){
	document.getElementById(layer).style.display="block";
	} else { 
	document.getElementById(layer).style.display="none";
	}
}

var w3c=(document.getElementById)?true:false;
var ie=(document.all)?true:false;
var N=-1;

function createBar(w,h,bgc,brdW,brdC,blkC,speed,blocks,count,action){
if(ie||w3c){
var t='<div id="_xpbar'+(++N)+'" style="visibility:visible; position:relative; overflow:hidden; width:'+w+'px; height:'+h+'px; background-color:'+bgc+'; border-color:'+brdC+'; border-width:'+brdW+'px; border-style:solid; font-size:1px;">';
t+='<span id="blocks'+N+'" style="left:-'+(h*2+1)+'px; position:absolute; font-size:1px">';
for(i=0;i<blocks;i++){
t+='<span style="background-color:'+blkC+'; left:-'+((h*i)+i)+'px; font-size:1px; position:absolute; width:'+h+'px; height:'+h+'px; '
t+=(ie)?'filter:alpha(opacity='+(100-i*(100/blocks))+')':'-Moz-opacity:'+((100-i*(100/blocks))/100);
t+='"></span>';
}
t+='</span></div>';
document.write(t);
var bA=(ie)?document.all['blocks'+N]:document.getElementById('blocks'+N);
bA.bar=(ie)?document.all['_xpbar'+N]:document.getElementById('_xpbar'+N);
bA.blocks=blocks;
bA.N=N;
bA.w=w;
bA.h=h;
bA.speed=speed;
bA.ctr=0;
bA.count=count;
bA.action=action;
bA.togglePause=togglePause;
bA.showBar=function(){
this.bar.style.visibility="visible";
}
bA.hideBar=function(){
this.bar.style.visibility="hidden";
}
bA.tid=setInterval('startBar('+N+')',speed);
return bA;
}}

function startBar(bn){
var t=(ie)?document.all['blocks'+bn]:document.getElementById('blocks'+bn);
if(parseInt(t.style.left)+t.h+1-(t.blocks*t.h+t.blocks)>t.w){
t.style.left=-(t.h*2+1)+'px';
t.ctr++;
if(t.ctr>=t.count){
eval(t.action);
t.ctr=0;
}}else t.style.left=(parseInt(t.style.left)+t.h+1)+'px';
}

function togglePause(){
if(this.tid==0){
this.tid=setInterval('startBar('+this.N+')',this.speed);
}else{
clearInterval(this.tid);
this.tid=0;
}}

function togglePause(){
if(this.tid==0){
this.tid=setInterval('startBar('+this.N+')',this.speed);
}else{
clearInterval(this.tid);
this.tid=0;
}}

// -->
