function restoreSubMenu() {
   
  
  var xhr = null;
  
    // Mozilla
  if (window.XMLHttpRequest) {
      xhr = new XMLHttpRequest();
  }
  // IE
  else if (window.ActiveXObject) {
      xhr = new ActiveXObject("Microsoft.XMLHTTP");
  }   

// var url = "/system/php/schauspielermenu.php";
  var url = "/system/php/schauspielermenu.php";
  
  xhr.open("GET", url, true);
     
  xhr.onreadystatechange = function() {
    if(xhr.readyState == 4) {
      parent.document.getElementById("submenu").innerHTML = xhr.responseText;
//      parent.document.getElementById("submenu").style.visibility = "visible";  
    }
  }
  xhr.send(null); 
}

function setSubMenu(path) {

  var xhr = null;
    // Mozilla
  if (window.XMLHttpRequest) {
      xhr = new XMLHttpRequest();
  }
  // IE
  else if (window.ActiveXObject) {
      xhr = new ActiveXObject("Microsoft.XMLHTTP");
  }   

  //var url = "/system/php/schauspielermenu.php?path=" + path;
  var url = "/system/php/schauspielermenu.php?path=" + path;
  
  xhr.open("GET", url, true);
     
  xhr.onreadystatechange = function() {
    if(xhr.readyState == 4) {
      parent.document.getElementById("submenu").innerHTML = xhr.responseText;
//      parent.document.getElementById("submenu").style.visibility = "visible";  
      parent.document.getElementById("contentframe").src = "showreel.html";
    }
  }
  xhr.send(null); 
}


function setiframeheight(relatedelement, relatediframe) {
    relatediframe.style.height = (relatedelement.offsetHeight) +"px";
    return;
  }    

function settooltip(element, text) {
  var tmp = new Array();
  tmp = document.getElementsByTagName(element);
  for (i=0; i < tmp.length; i++) {
    tmp[i].title = text;
  }
  return;  
}

function getViewPortWidth() {
  var width;
  if (document.body.clientWidth) { // iE 5.5
    width = document.body.clientWidth;
  }
  if (window.innerWidth) { //gecko browser, chrome, safari, konqueror
    width = window.innerWidth;
  }
  else if (document.documentElement.clientWidth) { // iE 6,7,8
    width = document.documentElement.clientWidth;
  }
  return (width);  
}

function getViewPortHeight() {
  var height;
  if (document.body.clientWidth) { // iE 5.5
    height = document.body.clientHeight;  
  }
  if (window.innerWidth) { //gecko browser, chrome, safari, konqueror
    height = window.innerHeight;
  }
  else if (document.documentElement.clientWidth) { // iE 6,7,8
    height = document.documentElement.clientHeight;  
  }
  return (height);  
}