/* CALCULATING HIGH OF CONTENT */

var Hoehe = 0;



//berechnet die hoehe der divs neu bei normaler grösse des headers
function neuAufbau()
{

	if (Hoehe != Fensterhoehe())
		Hoehe = Fensterhoehe();
		
	// ie explorer can go more down
	if(navigator.userAgent.indexOf("MSIE") > -1)
		Hoehe = Hoehe + 10;
		
		
	if(document.getElementById("resize") != null && Hoehe > 100)
		document.getElementById("resize").style.height = Hoehe - 54;
	if(document.getElementById("scrollable") != null && Hoehe > 100)
		document.getElementById("scrollable").style.height = Hoehe - 71;
	if(document.getElementById("hitlength") != null && Hoehe > 100)
		document.getElementById("hitlength").style.height = Hoehe - 195;
	if(document.getElementById("bearbeiterContent") != null && Hoehe > 100)
		document.getElementById("bearbeiterContent").style.height = Hoehe - 249;
	if(document.getElementById("bigContent") != null && Hoehe > 100)
		document.getElementById("bigContent").style.height = Hoehe - 40;	
	if(document.getElementById("scrollableFind") != null && Hoehe > 100)
		document.getElementById("scrollableFind").style.height = Hoehe - 155;
	if(document.getElementById("content") != null && Hoehe > 100)
		document.getElementById("content").style.height = Hoehe - 155;
	if(document.getElementById("find") != null && Hoehe > 100)
		document.getElementById("find").style.height = Hoehe - 155;
	if(document.getElementById("hitlengthBackground") != null && Hoehe > 100)
		document.getElementById("hitlengthBackground").style.height = Hoehe - 165;
	if(document.getElementById("hitlengthBackgroundNamen") != null && Hoehe > 100)
		document.getElementById("hitlengthBackgroundNamen").style.height = Hoehe - 180;
	if(document.getElementById("hitlengthNamen") != null && Hoehe > 100)
		document.getElementById("hitlengthNamen").style.height = Hoehe - 210;
	if(document.getElementById("findNamen") != null && Hoehe > 100)
		document.getElementById("findNamen").style.height = Hoehe - 170;
	if(document.getElementById("scrollableFindNamen") != null && Hoehe > 100)
		document.getElementById("scrollableFindNamen").style.height = Hoehe - 170;
	if(document.getElementById("contentNamen") != null && Hoehe > 100)
		document.getElementById("contentNamen").style.height = Hoehe - 170;
	if(document.getElementById("scrollableFrame") != null && Hoehe > 33)
		document.getElementById("scrollableFrame").style.height = Hoehe - 33;
	var Id = window.setTimeout("neuAufbau();",1000);
	
}

function Fensterhoehe() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body &&  document.body.clientHeight ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  
  return myHeight;
}

function BrowserIs ()
{

    var agt=navigator.userAgent.toLowerCase();



    this.Major = parseInt(navigator.appVersion);

    this.Minor = parseFloat(navigator.appVersion);



    this.Netscape  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)

                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)

                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));

    this.Netscape2 = (this.Netscape && (this.Major == 2));

    this.Netscape3 = (this.Netscape && (this.Major == 3));

    this.Netscape4 = (this.Netscape && (this.Major == 4));

    this.Netscape4Up = (this.Netscape && (this.Major >= 4));

    this.NetscapeOnly      = (this.Netscape && ((agt.indexOf(";nav") != -1) ||

                          (agt.indexOf("; nav") != -1)) );

    this.Netscape6 = (this.Netscape && (this.Major == 5));

    this.Netscape6Up = (this.Netscape && (this.Major >= 5));

    this.Gecko = (agt.indexOf('gecko') != -1);



    this.IE     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

    this.IE3    = (this.IE && (this.Major < 4));

    this.IE4    = (this.IE && (this.Major == 4) && (agt.indexOf("msie 4")!=-1) );

    this.IE4Up  = (this.IE  && (this.Major >= 4));

    this.IE5    = (this.IE && (this.Major == 4) && (agt.indexOf("msie 5.0")!=-1) );

    this.IE5_5  = (this.IE && (this.Major == 4) && (agt.indexOf("msie 5.5") !=-1));

    this.IE5Up  = (this.IE  && !this.IE3 && !this.IE4);

    this.IE5_5Up =(this.IE && !this.IE3 && !this.IE4 && !this.IE5);

    this.IE6    = (this.IE && (this.Major == 4) && (agt.indexOf("msie 6.")!=-1) );

    this.IE6Up  = (this.IE  && !this.IE3 && !this.IE4 && !this.IE5 && !this.IE5_5);

    

    this.W3cDom1 = this.IE5Up || this.Netscape6Up || document.getEltementById;

}



var browserIs = new BrowserIs();



function GetElt( elt ) 

{

	if( browserIs.W3cDom1 )

	{

		var obj = document.getElementById( elt );

		if( obj != null )

			return obj;

		return document.getElementByName( elt );

	}

	else if( BrowserIs.IsNavigator4Up ) 

	{

		var currentLayer = document.layers[ GetElt.arguments[0] ];

		for( var i=1; i < GetElt.arguments.length && currentLayer; i++ )

			currentLayer = currentLayer.document.layers[ GetElt.arguments[ i ] ];

		return currentLayer;

    } 

	else if( BrowserIs.IE4Up )

	{

	  	var search = GetElt.arguments[ GetElt.arguments.length-1 ];

		return document.all.item( search );

	}

}


function Toggle(objDiv, objImg)
{
					
	if (objDiv.style.display == "none") 
	{
		objDiv.style.display = "";
		objImg.src = "iconMinus.gif";
	}
	else 
	{
		objDiv.style.display = "none";
		objImg.src = "iconPlus.gif";
	}
}
