var webroot;var loc=document.location.href;
var errorDoc404="errors/error404.php";

if (loc.indexOf("localhost/brustkrebs-info/")>0) webroot = "http://localhost/brustkrebs-info/";	// CS-Home
else if (loc.indexOf("192.0.10.15")>0) webroot = "http://192.0.10.15/brustkrebs/";	// CS-Work
else if (loc.indexOf("localhost")>0) webroot = "http://localhost/"; // Kou
else {
	webroot = loc.substr(0,loc.indexOf(".de/")+4);
	if ((webroot.indexOf("brustkrebs-frueherkennung.de")==-1)&&(webroot.indexOf("brustzentren.de")==-1)&&(webroot.indexOf("mammazentren.de")==-1)&&(webroot.indexOf("brustkrebs-kliniken.de")==-1)) {
		//webroot += "relaunch-berlin/";
	}
}

function dotStyle(whatId,whatStyle){
// keine Stylesheets wg. N4 !!
	if (whatStyle=="hidden") newPic="system_berlin/bilder/gifs/transpix.gif";
	else if(whatId.indexOf(".0")>0) newPic="system_berlin/bilder/dots/dot_5E86EF.gif";
	else newPic="system_berlin/bilder/dots/dot_B2CBFF.gif";
	if (document.all) document.all(whatId).src=webroot + newPic;
	else if (document.getElementById) document.getElementById(whatId).src=webroot + newPic;
	else if (document.layers) document.images[whatId].src=webroot + newPic;
}

function winOpen(path,winWidth,winHeight){
	path=webroot+"/"+path;
	if (!winWidth) winWidth=450;
	if (!winHeight) winHeight=450;
	window.open(path,"newWin","width=" + winWidth + ",height=" + winHeight + ",status=no,menubar=no,dependent=no,resizable=yes,locationbar=no,scrollbars,screenX=50,screenY=50");
}

function checkParent(kapitel,id){
	if (kapitel=="false") return;
	var refpath;
	var toplocation=window.location.href;
	if (toplocation==location.href) {
		if (kapitel=="error404") {
			refpath=errorDoc404;
			top.location.href= webroot + "patienten-info/index.php?datei=" + refpath;
		}else {
			refpath = toplocation.substr(webroot.length,toplocation.length);
			if (refpath.indexOf("?")>0) refpath =refpath.substr(0,refpath.indexOf("?"));
			if ((!kapitel)||(kapitel=="")) kapitel=refpath.substr(0,refpath.indexOf("/"));	
			if (id) top.location.href= webroot + kapitel + "/index.php?id=" + id;
			else top.location.href= webroot + kapitel + "/index.php?datei=" + refpath;
		}
	}
}

function hideText(elmt) {
	if (document.all) document.all(elmt).innerHTML="";
	else if (document.getElementById) document.getElementById(elmt).innerHTML="";
}