// init funktion für allem möglichen schmarrn
function init()
{
	setGalleryTableHeight();
}

/* SETTINGS für wallpaper */
var adlWallPaperLeft = 990;
/* ENDE SETTINGS für wallpaper */



function machsuche () {

    document.newssuche.suchtext.value = "";
   // document.newssuche.mzsuchs.style.display="inline";
}


// Open new Window
function Neufenster(URL, name, newWidth, newHeight) {
        win=open(URL,name,'status=no,resizable=no,menubar=no,toolbar=no,resize=no,scrollbars=no,height=' + newHeight + ',width=' + newWidth);
        win.focus();
}


function openWindow(URL, name, newWidth, newHeight) {
        win=open(URL,name,'status=no,resizable=yes,menubar=no,toolbar=no,resize=yes,scrollbars=yes,height=' + newHeight + ',width=' + newWidth);
        win.self.focus();
}

function newscrollwin(url,wname,wheight,wwidth)
{
var windowtop = ((screen.height - wheight) /2) -20;
var windowleft = (screen.width - wwidth) /2;
var browserName=navigator.appName;
var browserVer=parseInt(navigator.appVersion);
if(browserName=="Netscape")
{
   if(browserVer>4)
   {
   wwidth=wwidth+15;
   wheight=wheight+5;
   }
}
wname=window.open(url+'\046dummy='+Math.random(),wname,"toolbar=0,width=" + wwidth  + ",height=" + wheight + ",location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0,left=" + windowleft + ",top=" + windowtop);
wname.focus();

}



function ChangeAnsichtBild(DerBildName) {
        document.images.AnsichtBild.src = DerBildName;
}

function bildtext(bildnr) {
if (document.all) document.all.bildtext.innerText = mzbildtext[bildnr]
else if (document.getElementById) document.getElementById("bildtext").firstChild.nodeValue = mzbildtext[bildnr]
else alert("Ihr Browser ist f&uuml;r solche tollen Seiten wie donau.de leider viel zu alt!");
}

 function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
} 

function ftvlaunch(video,quality,pid) {
	  var LeftPosition = (screen.width) ? (screen.width-665)/2 : 0;
	  var TopPosition = (screen.height) ? (screen.height-430)/2 : 0;
	  var popwin = window.open('http://www.zoomin.tv/videoplayer/index.cfm?id='+video+'&mode=normal&quality='+ quality +'&pid='+ pid,'MTV6_window','toolbar=no,width=665,height=430,top='+TopPosition+',left='+LeftPosition+',directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no');
      popwin.focus();
}

function VideoPopup(pid,pk) {
	  var LeftPosition = (screen.width) ? (screen.width-665)/2 : 0;
	  var TopPosition = (screen.height) ? (screen.height-430)/2 : 0;
	  var popwin = window.open('/_misc/videoplayer/videoplayer.cfm?pid=' + pid + '&pk=' + pk,'Videoplayer','toolbar=no,width=400,height=460,top='+TopPosition+',left='+LeftPosition+',directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no');
      popwin.focus();
}

function VideoPopupBig(pid,pk) {
	  var LeftPosition = (screen.width) ? (screen.width-665)/2 : 0;
	  var TopPosition = (screen.height) ? (screen.height-430)/2 : 0;
	  var popwin = window.open('/_misc/videoplayer/videoplayer_big.cfm?pid=' + pid + '&pk=' + pk,'Videoplayer','toolbar=no,width=560,height=610,top='+TopPosition+',left='+LeftPosition+',directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no');
      popwin.focus();
}

function VideoPopupMedium(pid,pk) {
	  var LeftPosition = (screen.width) ? (screen.width-665)/2 : 0;
	  var TopPosition = (screen.height) ? (screen.height-430)/2 : 0;
	  var popwin = window.open('/_misc/videoplayer/videoplayer_365x325.cfm?pid=' + pid + '&pk=' + pk,'Videoplayer','toolbar=no,width=400,height=500,top='+TopPosition+',left='+LeftPosition+',directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no');
      popwin.focus();
}


/* MS / Funktionen zum auslesen und setzn der Bildgröße bei Galerien */
function setGalleryTableHeight()
{ 	
	if(document.getElementById("InvisibleImage"))
	{
		var maxheight = document.getElementById("InvisibleImage").height;
		document.getElementById("DetailImageTable").height = maxheight;	
		document.getElementById("LoadingImage").style.display = 'none';
		document.getElementById("GalleryDetailImage").style.display = 'block';	
	}
}

/* mr / popupfunktion fuer adbuttons */
function openmzad(URL, name, newWidth, newHeight) {
    win=open(URL,name,'status=no,resizable=yes,menubar=no,toolbar=no,resize=yes,scrollbars=yes,height=' + newHeight + ',width=' + newWidth);
    win.self.focus();
}

/* MS / 08102008 / Funktion zum öffnen des Adcounter-Popups */
function openAdcounter() {
    //win=window.open('https://anzeigenannahme.mittelbayerische.de/AdCounter/se?objekt=MZ&refereroffice=http://www.donau.de','AdCounter',700,808);
	win=window.open('https://anzeigenannahme.mittelbayerische.de/AdCounter/se?objekt=MZ&refereroffice=http://www.donau.de','AdCounter','width=750,height=808');
    win.self.focus();
}

/* ST / 27-01.2010 / Funktion zum öffnen des PopUps beim Baby-Voting */
function PopupPic_Baby(pk, directory, name) {
        var win = window.open('/_misc/votings/detailpopup_baby.cfm?pk=' + pk + '&dir=' + directory + '&name=' + name, '_blank', 'width=616,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no');
		win.focus();
}

