
/* ------------------------------------------------------------------------ */
var view_heigth = '370';
var fixheigth = '200';
var x,y, agent;

/* an die URL wird der Parameter &checkmode=1 angehäng um die message zu zeigen */
  function checkcompatmode() {
    var expr = /(checkmode\=1)/g;
    if (expr.test(document.URL))
    {
     	if (document.compatMode == "CSS1Compat") 
	    { alert( "Browser verhaelt sich Standardkonform \n(" + document.compatMode + ' Modus)'); }
  	else { alert ("Browser verhaelt sich nicht Standardkonform \n(Quirks-Mode -> " + document.compatMode + '  Modus)'); }
    }
  }   

// ------------------------------------------------------------------
// javacript to change ccs style class 
// ------------------------------------------------------------------
// Works only on ellement with defined (id="somename") 
// Call like the element : 
// onMouseOut="chclass('this', 'def_class'); onMouseOver="change('this', 'over_class');

   function chclass(id, newClass)
   {
    	identity=document.getElementById(id);
	    identity.className=newClass;
   }

/* --------------------------------------------------------------------- */

  function getWinDims() 
  {
    if (self.innerHeight) // all except Explorer
    {
      agent='std';
      x = self.innerWidth;
      y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
   // Explorer 6 Strict Mode
    {
      agent='>=ie6';    
      x = document.documentElement.clientWidth;
      y = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
      agent='ie';      
      x = document.body.clientWidth;
      y = document.body.clientHeight;
    }
  return x,y;
  }

  function _Get_Heigh(){
    getWinDims();
	  var _WH;
    if ( agent == 'std')
    {
      _WH =  y -3;
    return _WH;
    }
    else if ( ( agent =='ie') && (document.body.offsetHeight > view_heigth) )
    {
      _WH = y -6;
    return _WH;
    }
    else if ( ( agent =='>=ie6') && (document.body.offsetHeight > view_heigth) )
    {
      _WH = y -6;
    return _WH;
    }
    else
    {
      return 0;
    }
  }
   
   
  function _Set_Cookie (_Content) {
		var _Ablauf = new Date();
		var _Zeit = _Ablauf.getTime() + (5 * 24 * 60 * 60 * 1000);
		_Ablauf.setTime(_Zeit);
		_Ablauf = _Ablauf.toGMTString();
		document.cookie = 'position-class-cookie' +"=" + _Content + ";expires=" + _Ablauf;
  }

	function _do_it(Value1,Value2)
	{
		if (document.getElementById('col-pos-0'))
			{
				document.getElementById('col-pos-0').style.height = Value2+'px';
			}
			if (document.getElementById('col-pos-1'))
			{
				document.getElementById('col-pos-1').style.height =  Value1+'px';
			}
			if (document.getElementById('col-pos-2'))
			{
				document.getElementById('col-pos-2').style.height = Value2+'px';
			}
			if (document.getElementById('col-pos-3'))
			{
				document.getElementById('col-pos-3').style.height = Value2+'px';
			}
	}

	function _re_size_it(){
		var _GH = _Get_Heigh() - fixheigth;

		if ( _GH >= view_heigth )
		{ 			
			var Value2 = _GH;
			var Value1 = _GH - 10;
	    _do_it(Value1,Value2);
		
			var _Class_Sizes = Value2+'#'+Value1;        
			_Set_Cookie(_Class_Sizes);
		}
		
		else if ( _GH < view_heigth )
		{ 			
			var Value2 = view_heigth;
			Value1 = view_heigth  -10 ;
		    _do_it(Value1,Value2); 

			var _Class_Sizes = Value2+'#'+Value1;        
			_Set_Cookie(_Class_Sizes);
		}
	}
	
   
   
   