// *** CROSS-BROWSER COMPATIBILITY ***
var isDOM = (document.getElementById ? true : false); 

// -----------------------------------------------------
// Funktionen
// -----------------------------------------------------

function openFenster(URL, Fenstername, Hoehe, Breite, Statusbar, Locationbar, Resizable, MenuBar) {
	//-------------
	//Fenster öffnen
	//-------------
	if (isDOM) Fenster = window.open(URL, Fenstername ,"height="+Hoehe+",width="+Breite+",dependent=no,status="+Statusbar+",locationbar="+Locationbar+",resizable="+Resizable+",menubar="+MenuBar+",scrollbars=yes");
	else alert("Sie verwenden einen nicht kompatiblen Internet-Browser!!");
	Fenster.focus();
}


function getRef(id) {
	if (isDOM) return document.getElementById(id);
}

function getSty(id) {
	if (isDOM) return getRef(id).style;
} 

function toggleDiv(id) {
	if (isDOM) {
		if (getSty(id).display!='block') 
			getSty(id).display = "block";
		else
			getSty(id).display = "none";
	}
}

function extLinks() {
	if (isDOM) {
		links = document.getElementsByTagName("a");
		for (i=0;i<links.length;i++) {
			if (links[i].className == "external-link-new-window") {
				links[i].target = "_blank";
				links[i].setAttribute("title",links[i].getAttribute("href") + " in neuem Fenster öffnen");
			}
		}
	}
}

function init() {
	extLinks();
}