// Version 2.04 vom 28.02.2003
// Freigabe derzeit nur für Reports

var NS4, IE4;
var WIW, WIH;
var E1, E2, E4, E5, E7, E8;
var R1, R2, R4, R5, R7, R8;
var S1, S2, S3, S4, S5, S6, S7, S8, S9;

function elan() 	// Elementanmeldung
{
//alert("top=" + top.location.href + "  location.href=" + location.href );

// Wenn aktuelle Seite die Oberste ist (also nicht im Frame)
if (top.location.href == location.href){
	defaults_uebernehmen();
	//alert("E4=" + E4);
	pos = location.href.indexOf("?"); // position an der das Fragezeichen steht
	if (pos != -1){		// wenn ein Fragezeichen vorhanden
		file = location.href.substring(0, pos);
		file = file.substring((file.lastIndexOf("/")+1),pos);
		sest = location.href.substring((pos+1), location.href.length); // Den Searchstring abtrennen
		searchstring_analyse(sest);
	}

	else{ // Wenn ein KEIN Fragezeichen vorhanden
		file = location.href.substring((location.href.lastIndexOf("/")+1),location.href.length);
		//file = location.href.pathname ;
		sest = null; //Searchstring expliziet auf Null setzen
	}	

	pos = E1.lastIndexOf("/");
	if (pos != -1){
		E1file = E1.substring((pos+1),E1.length);
	}
	else{
		E1file=E1;
	}
	//alert("locationfile =" + file + "    E1-file=" + E1file);
	if (file != E1file){
		//alert("DE7=" + DE7 + " E7=" + E7 +" Aufruf der neue URL=" + E1 + "    search=" + searchstring_erstellen());
		// eigentlich müsste erst nachgeschaut werden, ob ein searchstingexistiert der eien Framesetinfo enthält (ist aber praktischer unsinn)
		window.location.href = E1 + searchstring_erstellen();
		//break
		//alert("gfdsdasdsfss");
		//return false;
	}
}
//return true;
}


function defaults_uebernehmen()
{
//if (R2 == null) {alert("R2 ist null")};	
//if (DE6 == null) {alert("DE6 ist null")};
if (typeof(DE1) != "undefined") {E1=DE1}
if (typeof(DE2) != "undefined") {E2=DE2}
if (typeof(DE4) != "undefined") {E4=DE4}
if (typeof(DE5) != "undefined") {E5=DE5}
if (typeof(DE7) != "undefined") {E7=DE7}
if (typeof(DE8) != "undefined") {E8=DE8}
if (typeof(DR1) != "undefined") {R1=DR1}
if (typeof(DR2) != "undefined") {R2=DR2}
if (typeof(DS1) != "undefined") {S1=DS1}
if (typeof(DS2) != "undefined") {S2=DS2}
if (typeof(DS3) != "undefined") {S3=DS3}
if (typeof(DS4) != "undefined") {S4=DS4}
if (typeof(DS5) != "undefined") {S5=DS5}
if (typeof(DS6) != "undefined") {S6=DS6}
if (typeof(DS7) != "undefined") {S7=DS7}
if (typeof(DS8) != "undefined") {S8=DS8}
if (typeof(DS9) != "undefined") {S9=DS9}
}


function searchstring_erstellen()        //erstellt aus den Runtime-Variablen einen seak-string
{
var sest = "";
//if (E1) {sest+=("&E1="+E1)}
//if (E2 && E2 != DE2) {sest+=("&E2="+E2)}
//if (E4 && E4 != DE4) {sest+=("&E4="+E4)}
//if (E5 && E5 != DE5) {sest+=("&E5="+E5)}
//if (E7 && E7 != DE7) {sest+=("&E7="+E7)}
//if (E8 && E8 != DE8) {sest+=("&E8="+E8)}
//if (R1 && R1 != DR1) {sest+=("&R1="+R1)}
//if (R2 && R2 != DR2) {sest+=("&R2="+R2)}
// wenn 
if (E2) {sest+=("&E2="+E2)}
if (E4) {sest+=("&E4="+E4)}
if (E5) {sest+=("&E5="+E5)}
if (E7) {sest+=("&E7="+E7)}
if (E8) {sest+=("&E8="+E8)}
if (R1) {sest+=("&R1="+R1)}
if (R2) {sest+=("&R2="+R2)}

if (S1) {sest+=("&S1="+S1)}
if (S2) {sest+=("&S2="+S2)}
if (S3) {sest+=("&S3="+S3)}
if (S4) {sest+=("&S4="+S4)}
if (S5) {sest+=("&S5="+S5)}
if (S6) {sest+=("&S6="+S6)}
if (S7) {sest+=("&S7="+S7)}
if (S8) {sest+=("&S8="+S8)}
if (S9) {sest+=("&S9="+S9)}
if (sest) {sest = ("?" + sest.substr(1,sest.length))};
return sest;
}



function searchstring_analyse(sest)     //Wertet den übergebene search-string aus und schreibt die runtime-Variablen
{
var pos;        // Position innerhalb eines Strings     
var zuw;        //Zuweisung (String)
while(sest.length > 2) {
pos = sest.indexOf("&");
if (pos >= 0) {
zuw = sest.substring(0,pos);
sest = sest.substring((pos + 1),sest.length);
}
else{
zuw = sest ;
sest = "";
}
eval(zuw.substring(0,2) + " = \"" + zuw.substring(3,zuw.length) + "\"");
}
}


function g2c(cn)	// go to content, wechselt den Contentframe in dem vorhandenen Frameset aus.
{
// läd ein neues Content-Element, durch refresh des aktuellen Frames (Top-Element) dadurch erscheint der neue search-string 
if(cn != ""){
	URL = top.location.href;
	pos = URL.indexOf("?");
	if (pos != '-1'){
		URL = URL.substring(0, pos);
	}

	if (cn == '../index.html'){
		window.location.href = ('../index.html');
		//window.location.href = ('../index.html') + searchstring_erstellen();
	}
	else {
		E7=cn;
		window.location.href = URL + searchstring_erstellen();
	}
}
}


function g2r(cn) 	//go to return, läd ein neues Return-Topelement1
{
tg=R1;
R1=null;
E4=null;
E7=cn;
//alert (tg + searchstring_erstellen());
window.location.href = tg + searchstring_erstellen();
}


function pc(pp)		// läd eine neue Bildseite. Durch refresh des aktuellen Frames (Top-Element), dadurch erscheint der neue search-string 
{
E7=pp;
E4=null;
URL = "../rimfrmp.html";
window.location.href = URL + searchstring_erstellen();
}


function Servicewechsel(tg, con)	//läd einen neuen Frameset mit neuem Content
{
if(tg != ""){
E1=tg;
E7=con;
window.location.href = tg + searchstring_erstellen();
}
}


function navi_pos(po)	//Navigation positionieren, Neuladen des Frames mit neuem Wert für die Navigationsleistenposition
{
URL = top.location.href;
pos = URL.indexOf("?");
if (pos != '-1'){ // Wenn es einen Suchstring gibt
	URL = URL.substring(0, pos);
}
E7 = confra.location.href // aktuelle Contentseite in Variable E7 Schreiben 
S1 = po; // positionierung der Navigationsleiste ändern
window.location.href = URL + searchstring_erstellen();
}



function mk_rimfrmset()
{
if (S1 == "1") {
document.write("<frameset cols='150,*' border=0 frameborder=0 framespacing=0 onResize='NeuLaden()'>");
document.write("<frame src='" + E4 + "#BottomOfPage' name=NaviFenster scrolling=auto noresize marginwidth=8 marginheight=0>");
document.write("<frame src='" + E7 + "' name=confra marginwidth=9 marginheight=0>");
}
else {
if (S1 == "3") {
document.write("<frameset rows='*,80' onResize='NeuLaden()'>");
document.write("<frame src='" + E7 + "' name=confra>");
document.write("<frame src='" + E5 + "' name=NaviFenster scrolling=auto noresize>");
}
else {
if (S1 == "2") {
document.write("<frameset rows='80,*' onResize='NeuLaden()'>");
document.write("<frame src='" + E5 + "' name=NaviFenster scrolling=auto noresize>");
document.write("<frame src='" + E7 + "' name='confra'>");
}
else {
document.write("<frameset cols='*,150' border=0 onResize='NeuLaden()'>");
document.write("<frame src='" + E7 + "' name=confra marginwidth=9 marginheight=0>");
document.write("<frame src='" + top.E4 + "#BottomOfPage' name=NaviFenster scrolling=auto noresize marginwidth=8 marginheight=0>");
}
}
}
document.write("</frameset>");
}


function mk_dicfrmset()
{
document.write("<frameset rows='80,*' onResize='NeuLaden()'>");
document.write("<frame src='" + E5 + "' name=NaviFenster scrolling=auto noresize>");
document.write("<frame src='" + E7 + "' name=confra>");
document.write("</frameset>");
}



function NeuLaden(){
confra.location.reload()
}


function serien_style(st)
{
if(STEN == 1)
{
S2=st;
URL = top.location.href;
pos = URL.indexOf("?");
if (pos != '-1'){
URL = URL.substring(0, pos);
}
window.location.href = URL + searchstring_erstellen();
}
}


function mk_picfrmset()
{
document.write("<frameset rows='*,40' border=0 frameborder=0 framespacing=0>");
document.write("<frame src=" + E7 + " name=confra>");
document.write("<frame src=" + self.E4 + " name=NaviFenster scrolling=no noresize>");
document.write("</frameset>");
}


function ladekontrolle()
{
// "complete" wird nur vom IE richtig verarbeitet
if(zweitbild.complete == true) {
bild.src = zweitbild.src;
}
else {
window.setTimeout("ladekontrolle()",500);
}}


function popupsummary(report)  // öffnet ein Popupfenster für Detaiinformationen, wird in der Report-Übersichtsseite verwendet 
{
HF1=window.open("./popup/" + report, "popupsummary", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=330,height=400");
HF1.focus();
}


// alte Funktionen---------------------------------------------------------

function btest()	//Brosertest
{
NS4=false;
IE4=false;
BN=navigator.appName;
BV=parseInt(navigator.appVersion);

if(BN == "Netscape" && BV>=4) {
NS4=true;
}
else {
if(BN == "Microsoft Internet Explorer" && BV>=4) {
IE4=true;
}
}
}

function btest_old()	//Brosertest old
{
BV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(BV>=4))?true:false;
}


function wsize()
{
if(NS4){ 
WIW = window.innerWidth;
WIH = window.innerHeight;
}
else {
if(IE4){
//Der IE legt sich hier auf die Fresse
//IW = document.body.clientWidth;
//WIH = document.body.clientHeight;
WIW = 800;
WIH = 500;
}
else{
WIW = 800;
WIH = 500;
}
}
VPOS = (PICWID - WIW) / 2;
HPOS = (PICHEI - WIH) / 2;
}


function copyright(e)
{
CRM ="Die Bilder sind Urheberrechtlich geschützt. © All rightsreserved.";
if (document.all) {if (event.button == 2)
{alert(CRM); return false;}}if (document.layers) {if (e.which == 3) {alert(CRM);
return false;}}
}


function manage_pagesize()	//
{
if(NS4){
WIW = window.innerWidth;
}
else{
if(IE4){
WIW = document.body.clientWidth;
}
else{
WIW = 570;
}
}
if (top.S2==1){
SPBR=136;
}
else{
SPBR=274;
}
SPA = Math.floor(WIW / (SPBR + 6));
if (SPA == 0){
SPA = 1;
}
}





function make_pic_entry() // Einträge in Bildserienübersichtsseiten
{
var LCC = 1;
PICDES="<P ALIGN=justify><span ID=TX1>" + PICDES + "</span></P>";
DESTAB1="<TABLE WIDTH=274 BORDER=1 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH='11%' VALIGN=top ALIGN=center><span ID=TX2>Bild</span></TD><TD WIDTH='42%' VALIGN=top ALIGN=center><span ID=TX2><A HREF=\"JAVASCRIPT:top.pc('" + PICPAG + "');\" name=" + PICNO + "><B>" + PICNO + "</B></A>&nbsp;&nbsp;(" + PICSIZ + "&nbsp;Kb)</span></TD>";

DESTAB3= "</TR>";

if (PICLOC != "") {
DESTAB3=DESTAB3 + "<TR><TD VALIGN=TOP ALIGN=CENTER><span ID=TX2>Ort</span></TD><TD VALIGN=top ALIGN=center><span ID=TX2>" + PICLOC + "</span></TD></TR>";
LCC++;
}

if (LOCO != "") {
DESTAB3=DESTAB3 + "<TR><TD VALIGN=TOP ALIGN=CENTER><span ID=TX2>Tfz.</span></TD><TD VALIGN=top ALIGN=center><span ID=TX2>" + LOCO + "</span></TD></TR>";
LCC++;
}

if (PICDAT != "") {
DESTAB3=DESTAB3 + "<TR><TD VALIGN=top ALIGN=center><span ID=TX2>Datum</span></TD><TD VALIGN=top ALIGN=center><span ID=TX2>" + PICDAT +"</span></TD></TR>";
LCC++;
}


if (PICAUT != "") {
DESTAB3=DESTAB3 + "<TR><TD VALIGN=top ALIGN=center><span ID=TX2>Autor</span></TD><TD VALIGN=top ALIGN=center><span ID=TX2>";
if (AUTREF == ""){
DESTAB3=DESTAB3 + PICAUT;
}
else{
DESTAB3=DESTAB3 + "<A HREF='../authors/authorspage_de.html#" + AUTREF + "' target='_top'>" + PICAUT + "</A>";
}
DESTAB3=DESTAB3 + "</span></TD></TR>";
LCC++;
}


if (PICCOL != "") {
DESTAB3=DESTAB3 + "<TD VALIGN=top ALIGN=center><span ID=TX2>Slg.</span></TD><TD VALIGN=top ALIGN=center><span ID=TX2>";
if (COLREF == ""){
DESTAB3=DESTAB3 + PICCOL;
}
else {
DESTAB3=DESTAB3 + "<A HREF='../authors/authorspage_de.html#" + COLREF + "' target='_top'>" + PICCOL + "</A>";
}
DESTAB3=DESTAB3 + "</span></TD></TR>";
LCC++;
}

DESTAB3=DESTAB3 + "</TABLE>";


DESTAB2="<TD WIDTH=130 ROWSPAN=" + LCC + " VALIGN=top ALIGN=center><A HREF=\"JAVASCRIPT:top.pc('" + PICPAG + "');\" name=" + PICNO + "><IMG SRC='" + THUMB + "' WIDTH=" + TMBWID + " HEIGHT=" + TMBHEI + " ALIGN=right HSPACE=0 VSPACE=0></A></TD>";


document.write("<TD WIDTH=" + SPBR + " ALIGN=left VALIGN=top>");
//Nur Bild
if (top.S2 == "1"){
document.write("<A HREF=\"JAVASCRIPT:top.pc('" + PICPAG + "');\" name=" + PICNO + "><IMG SRC='" + THUMB + "' WIDTH=130 HEIGHT=91 ALIGN=right HSPACE=0 VSPACE=0></A>");
}
else{
//Nur Text
if (top.S2 == "2"){
document.write(DESTAB1 + DESTAB3 + "<CENTER><TABLE WIDTH='95%' BORDER=0 CELLPADDING=0><TR><TD><A HREF=\"JAVASCRIPT:top.pc('" + PICPAG + "');\" name=" + PICNO + ">" + PICDES + "</A></TD></TR></TABLE></CENTER>");
}
else{
// Bild und Text
if (top.S2 == "0"){
document.write(DESTAB1 + DESTAB2 + DESTAB3 + "<CENTER><TABLE WIDTH='95%' BORDER=0 CELLPADDING=0><TR><TD>" + PICDES + "</TD></TR></TABLE></CENTER>");
}
}
}
document.write("</TD>");
if (ZAE == SPA){
ZAE = 1;
document.write('</TR></TABLE>');
document.write('<hr><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0><TR>');
}
else{
ZAE ++ ;
}
}