/* JavaScript Code, Author: Volker Golbig, May 2005
   This script is used by design1.html in order to
   adapt Height and Width of the boxcontent-Object
   to ensure 100 percent Height and Width Layout	*/

   var url, suburl, posparameter, design, color, width, position, navigation;

   if(!window.winheight && window.innerHeight)
   {
	window.onresize = setBoxcontentheight;
	winheight = getWinheight();
   }

/* getWinheight() returns Window inner Height (browser-dependent)
   @return: Height of Browserwindow or Frame (int)
   @called by: design1.html, init of this script */

   function getWinheight()
   {
	if (window.innerHeight) return window.innerHeight;
	else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
	else return 0;
   }



/* setBoxcontentheight() changes width and height
   of boxcontent-Object (browser-dependent)
   @called by: design1.html, init of this script */

   function setBoxcontentheight()
   {
	var DHTML = (document.getElementById || document.all || document.layers);
	if (DHTML) {
	         var x,y;
	         if (self.innerHeight) // all except Explorer
	         {
	                 x = self.innerWidth;
	                 y = self.innerHeight;
	         }
	         else if (document.documentElement && document.documentElement.clientHeight)
	         // Explorer 6 Strict Mode
	         {
	                 x = document.documentElement.clientWidth;
	                 y = document.documentElement.offsetHeight;
	         }
	         else if (document.body) // other Explorers
	         {
	                 x = document.body.clientWidth;
	                 y = document.body.clientHeight;
	         }
	         var boxcontent = new getObjstyle('boxcontent');
                  if ((y-220)>359) {
                   boxcontent.style.overflow ='auto';
                   boxcontent.style.height =y-225+'px';
                  } else {
                   boxcontent.style.height =100+'%';
                   boxcontent.style.overflow ='hidden';
                  }
	}
   }

/* getObjstyle(name) sets Object and Style (browser-dependent)
   @input: boxcontent-name
   @called by: setBoxcontentheight()*/

   function getObjstyle(name)
   {
	if (document.getElementById)
	{
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all)
	{
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers)
	{
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
   }
