<!-- voor de swap plaatjes -->
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() { //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];}
}

function doShowSlideShow(naam, nr)
{
	obj = document.getElementById(naam);
	obj2 = document.getElementById("fotoshow");
	obj.style.visibility = "visible";
	obj2.style.visibility = "visible";
	obj.style.display = "block";
	obj2.style.display = "block";
	obj2.style.filter = "alpha(opacity=75)";
	obj2.style.opacity = ".75";
	obj2.style.height = document.body.clientHeight + 20 +"px";
	//obj2.style.heigth = document.body.height;
	//document.body.style.overflow = "hidden";
	obj.scrollIntoView();
	alert ("hoi"+myGallery);
	myGallery.goTo(nr);	
}

function closeSlideShow(naam)
{
	obj = document.getElementById(naam);
	obj2 = document.getElementById("fotoshow");
	obj.style.visibility = "hidden";
	obj2.style.visibility = "hidden";
	obj.style.display = "none";
	obj2.style.display = "none";
	document.body.style.overflow = "auto";
}


function showImage(url, text, size)
{
	htmlobject = document.getElementById("fullsize");
	htmlobject2 = document.getElementById("fullsizeimg");
	imgobject = document.getElementById("imgfull");
	textobject = document.getElementById("fulltext");
	if (htmlobject!= null)
	{
		// display foto	
		htmlobject.style.display = "";
		htmlobject2.style.display = "";
		// soort foto
		imgobject.src = url;
		
		htmlobject.style.filter = "alpha(opacity=75)";
		htmlobject.style.opacity = ".75";
		
		// voor de tekst
		if (size[1] > 300)
		{
			textobject.style.width = (size[1]-44)+"px"; // 40px padding + 4px border
			textobject.style.marginLeft = ((size[1]/2)*-1)+"px";
		}
		//alert (textobject.style.width);
		textobject.innerHTML = text;// + "<br/>Fotogrootte: "+ size[1]+ "x"+size[0] + "<br/>Margin: " + ((size[1]/2)*-1) + "x"+((size[0]/2)*-1);
		
		// de foto in het midden plaatsen
		imgobject.style.top = "50%";
		imgobject.style.marginTop = ((size[0]/2)*-1)+"px";
		imgobject.style.marginLeft = ((size[1]/2)*-1)+"px";
		imgobject.style.position = "absolute";
		
		// foto moet niet doorzichtig zijn...
		imgobject.style.filter = "alpha(opacity=100)";
		imgobject.style.opacity = "1.0";
	}
	else
		alert ("Foto kan niet worden uitvergroot!");
}

function closeImage(obj)
{
	if (obj.id != "fullsize")
		document.getElementById("fullsize").style.display = "none";
	if (obj.id != "fullsizeimg")
		document.getElementById("fullsizeimg").style.display = "none"; 
	document.getElementById("fulltext").style.width = "300px";
	document.getElementById("fulltext").style.marginLeft = "-194px";
	obj.style.display = "none";
}

function toggle(srt)
{
	if (srt == "standaard")
	{
		//document.getElementById("hoofdmenu").className = "geen";
		//document.getElementById("standaard").style.visibility = "visible";
		//document.getElementById("sub_menu_particulier").style.visibility = "hidden";
		//document.getElementById("sub_menu_zakelijk").style.visibility = "hidden";
	}
	else
	{
		//document.getElementById("standaard").style.visibility = "hidden";
		//document.getElementById("hoofdmenu").className = "uitschuif";
		//document.getElementById("hoofdmenu").style.height = "28px";
		/*if (srt == "particulier")
		{
			document.getElementById("sub_menu_particulier").style.visibility = "visible";
			document.getElementById("sub_menu_zakelijk").style.visibility = "hidden";
		}
		else
		{
			document.getElementById("sub_menu_particulier").style.visibility = "hidden";
			document.getElementById("sub_menu_zakelijk").style.visibility = "visible";
		}*/
	}
}

function print_r(theObj){
  if(theObj.constructor == Array ||
     theObj.constructor == Object){
    document.write("<ul>")
    for(var p in theObj){
      if(theObj[p].constructor == Array||
         theObj[p].constructor == Object){
document.write("<li>["+p+"] => "+typeof(theObj)+"</li>");
        document.write("<ul>")
        print_r(theObj[p]);
        document.write("</ul>")
      } else {
document.write("<li>["+p+"] => "+theObj[p]+"</li>");
      }
    }
    document.write("</ul>")
  }
}




