
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('<style>body {background-color: #FFFFFF}</style>');
   docprint.document.write('</head><body>');          
   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';
}

function SyncDiv() //sørger for, at venstremenuen går helt til bund 
	{
	var iHeight;

	iHeight = document.getElementById('content').offsetHeight;
	bSync = false;

	if(document.getElementById('leftcolumn')) {
		if (document.getElementById('leftcolumn').offsetHeight>iHeight) {
				iHeight = document.getElementById('leftcolumn').offsetHeight;
				bSync = true;
				}
	}
	if(document.getElementById('rightcolumn')) {
		if (document.getElementById('rightcolumn').offsetHeight>iHeight) {
				iHeight = document.getElementById('rightcolumn').offsetHeight;
				bSync = true;
				}
	}

	if(bSync = true) {
		document.getElementById('content').style.height = iHeight + 'px';

		if(document.getElementById('leftcolumn')) {
			document.getElementById('leftcolumn').style.height = iHeight + 'px';
		}
		if(document.getElementById('rightcolumn')) {
			document.getElementById('rightcolumn').style.height = iHeight + 'px';
		}
	}
}

DropMenu = function() {
	if (document.getElementById) {
		navRoot = document.getElementById("DropMenu");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.className == "Drop") 
				node.firstChild.onfocus = function() {dropdown(this)}; // JWJ
			{
				node.onmouseover = function() 
				{
					this.className += " over";
					this.firstChild.className += " expanded";
				}
				node.onmouseout = function()
				{
					this.className = this.className.replace(" over", "");
					if (this.firstChild.className == "selected expanded") this.firstChild.className = "selected";
					if (this.firstChild.className == " expanded" || this.firstChild.className == "expanded") this.firstChild.className = "";
				}
			}
		}
	}
}
/* window.onload = DropMenu; */