//	Browsertype
ie4		= (document.all && !document.getElementById)?1:0						//IE 4+
ie5		= (document.all && document.getElementById)?1:0							//IE 5.0
ie55	= (document.all && document.fireEvent && !document.createComment)?1:0	//IE 5.5
ie6		= (document.all && document.fireEvent && document.createComment)?1:0	//IE 6.0
ns4		= (document.layers)?1:0								//NN 4+
ns6		= (document.getElementById && !document.all)?1:0	//NN 6+ & Opera
op7		= (window.opera && document.createComment)?1:0		//Opera 7.0
op6		= (window.opera && !document.createComment)?1:0		//Opera 6.0 og under

function booking(ident){
	switch(ident){
		case "vejle":
			objW = window.open('http://www.jegvilbestilletid.dk/loox.vejle','win','locationbar=0,menubar=0,resizable=1,toolbar=0,status=0,scrollbars=1,left=10,top=10,width=800,height=700');
			break;
	}
}

function openPrintWin(docID)
{
	win_pf = window.open('win_print.asp?id='+docID,'win_pf2','locationbar=no,menubar=no,resizable=no,toolbar=yes,status=yes,scrollbars=yes,width=664,height=500');
	win_pf.moveTo (5, 5);
	win_pf.focus();
}

function openTevWin(docID)
{
	win_tev = window.open('win_tip_friend.asp?action=display&id='+docID,'win_tev2','locationbar=no,menubar=no,resizable=no,toolbar=no,status=no,scrollbars=no,width=320,height=440');
	win_tev.moveTo (5, 5);
	win_tev.focus();
}

function show_win(id)
{
	switch (id){
		case 'mailform':
			win_mailform = window.open('mailform_001.asp?action=show','win_mf','locationbar=no,menubar=no,resizable=no,toolbar=no,status=no,scrollbars=no,width=600,height=480');
			win_mailform.moveTo (5, 5);
			win_mailform.focus();
			break;
	}
}

function openInfoWin(id)
{
	switch (id){
		case 1:
			//	Copyrights
			win_acc = window.open('admin/win_info.asp?id=copyrights','win','locationbar=no,menubar=no,resizable=no,toolbar=yes,status=no,scrollbars=yes,width=448,height=450');
			win_acc.moveTo (5, 5);
			win_acc.focus();
			break;
		case 2:
			//	Policy statement
			win_acc = window.open('admin/win_info.asp?id=userdata','win','locationbar=no,menubar=no,resizable=no,toolbar=yes,status=no,scrollbars=yes,width=448,height=450');
			win_acc.moveTo (5, 5);
			win_acc.focus();
			break;
		case 3:
			//	About
			win_acc = window.open('admin/win_info.asp?id=about','win','locationbar=no,menubar=no,resizable=no,toolbar=yes,status=no,scrollbars=yes,width=448,height=450');
			win_acc.moveTo (5, 5);
			win_acc.focus();
			break;
	}
}

function gotoid(id)
{
	self.location.href = 'default.asp' + id;
}

function gotopage(page, id)
{
	self.location.href = page + id;
}

function statusTxt(txt)
{
	window.status = txt;
}

function openwin(ident)
{
	switch(ident)
	{
		case 'ident':
			kWin = window.open('kampagner/periode/x.asp','k_win','locationbar=no,menubar=no,resizable=no,toolbar=no,status=no,scrollbars=yes,width=480,height=370');
			kWin.moveTo (5, 5);
			kWin.focus();
			break
	}
}

function defaultPage()
{
	if (ns4||ns6||op6||op7)
	{
		alert('Denne facilitet virker kun, hvis du benytter Internet Explorer.');
	}else{
		strThisPage = self.location.href;
		dpLink.style.behavior='url(#default#homepage)';
		dpLink.setHomePage(strThisPage);
	}
}

function addToFav()
{
	if (ns4||ns6||op6||op7)
	{
		alert('Klik på [CTRL + D] for at tilføje denne side under \'Foretrukne\'.');
	}else{
		strThisPage = self.location.href;
		window.external.AddFavorite(strThisPage, strThisPage);
	}
}

function chkFrmPoll(frm)
{
	var blnSelection = false
	tagLength	= frm.rad_qps.length

	for(var i = 0; i <= tagLength-1; i++)
	{
		chkStatus = frm.rad_qps[i].checked
		if(chkStatus == true)
		{
			qps_id = frm.rad_qps[i].value;
			blnSelection = true;
		}
	}

	if(blnSelection == true)
	{
		document.getElementById("qps_id").value = qps_id;
	}else{
		alert('Du skal vælge en besvarelse.');
		return (false);
	}
}



//	-----------------------------------
//		Newsletter
//	-----------------------------------
function checkNewsletterForm(frm)
{
	//	Checker om brugeren har klikket på "Tilmeld"- eller "Afmeld"-knappen (tryk på [Return] for submit er dermed deaktiveret)
	btnStatus = document.getElementById('btn_status').value
	if (btnStatus == "0"){return(false)};
	
	//	Checker email-adresse
	if (frm.txt_email.value!="")
	{
		if (checkEmail(frm.txt_email)==false)
		{
			frm.txt_email.focus();
			return(false);
		}
	}else{
		alert('Du skal indtaste din email-adresse for at blive tilmeldt/afmeldt.');
		frm.txt_email.focus();
		return(false);
	}
}
function changeBtnStatus(ident)
{
	document.getElementById('btn_status').value = ident;
}


//	-----------------------------------
//		Gallerier
//	-----------------------------------
function fncGallery_Pic_Vis(id)
{
	window.open('gal_pic_001.asp?id='+id,'win_picshow', 'directories=1,location=0,toolbar=1,menubar=0,status=0,resizable=1,dependent=1,scrollbars=1,fullscreen=0,left=5,top=5,width=700,height=600');
}
function openGallery(inpG_ID)
{
	location.href = '?action=show_gal_pics&g_id='+inpG_ID;
}

//	-----------------------------------
//		Kampagner
//	-----------------------------------
function kampagne(ident)
{
	switch(ident){
		case "2008_06":
			obj = window.open('vejfest/default.asp','wkamp','locationbar=0,menubar=0,resizable=0,toolbar=0,status=0,scrollbars=0,width=780,height=497');
			obj.moveTo (20, 20);
			obj.focus();
			break;
	}
}

//	-----------------------------------
//		Microsites
//	-----------------------------------
function showMap(){
	mWin = window.open('microsites/maps/win_001.asp','map1','locationbar=no,menubar=no,resizable=no,toolbar=no,status=no,scrollbars=no,width=640,height=670');
	mWin.moveTo (5, 5);
	mWin.focus();
}