﻿<!--

function RE_preloadImages(imagesStrArr) {
  imagesImgArr = new Array();
  for (counter in imagesStrArr) {
    imagesImgArr[counter] = new Image();
    imagesImgArr[counter].src = imagesStrArr[counter];
  }
}

function RE_changeFrameSource(sourceStr) {
  top.rubrikFrame.location.href = "/" + sourceStr + "/kopfleiste.htm";
  top.dokumentFrame.location.href = "/" + sourceStr + "/index.htm";
}

var winObj;

function RE_openBrWindowCentered(theURL,winName,width,height) {
  theURLStrArr = theURL.split("/")

  width = RE_openBrWindowCentered.arguments[2] ? RE_openBrWindowCentered.arguments[2] : 550;
  height = RE_openBrWindowCentered.arguments[3] ? RE_openBrWindowCentered.arguments[3] : 550;

  if (is_nav4up||is_opera) {
    middleX = Math.round((window.outerWidth/2) - (width/2)) + window.screenX;
    middleY = Math.round((window.outerHeight/2)- (height/2))+ window.screenX;
    str = 'width='+width+',height='+height+',screenX=' + middleX + ',screenY=' + middleY;
  }

  if (is_ie4up) {
    middleX= Math.round((top.document.body.clientWidth/2) - (width/2));
    middleY= Math.round((top.document.body.clientHeight/2) - (height/2));
    str = 'width='+width+',height='+height+',left=' + middleX + ',top=' + middleY;
  }

  winObj = window.open(theURL,winName,str);
    winObj.focus();
}

function RE_openBrWindowXY(theURL,winName,width,height,x,y) {
  if (is_nav4up||is_opera) {
    y += 130;
    str = 'width='+width+',height='+height+',screenX=' + x + ',screenY=' + y;
  }

  if (is_ie4up) {
    y += 100;
    str = 'width='+width+',height='+height+',left=' + x + ',top=' + y;
  }

  winObj = window.open(theURL,winName,str);
  winObj.focus();
}

function RE_openDetailViewCentered(source, wintitle, text, weite, hoehe) {

  weiteInt = weite;
  hoeheInt = hoehe;
  
  RE_openBrWindowCentered("","popupWin",weiteInt,hoeheInt);
  
 // with(eval(window.open("","popupWin")).document) {
  with(eval(winObj.document)) {
    write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
    write('<html><head><title>' + wintitle + '</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
    write('<meta http-equiv="imagetoolbar" content="no">');
    write('<link rel="stylesheet" type="text/css" href="../styles/stadtmuseum.css">');
    write('<scr'+'ipt language="JavaScript1.2" type="text/javascript">');
    write('var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0; var isMinNS6 = (isMinNS4 && navigator.userAgent.indexOf("Gecko")>=0) ? 1 : 0; var isMinIE4 = (document.all) ? 1 : 0; var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.")) >= 0 ? 1 : 0; var isDOM = (document.getElementById) ? 1 : 0;\n\n');
    write('function getLayer(name) { if (isDOM) return document.getElementById(name); if (isMinIE4) return eval("document.all." + name);  if (isMinNS4) return findLayer(name, document); return null;}\n\n function findLayer(name, doc) { var i, layer; for (i = 0; i < doc.layers.length; i++) { layer = doc.layers[i]; if (layer.name == name) return layer; if (layer.document.layers.length > 0) { layer = findLayer(name, layer.document); if (layer != null) return layer; } } return null;}\n\n');
    write('function hideLayer(layer) { layer = getLayer(layer); if (isMinIE4||isDOM) layer.style.visibility = "hidden"; if (isMinNS4)layer.visibility = "hide";}\n\n function showLayer(layer) { layer = getLayer(layer); if (isMinIE4||isDOM)layer.style.visibility = "visible"; if (isMinNS4) layer.visibility = "show";}\n\n');
    write('function setTop(layer, y) { layer = getLayer(layer); if (isDOM) layer.style.top = y + "px"; if (isMinIE4) layer.style.pixelTop = y; if (isMinNS4) layer.top = y;  return -1;}\n\n');
    write('function getHeight(layer) { layer = getLayer(layer); if (isDOM) { if (layer.style.height && (layer.style.height != "auto")) return(parseInt(layer.style.height)); else{ return(layer.offsetHeight); } } if (isMinIE4) { if (false && layer.style.pixelHeight) return(layer.style.pixelHeight); else return(layer.clientHeight); } if (isMinNS4) { if (layer.document.height) return(layer.document.height); else return(layer.clip.bottom - layer.clip.top); } return -1;}\n\n');
    write('function setEvent() { document.links[0].onmouseover=new Function("hoeheInt =' + hoeheInt + '; showGalleryAnnotation(hoeheInt)");}\n\n');
    write('var ieOpInt = 0; var opIdObj = 0;\n\n function incrementOpacity(){ if(ieOpInt <= 70){ ieOpInt += 7; if(isMinIE4) bildbeschreibungDiv.style.filter="alpha(opacity="+ieOpInt+")"; if(isMinNS6) getLayer("bildbeschreibungDiv").style.MozOpacity=ieOpInt/100; opIdObj = setTimeout("incrementOpacity()", 50); } if(ieOpInt > 70) { clearTimeout(opIdObj); ieOpInt = 70; }}\n\n function decrementOpacity(){ if(ieOpInt > 0){ ieOpInt -= 7; if(isMinIE4) bildbeschreibungDiv.style.filter="alpha(opacity="+ieOpInt+")"; if(isMinNS6) getLayer("bildbeschreibungDiv").style.MozOpacity=ieOpInt/100; opIdObj = setTimeout("decrementOpacity()", 50); } if(ieOpInt <= 0) { clearTimeout(opIdObj); ieOpInt = 0; }}\n\n function showGalleryAnnotation(hoehe) { if(isMinIE4) bildbeschreibungDiv.style.filter="Alpha(opacity=0)"; if(isMinNS6) getLayer("bildbeschreibungDiv").style.MozOpacity=0; setTop("bildbeschreibungDiv", hoehe - getHeight("bildbeschreibungDiv") - 10); showLayer("bildbeschreibungDiv"); incrementOpacity();}\n\n function hideGalleryAnnotation() { decrementOpacity(); if (document.layers) hideLayer("bildbeschreibungDiv");}');
    write('<\/scr'+'ipt>');
    write('</head><body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"');
    if (text != "")
      write(' onLoad="showGalleryAnnotation(' + hoeheInt + ');setEvent()"');
    write('>');
    write('<a href="javascript:void(0)"');
    if (text != "")   
      write(' onMouseOut="hideGalleryAnnotation()" onMouseMove="showGalleryAnnotation(' + hoeheInt + ')"');
    write('><img alt="" border="0" src="' + source + '" width="' + weite + '" height="' + hoehe + '" name="bildImg"></a>');
    write('<div id="bildbeschreibungDiv" style="position:absolute; left: 10px; top: 0px; z-index:1; visibility: hidden"><table width="' + (weite - 20) +'" border="0" cellspacing="0" cellpadding="5">');
    write('<tr><td bgcolor="#FFFFFF">' + text+ '</td></tr></table></div>');
    write('</body></html>');
    close();
  }
    // window.open("","popupWin").focus();
}

function RE_openQuickTime(source, wintitle, weite, hoehe) {
  weiteInt = weite;
  hoeheInt = hoehe;
  
  RE_openBrWindowCentered("","popupWin",weiteInt,hoeheInt);

  with(eval(winObj.document)) {
    write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
    write('<html><head><title>' + wintitle + '</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
    write('<meta http-equiv="imagetoolbar" content="no">');
    write('</head><body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"');
	
	write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"');
	write('codebase="http://www.apple.com/qtactivex/qtplugin.cab"');
	write('  width="' + weiteInt + '" height="' + hoeheInt + '" >');
	write('  <param name="src" value="' + source + '">');
	for(i=4;i<arguments.length;i+=3) {
	  write('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	write('<embed width="' + weiteInt + '" height="' + hoeheInt + '"');
	write('	pluginspage="http://www.apple.com/quicktime/download/"');
	write('	type="video/quicktime"');
	write('	src="' + source + '"');
	for(i=3;i<arguments.length;i+=2) {
	  write('  ' + arguments[i] + '="' + arguments[i+1] + '"');
	}
	write('	/>');
	write('</object>');	
    write('</body></html>');
    close();
  }
}


function RE_submitSwitch(formStr) {

 // alert(formStr);

  formularFrm = getForm(formStr);

  if(RE_submitSwitch.arguments[1])
    formularFrm.target = RE_submitSwitch.arguments[1];

  for(i=2; i<RE_submitSwitch.arguments.length; i+=2)
    formularFrm.elements[RE_submitSwitch.arguments[i]].value = RE_submitSwitch.arguments[i+1];

  formularFrm.submit();
}

function RE_displayOpenerStatusMsg(msgStr) {
  window.parent.opener.status=msgStr;
  document.MM_returnValue = true;
}

function RE_openFromPopup(theURL, loc) {
     if (loc == 1) theURL = "../" + theURL;
     window.opener.location.href=theURL;
     window.opener.focus();
     self.close();
}

function RE_setFocus() {
  i = 0;
  while (document.forms[0].elements[i].value.length > 0) {
    ++i;
  }
  document.forms[0].elements[i].focus();
}


function RE_getDocumentInfo(e) {
  if(getLayer("popupKontaktDiv")) {
    if((e.modifiers & Event.SHIFT_MASK) && (e.modifiers & Event.CONTROL_MASK) && (e.modifiers & Event.ALT_MASK)) {
      alert("Popup-Informationen\n--------------------------\n\nHöhe: " + getHeight("popupKontaktDiv") );
    }
  }
}

if(document.captureEvents) {
  document.captureEvents(Event.MOUSEDOWN);
  document.onmousedown = RE_getDocumentInfo;
}

// -->