// JavaScript Document
function fensteroeffnen(URL, fenstername, w, h, scrollen, rez, media) {
	var adresse = URL;
	var breite = w;
	var hoehe = h;
	var winlinks = (screen.width - breite) / 2;
	var winoben = (screen.height - hoehe) / 2;
	winprops = 'height='+hoehe+',width='+breite+',top='+winoben+',left='+winlinks+',scrollbars='+scrollen+',resizable='+rez;
	win = window.open((adresse+'?media='+media), fenstername, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	if (win) {
		return false;
  	}else{ 
		return true;
	}
}

function checkformular(){
	if((document.loginform.benutzer.value == "") || (document.loginform.pass.value == "")){ 
		alert("Bitte füllen Sie alle Felder aus."); 
		document.loginform.benutzer.focus();  
	} else{
		document.loginform.submit();
	}
}

function subMenu() {
  var arr = ["home","references","producers","studios"];
  jQuery.each(arr, function() {
    var tmpId = this;
    $("#"+tmpId+"link").mouseover(function(event){
      $("#"+tmpId+"Container").show();
    });
    $("#"+tmpId+"Container").mouseover(function(event){
      $("#"+tmpId+"Container").show();
    });
    $("#"+tmpId+"Container").mouseout(function(event){
      $("#"+tmpId+"Container").hide();
    });
  });
}

$(document).ready(function(){
  subMenu();
});

