
var imgName;
function subLinkPicChange(imgName){
		parent.head.document.images[0].src = imgName;
}
function setCookie(cookName,cookWert){
	document.cookie = cookName + "=" +escape(cookWert);
	setTimeout("parent.location.href='index.php'", 200);
}
function getCookie(){
	i = 6;
	j = 16;
	alert(document.cookie.substring(i,j));
}
var Swidth;
var pos_left;
function Layerformat(){
 if(navigator.appName.charAt(1)== 'i'){
  Swidth = document.body.offsetWidth;
  pos_left = (Swidth - 705)/2;
  pos_top = 184;
  pos_top1 = 52;
 }else{
  Swidth = window.innerWidth;
  pos_left = (Swidth - 705)/2;
  pos_top = 194;
  pos_top1 = 62;
 } 
}

function PrintFenster(URL) {
 MeinFenster =
 window.open(URL, "Printfenster", "width=460,height=580, scrollbars, menubar");
}
function KarteFenster() {
 einFenster =
 window.open("karte.php", "Bildfenster", "width=600,height=591");
}
function AdminFenster(url) {
 einFenster =
 window.open(url, "Bildfenster", "width=850,height=480");
}
function AdminFenster1(url) {
 einFenster =
 window.open(url, "Bildfenster", "width=1024,height=768");
}
function AdminFenster2(url) {
 einFenster =
 window.open(url, "Bildfenster", "resizable=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,width=1024, height=768");
}
function SetNewsLayer(){
	if(navigator.appName=='Netscape'){
		Hwindow = document.body.offsetHeight;
		Wwindow = document.body.offsetWidth;
	//	alert (Hwindow);
		PosNewTop= (Hwindow-470)/2+386;
		PosNewLeft=(Wwindow-958)/2+390;
		document.getElementById("divNewsCont").style.top = PosNewTop;
		document.getElementById("divNewsCont").style.left = PosNewLeft;
		//window.onresize = window.history.go(0);
	}
	if(navigator.appName=="Microsoft Internet Explorer"){
		document.getElementById("divNewsCont").style.top = PosNewTop;
		document.getElementById("divNewsCont").style.left = PosNewLeft;
	}
	if(navigator.appName=='Opera'){
		Hwindow = document.body.offsetHeight;
		Wwindow = document.body.offsetWidth;
	//	alert (Hwindow);
		PosNewTop= (Hwindow-470)/2+386;
		PosNewLeft=(Wwindow-958)/2+390;
		document.getElementById("divNewsCont").style.top = PosNewTop;
		document.getElementById("divNewsCont").style.left = PosNewLeft;
		//window.onresize = window.history.go(0);
	}
	if(navigator.appName=='Safari'){
		Hwindow = document.body.offsetHeight;
		Wwindow = document.body.offsetWidth;
	//	alert (Hwindow);
		PosNewTop= (Hwindow-470)/2+386;
		PosNewLeft=(Wwindow-958)/2+390;
		document.getElementById("divNewsCont").style.top = PosNewTop;
		document.getElementById("divNewsCont").style.left = PosNewLeft;
		//window.onresize = window.history.go(0);
	}
	//alert(navigator.appName);
}
	function zeigetext(module){
			var beschreibung;
			//alert(document.getElementById(module).value);
			beschreibung=document.getElementById(module).value;
			document.getElementById("modulbeschreibung").value=beschreibung;
		}
function SetNewsLayer1(){
	if(navigator.appName=='Netscape'){
		Hwindow = document.body.offsetHeight;
		Wwindow = document.body.offsetWidth;
	//	alert (Hwindow);
		PosNewTop= (Hwindow-470)/2-65;
		PosNewLeft=(Wwindow-458)/2-265;
		document.getElementById("divNewsCont").style.top = PosNewTop;
		document.getElementById("divNewsCont").style.left = PosNewLeft;
		//window.onresize = window.history.go(0);
	}
	if(navigator.appName=='Opera'){
		Hwindow = document.body.offsetHeight;
		Wwindow = document.body.offsetWidth;
	//	alert (Hwindow);
		PosNewTop= (Hwindow-470)/2+5;
		PosNewLeft=(Wwindow-458)/2+445;
		document.getElementById("divNewsCont").style.top = PosNewTop;
		document.getElementById("divNewsCont").style.left = PosNewLeft;
		//window.onresize = window.history.go(0);
	}
	alert
}
function SetUmfrageLayer(){
		Hwindow = document.body.offsetHeight;
		Wwindow = document.body.offsetWidth;
	//	alert (Hwindow);
		PosNewTop= (Hwindow-470)/2+248;
		PosNewLeft=(Wwindow-958)/2+737;
		//window.onresize = window.history.go(0);
		//alert(navigator.appName);
		if(navigator.appName=="Netscape"){
			PosNewTop= (Hwindow-470)/2+257;
			PosNewLeft=(Wwindow-958)/2+755;
		
		}
		document.getElementById("umfrage").style.top = PosNewTop;
		document.getElementById("umfrage").style.left = PosNewLeft;
}
function setLayerBundpol1(type){
		document.getElementById("div_pdf").style.visibility = "hidden";
		document.getElementById("div_url").style.visibility = "visible";
}
function setLayerBundpol(type){
		document.getElementById("div_url").style.visibility = "hidden";
		document.getElementById("div_pdf").style.visibility = "visible";
}
function gotoURL (Ziel) {
  window.location.href = Ziel;
}
function hideorshow_archivtyp(divid, formid){
	if(document.getElementById(formid).value=="neu"){
		document.getElementById(divid).style.visibility = 'hidden';
	}else{
		document.getElementById(divid).style.visibility = 'visible';
	}
}
function hideorshow_seitenlimit(divid,divid1, formid){
	if(document.getElementById(formid).value=="archiv"){
		document.getElementById(divid).style.visibility = 'visible';
		document.getElementById(divid1).style.visibility = 'hidden';
		document.getElementById(divid1).value = '';
	}else{
		document.getElementById(divid).style.visibility = 'hidden';
		document.getElementById(divid).value = '';
		document.getElementById(divid1).style.visibility = 'visible';
	}
}

function hideorshow_archivtyp(divid,divid1, formid){
	if(document.getElementById(formid).value=="titelundbild"  || document.getElementById(formid).value=="titelanriss350Bild"){
		document.getElementById(divid).style.visibility = 'visible';
		document.getElementById(divid1).style.visibility = 'visible';
	}else{
		document.getElementById(divid).style.visibility = 'hidden';
		document.getElementById(divid1).style.visibility = 'hidden';
	}
}
function SetVerteiler(email, tagid){
	var emailliste;
	email = email+", ";
	emailliste= document.getElementById('vadressen').value;
	
	if(document.getElementById(tagid).checked==true){
		emailliste=emailliste.replace(email,"");
		document.getElementById('vadressen').value =emailliste;
		document.getElementById('vadressen').value +=email;
	}else{
		alert("zu entfernen "+ email);
		emailliste=emailliste.replace(email,"");
		document.getElementById('vadressen').value =emailliste;
		//alert("liste nach entfernen "+emailliste);
	}
}
function SetAlle(){
	var anzahl=document.getElementById('anzahl').value;
	var emailt;
	var i;
	var tagid;
	for(i=1;i<=anzahl;i++){
		document.getElementById(i).checked=true;
		emailt=document.getElementById(i).value;
		tagid=i;
		SetVerteiler(emailt,tagid);
	}
	document.getElementById('alleaus').checked=false;
}
function SetAusAlle(){
	var anzahl=document.getElementById('anzahl').value;
	alert(anzahl);
	var email;
	var i;
	var tagid;
	for(i=1;i<=anzahl;i++){
		document.getElementById(i).checked=false;
		email=document.getElementById(i).value;
		tagid=i;
		SetVerteiler(email,tagid);
	}
	document.getElementById('alle').checked=false;
}
function checkfile(){
		alert("test");
		alert(document.getElementById("hideimageform").value);
			var posfolder=document.getElementById("hideimageform").value.lastIndexOf("\\")+1;
			var pathlength=document.getElementById("hideimageform").value.length;
		alert(posfolder);
			var filename= document.getElementById("hideimageform").value.substring(posfolder, pathlength);
			document.getElementById("imagefilenameform").value=filename;
}
function hideandset_contentarchiv(){
	if(document.getElementById("contentarchivrad2").value=="ct_contentarchiv"){
		alert("Dieses Modul ist nur für die Spalte 2 (Contentbereich) vorgesehen");
		document.getElementById("po_spalte").value=2;
		document.getElementById("po_spalte").style.visbility='hidden';
		document.getElementById("contentarchivrad2").checked='true';
		document.getElementById("contentarchivrad1").checked='true';
	}
}
function doubleselect(id1,id2){
		//document.getElementById("po_spalte").value=2;
		//document.getElementById("po_spalte").style.visbility='hidden';
		//document.getElementById("contentarchivrad2").checked='true';
		//document.getElementById("contentarchivrad1").checked='true';
		document.getElementById(id1).checked='true';
		document.getElementById(id2).checked='true';

}
function SetSiteHeight(subnavi){
	Hwindow = document.body.offsetHeight;
	if (subnavi=="yes"){
		contenthoehe=Hwindow-169;
	}else{
		contenthoehe=Hwindow-147;
	}
	if(navigator.appName=='Netscape'){
		contenthoehe=Hwindow-143;
		document.getElementById("skaler").height = contenthoehe;
	}
	if(navigator.appName=="Microsoft Internet Explorer"){
		document.getElementById("skaler").style.height = contenthoehe;
	}
	if(navigator.appName=='Opera'){
		document.getElementById("skaler").style.height = contenthoehe;
		//window.onresize = window.history.go(0);
	}
	if(navigator.appName=='Safari'){
		document.getElementById("contentpart").style.height = contenthoehe;
		//window.onresize = window.history.go(0);
	}
	//alert(contenthoehe);
}
		//-->
