/** 
*	gesammelte funktionen aus
*	site/index.php
*	share/header_v2.php
*/

function resize_iframe() {
	var abstandoben = 240;
	var myHeight = 0;
	var iframeheight = 500;
	var BO = new detectBrowser();
	if (BO.ie == false) {
		//window.alert('kein IE');
		myHeight = window.innerHeight;
	} else {
		//window.alert('IE');
		myHeight = document.body.clientHeight;
	}
	iframeheight = myHeight - abstandoben;
	//alert(iframeheight);
	$('link_object_iframe').writeAttribute("height", iframeheight);
	return true;
}

function detectBrowser() { 
    //window.alert('detect browser');
    var BO = new Object(); 
    BO["ie"]        = false /*@cc_on || true @*/; 
    //BO["ie4"]       = BO["ie"] && (document.getElementById == null); 
    //BO["ie5"]       = BO["ie"] && (document.namespaces == null) && (!BO["ie4"]); 
    BO["ie6"]       = BO["ie"] && (document.implementation != null) && (document.implementation.hasFeature != null); 
    //BO["ie55"]      = BO["ie"] && (document.namespaces != null) && (!BO["ie6"]);
    BO["ie7"]       = (BO["ie"] && document.implementation != null && document.compatMode != null && window.XMLHttpRequest != null);
    //BO["ns4"]       = !BO["ie"] &&  (document.layers != null) &&  (window.confirm != null) && (document.createElement == null); 
    //BO["opera"]     = (self.opera != null); 
    //BO["gecko"]     = (document.getBoxObjectFor != null); 
    //BO["khtml"]     = (navigator.vendor == "KDE"); 
    //BO["konq"]      = ((navigator.vendor == 'KDE') || (document.childNodes) && (!document.all) && (!navigator.taintEnabled)); 
    //BO["safari"]    = (document.childNodes) && (!document.all) && (!navigator.taintEnabled) && (!navigator.accentColorName); 
    //BO["safari1.2"] = (parseInt(0).toFixed == null) && (BO["safari"] && (window.XMLHttpRequest != null)); 
    //BO["safari2.0"] = (parseInt(0).toFixed != null) && BO["safari"] && !BO["safari1.2"]; 
    //BO["safari1.1"] = BO["safari"] && !BO["safari1.2"] && !BO["safari2.0"]; 
    return BO; 
}

function js_object(which) {
	fenster_js_object = open(which,"js_object","width=500,height=550,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_object.focus();
}               

function js_object_form(which) {
	fenster_js_object_form = open(which,"js_object_form","width=650,height=550,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_object_form.focus();
}               

function js_object_wide(which) {
	fenster_js_object_wide = open(which,"js_object_wide","width=800,height=700,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_object_wide.focus();
}               

function js_dokument(which) {
	fenster_js_dokument = open(which,"js_dokument","width=450,height=200,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_dokument.focus();
}               

function js_person(which) {
	fenster_js_person = open(which,"js_person","width=450,height=400,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_person.focus();
}               

function js_tabelle(which) {
	fenster_js_tabelle = open(which,"js_tabelle","width=600,height=400,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_tabelle.focus();
}               

function js_pictures(which) {
	fenster_js_pictures = open(which,"js_pictures","width=300,height=300,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_pictures.focus();
}               

function js_news(which) {
	fenster_js_news = open(which,"js_news","width=570,height=500,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_news.focus();
}               

function js_news_edit(which) {
	fenster_js_news_edit = open(which,"js_news_edit","width=515,height=600,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_news_edit.focus();
}               

function js_chart_zoom(which) {
	fenster_js_chart_zoom = open(which,"js_chart_zoom","width=780,height=500,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_chart_zoom.focus();
}               

function js_preview_pic(which) {
	fenster_js_preview_pic = open(which,"js_preview_pic","scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_preview_pic.focus();
}               

function js_related_item_edit(which) {
	fenster_js_related_item_edit = open(which,"js_related_item_edit","width=450,height=300,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_related_item_edit.focus();
}               

function js_page2ordner(which) {
	fenster_js_page2ordner = open(which,"js_page2ordner","width=570,height=500,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_page2ordner.focus();
}               

function js_highlight(which) {
	fenster_js_highlight = open(which,"js_visual","width=800,height=600,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_highlight.focus();
}               

function js_detail(which) {
	fenster_js_detail = open(which,"js_detail","width=550,height=620,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_detail.focus();
}               

function js_kommentare(which) {
	fenster_js_kommentare = open(which,"js_kommentare","width=450,height=350,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_kommentare.focus();
}               

function js_edit(which) {
	fenster_js_edit = open(which,"js_edit","width=500,height=500,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_edit.focus();
}               

function js_chemidex(which) {
	fenster_js_chemidex = open(which,"js_chemidex","width=1000,height=720,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_chemidex.focus();
}               

function js_calendar(which) {
	fenster_js_calendar = open(which,"js_calendar","width=250,height=250,scrollbars=no,resizable=yes,toolbar=no,status=no");
	fenster_js_calendar.focus();
}               

function js_textarea(which) {
	fenster_js_textarea = open(which,"js_textarea","width=520,height=420,scrollbars=no,resizable=yes,toolbar=no,status=yes");
	fenster_js_textarea.focus();
}

function js_user(which) {
	fenster_js_user = open(which,"js_user","width=520,height=600,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_user.focus();
}
function js_group(which) {
	fenster_js_group = open(which,"js_user","width=520,height=400,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_group.focus();
}
function js_editrechte(which) {
	fenster_js_editrechte = open(which,"js_editrechte","width=450,height=600,scrollbars=yes,resizable=yes,toolbar=no,status=no");
	fenster_js_editrechte.focus();
}