 var t;
 function ShowSubMenu(el) {
  HideSubMenu();
  li = el.parentNode.getElementsByTagName('ul')[0].getElementsByTagName('li');
  if (li.length > 0) {
  el.parentNode.getElementsByTagName('ul')[0].className = 'open';
  }
 }

 function HideSubMenu() {
	el = document.getElementById('navcontainer');
		ul = el.getElementsByTagName("ul");
		for (i = 0; i < ul.length; i++) {
			ulul = ul[i].getElementsByTagName("ul");
			for (var x = 0; x < ulul.length; x++) {
				ulul[x].className = "";
			}
		}
 }
 
 function DoHideSubMenu() {
 	HideSubMenu;
 }
 

window.onload = function() {
    if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		strGET=window.location.href;
		if ( strGET.lastIndexOf('.html') > 0) {	strGET= strGET.substring(0, strGET.lastIndexOf('.html')); }
		if ( strGET.lastIndexOf('.php') > 0) { strGET= strGET.substring(0, strGET.lastIndexOf('.php'));	}
		if ( strGET.lastIndexOf('/') > 0) { strGET= strGET.substring(strGET.lastIndexOf('/')+1);	}
		el = document.getElementById('flashcontent');
        el.style.backgroundImage = "url(./picplayer/"+strGET+".jpg)";
	}
	
	document.getElementById('flashcontent').onmouseover = function() {
		HideSubMenu();
	}
	document.getElementById('middle').onmouseover = function() {
		HideSubMenu();
	}
 }

