var nixdorfStart = new Array();

function justify_screen()
{
  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.clientHeight;
  }
  else if (document.body) // other Explorers
  {
  	x = document.body.clientWidth;
  	y = document.body.clientHeight;
  }


  if (x<1200 || y<830) {
    document.body.scroll = "yes";
    document.body.style.overflow = "auto";
  } else {
    document.body.scroll = "no";
    document.body.style.overflow = "hidden";  
  }
   
  if (y<830) {
    //document.getElementById("rahmen_seite").style.height = "850px";
    //document.getElementById("inhalt").style.height = "500px";
    document.getElementById("rahmen").style.marginTop = "auto";
    document.getElementById("rahmen").style.top = "-120px";   
    document.getElementById("rahmen").style.height = String(120 + 850) + "px"; 
  } else {
    document.getElementById("rahmen").style.marginTop = "-580px";
    document.getElementById("rahmen").style.top = "50%";
    document.getElementById("rahmen").style.height = "1200px";
  }
  
  if (x<1200) {
    document.getElementById("rahmen").style.marginLeft = "auto";
    document.getElementById("rahmen").style.left = "-330px";
    document.getElementById("rahmen").style.width = String(330 + 1200) + "px";

  } else {
    document.getElementById("rahmen").style.marginLeft = "-960px";
    document.getElementById("rahmen").style.left = "50%";
    document.getElementById("rahmen").style.width = "1920px";  
  }  
  
}




function rgb2hex(rgb) {
 rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
 function hex(x) {
  hexDigits = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
  return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];
 }
 return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}



