function popup(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ShowHide(id) {
    if (document.getElementById(id).style.visibility == 'visible') {
    	document.getElementById(id).style.visibility = 'hidden';
    }
    else {
    	document.getElementById(id).style.visibility = 'visible';
    }
}

function GetCookie( check_name ) {
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f
	
	for ( i = 0; i < a_all_cookies.length; i++ ) {
		a_temp_cookie = a_all_cookies[i].split( '=' );
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
			if ( cookie_name == check_name ) {
			b_cookie_found = true;
			if ( a_temp_cookie.length > 1 ) {
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found ) {
		return null;
	}
}				

function addNet(url,titel) {
	if ((typeof window.sidebar=="object") && (typeof window.sidebar.addPanel=="function")) {
		window.sidebar.addPanel(titel,url,"");
	}
	else {
		alert("Sie Nutzen eine veralterte Netscape Version!\nLesezeichen hinzufügen ist nicht möglich!");
	}
}

function lesezeichen() {
	var url=window.location.href, t=document.title, ap=navigator.appName;
	if (ap=="Microsoft Internet Explorer") { 
		window.external.AddFavorite(url,t);
	}
	else {
		if(ap=="Netscape") {
			addNet(url,t);
		}
		else {
			alert("Mit ihren Browser ist kein Lesezeichen über Javascript möglich.\nBitte legen sie das Lesezeichnen manuell an.\nURL:"+url);
		};
	}
}

