function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function pop (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Pop','toolbar=1,location=0,status=0,menubar=1,resizable=no,scrollbars=1,height=503,width=650,top=0,left=0');
		mini.focus();
	}
	else{
		mini=window.open(a,'Pop','toolbar=1,location=0,status=0,menubar=1,resizable=no,scrollbars=1,height=485,width=661,top=0,left=0');
		mini.focus();
	}
}

function popExtern (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Pop','toolbar=1,location=1,status=0,menubar=0,resizable=yes,scrollbars=1');
		mini.focus();
	}
	else{
		mini=window.open(a,'Pop','toolbar=1,location=1,status=0,menubar=0,resizable=yes,scrollbars=1');
		mini.focus();
	}
}

function popMicro (a){
	if(navigator.appName.substring(0,8)=="Netscape"){
		mini=window.open(a,'Pop','toolbar=1,location=1,status=1,menubar=1,resizable=1,scrollbars=1,height=600,width=824,top=0,left=0');
		mini.focus();
	}
	else{
		var ua = navigator.userAgent.toLowerCase();
		if (ua.indexOf("msie 7") != -1) {
			mini=window.open(a,'Pop','toolbar=1,location=1,status=1,menubar=1,resizable=1,scrollbars=1,height=621,width=824,top=0,left=0');
			mini.focus();
		} else {
			mini=window.open(a,'Pop','toolbar=1,location=1,status=1,menubar=1,resizable=1,scrollbars=1,height=600,width=824,top=0,left=0');
			mini.focus();
		}
	}
}

function pulldownExtern(form,id) {
	var myindex = form[id].selectedIndex;
	form[id].selectedIndex = 0;
	var myurl=form[id].options[myindex].value;
	if(myurl.indexOf('extern=')!=-1){
		var tmp_array = myurl.split('extern=');
		myurl = tmp_array[1];
		popExtern(myurl);
	}else{
		location=myurl;
	}
}

function submitFahrplanauskunft(URL,URLextern,Abfahrt,Ziel,Datum,Uhrzeit,AnOderAb) {

	if(AnOderAb[0].checked==true){
		anab = "depart";
	}else{
		anab = "arrive";
	}

	newWin = window.open("","","");

	newWin.document.write("<html><head><title>Stadtwerke Potsdam GmbH<\/title><\/head>\n");
	newWin.document.write("<body>\n");

	newWin.document.write("<form id=\"FahrplanauskunftFormTmp\" action=\"" + URLextern + "\" method=\"post\">");

	newWin.document.write("<input type=\"hidden\" name=\"protocol\" value=\"http:\"/>\n");
	newWin.document.write("<input type=\"hidden\" name=\"filter\" value=\"ALL#0#0#0\"/>\n");
	newWin.document.write("<input type=\"hidden\" name=\"REQ0JourneyStopsSA1\" value=\"7\"/>\n");
	newWin.document.write("<input type=\"hidden\" name=\"REQ0JourneyStopsZA1\" value=\"7\"/>\n");
	newWin.document.write("<input type=\"hidden\" name=\"REQ0JourneyStopsSG1\" value=\"" + Abfahrt.value + "\" />\n");
	newWin.document.write("<input type=\"hidden\" name=\"REQ0JourneyStopsZG1\" value=\"" + Ziel.value + "\" />\n");
	newWin.document.write("<input type=\"hidden\" name=\"date\" value=\"" + Datum.value + "\" />\n");
	newWin.document.write("<input type=\"hidden\" name=\"time\" value=\"" + Uhrzeit.value + "\" />\n");
	newWin.document.write("<input type=\"hidden\" name=\"timesel\" value=\"" + anab + "\" />\n");

	newWin.document.write("<\/form>\n");

	newWin.document.write("Einen Moment Geduld bitte. Sie werden gleich weitergeleitet ...\n");

	newWin.document.write("<\/body><\/html>\n");
	newWin.document.getElementById('FahrplanauskunftFormTmp').submit();
	newWin.document.close();

	document.getElementById('FahrplanauskunftForm').action=URL;
}

function makeRemote(dateiname) {
remote = window.open("","remotewin",'toolbar=1,location=0,status=0,menubar=1,resizable=no,scrollbars=1,height=520,width=475,top=0,left=0');
remote.location.href = dateiname
if (remote.opener == null) remote.opener = window;
remote.opener.name = "opener";
}
function go(url) {
opener.location.href = url;
}

var i=0, sw=screen.width*80/100, sh=screen.height*100/100;
function resize() {
if (navigator.appName == 'Netscape') i=0;
nw = 70 + ((document.closeButton.width > document.articleImage.width) ? document.closeButton.width : document.articleImage.width);
nh = document.articleImage.height + 220 - i;
if(nw>sw) nw = sw;
if(nh>sh) nh = sh;
window.resizeTo(nw, nh);
nx = screen.width/2 - nw/2;
ny = screen.height/2 - nh/2;
window.moveTo(nx, ny);
}
function show (id)
{
  if (document.getElementById(id).style.visibility=="hidden"){
     document.getElementById(id).style.visibility="visible";
	 document.getElementById(id).style.position="relative";
  } else
  {
   document.getElementById(id).style.visibility="hidden";
   document.getElementById(id).style.position="absolute";
  }
}

//Imagemap
wmtt = null;

function showWMTT(id) {
	wmtt = document.getElementById(id);
	wmtt.style.display = "block";
}

function hideWMTT() {
	wmtt.style.display = "none";
}

//Imagemap 2
// Rechung erklärt
function swapin(EBENE,pos) {
	document.getElementById("L0").style.border = "1px solid #030303";
	document.getElementById("L0").style.marginTop = pos;
	document.getElementById("L0").innerHTML = document.getElementById("L"+EBENE).innerHTML;
}

function swapout() {
	document.getElementById("L0").style.border = "1px solid #FFF";
	document.getElementById("L0").style.marginTop = "0px";
	document.getElementById("L0").innerHTML = "";
}

