function delete_checks(name, link)
{
	var check = window.confirm(name+' wirklich löschen?');
	if(check){location.href = link}else {}
}
function user_login(user, password, site, under)
{
	var cook = "user="+user+"|"+password;
	document.cookie = cook;
	location.href = "index.php?si="+site+"&un="+under;
}
function prs_sub(div, div2)
{
	document.getElementById(div).style.display = "none";
	document.getElementById(div2).style.display = "";
}
function user_logout()
{
	var cook = "user=";
	document.cookie = cook;
	window.location.reload();
}
function add_site(site, under)
{
	var titel = window.prompt("Titel der neuen Seite", "");
	if(titel != "" && titel != null)
	{
		location.href = "?si="+site+"&un="+under+"&add_site="+titel;
	}
}
function show_login()
{
	document.getElementById('show_login_text').style.display = "none";
	document.getElementById('login_form').style.display = "";
}
function change_titel(site, under)
{
	var check = prompt('Neuen Titel eingeben', '');
	if(check){location.href = "?si="+site+"&un="+under+"&edit=1&new_titel_save="+check;}else {}
}
function delete_site(site, under)
{
	var check = window.confirm('Seite wirklich löschen?');
	if(check){location.href = "?si="+site+"&un="+under+"&delete=1";}else {}
}
function flash_test()
{
	var agt=navigator.userAgent.toLowerCase();
	var ie  = (agt.indexOf("msie") != -1);
	var ns  = (navigator.appName.indexOf("Netscape") != -1);
	var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
	var mac = (agt.indexOf("mac")!=-1);
	
	if (ie && win) {	pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }
	if (ns || !win) {
			nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
			pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader");
	}
	
	function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCR'+'IPT>\n'); if (result) return name+','; else return ''; }
	function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }
	
	pluginlist += navigator.javaEnabled() ? "Java," : "";
	if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);
	
	if (1==1){document.getElementById('top_navi1').style.display = "";document.getElementById('upper').style.display = "none";document.getElementById('navi_upper2').style.display = "none";}
}
