/* -------------------------------------------------------------------------------script:		ikaoe_main.jsversion:	1.0author:		Ph. Cosidesc:		Allgemeine Hilfsfunktionen, die über die ganze Site verwendet werdenhistory:	3.6.2005			Wrapper fuer altes WriteMailAdress Skritp hinzugefuegt					------------------------------------------------------------------------------- *///-----------------------------------------------------// MailAdresse// Schreibt E-Mail Adressen per JavaScript ins Dokumentfunction MailAdresse(user, domain, text, status){	domain = (domain==null || domain=="") ? "ikaoe.unibe.ch" : domain;	text = (text==null || text=="") ? user + '@' + domain : text;	status = (status==null || status=="") ? "Sendet eine E-Mail an " + text : status;	document.write('<a href=\"mailto:' + user + '@' + domain + '\" onmouseover=\"status=\''+ status + '\';return true;\" onmouseout=\"status=\'\';return true;\">' + text + '</a>');}//----------------------------------------------// Wrapper fuer altes WriteMailAdress Skript, falls dieser Funktionsaufruf in "alten" Seiten// noch vorhanden sein sollte.function WriteMailAdress(p, d, t){	MailAdresse(p, d, t)	// alter source:	// document.write ('<a href=\"mailto:' + p + '@' + d + '\">' + (t=="" ? p + '@' + d : t) + '</a>');}function DocumentPath(){	var docURL = (document.URL).split('/');	return docURL.slice(3,-1);}//------------------------------------------------------------------// Automatischer Brotkruemel-Pfad aus document.URL und document.titlefunction BreadCrumbPath(path){	var breadcrumb = '<a href="http://www.unibe.ch">home universit&auml;t</a>' // start mit unibe	var docPath = (path==null || path=="") ? (document.URL) : path;						 // just for testing, delete	var docTitle = (document.title).replace(/Universit.+kologie - /,""); 			 // get last part of document.title	a = docPath.split("/")  // url in array aufsplitten	b = new Array()					// assoz. array mit alternativen namen	b["www.ikaoe.unibe.ch"] = "ika&ouml;";	b["informationen"]		= "informationen studiengang";	b["capacity"]			= "capacity development";	b["ufp"]				= "berner umwelt-forschungspreis";	for (var i=2; i<(a.length - 1); i++)	{		var subPath = docPath.substring(0, docPath.indexOf(a[i])+ a[i].length )		breadcrumb += ' &gt; <a href="' + subPath + '">' + ( (b[a[i]]==null) ? a[i] : b[a[i]]) + '</a>';	}	breadcrumb += (a[a.length - 1]=="index.html") ? '' : ' &gt; ' + docTitle;	document.write(breadcrumb);}function toggleAdress(){	//val = document.getElementById("adresstyp").value;	switch (document.getElementById("adresstyp").value) {		case "work":			document.getElementById("addresshome").style.display = "none";						document.getElementById("addresswork").style.display = "block";			break;		case "home":			document.getElementById("addresswork").style.display = "none";						document.getElementById("addresshome").style.display = "block";			break;	}}// ------------------------// toggleDisplay, 3.10.2005, Philippe Cosi// blendet dasjenige <div> ein, welches die gleiche id hat wie die gewählte option-value von <select> mit id=id_select// blendet alle anderen <div>'s aus, deren id's in der option-liste von <select> mit id=id_select vorkommen. function toggleDisplay(id_select){	var view_div = document.getElementById(id_select).value;	var select_node = document.getElementById(id_select);		for ( var i=0; i < select_node.childNodes.length ; i++ ) {		var div_id = select_node.childNodes[i].getAttribute('value');		if ( div_id == view_div )			document.getElementById(div_id).style.display = 'block';		else			document.getElementById(div_id).style.display = 'none';	}}// ------------------------// toggleDisplay, 13.6.2007/PHCfunction toggleDisplayN(id){	//alert(id);		if ( document.getElementById(id).style.display == 'block' )		document.getElementById(id).style.display = 'none';	else		document.getElementById(id).style.display = 'block';}function fenster(url) {	window.open(url, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=610, height500");}
