function BildBox(BildName,BildBreit,BildHoch,BildText,Rand,Farbe,Gross) {
	var Adj = 0;
	var Breit = screen.availWidth - Adj;
	var Hoch  = screen.availHeight - Adj - Adj;
	var Faktor_b = 1;
	var Faktor_h = 1;
	var posLeft  = 0;
	var posTop   = 0;
	var Scroll   = "auto";

	if (BildBreit == "") {BildBreit = Breit;}
	if (BildHoch  == "") {BildHoch  = Hoch;}
	if (BildText  == "") {BildText  = BildName;}
	if (Farbe == "") {Farbe = "white";}
	if (Rand  == "") {Rand  = 0;}
	if (Gross == "") {Gross = 0;}

	if (Gross == 0) {

	  if (BildBreit > screen.availWidth) {
	    Faktor_b  = Breit / BildBreit;
	  }

	  if (BildHoch > screen.availHeight) {
	    Faktor_h  = Hoch / BildHoch;
	  }

	  if (Faktor_b > Faktor_h) {
	      BildHoch  = BildHoch * Faktor_h;
	      BildBreit = BildBreit * Faktor_h;
	  } else {
	      BildBreit = BildBreit * Faktor_b;
	      BildHoch  = BildHoch * Faktor_b;
	  }

	  var scrWidth  = BildBreit;
	  var scrHeight = BildHoch;

	} else {

	  if (BildBreit > screen.availWidth) {
	    Scroll = "yes";
	    var scrWidth = Breit;
	  } else {
	    var scrWidth  = BildBreit;
	  }

	  if (BildHoch > screen.availHeight) {
	    Scroll = "yes";
	    var scrHeight = Hoch;
	  } else {
	    var scrHeight = BildHoch;
	  }
	}

	if (scrWidth  < 100) {scrWidth  = 100;}
 	if (scrHeight < 100) {scrHeight = 100;}

	if (scrWidth + 2 * Rand + Adj > Breit) {
	  Rand = 0;
	} else {
	  if (scrHeight + 2 * Rand + 2 * Adj > Hoch) {
	    Rand = 0;
	  }
	}

	scrWidth  = scrWidth  + 2 * Rand;
	scrHeight = scrHeight + 2 * Rand;

	posTop  = (Hoch - scrHeight) / 2;
	posLeft = (Breit - scrWidth) / 2;

	posTop    = parseInt(posTop);
	posLeft   = parseInt(posLeft);
	scrWidth  = parseInt(scrWidth);
	scrHeight = parseInt(scrHeight);
	BildBreit = parseInt(BildBreit);
	BildHoch  = parseInt(BildHoch);

	if (document.all) {
	// navigator.family = "ie4"
	  bildbox = window.open("","bildbox","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	}

	if (document.layers) {
	// navigator.family = "nn4"
	  bildbox = window.open("http://www.matwi.uni-jena.de/fenster.html","bildbox","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	  bildbox.document.open();
	}

	if (window.navigator.userAgent.toLowerCase().match(/gecko/)) {
	// navigator.family = "gecko"
	  bildbox = window.open("http://www.matwi.uni-jena.de/fenster.html","bildbox","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	  bildbox.document.open();
	}

	if (window.navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
	// navigator.family = 'opera';
	  bildbox = window.open("http://www.matwi.uni-jena.de/fenster.html","bildbox","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	  bildbox.document.open();
	}

	  bildbox.document.write('<Html><Head><Title>' + BildText + ' - (' + BildBreit + 'x' + BildHoch + ' Pixel)</Title></Head><Body BgColor=' + Farbe + ' LeftMargin=0 TopMargin=0 MarginHeight=0 MarginWidth=0 onBlur="self.close()" onClick="self.close()">');
//	  bildbox.document.write('<Html><Head><Title>' + BildText + ' - (' + BildBreit + 'x' + BildHoch + ' Pixel)</Title></Head><Body BgColor=' + Farbe + ' LeftMargin=0 TopMargin=0 MarginHeight=0 MarginWidth=0>');
	  bildbox.document.write('<Table Border=0 CellSpacing=0 CellPadding=0 Align=Center Height=' + scrHeight + '><Tr>');
	  bildbox.document.write('<Td><Img Src="' + BildName + '" Width=' + BildBreit + ' Height=' + BildHoch + ' Alt="Klicke auf das Bild, um das Fenster zu schliessen!"></Td>');
	  bildbox.document.write('</Tr></Table></Body></Html>');
	  bildbox.document.close();
	  bildbox.focus();
}

function Fenster(DateiName,Breite,Hoehe,posLeft,posTop) {
	var Adj = 20;
	var Breit = screen.availWidth;
	var Hoch  = screen.availHeight;
	var Scroll   = "no";

	if (Breite  == "") {Breite  = Breit;}
	if (Hoehe   == "") {Hoehe   = Hoch;}

	if (Breite > Breit){
	    Scroll = "yes";
	    Breite = Breit - Adj;
	}

	if (Hoehe > Hoch){
	    Scroll = "yes";
	    Hoehe = Hoch - 2 * Adj;
	}

	if (Breite < 100) {Breite = 100;}
 	if (Hoehe  < 100) {Hoehe  = 100;}

	if (posTop >=0) {
	    if (posTop > (Hoch - Hoehe - 2 * Adj) / 2) {
		posTop = (Hoch - Hoehe - 2 * Adj) / 2;
	    }
	} else {
	    posTop = (Hoch - Hoehe - 2 * Adj) / 2;
	}

	if (posLeft >= 0) {
	    if (posLeft > (Breit - Breite - Adj) / 2) {
		posLeft = (Breit - Breite - Adj) / 2;
	    }
	} else {
	    posLeft = (Breit - Breite - Adj) / 2;
	}

	posTop  = parseInt(posTop);
	posLeft = parseInt(posLeft);
	Breite  = parseInt(Breite);
	Hoehe   = parseInt(Hoehe);

	if (document.layers) {
	// navigator.family = "nn4"
	   fenster = window.open(DateiName,"Fenster","width=" + Breite + ",height=" + Hoehe + ",left=" + posLeft + ",top=" + posTop + ",scrollbars=" + Scroll + ",status=no");
	}

	if (window.navigator.userAgent.toLowerCase().match(/gecko/)) {
	// navigator.family = "gecko"
	   fenster = window.open(DateiName,"Fenster","width=" + Breite + ",height=" + Hoehe + ",left=" + posLeft + ",top=" + posTop + ",scrollbars=" + Scroll + ",status=no");
	}

	if (document.all) {
	// navigator.family = "ms-ie"
	   fenster = window.open(DateiName,"Fenster","width=" + Breite + ",height=" + Hoehe + ",left=" + posLeft + ",top=" + posTop + ",scrollbars=" + Scroll + ",status=no");
	}

	if (window.navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
	// navigator.family = "opera"
	   fenster = window.open(DateiName,"Fenster","width=" + Breite + ",height=" + Hoehe + ",left=" + posLeft + ",top=" + posTop + ",scrollbars=" + Scroll + ",status=no");
	}

	fenster.focus();
}

function Fenster_2(Adresse,Breite,Hoehe) {
	var topPixel = (screen.availHeight - Hoehe)/2;
	var leftPixel = (screen.availWidth - Breite)/2;
	fenster_2 = window.open(Adresse,"fenster_2","top=" + topPixel + ",left=" + leftPixel + ",width="+ Breite + ",height=" + Hoehe + ",location=0,menubar=0,status=1,toolbar=0,scrollbars=0,resizable=1");
	fenster_2.focus();
}

function Fenster_3(Adresse,Breite,Hoehe) {
	var topPixel = (screen.availHeight - Hoehe)/2;
	var leftPixel = (screen.availWidth - Breite)/2;
	fenster_3 = window.open(Adresse,"fenster_3","top=" + topPixel + ",left=" + leftPixel + ",width="+ Breite + ",height=" + Hoehe + ",location=1,menubar=0,status=1,toolbar=1,scrollbars=1,resizable=1");
	fenster_3.focus();
}

function LinkToWebmaster() {
	document.write("<A Href=\"http://www.matwi.uni-jena.de/WebMaster.html\" Title=\"zur HomePage des WebMasters...\" Target=\"_top\" OnMouseOver=\"self.status='zur HomePage des WebMasters...'; return true\" OnMouseOut=\"self.status=''; return true\" class=copy>Hmg</A>.");
}

function eMailToWebmaster(Subjekt) {
	document.write("<A Href=\"mailto:volker.helmig@uni-jena.de?subject=" + Subjekt + "\" Title=\"eMail an den Webmaster.\" OnMouseOver=\"self.status='eMail an den Webmaster.';return true\" OnMouseOut=\"self.status='';return true\">e-mail: Webmaster</a>");
}

function eMailTo(Domain1,eMail1,Subjekt,Domain2,eMail2) {
	var eMail = eMail1 + "&#064;" + Domain1;
	if (Domain2 != '' && eMail2 != '') {
	  eMail = eMail + "," + eMail2 + "&#064;" + Domain2;
	}
	document.write("<A Href=\"mailto:" + eMail + "?subject=" + Subjekt + "\" Title=\"eMail senden...\" OnMouseOver=\"self.status='eMail senden...';return true\" OnMouseOut=\"self.status='';return true\"><Span Class=text>eMail:</Span> " + eMail + "</A>");
}

function eMail(email,person,subjekt,text) {
	email = email + "@uni-jena.de";
	var adresse = email;
	if (subjekt) {
		adresse = adresse + "?subject=" + subjekt;
		if (text) {
			adresse = adresse + "&body=" +  text;
		}
	}
	email = '<Html><Head><Link Rel="stylesheet" Href="http://www.matwi.uni-jena.de/ti.css" type="text/css"></Head><Body><Br><Br><Br><Br><H2 Align=Center>eMail an ' + person + ' senden...</H2><Br><P Align=Center>Bitte noch einmal &lt;<B>Klick!!!</B>&gt;en: <B><A Href="mailto:' + adresse + '" onBlur=history.back() Title="eMail senden...">' + email + '</A></B></P><Br><Br><Br><Br><P Align=Center><A Href="javascript:history.back()"><B>&laquo; zur&uuml;ck</B></A></P></Body></Html>';
	return email;
}

function eMail1(domain,email,person,subjekt,text) {
	email = email + "@" + domain;
	var adresse = email;
	if (subjekt) {
		adresse = adresse + "?subject=" + subjekt;
		if (text) {
			adresse = adresse + "&body=" +  text;
		}
	}
	email = '<Html><Head><Link Rel="stylesheet" Href="http://www.matwi.uni-jena.de/ti.css" type="text/css"></Head><Body><Br><Br><Br><Br><H2 Align=Center>eMail an ' + person + ' senden...</H2><Br><P Align=Center>Bitte noch einmal &lt;<B>Klick!!!</B>&gt;en: <B><A Href="mailto:' + adresse + '" onBlur=history.back() Title="eMail senden...">' + email + '</A></B></P><Br><Br><Br><Br><P Align=Center><A Href="javascript:history.back()"><B>&laquo; zur&uuml;ck</B></A></P></Body></Html>';
	return email;
}

function eMail2(domain,email,person) {
	email = '<Html><Head><Link Rel="stylesheet" Href="http://www.matwi.uni-jena.de/ti.css" type="text/css"></Head><Body><Br><Br><Br><Br><H2 Align=Center>eMail an ' + person + ' senden...</H2><Br><P Align=Center>Bitte noch einmal &lt;<B>Klick!!!</B>&gt;en: <B><A Href="mailto:' + email + '@' + domain + '" onBlur=history.back() Title="eMail senden...">' + email + '@' + domain + '</A></B></P><Br><Br><Br><Br><P Align=Center><A Href="javascript:history.back()"><B>&laquo; zur&uuml;ck</B></A></P></Body></Html>';
	return email;
}

function eMail3(email,person,subjekt,email2,person2) {
	email = email + "@uni-jena.de";
	var adresse = email + "?subject=" + subjekt;
	if (email2) {
		email2 = email2 + "@uni-jena.de";
		adresse = adresse + "&cc=" +  email2;
		person = person + " und " + person2;
		email = email + "</B>,<B>" + email2;
	}
	email = '<Html><Head><Link Rel="stylesheet" Href="http://www.matwi.uni-jena.de/ti.css" type="text/css"></Head><Body><Br><Br><Br><Br><H2 Align=Center>eMail an ' + person + ' senden...</H2><Br><P Align=Center>Bitte noch einmal &lt;<B>Klick!!!</B>&gt;en: <B><A Href="mailto:' + adresse + '" onBlur=history.back() Title="eMail senden...">' + email + '</A></B></P><Br><Br><Br><Br><P Align=Center><A Href="javascript:history.back()"><B>&laquo; zur&uuml;ck</B></A></P></Body></Html>';
	return email;
}

function Jahr(semester) {
	datum = new Date();
	jahr  = datum.getYear();
	monat = datum.getMonth();
	if (jahr < 2000) { jahr += 1900; }

	switch(semester) {

	case "SS":
		if (monat > 8) {		// im Oktober ?
			document.write(jahr+1);
		} else {
			document.write(jahr);
		}
	break;

	case "WS":
		if (monat > 2) {		// im April ?
			document.write(jahr);
			document.write("/");
			document.write(jahr+1);
		} else {
			document.write(jahr-1);
			document.write("/");
			document.write(jahr);
		}
	break;
	}
}

function Spruch(semester) {
	var datum = new Date();
	var monat = datum.getMonth();
	var Spruch = "Diese Daten sind zu Beginn der Vorlesungsperiode offiziell und aktuell verf&uuml;gbar...";

	switch(semester) {

	case "SS":
		if (monat > 8 || monat < 3) {	// 9=Okt. bis 2=Mar.
			document.write(Spruch);
		}
	break;

	case "WS":
		if (monat > 2 && monat < 9) { // 3=Apr. bis 8=Sept.
			document.write(Spruch);
		}
	break;
	}
}

// - Script zur Darstellung von Textboxen am Cursor - //

var offsetxpoint = 0;	// 5 - Customize x offset of tooltip
var offsetypoint = 19;	// 5 - Customize y offset of tooltip
var ie = document.all	
var ns6 = document.getElementById && !document.all;
var enabletip = false;

function show_tip(thetext,thewidth,thecolor) {
	if (ns6||ie) {
		if (typeof thewidth != "undefined") tipobj.style.width = thewidth + "px";
		if (typeof thecolor != "undefined" && thecolor != "") tipobj.style.backgroundColor = thecolor;
		tipobj.innerHTML = thetext;
		enabletip = true;
		return false;
	}
}

function hide_tip() {
	if (ns6||ie) {
		enabletip = false;
		tipobj.style.visibility = "hidden";
		tipobj.style.left = "-1000px";
		tipobj.style.backgroundColor = '';
		tipobj.style.width = '';
	}
}

function positiontip(e) {
	if (enabletip) {
		var curX = (ns6) ? e.pageX : event.x + ietruebody().scrollLeft;
		var curY = (ns6) ? e.pageY : event.y + ietruebody().scrollTop;

		//Find out how close the mouse is to the corner of the window
		var rightedge  = ie && !window.opera ? ietruebody().clientWidth  - event.clientX - offsetxpoint : window.innerWidth  - e.clientX - offsetxpoint - 20;
		var bottomedge = ie && !window.opera ? ietruebody().clientHeight - event.clientY - offsetypoint : window.innerHeight - e.clientY - offsetypoint - 20;
		var leftedge = (offsetxpoint < 0) ? offsetxpoint*(-1) : -1000;

		//if the horizontal distance isn't enough to accomodate the width of the context menu
		if (rightedge < tipobj.offsetWidth);
			//move the horizontal position of the menu to the left by it's width
			tipobj.style.left = ie ? ietruebody().scrollLeft + event.clientX - tipobj.offsetWidth + "px" : window.pageXOffset + e.clientX-tipobj.offsetWidth + "px";
		} else if (curX < leftedge) {
			tipobj.style.left = "5px";
		} else {
			//position the horizontal position of the menu where the mouse is positioned
			tipobj.style.left = curX + offsetxpoint + "px";
		}
		//same concept with the vertical position
		if (bottomedge < tipobj.offsetHeight) {
			tipobj.style.top = ie ? ietruebody().scrollTop + event.clientY - tipobj.offsetHeight - offsetypoint + "px" : window.pageYOffset + e.clientY - tipobj.offsetHeight - offsetypoint + "px";
		} else {
			tipobj.style.top = curY + offsetypoint + "px";
			tipobj.style.visibility = "visible";
		}
}

