image1 = new Image();
image1.src = "images/bgspot.jpg";

image2 = new Image();
image2.src = "images/bgspot2.jpg";

image3 = new Image();
image3.src = "images/bgmaking.jpg";

image3 = new Image();
image3.src = "images/bgsong.jpg";

//PICTUREVIEWER//
var cur=0

var beeld=new Array()
beeld[0]='<img src="images/mo/full/0.jpg" width="224" height="335" alt="de making of" border="0" />'
beeld[1]='<img src="images/mo/full/1.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[2]='<img src="images/mo/full/2.jpg" width="224" height="335" alt="de making of" border="0" />'
beeld[3]='<img src="images/mo/full/3.jpg" width="224" height="335" alt="de making of" border="0" />'
beeld[4]='<img src="images/mo/full/4.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[5]='<img src="images/mo/full/5.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[6]='<img src="images/mo/full/6.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[7]='<img src="images/mo/full/7.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[8]='<img src="images/mo/full/8.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[9]='<img src="images/mo/full/9.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[10]='<img src="images/mo/full/10.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[11]='<img src="images/mo/full/11.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[12]='<img src="images/mo/full/12.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[13]='<img src="images/mo/full/13.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[14]='<img src="images/mo/full/14.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[15]='<img src="images/mo/full/15.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[16]='<img src="images/mo/full/16.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[17]='<img src="images/mo/full/17.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[18]='<img src="images/mo/full/18.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[19]='<img src="images/mo/full/19.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[20]='<img src="images/mo/full/20.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[21]='<img src="images/mo/full/21.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[22]='<img src="images/mo/full/22.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[23]='<img src="images/mo/full/23.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[24]='<img src="images/mo/full/24.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[25]='<img src="images/mo/full/25.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[26]='<img src="images/mo/full/26.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[27]='<img src="images/mo/full/27.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[28]='<img src="images/mo/full/28.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[29]='<img src="images/mo/full/29.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[30]='<img src="images/mo/full/30.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[31]='<img src="images/mo/full/31.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[32]='<img src="images/mo/full/32.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[33]='<img src="images/mo/full/33.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[34]='<img src="images/mo/full/34.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[35]='<img src="images/mo/full/35.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[36]='<img src="images/mo/full/36.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[37]='<img src="images/mo/full/37.jpg" width="224" height="335" alt="de making of" border="0" />'
beeld[38]='<img src="images/mo/full/38.jpg" width="500" height="335" alt="de making of" border="0" />'
beeld[39]='<img src="images/mo/full/39.jpg" width="224" height="335" alt="de making of" border="0" />'

function showgallery(nr){
			cur=0;
			prevpic(beeld);
			nextpic(beeld);
}



function prevpic(ar){
	if(cur==0){
			cur=ar.length-1
			writePic(ar, cur)
		}else if (cur>0){
		cur--
		writePic(ar, cur)
	}
}

function nextpic(ar){
	if(cur>=ar.length-1){
			cur=0
			writePic(ar, cur)
		}else if (cur<ar.length-1){
		cur++
		writePic(ar, cur)
	}
}

function writePic(ar, nr){
	cur = nr;
	document.getElementById('fotos').innerHTML = ar[nr]
	document.getElementById('teller').innerHTML = 'foto '+(nr+1)+' van '+ar.length
}

/*******************************************************************/

function writeVideo(nr){
	document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="260">');
	document.write('<param name="src" value="video/'+nr+'.mpg" />');
	document.write('<param name="controller" value="true" />');
	document.write('<param name="autoplay" value="false" />');
	document.write('<!--[if !IE]>-->');
	document.write('<object type="video" data="video/'+nr+'.mpg" width="320" height="260">');
	document.write('<param name="autoplay" value="false" />');
	document.write('<param name="controller" value="true" />');
	document.write('</object>');
	document.write('<!--<![endif]-->');
	document.write('</object>');
}

function writeAudio(nr){
	document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="240" height="20">');
	document.write('<param name="src" value="audio/'+nr+'.mp3" />');
	document.write('<param name="controller" value="true" />');
	document.write('<param name="autoplay" value="false" />');
	document.write('<!--[if !IE]>-->');
	document.write('<object data="audio/'+nr+'.mp3" width="240" height="20">');
	document.write('<param name="autoplay" value="false" />');
	document.write('<param name="controller" value="true" />');
	document.write('</object>');
	document.write('<!--<![endif]-->');
	document.write('</object>');
}

function writeSong(nr){
	document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="240" height="20">');
	document.write('<param name="src" value="audio/'+nr+'.mp3" />');
	document.write('<param name="controller" value="false" />');
	document.write('<param name="autoplay" value="true" />');
	document.write('<!--[if !IE]>-->');
	document.write('<object data="audio/'+nr+'.mp3" width="240" height="20">');
	document.write('<param name="autoplay" value="true" />');
	document.write('<param name="controller" value="false" />');
	document.write('</object>');
	document.write('<!--<![endif]-->');
	document.write('</object>');
}