


function pict_out(id)
{
	myString = new String(document.getElementById(id).src);
	lastslash=0;
	lastslash=myString.lastIndexOf("/");
	if (lastslash>0) path=myString.substr(0,lastslash);
	filename=myString.substr((lastslash+4));
	document.getElementById(id).src=path+"/"+filename;
}

function pict_in(id)
{
	myString = new String(document.getElementById(id).src);
	lastslash=0;
	lastslash=myString.lastIndexOf("/");
	if (lastslash>0) path=myString.substr(0,lastslash);
	//alert(path);
	filename=myString.substr((lastslash+1));
	document.getElementById(id).src=path+"/mo_"+filename;
}

function openphoto(url,name,desc) {

	fotowin = window.open("/global/php/customphp/photo.php?url="+url+"&name="+name+"&desc="+desc,'fotowindow','toolbar=no,width=300,height=550,directories=no,status=no,scrollbars=auto,resizable=yes,menubar=no');
	/*fotowin.document.write('<html><head>');
	fotowin.document.write('<title>'+name+'</title><link rel="stylesheet" href="/global/style/rebel.css" type="text/css">');
	fotowin.document.write('<script language="javascript" >  function fitPic() { var NS = (navigator.appName=="Netscape")?true:false; 	mWidth = (NS)?window.innerWidth:document.body.clientWidth; 	mHeight = (NS)?window.innerHeight:document.body.clientHeight; 	iWidth = document.images[0].width - mWidth + 75; 	iHeight = document.images[0].height - mHeight + 115; 	window.resizeBy(iWidth, iHeight);	self.focus(); }</script>');
	fotowin.document.write('</head><body margin="0" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" bottommargin="0" onLoad="fitPic()"><div class="PhotoPopup" ><table cellspacing="0" cellpadding="0" class="PhotoPopup" border="0" ><tr><td  class="PhotoClose" colspan="2" align="middle">');
	fotowin.document.write('<img src="'+url+'"></td></tr><tr><td class="PhotoClose" ><img style="cursor:pointer;" title="Close"  src="/global/img/close.gif" onClick="self.close()"></td><td class="PhotoOpschrift" ><b>'+name+'</b>&nbsp;'+desc+'</td></tr></table></div>');
	fotowin.document.write('</body></html><button onclick="fitPic();">clickme</button>');
	fotowin.document.close();*/
	return false;
}

function logonmaybe(theevent)
{
		location.href="/index.php?application=Login&action=DrawForm";
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
  
}

function StopMp3()
{
	var flashMovie=getFlashMovieObject("themovie");
	flashMovie.TCallFrame("/", 1);
	document.getElementById("Mp3PlayKnop").innerHTML="<a href='javascript:StartMp3()'><img border='0' src='/global/img/geluiduit.gif'></a>";
	createCookie("MagMuziekAan","Nee");
}

function StartMp3()
{
	var flashMovie=getFlashMovieObject("themovie");
	flashMovie.TCallFrame("/", 2);
	document.getElementById("Mp3PlayKnop").innerHTML="<a href='javascript:StopMp3()'><img border='0' src='/global/img/geluidaan.gif'></a>";
	createCookie("MagMuziekAan","Ja");
}

//window.onload = function () {
//alert(MagMuziekAan);
	//if (SpelenIsToegestaan && MagMuziekAan) StartMp3();

//}
