// *** 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 addSw (text) {
	if (isDOM) {
		if (document.getElementById('Suchbegriff').value == "Suchbegriff") {
			document.getElementById('Suchbegriff').value = text;
		}
		else {
			document.getElementById('Suchbegriff').value += ' ' + text;
		}
	}
}
*/

function init() {
	//extLinks();
}

function toggleDivMoo(toggle_el) {

	var el = $(toggle_el);

	// assign fade effect to image

	if (el) {
		var myFade = el.effect('opacity', {
			duration: 400,
			fps: 25,
			onComplete: function() {
				alert('huhu');
			}
		});
		myFade.start(1,0);
	}	
}
