function Stadtplanfenster(stadtplanurl)
	{
 	F1 = open(stadtplanurl,"Fenster1","width=780,height=580,screenX=0,screenY=0,hotkeys=no,locationbar=no,menubar=no,resizable=no,status=yes");
 	}

function openWin(datei,breite,hoehe)
	{
	fenster=eval('open(datei,"Win","height="+hoehe+",width="+breite+",resizable=no,scrollbars=no")');
	}


function szo_OpenBrWindow(theURL,winName,features) 
	{
  	SecondWin=window.open(theURL,winName,features);
	}

function szo_openbrwindow(theURL,winName,features) 
	{
  	window.open(theURL,winName,features);
	}


function szo_galerie(id,breite,hoehe)
	{
	window.open("http://www.sz-online.de/_tools/galerie/fotos.asp?artikel="+id,id,'scrollbars=yes,resizable=yes,width='+breite+',height='+hoehe);
	}


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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function LineBlur(x)
	{
 	if (document.all) x.blur();
	}

function AugustoPopup()
	{
	url="http://www.sz-online.de/werbung/augusto2002/anzeige.html"
	hoehe = 567
	breite = 394
	yPos = Math.ceil((screen.availHeight - hoehe)/2)-2;
	xPos = Math.ceil((screen.availWidth - breite)/2);
	F1 = open(url,"augusto","width="+breite+",height="+hoehe+",resizable=yes,scrollbars=no");
	F1.focus();
	F1.moveTo(xPos,yPos)
	}

function MM_OpenBrWindow(theURL,winName,features) 
	{
  	window.open(theURL,winName,features);
	}


function szo_ShowPrivacy() 
	{
	szo_OpenBrWindow('/wirueberuns/privacy.asp','privacy', 'width=700,height=480,screenX=50,screenY=20,hotkeys=no,locationbar=no,menubar=no,resizable=no,status=no,scrollbars=yes');
	}


function addEngine(name,ext,cat,pid)
{
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
    window.sidebar.addSearchEngine(
      "http://mycroft.mozdev.org/install.php/" + pid + "/" + name + ".src",
      "http://mycroft.mozdev.org/install.php/" + pid + "/" + name + "."+ ext, name, cat );
  } else {
    alert("You will need a browser which supports Sherlock to install this plugin.");
  }
}



function openUDJ()
    {
	var features;
    	var xPosition =(screen.width)/2-350;
    	var yPosition =(screen.height)/2-300;

    	features = 'width=700, height=600,'+ 'toolbar=0,'+ 'location=0,'+ 'status=0,'+ 'menubar=0,'+ 'scrollbars=0,'+ 'resizable=0';
    	features += ','+ 'screenx=' + xPosition + ',' + 'screeny=' + yPosition + ',' + 'left=' + xPosition + ',' + 'top=' + yPosition; //IE
    	window.open("http://www.neuwerk-agentur.de/projekte/udj/main.php","udjSite", features);
    	//self.location="danke.php";
    }




/*
######################################################################################
# szoAdCookieCheck()                                                                 #
# sorgt dafür, Popups etc. nur einmal je gewähltem Zeitintervall auszuliefern.       #
# Die Function braucht die beiden Funktionen szoGetCookie() und ## szoSetCookie()    #
#                                                                                    #
# Als HTML_AD ist dafür ein bissel JS auszuliefern:                                  #
# //Beginn HTML_AD                                                                   #
# function szoShowAd(actCampaign){                                                   #
#  	//hier wird definiert, was eigentlich passieren soll...                      #
# }                                                                                  #
# var Campaign = 'Campaign2';    //eindeutiger Name der Kampagne                     #
# var expRange = 0;             // Zeitintervall 0=Sekunden | 1=Minuten | 2=Tage     #
# var expTime = 10;             // Lebenszeit des Cookies in Sek. / Minuten / Tagen  #
# //don't touch anything below this line;)                                           #
# var expires = "";                                                                  #
# szoAdCookieCheck();                                                                #
# //Ende HTML_AD                                                                     #
######################################################################################
*/
function szoAdCookieCheck() {
var expires = new Date();	
	if (expRange == 0){
		expires.setTime(expires.getTime() + (expTime*1000));
		}
	else if (expRange == 1){
		//var expires = new Date();
		expires.setTime(expires.getTime() + (expTime*60000));
		}
	else if (expRange == 2){
		//var expires = new Date();
		expires.setTime(expires.getTime() + (expTime*86400000));
		}
	
	if (szoGetCookie(Campaign) == null){
		szoShowAd(Campaign)
		szoSetCookie(Campaign, Campaign, expires);
		}
	}


function szoSetCookie(name,value,expires) {
	if (!expires) 
		expires = new Date();
		document.cookie = name + '=' + escape(value) + '; expires=' + expires.toGMTString() + '; path=/';
	} 


function szoGetCookie(name) {
	var dcookie = document.cookie; 
	var cname = name + "="; 
	var clen = dcookie.length; 
	var cbegin = 0; 
	while (cbegin < clen) {
		var vbegin = cbegin + cname.length;
		if (dcookie.substring(cbegin, vbegin) == cname) {
			var vend = dcookie.indexOf (";", vbegin); 
			if (vend == -1) vend = clen; 
			return unescape(dcookie.substring(vbegin, vend));
			} 
		cbegin = dcookie.indexOf(" ", cbegin) + 1; 
		if (cbegin == 0) break;
		} 
	return null;} 


/*
######################################################################################
# szo_keymsgon(divid, ArticleID) und szo_keymsgoff(divid)                            #
# zeigen den Login-Layer auf Newsseiten an / verbergen ihn.                          #
#                                                                                    #
# Seiten muessen das Include \_tools\news\_loginlayer.inc enthalten.                 #
#                                                                                    #
######################################################################################
*/
var szo_keymsgflag = 0;
function szo_keymsgon(divid, ArticleID) {
	if (szo_keymsgflag==1){
		browserdimensionen('login_keymsgcont');
		document.forms.layerloginform.ArticleID.value=ArticleID;
		document.getElementById(divid).style.visibility = 'visible';
		}
	}

function szo_keymsgoff(divid) {
	document.getElementById(divid).style.visibility = 'hidden';
	}

function browserdimensionen(divid) {
	//*********** scrollhoehe & scrollbreite **********
		if (self.pageYOffset) // all except Explorer
		{
			scrollx = self.pageXOffset;
			scrolly = self.pageYOffset;
		}
		else if (document.documentElement && document.documentElement.scrollTop)
			// Explorer 6 Strict
		{
			scrollx = document.documentElement.scrollLeft;
			scrolly = document.documentElement.scrollTop;
		}
		else if (document.body) // all other Explorers
		{
			scrollx = document.body.scrollLeft;
			scrolly = document.body.scrollTop;
		}
		
	//*********** innerwidth & innerheight **********
		if (self.innerHeight) // all except Explorer
		{
			browserwidth = self.innerWidth;
			browserheight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			browserwidth = document.documentElement.clientWidth;
			browserheight = document.documentElement.clientHeight;
		}
		else if (document.body) // other Explorers
		{
			browserwidth = document.body.clientWidth;
			browserheight = document.body.clientHeight;
		}
	//window.status = scrolly + " width: " + browserwidth + " height: " + browserheight;
		//document.getElementById(divid).style.left = (browserwidth/2)-300+scrollx+'px';
		document.getElementById(divid).style.left = '165px';
		document.getElementById(divid).style.top = (browserheight/2)-200+scrolly+'px';
	window.setTimeout("browserdimensionen('"+divid+"')",10);
}


/*
######################################################################################
# ftvlaunch                                                                          #
# für das Videopopup                                                                 #
######################################################################################
*/
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 CenterPopup() {
var intPopupWidth
var intPopupHeight
//ermittelt die Größe eines Popups und die verfügbare Bildschirmauflösung
//zentriert das Popup
//die Funktion darf wegen IE erst nach Ende des Seitenladevorgangs aufgerufen werden
if (navigator.appName=="Microsoft Internet Explorer") {
	intPopupWidth = document.body.offsetWidth;
	intPopupHeight = document.body.offsetHeight;
	}
	else {
		intPopupWidth = window.innerWidth;
		intPopupHeight = window.innerHeight; 
		}
if (isNaN(intPopupWidth)||isNaN(intPopupHeight)) {
	intPopupWidth=640;
	intPopupHeight=480;
	self.resizeTo(intPopupWidth,intPopupHeight);
	}
//self.resizeTo(intPopupWidth*1, intPopupHeight*1);
self.moveTo((screen.width-intPopupWidth)/2,(screen.height-intPopupHeight)/2);
self.focus();
}


/*
######################################################################################
# ADOBE-SKRIPTE                                                                      #
# zum Einbinden von Flashs, die dann auch automatisch starten (IE7)                  #
######################################################################################
*/

//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
