function openpopup (myfile, myname, breite, hoehe) {
	params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=0,scrollbars=0,toolbar=0,location=0,directories=0,menubar=1";
	newwin = window.open( myfile , myname , params)
	if (window.focus){newwin.focus()} // popup nach vorne bringen, wenn es hinten ist
	
	IE=(document.all&&!window.opera);
	if(IE) document.body.scroll='auto';
}

function openpopupscroll (myfile, myname, breite, hoehe) {
	params = "width=" + breite + ",height=" + hoehe + ",resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=1";
	newwin = window.open( myfile , myname , params)
	if (window.focus){newwin.focus()} // popup nach vorne bringen, wenn es hinten ist
	
	IE=(document.all&&!window.opera);
	if(IE) document.body.scroll='auto';
}

function openpopupscroll_size (myfile, myname, breite, hoehe) {
	params = "width=" + breite + ",height=" + hoehe + ",resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=1";
	newwin = window.open( myfile , myname , params)
	if (window.focus){newwin.focus()} // popup nach vorne bringen, wenn es hinten ist
	
	IE=(document.all&&!window.opera);
	if(IE) document.body.scroll='auto';
}


function openpopupdyn (myfile, mytext, myname, breite, hoehe) {
	params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0";
	//alert(myfile.substring(61));
	newwin = window.open( myfile , myname , params);
	newwin.focus(); // popup nach vorne bringen, wenn es hinten ist
	newwin.document.open(); // popup nach vorne bringen, wenn es hinten ist
	with(newwin)
	{
		document.write("<html><head>");
		document.write("<title>Klimadiagramm</title>");
		document.write ("<link rel='stylesheet' type='text/css' href='/tis/vorlagen/include/css/styles.css' media='screen'>");
		document.write ("<link rel='stylesheet' type='text/css' href='/tis/vorlagen/include/css/print_styles.css' media='print'>");
		document.write ("<script language='javascript' src='/tis/vorlagen/include/js/openpop.js'></script>");
		document.write("</head>");
		document.write("<body leftmargin='0' marginheight='0' marginwidth='0' topmargin='0'>");
        document.write("<div align='center'><img border='0' src='"+ myfile +"' title=''></div><br><br>");
        if(mytext!=0){
			document.write("<div class='h1' align='center'>"+ mytext +"</div><br><br><br>");
		}
		document.write("<div align='center'><a href='javascript:window.close();'>[Fenster schlie&szlig;en]</a></div><br>");
		document.write("<img src='/tis/vorlagen/images/pfad_linie_verlauf.gif' width='100%' height='1' alt='' border='0'><br>");
		document.write("&copy; Gesamtverband der Deutschen Versicherungswirtschaft e. V. (GDV), <br>Berlin 1999-2010, ");
		document.write("<a href='http://www.tis-gdv.de' target='_blank'>www.tis-gdv.de</a>");
        document.write("</body></html>");
	}
	newwin.document.close();
}

function openpopupdynswf (myfile, myname, breite, hoehe, bildbreite, bildhoehe) {
	params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0";
	newwin = window.open( myfile , myname , params);
	newwin.focus(); // popup nach vorne bringen, wenn es hinten ist
	newwin.document.open(); // popup nach vorne bringen, wenn es hinten ist
	//alert(myfile);
	with(newwin)
	{
		document.write("<html><head>");
		document.write("<title>Klimastationen</title>");
		document.write ("<link rel='stylesheet' type='text/css' href='/tis/vorlagen/include/css/styles.css' media='screen'>");
		document.write ("<link rel='stylesheet' type='text/css' href='/tis/vorlagen/include/css/print_styles.css' media='print'>");
		document.write ("<script language='javascript' src='/tis/vorlagen/include/js/openpop.js'></script>");
		document.write("</head>");
		document.write("<body bgcolor='#ffffff'><br>");
        document.write("<div align='center'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+ bildbreite +"' height='" + bildhoehe +"' id='" + myfile + "' align='middle'>");
        document.write("<param name='allowScriptAccess' value='sameDomain' />");
        document.write("<param name='movie' value='" + myfile + "' />");	
        document.write("<param name='quality' value='high' />");
        document.write("<param name='wmode' value='transparent' />");
        document.write("<param name='bgcolor' value='#ffffff' />");
        document.write("<embed src='" + myfile + "' quality='high' wmode='transparent' bgcolor='#ffffff' width='" + bildbreite +"' height='" + bildhoehe +"' name='" + myfile + "' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
        document.write("</object></div><br><br><br>");
		document.write("<div align='center'><a href='javascript:window.close();'>[Fenster schlie&szlig;en]</a></div><br>");
		document.write("<img src='/tis/vorlagen/images/pfad_linie_verlauf.gif' width='100%' height='1' alt='' border='0'><br>");
		document.write("&copy; Gesamtverband der Deutschen Versicherungswirtschaft e. V. (GDV), <br>Berlin 1999-2010, ");
		document.write("<a href='http://www.tis-gdv.de' target='_blank'>www.tis-gdv.de</a>");
        document.write("</body></html>");
	}
	newwin.document.close();
}

//Versteckten Text aufklappen
function toggledisplay (id, indicator){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		var pic = document.getElementsByName(indicator);
		obj.style.display = (obj.style.display=='block'?'none':'block');
		switch (id) {
		case 'hiddenDiv1':
		pic[0].src = (obj.style.display=='block'?/*VIPURL*/'/tis/vorlagen/images/hide.gif':/*VIPURL*/'/tis/vorlagen/images/show.gif');
		break;
		case 'hiddenDiv2':
		pic[1].src = (obj.style.display=='block'?/*VIPURL*/'/tis/vorlagen/images/hide.gif':/*VIPURL*/'/tis/vorlagen/images/show.gif');
		break;
		case 'hiddenDiv3':
		pic[2].src = (obj.style.display=='block'?/*VIPURL*/'/tis/vorlagen/images/hide.gif':/*VIPURL*/'/tis/vorlagen/images/show.gif');
		break;
		case 'hiddenDiv4':
		pic[3].src = (obj.style.display=='block'?/*VIPURL*/'/tis/vorlagen/images/hide.gif':/*VIPURL*/'/tis/vorlagen/images/show.gif');
		break;
		}
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
		indicator.src = (id.style.display=='block'?/*VIPURL*/'/tis/vorlagen/images/hide.gif':/*VIPURL*/'/tis/vorlagen/images/show.gif');
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = (document.id.style.display=='block'?'none':'block');
		document.indicator.src = (document.id.style.display=='block'?/*VIPURL*/'/tis/vorlagen/images/hide.gif':/*VIPURL*/'/tis/vorlagen/images/show.gif');
	}
}

//funktionen zum versenden eines formulars
function formularSendenHK(zieldatei) {
	document.hkom.method='get';
	document.hkom.action=zieldatei;
	document.hkom.submit();
	document.hkom.reset();
}

function formularSendenLH(zieldatei) {
	document.landinfo.method='get';
	document.landinfo.action=zieldatei;
	document.landinfo.submit();
}

//funktionen für das hk_verzeichnis
/*function ChangeBland(bland){
	document.hkom.method='get';
	document.hkom.action='weiterleiten.php';
	document.hkom.submit();
	document.hkom.reset();

}*/
function ChangeBland(bland){
	switch(bland) {
	 case "1":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/bawu.php');
/*		document.hkom.method="post";
		document.hkom.action="bawu.php";
		document.hkom.submit();
*/
	 break;
	 case "2":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/baye.php');
	 break;
	 case "3":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/berl.php');
	 break;
	 case "4":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/brbu.php');
	 break;
	 case "5":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/brem.php');
	 break;
	 case "6":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/hamb.php');
	 break;
	 case "7":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/hess.php');
	 break;
	 case "8":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/mevo.php');
	 break;
	 case "9":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/nisa.php');
	 break;
	 case "10":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/nowe.php');
	 break;
	 case "11":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/rhpf.php');
	 break;
	 case "12":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/sala.php');
	 break;
	 case "13":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/sach.php');
	 break;
	 case "14":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/saan.php');
	 break;
	 case "15":
		formularSendenHK('scho.php');
	 break;
	 case "16":
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/thue.php');
	 break;
	 default:
		formularSendenHK('http://www.tis-gdv.de/tis/hk_verzeichnis/ort.php');
	 break;
	}
} 

function ChangeOrt(blandnr) {
	document.hkom.method='get';
	document.hkom.action='ort.php';
	document.hkom.submit();
	document.hkom.reset();

}
/*function ChangeOrt(blandnr){
	switch(blandnr) {
	 case "1":
		formularSendenHK('weiterleiten.php');*/
/*		document.hkom.method="post";
		document.hkom.action="bawu_ergebnis.php";
		document.hkom.submit();*/
/*	 break;
	 case "2":
		formularSendenHK('baye_ergebnis.php');
	 break;
	 case "3":
		formularSendenHK('berl_ergebnis.php');
	 break;
	 case "4":
		formularSendenHK('brbu_ergebnis.php');
	 break;
	 case "5":
		formularSendenHK('brem_ergebnis.php');
	 break;
	 case "6":
		formularSendenHK('hamb_ergebnis.php');
	 break;
	 case "7":
		formularSendenHK('hess_ergebnis.php');
	 break;
	 case "8":
		formularSendenHK('mevo_ergebnis.php');
	 break;
	 case "9":
		formularSendenHK('nisa_ergebnis.php');
	 break;
	 case "10":
		formularSendenHK('nowe_ergebnis.php');
	 break;
	 case "11":
		formularSendenHK('rhpf_ergebnis.php');
	 break;
	 case "12":
		formularSendenHK('sala_ergebnis.php');
	 break;
	 case "13":
		formularSendenHK('sach_ergebnis.php');
	 break;
	 case "14":
		formularSendenHK('saan_ergebnis.php');
	 break;
	 case "15":
		formularSendenHK('scho_ergebnis.php');
	 break;
	 case "16":
		formularSendenHK('thue_ergebnis.php');
	 break;*/
	 /*default:
		document.hkom.method="post";
		document.hkom.action="ort.php";
		document.hkom.submit();
	 break;*/
/*	}
}*/

//funktion für die länderinfos
function selectKontinent(kontinent){
	switch(kontinent) {
	 case "1":
		formularSendenLH('afri.php');
	 break;
	 case "2":
		formularSendenLH('asia.php');
	 break;
	 case "3":
		formularSendenLH('aust.php');
	 break;
	 case "4":
		formularSendenLH('euro.php');
	 break;
	 case "5":
		formularSendenLH('miam.php');
	 break;
	 case "6":
		formularSendenLH('noam.php');
	 break;
	 case "7":
		formularSendenLH('suam.php');
	 break;
	}
}

function formReset(){
	if (document.forms['hkom']){
		document.forms['hkom'].reset();
	}
	if (document.forms['landinfo']){
		document.forms['landinfo'].reset();
	}
}

function sendeVariable(){
	if(document.hkom.blandnr){
	
document.getElementById("deutschland_klein").setVariable("bland",document.hkom.blandnr.value)
	//alert(document.hkom.blandnr.value);
	}
}

function selectLand(land){
		document.landinfo.method="get";
		document.landinfo.action="lh_erg.php";
		document.landinfo.submit();
}

//Funktion zum Öffnen eines Extrafensters zum Vergrößern der Grafik mit php
function GrafikAnzeigen(GrafikURL, Breite, Hoehe)
{
	Fensteroptionen="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";

	Grafikfenster=window.open("", "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
	Grafikfenster.focus();
	Grafikfenster.document.open();
	with(Grafikfenster)
	{
		document.write("<html><head>");
		document.write("<title>Schadenverhütungstagung 2007</title>");
		document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"http://wcms2.ham.gdv.org/wcm/TIS_WWW_edit/TIS_WWW/tis/vorlagen/include/css/styles.css\" media=\"screen\">");
		document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"http://wcms2.ham.gdv.org/wcm/TIS_WWW_edit/TIS_WWW/tis/vorlagen/include/css/print_styles.css\" media=\"print\">");
		document.write("</head>");
		document.write("<body leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\">");
		document.write("<div align=\"center\"><img border=\"0\" src=\""+ GrafikURL +"\" title=\"Schadenverhütungstagung 2007\"><br><br>");
		document.write("<a href=\"javascript:window.close();\">[Fenster schlie&szlig;en]</a></div><br>");
		document.write("<img src=\"http://wcms2.ham.gdv.org/wcm/TIS_WWW_edit/TIS_WWW/tis/vorlagen/images/pfad_linie_verlauf.gif\" width=\"100%\" height=\"1\" alt=\"\" border=\"0\"><br>&copy; Gesamtverband der Deutschen Versicherungswirtschaft e. V. (GDV), <br>");
		document.write("Berlin 1999-2010, <a href=\"http://www.tis-gdv.de\" target=\"_blank\">www.tis-gdv.de</a>");
		document.write("</body></html>");
	}
	Grafikfenster.document.close();
}

//extra Druckseite generieren

function druckSeitenAufruf(url)
{
	//alert(url);
	//window.location.href =  "http://tis.gdv.org/tis/test/ajax/druckseite.php?druckseite=" + url;
	DruckFenster = window.open("http://www.tis-gdv.de/tis/vorlagen/include/php/druckseite.php?druckseite=" + url, "Druckseite", "width=600, menubar=yes, location=no, resizable=yes, scrollbars=yes");
	DruckFenster.focus();
	
}

// sitemap aktuellisieren

function Bereich_Suchen(Feld_id)
{
  var url = "http://www.tis-gdv.de/tis/vorlagen/include/php/sitemap.php?Feld_id="+Feld_id;

  if (Feld_id == 2)
  {
  foto_req = Site_Map_Object();
		  if(foto_req) 
			 {
  		   foto_req.onreadystatechange = foto_des_monats;
		   foto_req.open("GET", url, true);
		   foto_req.send(null);
		    }
   }
   else if (Feld_id == 0)
   {
   szr_req = Site_Map_Object();
		  if(szr_req) 
		 {
		 	szr_req.onreadystatechange = szr;
		   	szr_req.open("GET", url, true);
		   	szr_req.send(null);
		 }	
   
   }
   
}
function inhalt_b(bereich, req)
{
  if (req.readyState == 4) 
     if (req.status == 200) 
       document.getElementById(bereich).innerHTML = req.responseText; 
}

function szr()
{
  if (szr_req.readyState == 4) 
     if (szr_req.status == 200) 
       document.getElementById('b_szr').innerHTML = szr_req.responseText; 
}

function foto_des_monats()
{
  if (foto_req.readyState == 4) 
     if (foto_req.status == 200) 
       document.getElementById('b_foto_des_monats').innerHTML = foto_req.responseText; 
}

function Site_Map_Object() {
  var req = false;

  if(window.XMLHttpRequest) {
   try { 
   req = new XMLHttpRequest();
  } catch(e) {
  req = false;
  }

  } else if(window.ActiveXObject) {
    try {
   req = new ActiveXObject("Msxml2.XMLHTTP");
  } catch(e) {
  try {
   req = new ActiveXObject("Microsoft.XMLHTTP");
  } catch(e) {
   req = false;
    }
   } 
  }

return req;
}

 
function UrteilAufruf(urteil_url)
{
	var UrteilFenster = window.open(urteil_url, "TIS", "width=690, menubar=yes, location=no, resizable=yes, scrollbars=yes");
	UrteilFenster.focus();
}
function UrteilAufruf_taz(urteil_url,pos)
{
	var UrteilFenster;
	if (pos == 67)
		UrteilFenster = window.open("http://www.tis-gdv.de/tis/bedingungen/urteile/urteil_taz.php?urteil_id=" + urteil_url.substr(pos,urteil_url.length), "TIS", "width=690, menubar=yes, location=no, resizable=yes, scrollbars=yes");
		else
		UrteilFenster = window.open("http://www.tis-gdv.de/tis/bedingungen/urteile/urteil.php?urteil_id=" + urteil_url.substr(pos,urteil_url.length), "TIS", "width=690, menubar=yes, location=no, resizable=yes, scrollbars=yes");
	UrteilFenster.focus();
}
