﻿function div_show(divname)
	    {
	
		eval(sync_om_documentdiv(divname) + sync_om_style() + '.visibility="visible"');
		return 1;
}
	
	function div_hide(divname)
	        {
						
	        eval(sync_om_documentdiv(divname) + sync_om_style() + '.visibility="hidden"');
			return 0;
	        }
	

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
	
function changeImages(){
   if (document.images && (preloadFlag == true))
         {                for (var i=0; i<changeImages.arguments.length; i+=2)
                  {                        document[changeImages.arguments[i]].src = this[changeImages.arguments[i+1]].src;
                  }
         }
}


function goto_contact(wert,flag) {
	
	if (flag=="1") selector="person";
	if (flag=="0") selector="department";
	
	wert=wert.options[wert.selectedIndex].value;
	link="index.php?selector="+selector+"&person="+wert+"&page=3_1_2_1";
	if (wert>"0") self.location.href=link;
	
}


function goto_page(wert,temp,lan) {
	
	wert=wert.options[wert.selectedIndex].value;
	link="index.php?lan="+lan+"&page="+wert;
	if (wert>"0") self.location.href=link;
	
}	

function goto_page_from_popup(link) {
	opener.location.href=link;
	opener.focus();
}	

   
function doClear(theText)
{
	  if (theText.value == theText.defaultValue)
	  {
	    theText.value = ""
	  }
}   
        
function show_picture (title,file_path,width,height) {

	width=width+30;
	height=height+30;
		
	newWindow = window.open("includes/leer.htm","popup","width="+width+",height="+height+",left=50,top=50");
	content="<html height='100%'><head><title>"+title+"</title><LINK rel='stylesheet' type='text/css' href='formate.css'></head><body height='100%' width='100%'><table class='popup' width='100%' height='100%' cellpadding='0' cellspacing='0' border='1'><tr><td align='center' valign='middle' height='100%' width='100%'><img src='"+file_path+"' border='0'></td></tr></table></body></html>";
	newWindow.document.open();
	newWindow.document.write(content);
	newWindow.document.close();
	newWindow.focus();	
}	        

function show_page (file_path,width,height) {

	if (width>0 && height>0)
		newWindow = window.open(file_path,"popup","width="+width+",height="+height+",left=50,top=50,scrollbars=yes,resizable=no");
	else 
		newWindow = window.open(file_path,"popup","width=800,height=600,left=0,top=0,scrollbars=yes,resizable=yes,menubar=yes");
	
	newWindow.focus();	
	if (newWindow.scrollbars && newWindow.scrollbars.visible == false)
	 newWindow.scrollbars.visible = true;
}	

function open_contact_from_popup(url) {

	if (opener.closed == false) {
		opener.location.href=url;
		return false;	
	} else {
		newWindow = window.open(file_path,"popup","width="+width+",height="+height+",left=50,top=50,toolbar=yes,menubar=yes,scrollbars=yes,resizable=no");
		return false;
	}	
	
}	

function popUp(img,w,h,page_title,subtitle) {
	
	var imgPath = img;
	var backBarHeight = 0;
	var topOffset = backBarHeight;
	// Fenster oeffnen
	
	var windowPrefs = "scrollbars=no,resizable=no,width="+ (w - 2) + ",height=" + (h + backBarHeight);
	var dispWindow = window.open("", "", windowPrefs);
   	//dispWindow.focus();

	// HTML-Code in das geoefnete Fenster schreiben
	with (dispWindow.document) {
			open ("text/html");
			writeln ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
			writeln ('<html xmlns="http://www.w3.org/1999/xhtml">');
			writeln ('<head>');
			writeln ('<title>' + page_title + '</title>');
			writeln ('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
			writeln ('<style type="text/css">');
			writeln ('body {background: #fff url('+ imgPath +') 0px ' + topOffset + 'px no-repeat; margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif;}');
			writeln ('#backLink {position: relative; margin: 0 auto; padding: 0; color: #fff; font-size: 12px; font-weight: bold; background-color: #05889C; height: ' + backBarHeight + 'px;}');
			writeln ('#backLink table {margin: 0; padding: 0; border: 0px solid; height: ' + backBarHeight + 'px; width: 100%;}');
			writeln ('#backLink td {padding: 0 0 0 10px; vertical-align: middle;}');
			writeln ('a {font-size: 12px; font-weight: bold; text-decoration: none; vertical-align: middle;}');
			writeln ('a:link, a:active, a:visited {color: #fff;}');
			writeln ('a:hover {color: #003366;}');
			writeln ('</style>');
			writeln ('</head>');
			writeln ('<body><table style="width:'+w+'px ; height:'+h+'px"><tr><td style="height:100%; " width="100%" height="100%" onmousedown="self.close()">&nbsp;');
			//writeln ('<div id="backLink">');
				//writeln ('<table cellspacing="0">');
					//writeln ('<tr>');
						//writeln ('<td>' + subtitle + '</td>');
						//writeln ('<td style="width:30px; padding:4px 0 0 0" valign="middle"><a href="javascript:self.close();"><img src="layout/close_window.gif" border="0"></a></td>');
					//writeln ('</tr>');
				//writeln ('</table>');
			//writeln ('</div>');
			writeln ('</td></tr></table></body></html>');
			close();
	}
}

var javascript_menu_flag=0;      
