function openEdit()
{
thisData=thisPage;
if(!thisData)
	alert(unescape("Bitte eine Kategorie ausw%E4hlen."));
else
{
if(thisPage.indexOf("Termine")!="-1"||thisPage.indexOf("Vita")!="-1")
	openTableEdit(thisData);
else
	{
	if(navigator.userAgent.indexOf("Firefox")=="-1")
		alert(unescape("Sie verwenden einen Browser, der den Texteditor nicht unterst%FCtzt. Bitte benutzen Sie Mozilla Firefox."))
	else
		{
		WWidth=904;
		WHeight=710;
		x=Math.round(((screen.availWidth)/2) - (WWidth/2));	
		y=Math.round(((screen.availHeight)/2) - (WHeight/2));
		window.open('editing/textEditor.php?'+thisPage,"Bearbeiten",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+WWidth+',height='+WHeight+',left='+x+',top='+y);
		}
	}
}
}
function openTableEdit(data)
{
if(navigator.userAgent.indexOf("Firefox")=="-1")
	alert(unescape("Sie verwenden einen Browser, der den Texteditor nicht unterst%FCtzt. Bitte benutzen Sie Mozilla Firefox."))
else
{
thisData=data;
WWidth=904;
WHeight=710;
x=Math.round(((screen.availWidth)/2) - (WWidth/2));	
y=Math.round(((screen.availHeight)/2) - (WHeight/2));
window.open('editing/tableEditor.php?'+thisData,"Bearbeiten",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+WWidth+',height='+WHeight+',left='+x+',top='+y);
}
}
function imageContent(content)
{
content=content.replace(/_/g, "");
thisData=content;
WWidth=1256;
WHeight=743;
x=Math.round(((screen.availWidth)/2) - (WWidth/2));	
y=Math.round(((screen.availHeight)/2) - (WHeight/2));

window.open("editing/imageContent.php?"+content,"Bearbeiten","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+WWidth+",height="+WHeight+",left="+x+",top="+y);
}
function refreshImageContent(content)
{
thisData=content;
WWidth=1256;
WHeight=743;
x=Math.round(((screen.availWidth)/2) - (WWidth/2));	
y=Math.round(((screen.availHeight)/2) - (WHeight/2));

window.open("imageContent.php?"+content,"Bearbeiten","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+WWidth+",height="+WHeight+",left="+x+",top="+y);
}
function get_pQ(URL)
{
if(window.innerHeight)
	{
	if(location.href.indexOf("?"+pw)!="-1")
		window.open(URL+"?"+pw,target="_top");
	}
}
function printDoc()
{
document.getElementById("oost_body").style.color="#000";
document.getElementById("Navigation").style.display="none";
document.getElementById("Navigation2").style.display="none";
document.getElementById("Bild").style.display="none";
document.getElementById("lupe").innerHTML="<img src='layout/Backsymbol.jpg' style='width:22px;height:22px;border:0px;cursor:pointer' title='Zur&uuml;ck' onclick='location.reload()' alt='' />&nbsp;<img src='layout/Druckersymbol.jpg' style='width:23px;height:20px;border:0px;cursor:pointer' title='Drucken' onclick='goPrint()' alt='' />";
document.getElementById("Leerbalken").style.display="none";
document.getElementById("textedit").style.display="none";
document.getElementById("theText").style.left="83px";
document.getElementById("theText").style.top="200px";
document.getElementById("theText").style.right="80px";
document.getElementById("theText").style.bottom="50px";
document.getElementById("theLayout").style.position="absolute";
document.getElementById("log1").style.position="absolute";

for(i=0;i<100;i++)
	{
	if(document.getElementsByTagName("td")[i])
		document.getElementsByTagName("td")[i].style.fontSize="12px";
	if(document.getElementsByTagName("div")[i])
		document.getElementsByTagName("div")[i].style.fontSize="12px";
	}
}
function goPrint()
{
document.getElementById("lupe").style.display="none";
print();
setTimeout("document.getElementById('lupe').style.display='block'",500);
}
function setFontSize()
{
xSize=document.getElementById("theText").style.fontSize;
xSize=xSize.substring(0,2);
newSize=(Number(xSize)+1)+"px";
for(i=0;i<100;i++)
	{
	if(document.getElementsByTagName("td")[i])
		document.getElementsByTagName("td")[i].style.fontSize=newSize;
	if(document.getElementsByTagName("div")[i])
		document.getElementsByTagName("div")[i].style.fontSize=newSize;
	}
}

function setSize()
{
if(window.innerWidth)
	{
	windWidth=window.innerWidth;
	windHeight=window.innerHeight;
	}
else
	{
	windWidth=document.getElementById("oost_body").offsetWidth;
	windHeight=document.getElementById("oost_body").offsetHeight;
	}
if(document.getElementById("textbereich2"))
	{
	document.getElementById("textbereich2").style.width=(windWidth-713)+"px";
	document.getElementById("textfelder").style.width=(windWidth-566)+"px";
	}

if(windWidth<1000)
	{
	document.getElementById("oost_body").style.fontSize="11px";
	if(document.getElementById("increaseFont"))
		document.getElementById("increaseFont").style.visibility="visible";
	/*document.getElementById("oost_body").style.letterSpacing="0px";*/
	for(i=0;i<100;i++)
		{
		if(document.getElementsByTagName("td")[i])
			{
			/*document.getElementsByTagName("td")[i].style.letterSpacing="0px";*/
			document.getElementsByTagName("td")[i].style.fontSize="11px";
			}
		if(document.getElementsByTagName("div")[i])
			document.getElementsByTagName("div")[i].style.fontSize="11px";
		}
	/*document.getElementById("theText").style.letterSpacing="0px";*/
	if(document.getElementById("imgText"))
		document.getElementById("imgText").style.fontSize="9px";
	/*260,62*/

	if(document.getElementById("logo"))
		{
		document.getElementById("logo").style.width="260px";
		document.getElementById("logo").style.height="62px";
		
		logoWidth=Math.round((windWidth/100)*32);
		document.getElementById("Navigation").style.width=(windWidth-(logoWidth+200))+"px";
		imgW=333;
		imgH=79;
		prozent=Math.round(logoWidth/(imgW/100));
		logoHeight=Math.round((imgH/100)*prozent);
		document.getElementById("logo").style.width=logoWidth+"px";
		document.getElementById("logo").style.height=logoHeight+"px";
		}

	textWidth=(windWidth/100)*45;
	if(document.getElementById("theText"))
		document.getElementById("theText").style.left=textWidth+"px";
	}
var windWidth;
var windHeight;

if(window.innerWidth)
	{
	windWidth=window.innerWidth-730;
	windHeight=window.innerHeight;
	}
else
	{
	windWidth=document.getElementById("oost_body").offsetWidth-730;
	windHeight=document.getElementById("oost_body").offsetHeight;
	}
/*nur fuer Internet Explorer 6*/

if(navigator.appVersion.indexOf("MSIE 6")!="-1")
	{
	if(windWidth>229)
		x=document.getElementById("oost_body").offsetWidth-404;
	else
		x=document.getElementById("oost_body").offsetWidth-400;
	
	
	
	/*if(document.getElementById("oost_body").offsetWidth<1000)
		document.getElementById("theText").style.width=(document.getElementById("oost_body").offsetWidth-(logoWidth+200))+"px";
	else
		document.getElementById("theText").style.width=(document.getElementById("oost_body").offsetWidth-600)+"px";*/

	if(document.getElementById("Leerbalken"))
		{
		document.getElementById("Leerbalken").style.bottom=-1;
		document.getElementById("Leerbalken").style.width=(document.getElementById("oost_body").offsetWidth-300)+"px";
		}
	document.getElementById("Navigation2").style.top=windHeight-180;
	document.getElementById("Navigation2").style.display="block";
	/*document.getElementById("Navigation").style.width=(document.getElementById("oost_body").offsetWidth-300)+"px";*/
	}

}
var L_ctrl=1;


function showAllImages()
{
L_ctrl++;
if(L_ctrl==5)
	{
	document.getElementById("sh1").style.visibility="visible";
	document.getElementById("sh2").style.visibility="visible";
	document.getElementById("sh3").style.visibility="visible";
	document.getElementById("frontImage").style.visibility="visible";
	document.getElementById("frontImg").style.visibility="visible";
	document.getElementById("imgText").style.visibility="visible";
	}
}
var WWidth;
var WHeight;

/*************************************************************/
var fullLength;

function checkWSize()
{
if(window.innerHeight)
	{
	var WWidth=window.innerWidth;
	var WHeight=window.innerHeight;
	}
else
	{
	var WWidth=document.getElementById("oost_body").offsetWidth;
	var WHeight=document.getElementById("oost_body").offsetHeight;
	}
}


function Fensterweite () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function Fensterhoehe () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function neuAufbau () {
  if (Weite != Fensterweite() || Hoehe != Fensterhoehe()) {
	setTimeout("location.href = location.href",200);	
	}
}

/* Überwachung von Netscape initialisieren */
if (!window.Weite && window.innerWidth||window.opera) {
  window.onresize = neuAufbau;
  Weite = Fensterweite();
  Hoehe = Fensterhoehe();
}
var pw="oostende";

