function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
function checkSubmenu() {
        var iGroep = gup('iGroep');
	if (iGroep != '') {
		showSubmenu(iGroep);
		}
	else {
		document.getElementById('submenuDiv').style.display = "none";
	}
}
function showSubmenu(groep) {
        var iCategory = gup('iCategory');
	document.getElementById('submenuDiv').style.display = "block";

	var locatie = document.getElementById('submenu');
	var locX = document.getElementById(groep).x;


	switch(groep) {
	case 'partyverhuur' :
		locatie.innerHTML = '<ul><li><a href="?content=producten&iGroep='+groep+'&iCategory=6" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="6">Tafels en Sta-tafels</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=22" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="22">Tafellinnen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=40" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="40">Tafelrokken en -hoezen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=41" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="41">Stoelen en krukken</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=17" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="17">Inrichting</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=42" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="42">Entree / Garderobe</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=43" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="43">Podium / Dansvloer</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=23" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="23">Licht/ geluid/ electra</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=12" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="12">Bestek</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=20" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="20">Serviesgoed</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=16" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="16">Glaswerk</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=44" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="44">Keuken-apparatuur</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=19" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="19">Keukenmaterialen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=45" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="45">Warmhoud-apparatuur</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=46" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="46">Koel- en vriesapparatuur</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=47" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="47">Koffie- en Theeapparatuur</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=14" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="14">Buffet artikelen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=13" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="13">Biertap + benodigdheden</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=15" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="15">Dranken</a></li></ul>';
		locatie.style.marginLeft = "0px";
		locatie.style.width = "235px";
		break;
	case 'spelmaterialen' :
		locatie.innerHTML = '<ul><li><a href="?content=producten&iGroep='+groep+'&iCategory=3" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="3">Springkussens</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=5" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="5">Sport en Spel</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=34" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="34">Voetbal spelen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=33" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="33">Zeskamp spelen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=8" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="8">Tractaties</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=26" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="26">Houten Spelen</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=4" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="4">Opblaasfiguren</a></li></ul>';
		locatie.style.marginLeft = "235px";
		locatie.style.width = "227px";
		break;
	case 'kantoormeubilair' :
		locatie.innerHTML = '<ul><li><a href="http://www.allinkantoormeubelverhuur.nl/index.php?item=producten.html" target="_blank" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="39">Bureaustoelen</a></li><li><a href="http://www.allinkantoormeubelverhuur.nl/index.php?item=producten.html" target="_blank" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="7">Bureautafels</a></li><li><a href="http://www.allinkantoormeubelverhuur.nl/index.php?item=producten.html" target="_blank" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="7">Kantoorkasten</a></li><li><a href="http://www.allinkantoormeubelverhuur.nl/index.php?item=producten.html" target="_blank" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="7">Vergadermeubilair</a></li></ul>';
		locatie.style.marginLeft = "462px";
		locatie.style.width = "264px";
		break;
	case 'tentverhuur' :
		locatie.innerHTML = '<ul><li><a href="?content=producten&iGroep='+groep+'&iCategory=39" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="39">Quick-Tenten</a></li><li><a href="?content=producten&iGroep='+groep+'&iCategory=7" onmouseover="deleteTimer()" onmouseout="TimeOut()" id="7">Party-Tenten</a></li></ul>';
		locatie.style.marginLeft = "725px";
		locatie.style.width = "257px";
		break;
	}

	if (iCategory != '') {
	var Item = document.getElementById(iCategory);
	Item.style.background = "url(images/submenu_rollover.gif) top left repeat-x";
	Item.style.color = "#fff";
	}

}
function msieversion()
// return Microsoft Internet Explorer (major)
// version number, or 0 for others.
// This function works by finding the "MSIE "
// string and extracting the version number
// following the space, up to the decimal point
// for the minor version, which is ignored.
{
var ua = window.navigator.userAgent
var msie = ua.indexOf ( "MSIE " )
if ( msie > 0 )      // is Microsoft Internet Explorer; return version number
   return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )
else
   return 0          // is other browser
}
function TimeOut() {
	window.timeOut = setTimeout("hideMenu();",1000);
}
function deleteTimer() {
if (window.timeOut !== undefined) {
	window.clearTimeout(timeOut);
	}
}
function hideMenu() {
	document.getElementById('submenuDiv').style.display = "none";
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage(submenu) { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
      }

}