<!--

// window.onerror = stoperror;
 
 function stoperror()
 {
  return true;
 }
 

// globale Javascript Konstanten:

// automatisches Logout 
 var LogoutNachMinuten = 30;


// max. integer Wert
var CONST_MAX_INT  = 2147483647;



function init_common()
{
	if (document.getElementById)
	{
		breite = document.body.clientWidth;
		hoehe  = document.body.clientHeight;

		left_position = eval(breite-350);
		top_position  = eval(hoehe-50);

		if (document.getElementById("footer"))
			{
				document.getElementById("footer").style.left = left_position+"px";
				document.getElementById("footer").style.top  = top_position+"px";
			}
	}

 }
 
 

// init_common();
// window.onresize = init_common;
 
  
  
 
 var myTimer;
 var myTimerIsActive;
 
 function ResetTimer()
 {
 	if(myTimerIsActive == true)
 	{
 		clearTimeout(myTimer);
 	}
 	else
 	{
 		myTimerIsActive = true;
 		myTimer = setTimeout("Logout()", LogoutNachMinuten*60000);
	}
 }
 
 function Logout()
 {
	/*
	if(showModalDialog)
	{
		var ueber_array = new Array();
		url = "<?= MODULE_BASE ?>/alert.php";
		hinweis_text = "Ihre Session ist abgelaufen. <br>Bitte melden Sie sich neu an.";

		ueber_array[0] = hinweis_text;
		window_properties = "resizable:1;center=yes;dialogWidth=380px;dialogHeight=150px;status=no;help=no";
		var retArray = showModalDialog(url,ueber_array,window_properties);
	}
	*/

	if (top.opener)
	{
		top.opener.location.href = "/logout.php?msg=1";
		self.close();
	}
	else
		top.location.href = "/logout.php?msg=1";
 }

 
 if (self.name == "content")
 	ResetTimer();
 



 // Hilfefunktion 
 function helpfunction(feldname,scriptname)	
 {

 	url = "/hilfe/help_content.php?feldname="+feldname+'&scriptname='+scriptname; 
 	window.open(url,"Hilfe","width=480,height=300,left=20,top=20,scrollbars=yes,toolbar=no,status=no,location=no,menubar=no,resizable=yes");
 
}



// Kalender 
function openCalendar(inputfeld,module_base)
{
	start = eval(inputfeld + ".value");
	url = module_base + "/_includes/calender.php?inputfeld="+inputfeld+"&start="+start;

	leftPos = screen.availWidth-280;
	topPos  = 20;

	window.open(url,"ccalender","width=250,height=220,left="+leftPos+",top="+topPos+",toolbar=no,status=no,location=no,menubar=no,resizable=yes");

}

// Bitte warten Hinweis einblenden
function set_bitte_warten()
{
  	if (document.getElementById("bitte_warten"))
  		document.getElementById("bitte_warten").style.visibility = "visible";
}

 // -->
 

