/*	Aktuelle XP Revision: $Revision: 1.2 $
	Letzte XP Aenderung am: $Date: 2006/01/11 15:25:37 $ GMT */
/* for the IE only workarounds */
var ie = (document.all) ? true : false;
/* to get rid of the pre-text in inputs */
/* needs two functions, if a ...... user enters the default Value... */
function onFocusCheckEntry(which, cont, colorChange) {
	if(cont !=  "dummy" && which.value == cont) {
		which.value = "";
	}
}

function onBlurCheckEntry(which, cont, colorChange) {
	if(cont !=  "dummy" && which.value == '') {
		which.value = cont;
	}
}

/* Opens a new Window */
var mediencenter = null;
function openWin() {
	if (mediencenter != null && mediencenter.closed == false) mediencenter.close();
	mediencenter = window.open("darsteller.html", "mediencenter", "");
	mediencenter.focus();
}

/*rr: barrierearme sendungsdropdowns incl. title mit ziel popup oder self*/
function dropdownpopup(formsendungauswahl) { 
 var myindex=formsendungauswahl.sendungsdropdown.selectedIndex; 
 if(document.getElementById('formsendungauswahl').sendungsdropdown.options[myindex].value !="0") {
  if (document.getElementById('formsendungauswahl').sendungsdropdown.options[myindex].title == "Externer Link") {
   window.open(formsendungauswahl.sendungsdropdown.options[myindex].value,target="","");
   }
 else {
  window.location.href=formsendungauswahl.sendungsdropdown.options[myindex].value;
  }
 }
}

function dropdownJJ(myform) { 
 var myindex=myform.list.selectedIndex; 
 if(myform.list.options[myindex].value !="0") {
  if (myform.list.options[myindex].title == "Externer Link") {
   window.open(myform.list.options[myindex].value,target="","");
   }
  else {
   window.location.href=myform.list.options[myindex].value;
   }
  }
}


/* ALTLASTEN */
this.window.name = "DasErste";

var dasErstePopupWin=0;
var dasErsteFlexiWin=0;
var dasErsteFlexiParamWin=0;
var dasErsteMediathekWin=0;

function DasErstePopup(tTarget,tWx,tWy) {
 if (dasErstePopupWin)
  if(!dasErstePopupWin.closed) 
   dasErstePopupWin.close();

 dasErstePopupWin=window.open(tTarget,"DasErstePopup","width="+tWx+",height="+tWy+""); 
 dasErstePopupWin.focus(); 
}

function DasErstePopup2(tTarget,tWx,tWy) {
 if (dasErstePopupWin)
  if(!dasErstePopupWin.closed) 
   dasErstePopupWin.close();

 dasErstePopupWin=window.open(tTarget,"DasErstePopup2","width="+tWx+",height="+tWy+""); 
 dasErstePopupWin.focus(); 
}

function DasErstePopupBrennpunkt(tTarget,tWx,tWy) {
 if (dasErstePopupWin)
  if(!dasErstePopupWin.closed) 
   dasErstePopupWin.close();

 dasErstePopupWin=window.open(tTarget,"DasErstePopupBrennpunkt","scrollbars=yes,width="+tWx+",height="+tWy+""); 
 dasErstePopupWin.focus(); 
}

function DasErstePopupscroll(tTarget,tWx,tWy) {
 if (dasErstePopupWin)
  if(!dasErstePopupWin.closed) 
   dasErstePopupWin.close();
 dasErstePopupWin=window.open(tTarget,"DasErstePopup","scrollbars=yes,width="+(Number(tWx)+1)+",height="+(Number(tWy)+1)+""); 
 dasErstePopupWin.focus(); 
}

function DasErsteFlexiPopup(tTarget,tName,tWx,tWy) {
 if (dasErsteFlexiWin)
  if(!dasErsteFlexiWin.closed) 
   dasErsteFlexiWin.close();

 dasErsteFlexiWin=window.open(tTarget,tName,"width="+tWx+",height="+tWy+""); 
 dasErsteFlexiWin.focus(); 
}

function DasErsteFlexiParamPopup(tTarget,tName,tWx,tWy,tParam) {
 if (dasErsteFlexiParamWin)
  if(!dasErsteFlexiParamWin.closed) 
   dasErsteFlexiParamWin.close();

 dasErsteFlexiParamWin=window.open(tTarget,tName,"width="+tWx+",height="+tWy+","+tParam+""); 
 dasErsteFlexiParamWin.focus(); 
}

function stopsubmit() {  
   if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
   else 
      {
      alert("Die Formular Daten wurden bereits verschickt. Vielen Dank!");
      return false;
      }
   }
   

function DasErstePopupMediathek(tTarget) {
// if (dasErsteMediathekWin)
//  if(!dasErsteMediathekWin.closed) 
//   dasErsteMediathekWin.close();
 dasErsteMediathekWin=window.open(tTarget,"daserstemediathek","scrollbars=yes,width=1024,height=768"); 
 dasErsteMediathekWin.focus(); 
}



//*** zoom function images ***/
var zoomed;
 zoomed = false;

function zoomin(normalbild, normalbildbreite, zoombild, zoombildbreite, bildnr) {
 
 var tvtippwrapperID;
 var tvtippimageID;
 var tvtipplupeID;

 ImgObjWrapperID	= "ImgObjWrapper" + bildnr;
 ImgObjImageID		= "ImgObjImage" + bildnr;
 ImgObjLupeID		= "ImgObjLupe" + bildnr;
 ImgObjLinkID		= "ImgObjLink" + bildnr;
 ImgObjLinkLupeID	= "ImgObjLinkLupe" + bildnr;

 if (!zoomed) {
 	zoomed = true;
	document.getElementById(ImgObjWrapperID).style.width = zoombildbreite + 'px';
	document.getElementById(ImgObjImageID).src = zoombild;
	document.getElementById(ImgObjLupeID).src = '/cmspix/icons/000000/icn_38.gif';
	document.getElementById(ImgObjLupeID).alt = 'Bild verkleinern';
	document.getElementById(ImgObjLinkID).title = 'Bild verkleinern';
	document.getElementById(ImgObjLinkLupeID).title = 'Bild verkleinern';
	} 
 else {
 	zoomed = false;
	document.getElementById(ImgObjWrapperID).style.width = normalbildbreite + 'px';
	document.getElementById(ImgObjImageID).src = normalbild;
	document.getElementById(ImgObjLupeID).src = '/cmspix/icons/000000/icn_10.gif';
	document.getElementById(ImgObjLupeID).alt = 'Bild vergrößern';
	document.getElementById(ImgObjLinkID).title = 'Bild vergrößern';
	document.getElementById(ImgObjLinkLupeID).title = 'Bild vergrößern';
	} 
}