var isNav4, isIE, isNav6
var coll = ""
var styleObj = ""

var IE3=false;
	if ((navigator.userAgent.indexOf("MSIE") != -1)){
		if (parseInt(navigator.appVersion)<=3){
			IE3 = true;
			}
		}
		
		

function init()
{
	if (navigator.appName == "Netscape") 
	{
		if (parseInt(navigator.appVersion) >=5) 
			isNav6=true;
		else if (parseInt(navigator.appVersion) >=4)			
			isNav4=true;
	}
	else if(navigator.appName == "Microsoft Internet Explorer")
	{
		isIE = true;
		coll = "all.";
		styleObj = ".style";			
	}
}

function getobject(Object)
{
	var myObject=null;
	if(typeof Object == "string")
	{
		myObject=eval("document."+coll+Object+styleObj);
	}
	else 
		myObject=Object;
		
	return 	myObject;
}

function show(oString)
{	
	var o=getobject(oString)
	
	if(isNav6)	
		document.getElementById(oString).style.visibility = "visible";		
	else
	{
		if(o != null)
			o.visibility= "visible"
	}		
}
function hide(oString)
{
	if(isNav6)	
		document.getElementById(oString).style.visibility = "hidden";		
	else
	{
		var o=getobject(oString)
		if(o != null)
			o.visibility= "hidden"
	}		
}

function move(oString,x,y)
{
	if(isNav6)
	{
		document.getElementById(oString).style.left = x;
		document.getElementById(oString).style.top = y;	
	}
	else
	{
		var o=getobject(oString)
		if(o != null)
		{
			if(isNav4 || isNav6)
				o.moveTo(x,y)
			else if(isIE == true)
			{
				o.pixelLeft=x;	
				o.pixelTop=y;				
			}	
		}
	}	
}

function moveRelativ(oString,Align,ObjectWidth,x,y)
{
	var o=getobject(oString)

	if(Align=="CENTER")	
	{
		iw=getInsideWindowWidth();		
		x=iw/2-ObjectWidth/2+x;
	}	
	else if(Align=="RIGHT")	
	{
		iw=getInsideWindowWidth();		
		x=iw-ObjectWidth+x;
	}	
	else
		;	
	

	
	if(isNav6)
	{
		document.getElementById(oString).style.left = x;
		document.getElementById(oString).style.top = y;	
	}
	else if(o != null)
	{		
		if(isNav4 )
			o.moveTo(x,y)
		else if(isIE == true)
		{
			o.pixelLeft=x;	
			o.pixelTop=y;				
		}	
	}
	
	
}




function getInsideWindowWidth()
{
	if (isNav4 || isNav6)
		return window.innerWidth
	else if(isIE == true)
		return document.body.clientWidth
}

function getInsideWindowHeight()
{
	if (isNav4 || isNav6)
		return window.innerHeight
	else if(isIE == true)
		return document.body.clientHeight
}

var grossesBild = null;

function winBildgross(url) 
{ 
grossesBild=window.open(url,"gb","width=480,height=480,menubar=0,toolbar=0,statusbar=0,scrollbars=0");
	
	if (!IE3)
	{
		if (grossesBild != null) 
			grossesBild.focus();
	}
}
    

function winBildreihe(url) { 
grossesBild=window.open(url,"","width=480,height=520,menubar=0,toolbar=0,statusbar=0,scrollbars=0");
	
	if (!IE3){
		if (grossesBild != null) grossesBild.focus();
		}
	}
 


function winPreistraeger2004(url) { 
grossesBild=window.open(url,"","width=500,height=520,menubar=1,toolbar=0,statusbar=0,scrollbars=1");
	
	if (!IE3){
		if (grossesBild != null) grossesBild.focus();
		}
	}

 

function bildrahmen(oString,color)
{	
	var o=getobject(oString)
	
	if(isNav6)	
		document.getElementById(oString).style.borderColor = color;		
		
	if(isNav4)	
		o.borderColor = color;		
	else
	{
		if(o != null)
			o.borderColor= color;
	}		
}


function winWettbewerb(url) { 

wettbewerb=window.open(url,"","width=740,height=500,menubar=1,status=1,scrollbars=1,resizable=1");
}	


function winWettbewerb2006(url) { 

wettbewerb=window.open(url,"","width=740,height=600,menubar=1,status=1,scrollbars=1,resizable=1");
}	


function winPdfHinweis()
{ 
winPdf=window.open('pdf_hinweis.html',"","width=280,height=200,menubar=0,status=0,scrollbars=0");
}	

w=null		
function changeWin(myurl) 
{ 

	   	 if (opener != null && opener.closed == false)
		 {
			opener.document.location.href=myurl
			opener.focus();
		}	
	   	 else if (w == null)
		   w=window.open('http://www.sternstadt-forum.de')
		 else (w != null)
			 w.focus();  
     
 }		

