//Programmed by :Beatnation:
//do not steal this code!

var sound=true;

function foto(url){
var foto=new Image();
foto.src=url;
var breedte=foto.width;
var hoogte=foto.height;
var breedtestr="";
if (hoogte>breedte){
	breedtestr="100";
}
else{
	breedtestr="120";

}
url=url.replace("party pics","party pics/small");
var nieuwefoto=new Image();
nieuwefoto.src=url;
document.write('<img src=\"'+url+ '\" width='+breedtestr+'\" ');

}

function resize(element){
	var hoogte=element.height;
	var breedte=element.width;
	var source=element.src;
	if (hoogte>breedte){
		element.width=100;
	}
	else{
		if ((source.indexOf('miscellaneous/01'))<0){
		element.width=120;
		}
	}
	
}

function resizeall(aantal){
	for(i=1;i<=aantal;i++){
		resize(document.getElementById('id'+i));		
	}
}



function openpopup(url,tekst)
{
var foto=new Image();
url2=url.replace("party pics","party pics/small");
foto.src=url2;
var breedte=foto.width;
var hoogte=foto.height;
var aspect=hoogte/breedte;


if (aspect>1){
	hoogte=500;
	breedte=Math.floor(hoogte/aspect);
	var venster=window.open('','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.clear();
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" onblur=\"self.close()\">');
	venster.document.write('<img src=\"'+url+'\" height=\"'+hoogte+' width=\"'+breedte+'\"\\>');
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();

}
else{
	breedte=550;
	hoogte=Math.floor(breedte*aspect);
	var venster=window.open('','','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');;
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" onblur=\"self.close()\">');
	venster.document.write('<img src=\"'+url+'\" height=\"'+hoogte+' width=\"'+breedte+'\"\\>');
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();
}
	
}

function openpopupgroot(url,tekst)
{
var foto=new Image();
url2=url.replace("party pics","party pics/small");
foto.src=url2;
var breedte=foto.width;
var hoogte=foto.height;
var aspect=hoogte/breedte;


if (aspect>1){
	hoogte=500;
	breedte=Math.floor(hoogte/aspect);
	var venster=window.open('','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.clear();
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" onblur=\"self.close()\">');
	venster.document.write('<img src=\"'+url+'\" height=\"'+hoogte+' width=\"'+breedte+'\"\\>');
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();

}
else{
	breedte=700;
	hoogte=Math.floor(breedte*aspect);
	var venster=window.open('','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');;
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" onblur=\"self.close()\">');
	venster.document.write('<img src=\"'+url+'\" height=\"'+hoogte+' width=\"'+breedte+'\"\\>');
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();
}
	
}

function openpopupsize(url,tekst,breedte,hoogte){
	var venster=window.open('','Beatnation','width='+breedte+',height='+hoogte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" onblur=\"self.close()\">');
	venster.document.write('<img src=\"'+url+'\" width=\"'+breedte+'\"\\>');
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();

}

function openinfopopup(url,breedte,hoogte){

var venster=window.open(url,'Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
}

function volgendefoto(url,aantal,datum){
afspelen('bladeren');
var teller=url.lastIndexOf('/');
var begin=url.slice(0,teller);
var eindeurl=url.substr((teller+1),10);
var eerstepunt=eindeurl.indexOf('.');
var strfilenummer=eindeurl.slice(0,eerstepunt);
var filenummer=parseFloat(strfilenummer);

if (filenummer<aantal){
	filenummer+=1;
	}
else{
	filenummer=1;
}

var alttag='id'+filenummer;
var element=document.getElementById(alttag);
if (filenummer<10){
document.images.viewer.src=begin+"/"+'0'+filenummer+'.jpg';
}
else{
document.images.viewer.src=begin+"/"+filenummer+'.jpg';
}
if(document.images.viewer.src.indexOf('miscellaneous/01.jpg')>0){
document.images.viewer.height="200";
}
else{
	document.images.viewer.height="300";
}


document.images.viewer.alt=element.alt;
}

function vorigefoto(url,aantal,datum){
afspelen('bladeren');
var teller=url.lastIndexOf('/');
var begin=url.slice(0,teller);
var eindeurl=url.substr((teller+1),10);
var eerstepunt=eindeurl.indexOf('.');
var strfilenummer=eindeurl.slice(0,eerstepunt);
var filenummer=parseFloat(strfilenummer);

if (filenummer>1){
	filenummer-=1;
	}
else{
	filenummer=aantal;
}

if(document.images.viewer.src.indexOf('miscellaneous/02.jpg')>0){
document.images.viewer.height="200";
}
else{
	document.images.viewer.height="300";
}

var alttag='id'+filenummer;
var element=document.getElementById(alttag);

if (filenummer<10){
document.images.viewer.src=begin+"/"+'0'+filenummer+'.jpg';
}
else{
document.images.viewer.src=begin+"/"+filenummer+'.jpg';
}
document.images.viewer.alt=element.alt;

}

function timer(){

var element=document.getElementById('auto');


if (element.value=="auto"){
afspelen('klik');
interval=window.setInterval("autonext()",3000);
element.value="manual";
}
else{
afspelen('klik');
window.clearInterval(interval);
element.value="auto";

}
}


function schrijfuserinfo(){

afspelen('klik');
var bezoeker='gast';
var user=document.getElementById('ingave').value;
var user=user.slice(0,21);
if ((user!=null)&&(user.replace(" ","")!="")){
	bezoeker=user;
	var datum=new Date();
	datum.setFullYear(datum.getFullYear()+5);
	var expires= "expires=" +datum.toGMTString();
	var pad="path=/";
	document.cookie="bezoeker=" +escape(bezoeker)+";"+expires+";"+pad;
	location.reload();
}
else{
	
}
}

function pers_begroeting(){
var bezoeker='gast';
var cookies=document.cookie.split(/;/);
for (var i=0; i<cookies.length; i++){
	cookies[i]=cookies[i].split(/=/);
	cookies[i][1]=unescape(cookies[i][1]);
	var getcookie=cookies[i][0];
	if(getcookie.indexOf("bezoeker")>=0){
		bezoeker=unescape(cookies[i][1]);
	}
}
if ((bezoeker=="gast")||(bezoeker=="bezoeker")||(bezoeker==null)||(bezoeker=="")||(bezoeker==" ")){
document.getElementById('naam').innerHTML='Click <a href=\"javascript:openinfopopup(\'instellingen.html\',\'350\',\'350\')\"> here </a> if you want to change site settings';

}
else{
document.getElementById('naam').innerHTML="Welcome, <a href=\"javascript:openinfopopup(\'instellingen.html\',\'350\',\'350\')\">"+bezoeker+"</a>"; 
}
}

function pers_begroeting_flash(){
	var bezoeker='gast';
var cookies=document.cookie.split(/;/);
for (var i=0; i<cookies.length; i++){
	cookies[i]=cookies[i].split(/=/);
	cookies[i][1]=unescape(cookies[i][1]);
	var getcookie=cookies[i][0];
	if(getcookie.indexOf("bezoeker")>=0){
		bezoeker=unescape(cookies[i][1]);
	}
}
if ((bezoeker=="gast")||(bezoeker=="bezoeker")||(bezoeker==null)||(bezoeker=="")||(bezoeker==" ")){
	return "";
}
else{
	return "Hello, "+bezoeker;
}
}

function tooninputveld(){
document.getElementById('naam').innerHTML='<font color=#66ccff>Choose your nick</font>';	
document.getElementById('naam').innerHTML+="<input id=\"ingave\" type=\"text\" size=\"20\" maxlength=\"20\"</p>";
document.getElementById('naam').innerHTML+="<p onclick=\"schrijfuserinfo()\"><font color=#66ccff><u>Use this nick</u></font></p>";
}



function check(formulier){
if (formulier.naam.value=="" && formulier.comment.value!=""){
alert('You have not filled in your name. Please try again');
return (false);
}
if (formulier.naam.value!="" && formulier.comment.value==""){
alert('You have not entered a message. Please try again');
return (false);
}
if (formulier.naam.value=="" && formulier.comment.value==""){
alert('You have not entered your name and a message. Please try again');
return (false);
}

if(formulier.comment.value.length>1000){
alert('You can only enter 1000 characters. Please try again');
return(false);
}

}

function checkcontactformulier(formulier){
if (formulier.afzender.value=="" && formulier.bericht.value!=""){
alert('You have not filled in your name. Please try again');
return (false);
}
if (formulier.afzender.value!="" && formulier.bericht.value==""){
alert('You have not entered a message. Please try again');
return (false);
}
if (formulier.afzender.value=="" && formulier.bericht.value==""){
alert('You have not entered your name and a message. Please try again');
return (false);
}
if (formulier.mailafzender.value=="" && formulier.mailafzender.value==""){
alert('You have not entered your emailadress. Please try again');
return (false);
}
}

function checkgeluid(){
	var geluid='test';
	var cookies=document.cookie.split(/;/);
	for (var i=0; i<cookies.length; i++){
		cookies[i]=cookies[i].split(/=/);
		var getcookie=cookies[i][0];
		if(getcookie.indexOf("geluid")>=0){
			geluid=unescape(cookies[i][1]);
		}
	}
	if (geluid=='uit'){
		sound=false;
	}
	else{
		sound=true;
	}
	
}

function afspelen (liedje){

	if (sound){
		soundManager.setVolume("beep",15);
		soundManager.play(liedje);
	}

	
	
	//soundManager.play(liedje);
}

function afspelen2 (liedje){
		
soundManager.play(liedje);

}






function pauzeren (liedje){
	soundManager.pause(liedje);
}
function stoppen(liedje){
	soundManager.stop(liedje);
}

function checkcombo(combobox){
	
var waarde=combobox.value;
if (waarde=='19 mei 2007'){
	window.location="gallery 19 mei 2007.html";
}
if (waarde=='16 juni 2007'){
	window.location="gallery 16 juni 2007.html";
}
if (waarde=='21 juli 2007'){
	window.location="gallery 21 juli 2007.html";
}
if (waarde=='18 augustus 2007'){
	window.location="gallery 18 augustus 2007.html";
}
if (waarde=='15 september 2007 1'){
	window.location="gallery 15 september 2007 1.html";
}
if (waarde=='15 september 2007 2'){
	window.location="gallery 15 september 2007 2.html";
}

if(waarde=="halloween 2007 1"){
	window.location="gallery halloween 2007 1.html";
}

if(waarde=="halloween 2007 2"){
	window.location="gallery halloween 2007 2.html";
}

if (waarde=='MISCELLANEOUS'){
	window.location="gallery.html";
}
if (waarde=='20 oktober 2007'){
	window.location="gallery 20 oktober 2007.html";
}
if (waarde=='17 november 2007'){
	window.location="gallery 17 november 2007.html";
}
if (waarde=='15 december 2007'){
	window.location="gallery 15 december 2007.html";
}
if (waarde=='19 januari 2008'){
	window.location="gallery 19 januari 2008.html";
}
if (waarde=='16 februari 2008'){
	window.location="gallery 16 februari 2008.html";
}
if (waarde=='15 maart 2008'){
	window.location="gallery 15 maart 2008.html";
}
if (waarde=='19 april 2008'){
	window.location="gallery 19 april 2008.html";
}
if (waarde=='17 mei 2008 performances'){
	window.location="gallery 17 mei 2008 performances.html";
}
if (waarde=='17 mei 2008 party'){
	window.location="gallery 17 mei 2008 party.html";
}
if (waarde=='17 mei 2008 shoot 1'){
	window.location="gallery 17 mei 2008 shoot 1.html";
}
if (waarde=='17 mei 2008 shoot 2'){
	window.location="gallery 17 mei 2008 shoot 2.html";
}
if (waarde=='21 juni 2008'){
	window.location="gallery 21 juni 2008.html";
}
if (waarde=='19 juli 2008'){
	window.location="gallery 19 juli 2008.html";
}
if (waarde=='16 augustus 2008'){
	window.location="gallery 16 augustus 2008.html";
}
if (waarde=='20 september 2008'){
	window.location="gallery 20 september 2008.html";
}
if (waarde=='18 oktober 2008'){
	window.location="gallery 18 oktober 2008.html";
}
if (waarde=='31 oktober 2008'){
	window.location="gallery 31 oktober 2008.html";
}
if (waarde=='15 november 2008'){
	window.location="gallery 15 november 2008.html";
}
if (waarde=='20 december 2008'){
	window.location="gallery 20 december 2008.html";
}
if (waarde=='17 januari 2009'){
	window.location="gallery 17 januari 2009.html";
}
if (waarde=='21 februari 2009'){
	window.location="gallery 21 februari 2009.html";
}
if (waarde=='21 maart 2009'){
	window.location="gallery 21 maart 2009.html";
}
if (waarde=='18 april 2009'){
	window.location="gallery 18 april 2009.html";
}
if (waarde=='16 mei 2009 performances'){
	window.location="gallery 16 mei 2009 performances.html";
}
if (waarde=='16 mei 2009 afterparty'){
	window.location="gallery 16 mei 2009 afterparty.html";
}
if (waarde=='16 mei 2009'){
	window.location="gallery 16 mei 2009 photoshoot.html";
}
if (waarde=='20 juni 2009 photoshoot'){
	window.location="gallery 20 juni 2009.html";
}
if (waarde=='18 juli 2009 photoshoot'){
	window.location="gallery 18 juli 2009.html";
}
if (waarde=='15 augustus 2009 photoshoot'){
	window.location="gallery 15 augustus 2009.html";
}
if (waarde=='19 september 2009'){
	window.location="gallery 19 september 2009.html";
}
if (waarde=='17 oktober 2009'){
	window.location="gallery 17 oktober 2009.html";
}
if (waarde=='21 november 2009'){
	window.location="gallery 21 november 2009.html";
}
if (waarde=='16 januari 2010'){
	window.location="gallery 16 januari 2010.html";
}
if (waarde=='17 april 2010'){
	window.location="gallery 17 april 2010.html";
}
if (waarde=='15 mei 2010'){
	window.location="gallery 15 mei 2010.html";
}
if (waarde=='19 juni 2010'){
	window.location="gallery 19 juni 2010.html";
}


}

function checkcomboplaylists(combobox){
	
var waarde=combobox.value;
if (waarde=='19 mei 2007'){
	window.location="playlist 19 mei 2007.html";
}
if (waarde=='16 juni 2007'){
	window.location="playlist 16 juni 2007.html";
}
if (waarde=='21 juli 2007'){
	window.location="playlist 21 juli 2007.html";
}
if (waarde=='18 augustus 2007'){
	window.location="playlist 18 augustus 2007.html";
}
if (waarde=='15 september 2007'){
	window.location="playlist 15 september 2007.html";
}
if (waarde=='20 oktober 2007'){
	window.location="playlist 20 oktober 2007.html";
}
if (waarde=='halloween 2007'){
	window.location="playlist halloween 2007.html";
}
if (waarde=='17 november 2007'){
	window.location="playlist 17 november 2007.html";
}
if (waarde=='15 december 2007'){
	window.location="playlist 15 december 2007.html";
}
if (waarde=='19 januari 2008'){
	window.location="playlist 19 januari 2008.html";
}
if (waarde=='16 februari 2008'){
	window.location="playlist 16 februari 2008.html";
}
if (waarde=='15 maart 2008'){
	window.location="playlist 15 maart 2008.html";
}
if (waarde=='19 april 2008'){
	window.location="playlist 19 april 2008.html";
}
if (waarde=='17 mei 2008'){
	window.location="playlist 17 mei 2008.html";
}
if (waarde=='18 augustus 2008'){
	window.location="playlist 16 augustus 2008.html";
}
if (waarde=='20 september 2008'){
	window.location="playlist 20 september 2008.html";
}
if (waarde=='18 oktober 2008'){
	window.location="playlist 18 oktober 2008.html";
}
if (waarde=='31 oktober 2008'){
	window.location="playlist halloween 2008.html";
}
if (waarde=='15 november 2008'){
	window.location="playlist 15 november 2008.html";
}
if (waarde=='21 februari 2009'){
	window.location="playlist 21 februari 2009.html";
}
if (waarde=='21 maart 2009'){
	window.location="playlists.html";
}
if (waarde=='21 maart 2009'){
	window.location="playlist 21 maart 2009.html";
}

if (waarde=='18 april 2009'){
	window.location="playlist 18 april 2009.html";
}
if (waarde=='16 mei 2009'){
	window.location="playlist 16 mei 2009.html";
}
if (waarde=='20 juni 2009'){
	window.location="playlist 20 juni 2009.html";
}
if (waarde=='18 juli 2009'){
	window.location="playlist 18 juli 2009.html";
}
if (waarde=='15 augustus 2009'){
	window.location="playlist 15 augustus 2009.html";
}

if (waarde=='19 september 2009'){
	window.location="playlist 19 september 2009.html";
}
if (waarde=='17 oktober 2009'){
	window.location="playlist 17 oktober 2009.html";
}
if (waarde=='17 april 2010'){
	window.location="playlists.html";
}

}

function writeoptions(){
	document.write("<option class=\"comboboxen\" selected=\"selected\"><center>Select gallery</center></option>");
	document.write("<option class=\"comboboxen\" value=\"MISCELLANEOUS\">MISCELLANEOUS</option>");
	document.write("<option class=\"comboboxen\" value=\"19 juni 2010\">Beatnation June 19 2010</option>");
	document.write("<option class=\"comboboxen\" value=\"15 mei 2010\">Beatnation May 15 2010</option>");
	document.write("<option class=\"comboboxen\" value=\"17 april 2010\">Beatnation April 17 2010</option>");
	document.write("<option class=\"comboboxen\" value=\"16 januari 2010\">Beatnation January 16 2010</option>");
	document.write("<option class=\"comboboxen\" value=\"21 november 2009\">Beatnation November 21 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"17 oktober 2009\">Beatnation October 17 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"19 september 2009\">Beatnation September 19 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"15 augustus 2009 photoshoot\">Beatnation August 15 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"18 juli 2009 photoshoot\">Beatnation July 18 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"20 juni 2009 photoshoot\">Beatnation Juni 20 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"16 mei 2009 photoshoot\">Beatnation May 16 2009 Photoshoot</option>");
	document.write("<option class=\"comboboxen\" value=\"16 mei 2009 afterparty\">Beatnation May 16 2009 Afterparty</option>");
	document.write("<option class=\"comboboxen\" value=\"16 mei 2009 performances\">Beatnation May 16 2009 Performances</option>");
	document.write("<option class=\"comboboxen\" value=\"18 april 2009\">Beatnation April 18 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"21 maart 2009\">Beatnation March 21 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"21 februari 2009\">Beatnation February 21 2009</option>");
			document.write("<option class=\"comboboxen\" value=\"17 januari 2009\">Beatnation January 17 2009</option>");
			document.write("<option class=\"comboboxen\" value=\"20 december 2008\">Beatnation December 20 2008</option>");
		document.write("<option class=\"comboboxen\" value=\"15 november 2008\">Beatnation November 15 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"31 oktober 2008\">Beatnation Halloween 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"18 oktober 2008\">Beatnation October 18 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"20 september 2008\">Beatnation September 20 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"16 augustus 2008\">Beatnation August 16 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"19 juli 2008\">Beatnation July 19 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"21 juni 2008\">Beatnation June 21 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"17 mei 2008 shoot 1\">Photoshoot 1 Year Beatnation (1)</option>");
			document.write("<option class=\"comboboxen\" value=\"17 mei 2008 shoot 2\">Photoshoot 1 Year Beatnation (2)</option>");
		document.write("<option class=\"comboboxen\" value=\"17 mei 2008 performances\">Performances 1 Year Beatnation</option>");
		document.write("<option class=\"comboboxen\" value=\"17 mei 2008 party\">1 Year Beatnation Afterparty</option>");
	document.write("<option class=\"comboboxen\" value=\"19 april 2008\">Beatnation April 19 2008</option>");
		document.write("<option class=\"comboboxen\" value=\"15 maart 2008\">Beatnation March 15 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"16 februari 2008\">Beatnation February 16 2008</option>");
		document.write("<option class=\"comboboxen\" value=\"19 januari 2008\">Beatnation January 19 2008</option>");
		document.write("<option class=\"comboboxen\" value=\"15 december 2007\">Beatnation December 15 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"17 november 2007\">Beatnation November 17 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"halloween 2007 2\">Halloween 2007 - part 2</option>");
	document.write("<option class=\"comboboxen\" value=\"halloween 2007 1\">Halloween 2007 - part 1</option>");
	document.write("<option class=\"comboboxen\" value=\"20 oktober 2007\">Beatnation October 20 2007</option>");
/*	document.write("<option class=\"comboboxen\" value=\"15 september 2007 2\">Beatnation September 15 2007 - part 2</option>");
	document.write("<option class=\"comboboxen\" value=\"15 september 2007 1\">Beatnation September 15 2007 - part 1</option>");
	document.write("<option class=\"comboboxen\" value=\"16 augustus 2007\">Beatnation August 16 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"21 juli 2007\">Beatnation July 21 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"16 juni 2007\">Beatnation June 16 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"19 mei 2007\">Beatnation May 19 2007</option>");
*/

}

function writeoptionsplaylist(){
	document.write("<option class=\"comboboxen\" selected=\"selected\">Select playlist</option>");
	document.write("<option class=\"comboboxen\" value=\"17 april 2010\">April 17 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"17 oktober 2009\">October 17 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"19 september 2009\">September 19 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"15 augustus 2009\">August 15 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"18 juli 2009\">July 18 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"20 juni 2009\">June 20 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"16 mei 2009\">May 16 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"18 april 2009\">April 18 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"21 maart 2009\">March 21 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"21 februari 2009\">February 21 2009</option>");
	document.write("<option class=\"comboboxen\" value=\"15 november 2008\">November 15 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"31 oktober 2008\">Halloween 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"18 oktober 2008\">Oktober 18 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"20 september 2008\">September 20 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"18 augustus 2008\">August 18 - 2008</option>");

	document.write("<option class=\"comboboxen\" value=\"17 mei 2008\">1 Year Beatnation</option>");
	document.write("<option class=\"comboboxen\" value=\"19 april 2008\">April 19 - 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"15 maart 2008\">March 15 - 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"16 februari 2008\">February 16 - 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"19 januari 2008\">January 19 - 2008</option>");
	document.write("<option class=\"comboboxen\" value=\"15 december 2007\">December 15 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"17 november 2007\">November 17 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"halloween 2007\">Halloween 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"20 oktober 2007\">October 20 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"15 september 2007\">September 15 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"18 augustus 2007\">August 18 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"21 juli 2007\">July 21 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"16 juni 2007\">June 16 - 2007</option>");
	document.write("<option class=\"comboboxen\" value=\"19 mei 2007\">May 19 - 2007</option>");
}


function opensimpsonspopup()
{
	var hoogte=480;
	var breedte=640;
	if (navigator.appName=="Microsoft Internet Explorer"){
		hoogte=480;
		breedte=640;
	}
	var venster=window.open('http://www.simpsonsmovie.com/content/games/wb/index.php?land=us&userid=null','Beatnation','height='+hoogte+',width='+breedte+		',resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.close();
}

function opentetrispopup(){
	var hoogte=495;
	var breedte=640;
	var tekst="Beatnation Games - Tetris";
		var venster=window.open('','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" >');
	
	venster.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"640\" height=\"495\" title=\"tetris\">');
	venster.document.write('<param name=\"movie\" value=\"games/tetrix2.swf\" />');
	venster.document.write('<param name=\"quality\" value=\"high\" />');
	venster.document.write('<embed src=\"games/tetrix2.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"640\" height=\"495\"></embed></object>');
	
 
	
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();
}



function openspacedudepopup(){
	var hoogte=495;
	var breedte=640;
	var tekst="Beatnation Games - Spacedude";
		var venster=window.open('','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" \>');
	
	venster.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"640\" height=\"495\" title=\"spacedude\">');
	venster.document.write('<param name=\"movie\" value=\"games/spacedude.swf\" />');
	venster.document.write('<param name=\"quality\" value=\"high\" />');
	venster.document.write('<embed src=\"games/spacedude.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"640\" height=\"495\"></embed></object>');
	
 
	
	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();
}

function opensonicpopup()
{
	var hoogte=350;
	var breedte=450;
	var tekst="Beatnation Games - Sonic the hedgehog";
		var venster=window.open('sonic.html','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.focus();
	venster.document.close();
	
	
	


}

function openmariopopup(){
	var hoogte=350;
	var breedte=410;
	var tekst="Beatnation Games - Super Mario";
		var venster=window.open('','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
	venster.document.write('<HTML><HEAD>');
	venster.document.write('<title>'+tekst+'</title>');
	venster.document.write('</HEAD><BODY style=\"margin:0px; padding:0px;\" onload=\"self.focus()\" >');
	
	venster.document.write('<a href=http://www.thegameblazer.com target=_new><img src=http://thegameblazer.com/gamebox.jpg width=425 height=30 border=0></a>');
	venster.document.write('<embed src=http://www.thegameblazer.com/flashfiles/adventuregames/superflashmariobros.swf quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=425 height=310></embed>');
	venster.document.write('<a href=http://www.thegameblazer.com target=_blank>');
	venster.document.write('<img src=http://thegameblazer.com/hosted.gif width=425 height=25 border=0></a>');

	venster.document.write('</body></html>');
	venster.document.focus();
	venster.document.close();
}

function writeslidemarquee_begin(){
	var browser=navigator.appName;
	if ((browser=="Microsoft Internet Explorer")||(browser=="Opera")){
		document.write('<marquee width=\"400\" behavior="\slide\" direction=\"left\">');
	}
	
}

function writeslidemarquee_einde(){
	var browser=navigator.appName;
	if ((browser=="Microsoft Internet Explorer")||(browser=="Opera")){
		document.write('</marquee>');
	}
}

function openspaceinvaderspopup(){
	var hoogte=470;
	var breedte=520;
	var tekst="Beatnation Games - Space Invaders";
	var venster=window.open('spaceinvaders.html','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no');
}

function afteller(datum){
	var volgend=new Date(datum);
	var nu=new Date();
	nu=Date.parse(nu);
	var diff=volgend-nu;
	var dagenstr="days";
	var urenstr="hours";
	var minutenstr="minutes";
	var secondenstr="seconds";
	
	if(diff>=0){
	var dagen= Math.floor(diff / 86400000);
	diff-=(dagen*86400000);
	var uren=Math.floor(diff/3600000);
	diff-=(uren*3600000);
	var minuten=Math.floor(diff/60000);
	diff-=(minuten*60000);
	var seconden=Math.floor(diff/1000);
	if (dagen==1){
		dagenstr="day";
	}
	if (uren==1){
		urenstr="hour";
	}
	if (minuten==1){
		minutenstr="minute";
	}
	if (seconden==1){
		secondenstr="second";
	}
		
	document.getElementById('tellertje').innerHTML='<p><b>Only '+dagen+' '+dagenstr+', '+uren+' '+ urenstr+', '+minuten+' '+minutenstr+' and '+seconden+' '+secondenstr+' left!</b></p>';
	}
	else if((diff<0)&&(Math.abs(diff)<21600000)){
		if(Math.abs(diff)<1000){
			alert('Time to leave! It\'s Beatnation time!');
		}
	document.getElementById('tellertje').innerHTML="<p><b>What the hell are you doing here! It\'s :Beatnation!</b></p>";
	}
	else{
	document.getElementById('tellertje').innerHTML="<p><b>I hope you all enjoyed this party</b></p>";
	}
}

function schrijfinfovelden(){
	afspelen('klik');
	if (document.getElementById('info1').innerHTML!=""){
	document.getElementById('info1').innerHTML="";
	}
	else
	{
	
	document.getElementById('info1').innerHTML="<div class=\"menuitem2\" onmouseover=\"afspelen('beep')\" onclick=\"afspelen('klik')\"><a href=\"general.html\" target=\"_parent\"><img class=\"glow\" src=\"images/general.gif\" height=\"25\" border=\"no\"></a></div><div class=\"menuitem2\"><a href=\"news.html\" target=\"_parent\"><img class=\"glow\" src=\"images/news.gif\" height=\"25\" border=\"no\" onmouseover=\"afspelen('beep')\"></a></div><div class=\"menuitem2\" onmouseover=\"afspelen('beep')\" onclick=\"afspelen('klik')\"><a href=\"dj.html\" target=\"_parent\"><img class=\"glow\" src=\"images/dj.gif\" height=\"25\" border=\"no\"></a></div><div class=\"menuitem2\" onmouseover=\"afspelen('beep')\" onclick=\"afspelen('klik')\"><a href=\"location.html\" target=\"_parent\"><img class=\"glow\" src=\"images/location.gif\" height=\"25\" border=\"no\"></a></div>";

	}
}



function opensmileyhelp(){
	var hoogte=450;
	var breedte=500;
	var tekst="Smiley-overzicht";
	var venster=window.open('popups/smileys.html','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no');
	venster.document.focus();
	venster.document.close();
}

function openstijlhelp(){
	var hoogte=490;
	var breedte=350;;
	var venster=window.open('popups/stijlen.html','Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no');
	venster.document.focus();
	venster.document.close();
}

function captchareload(){
	document.images.captcha.src="images/evengeduld.jpg";
	setTimeout("document.images.captcha.src=\"antispam.php\"",1000);

}

function afteller2(datum,id){
	var volgend=new Date(datum);
	var nu=new Date();
	nu=Date.parse(nu);
	var diff=volgend-nu;
	var dagenstr="days";
	var urenstr="hours";
	var minutenstr="minutes";
	var secondenstr="seconds";
	
	if(diff>=0){
	var dagen= Math.floor(diff / 86400000);
	diff-=(dagen*86400000);
	var uren=Math.floor(diff/3600000);
	diff-=(uren*3600000);
	var minuten=Math.floor(diff/60000);
	diff-=(minuten*60000);
	var seconden=Math.floor(diff/1000);
	if (dagen==1){
		dagenstr="day";
	}
	if (uren==1){
		urenstr="hour";
	}
	if (minuten==1){
		minutenstr="minute";
	}
	if (seconden==1){
		secondenstr="second";
	}
		
	document.getElementById(id).innerHTML=dagen+' '+dagenstr+', '+uren+' '+ urenstr+', '+minuten+' '+minutenstr+' and '+seconden+' '+secondenstr;
	}
	else if((diff<0)&&(Math.abs(diff)<21600000)){
	document.getElementById(id).innerHTML="This party has already begun!";
	}
	else{
	document.getElementById(id).innerHTML="This party is over";
	}
}

function interval(){
	var datuminterval=setInterval('afteller2(\"10/20/2007 22:00:00\")',1000);
}

function openwebsite(url){
	var hoogte=450;
	var breedte=750;
	

	var venster=window.open(url,'Beatnation','height='+hoogte+',width='+breedte+		',resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=no,status=no');	
	venster.getElementById('vertrekGemeenteInput').value="test";
}

function adaptresolutie(){
	var resolutie=screen.width;
	var zoom=Math.floor(resolutie/10.24);
	var inzoomen='';
	
	if (zoom<50){
		inzoomen='50%';
	}
	if ((zoom>=50)&&(zoom<75)){
		inzoomen='50%';
	}
	if ((zoom>=75)&&(zoom<100)){
		inzoomen='75%';
	}
	if ((zoom>=100)&&(zoom<125)){
		inzoomen='100%';
	}
	if ((zoom>=125)&&(zoom<150)){
		inzoomen='120%';
	}
	if ((zoom>=150)){
		inzoomen='150%';
	}
	return inzoomen;
	
	
	
}

function zetinstellingen(){
	//var elementintro=document.getElementById('skipintro');
	var elementsound=document.getElementById('buttonsound');
	var elementnaam=document.getElementById('ingave');
	
		var datum=new Date();
		datum.setFullYear(datum.getFullYear()+5);
		var expires= "expires=" +datum.toGMTString();
		var pad="path=/";
		
		if (elementsound.checked==true){
			document.cookie="geluid=" +escape("uit")+";"+expires+";"+pad;	
		}
		else{
			document.cookie="geluid=" +escape("aan")+";"+expires+";"+pad;
		}
		schrijfuserinfo();
		//skipintro
		
		//if (elementintro.checked==true){
		//	document.cookie="intro=" +escape("nee")+";"+expires+";"+pad;
		//}
		//else{
		//document.cookie="intro=" +escape("ja")+";"+expires+";"+pad;
		//}
		
		alert('These settings will take effect as soon as you reload this website');
		self.close();
}

function defaultinstellingen(){
	var geluid='test';
	var naam='bezoeker';
	var intro='ja'
	var elementintro=document.getElementById('skipintro');
	var elementsound=document.getElementById('buttonsound');
	var cookies=document.cookie.split(/;/);
	for (var i=0; i<cookies.length; i++){
		cookies[i]=cookies[i].split(/=/);
		var getcookie=cookies[i][0];
		if(getcookie.indexOf("geluid")>=0){
			geluid=unescape(cookies[i][1]);
		}
		if(getcookie.indexOf("bezoeker")>=0){
			naam=unescape(cookies[i][1]);
		}
		if(getcookie.indexOf("intro")>=0){
			intro=unescape(cookies[i][1]);
		}
		
	}
	if (geluid=="uit"){
		elementsound.checked=true;
	}
	else{
		elementsound.checked=false;
	}
	if(intro=="ja"){
		elementintro.checked=false;
	}
	else{
		elementintro.checked=true;
	}
	
	
}

function intro(){
	var intro='ja';
	var afspelen=true;
	var cookies=document.cookie.split(/;/);
	for (var i=0; i<cookies.length; i++){
		cookies[i]=cookies[i].split(/=/);
		var getcookie=cookies[i][0];
		if(getcookie.indexOf("intro")>=0){
			intro=unescape(cookies[i][1]);
		}
	}
	if (intro=='nee'){afspelen=false};
	return afspelen;
}

function googletoolbar(){
  if(window.attachEvent)
    window.attachEvent("onload",setListeners);
  
  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }

  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "" && event.srcElement.style.backgroundColor != "#000000"){
      event.srcElement.style.backgroundColor = "#555555"; 
      
    }
  }
  }
  
  function checkmailinglist(form){
	  if(form.mailafzender.value==""){
		  alert('Please enter your e-mail adress to sign up');
		  return false;
	  }
	  
  }
  
function volgendeflyer(url,aantal,datum){
afspelen('bladeren');
var teller=url.lastIndexOf('/');
var begin=url.slice(0,teller);
var eindeurl=url.substr((teller+1),10);
var eerstepunt=eindeurl.indexOf('.');
var strfilenummer=eindeurl.slice(0,eerstepunt);
strfilenummer=strfilenummer.replace('flyer','');

var filenummer=parseFloat(strfilenummer);

if (filenummer<aantal){
	filenummer+=1;
	}
else{
	filenummer=1;
}


if (filenummer<10){
document.images.viewer.src=begin+"/"+'flyer'+'0'+filenummer+'.jpg';
}
else{
document.images.viewer.src=begin+"/"+'flyer'+filenummer+'.jpg';
}
}

function vorigeflyer(url,aantal,datum){
afspelen('bladeren');
var teller=url.lastIndexOf('/');
var begin=url.slice(0,teller);
var eindeurl=url.substr((teller+1),10);
var eerstepunt=eindeurl.indexOf('.');
var strfilenummer=eindeurl.slice(0,eerstepunt);
strfilenummer=strfilenummer.replace('flyer','');

var filenummer=parseFloat(strfilenummer);

if (filenummer>1){
	filenummer-=1;
	}
else{
	filenummer=aantal;
}

var alttag='id'+filenummer;
var element=document.getElementById(alttag);

if (filenummer<10){
document.images.viewer.src=begin+"/"+'flyer'+'0'+filenummer+'.jpg';
}
else{
document.images.viewer.src=begin+"/"+'flyer'+filenummer+'.jpg';
}
document.images.viewer.alt=element.alt;

}

function site(){
	document.write('<div id=\"site\">');
	if (screen.width>1024){
	}
	else{
	document.getElementById('site').style.marginTop="0px";
	document.getElementById('site').style.marginLeft="0px";
	document.getElementById('site').style.top="0px";
	document.getElementById('site').style.left="0px";
	}
		
}
function siteend(){
	if (screen.width>1024){
		document.write('</div>');
	}
}

function placeholder(){
	document.write('<div id=\"placeholder\">');
	if(screen.height==768){
		document.getElementById('placeholder').style.position="fixed";
	}
	if((screen.height<768)&&(screen.width>1024)){
		document.getElementById('site').style.top="340px";
		document.getElementById('site').style.left="50%";
		document.getElementById('site').style.marginTop="-340px";
		document.getElementById('site').style.marginLeft="-512px";
	}
	
	var breedte= 0
	var hoogte = 0;
 	if( typeof( window.innerWidth ) == 'number' ) {
    	breedte = window.innerWidth;
    	hoogte = window.innerHeight;
 	} 
 	else if( document.documentElement && ( document.documentElement.clientWidth || document.			documentElement.clientHeight ) ) {
    	breedte = document.documentElement.clientWidth;
    	hoogte = document.documentElement.clientHeight;
  } 
 	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	breedte = document.body.clientWidth;
    	hoogte = document.body.clientHeight;
  	}

	
if((breedte<1000)||(hoogte<500)){
	scrollcontrol(true);
}
else{
	scrollcontrol(false);
}
	
}

function slideshowswitch(element){
	if (element.value=="View slideshow"){
	document.getElementById('gallerymain').style.visibility="visible";
	document.getElementById('fotogalerij').style.visibility="hidden";
	element.value="View gallery";
	}
	else{
	document.getElementById('gallerymain').style.visibility="hidden";
	document.getElementById('fotogalerij').style.visibility="visible";
	element.value="View slideshow";
	}
}

function showwebinfo(){
	document.getElementById('generalmain').style.visibility="hidden";
	document.getElementById('generalsite').style.visibility="visible";
	window.scrollBy(0,-100);
}

function ctrlcopy(tekst){
	var browser=navigator.appName;
	if (browser=="Microsoft Internet Explorer"){
		var area=document.getElementById(tekst);
		Copied = area.createTextRange();
		Copied.execCommand("Copy");
	}
	else{
		alert('This function can only by performed with Internet Explorer');
	}
	
}

function scrollcontrol(klein){

if(klein){
	document.getElementById('site').style.marginTop="0px";
	document.getElementById('site').style.marginLeft="0px";
	document.getElementById('site').style.top="0px";
	document.getElementById('site').style.left="0px";
	document.getElementById('placeholder').style.position="absolute";
}
else{
//	document.getElementById('placeholder').style.position="fixed";
	if(screen.height<801){
		document.getElementById('site').style.top="0px";
		document.getElementById('site').style.left="50%";
		document.getElementById('site').style.marginTop="0px";
		document.getElementById('site').style.marginLeft="-512px";
	}
	else{
		document.getElementById('site').style.top="50%";
		document.getElementById('site').style.left="50%";
		document.getElementById('site').style.marginTop="-340px";
		document.getElementById('site').style.marginLeft="-512px";
	}
		document.getElementById('placeholder').style.position="fixed";
}
	
}

function change_title(a,b,c){

 	var t = new Date();
 	s = t.getSeconds();
 	if (document.title == a){
		document.title = b;
	}
	else if (document.title == b){
		document.title = c;
	}
	else {
		document.title = a;	
	}
		
 	setTimeout("change_title(a,b,c)", 3000);
}


//steeds af te handelen


window.onresize=function(){

var breedte= 0;
var hoogte = 0;
 if( typeof( window.innerWidth ) == 'number' ) {
    breedte = window.innerWidth;
    hoogte = window.innerHeight;
 } 
 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    breedte = document.documentElement.clientWidth;
    hoogte = document.documentElement.clientHeight;
  } 
 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    breedte = document.body.clientWidth;
    hoogte = document.body.clientHeight;
  }

	
if((breedte<1000)||(hoogte<500)){
	scrollcontrol(true);
}
else{
	scrollcontrol(false);
}
}

checkgeluid();


//coded by :Beatnation: