//til pop-up-layer ved spørgeskema-undersøgelser


function hideMe(){
  document.getElementById('theLayer').style.visibility = 'hidden'; 
}



function PrintPage()
{ 
  var disp_setting="toolbar=no,location=no,directories=no,menubar=no,"; 
      disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25"; 
  //var content_vlue = document.getElementById("content").innerHTML; 
  var content_vlue=document.getElementById("Content").innerHTML.replace(/(<script.*?\/script>)/ig,"");
  var breadcrumb_vlue = document.getElementById("Breadcrumb").innerHTML; 
  
  var docprint=window.open("","",disp_setting); 
   docprint.document.open(); 
   docprint.document.write('<html><head><title>Udskrift fra '+location.host+'</title>'); 
   docprint.document.write('<link rel="stylesheet" type="text/css" href="admin/design/css/style.css" media="all">');
   docprint.document.write('<link rel="stylesheet" type="text/css" href="admin/write/css/UserDefined.css" media="all">');
   docprint.document.write('</head><body style="background-color: #ffffff;">');          
   docprint.document.write(breadcrumb_vlue);
   docprint.document.write('<br><br>'); 
   docprint.document.write(content_vlue);          
   docprint.document.write('</body></html>'); 
   docprint.document.close(); 
   docprint.focus();
   docprint.print();
}

function OpenLogin() {
	win_width = 450;
	win_height = 300;
	pos_horizon = ((screen.width/2)-(win_width/2));
	pos_vertical = ((screen.height/2)-(win_height/2));
	win = window.open("LoginPopup.asp", "Login", "Width="+win_width+",Height="+win_height+",Top="+pos_vertical+",Left="+pos_horizon+"");
	win.focus();
}

var winSepius = null;


function CloseSepius(){
		winSepius = window.open("sepius/default.asp", "Sepius","Width=2,Height=2,Top=0,Left=0,Scrollbars=yes,status=no,resizable");
		winSepius.close();
}


function SearchFormCheck() {
var strWords=document.SearchForm.Searchwords.value;
var strErrorMsg=''

  if (strWords=='' || strWords==' ' || strWords=='Søg...') {
  strErrorMsg+='Søgefeltet er ikke udfyldt'
}

if (strErrorMsg!='') {
  alert (strErrorMsg);
  return false;
}
else {
  return true;
}
}

function ConsoleOver(obj){
	obj.className='AdminConsole_cell_over'
}

function ConsoleOut(obj){
	obj.className='AdminConsole_cell_out'
}


function submitFormToPopup(formref,height,width) {
	win_width = ""+width+"";
	win_height = ""+height+"";
	pos_horizon = ((screen.width/2)-(win_width/2));
	pos_vertical = ((screen.height/2)-(win_height/2));
    newwin = window.open("about:blank","formvindue","width="+win_width+",height="+win_height+",Top="+pos_vertical+",Left="+pos_horizon+",Scrollbars=yes,status=no,resizable");
}

function PopUpWindow(url,height,width) {
	win_width = ""+width+"";
	win_height = ""+height+"";
	pos_horizon = ((screen.width/2)-(win_width/2));
	pos_vertical = ((screen.height/2)-(win_height/2));
	win = window.open(""+url+"", "WindowName", "Width="+win_width+",Height="+win_height+",Top="+pos_vertical+",Left="+pos_horizon+",Scrollbars=yes,status=no,resizable");
	win.focus();
}

function ConfirmLogOut()
	{ 	
		var agree=confirm(" Ønsker du at logge ud fra administrationssystemet?");
		if (agree)
		setTimeout("window.location = 'login.asp?Action=Logout'", 10);
		else
		return false; 
	}
	 
<!-- sletning skal bekræftes - bruges evt. ved gæstebog og lign.

function Confirm()
	{ 	
		var agree=confirm("Er du sikker på, at sletning skal foretages?");
		if (agree)
		return true;
		else
		return false; 
	}
 //-->

function mrfixit()
{
var fc = document.getElementById('fixedcell'); fc_top = fc.offsetParent.offsetTop; fc.style.top = document.documentElement.scrollTop + 
fc_top;
}
onscroll = mrfixit; 

var focusElem = null;
function dropdown( obj )
{
	if( focusElem != null )
	{
		focusElem.className = focusElem.className.replace(" over", "");
	}
	focusElem = obj.parentElement;
	focusElem.className += ' over';
}

