function OpenBandlid(id) {
	var x = (screen.availWidth - 425) / 2;
	var y = (screen.availHeight - 309) / 2;
	var popup = open('','pop','width=425,height=309,location=no,toolbar=no,scrollbars=no,resizable=no,left='+x+',top='+y+'')   
	popup.document.write('<html><head></head><title>Flat Out - Bandlid '+id+'</title>');
	popup.document.write('<body style="margin:0px 0px 0px 0px; background-color:#5b3e9d;">');
	popup.document.write('<img src="images/bandleden/popup/'+id+'.jpg" width="425" height="309" border="0" onclick="javascript:self.close();"></body></html>');
	popup.document.close();
};

function OpenVideo(id) {
	var x = (screen.availWidth - 380) / 2;
	var y = (screen.availHeight - 300) / 2;
	var url = 'include/get_video.asp?file='+id;
	var popup = open(url,'pop','width=380,height=300,location=no,toolbar=no,scrollbars=no,resizable=no,left='+x+',top='+y+'')   
};

function OpenImage(id,width,height) {
	_width = width;
	_height = height;
	if(_width > screen.availWidth || _height > screen.availHeight) {
		_width = screen.availWidth;
		_height = screen.availHeight;
	}
	var x = (screen.availWidth - _width) / 2;
	var y = (screen.availHeight - _height) / 2;
	var popup = open('','pop','width='+_width+',height='+_height+',location=no,toolbar=no,scrollbars=no,resizable=no,left='+x+',top='+y+'')   
	popup.document.write('<html><head></head><title>Flat Out</title>');
	popup.document.write('<body style="margin:0px 0px 0px 0px; background-color:#5b3e9d;">');
	popup.document.write('<img src="images/'+id+'" width="'+_width+'" height="'+_height+'" border="0" onclick="javascript:self.close();"></body></html>');
	popup.document.close();
};


function CheckFormGuestbook() {
	if(document.forms[0].naam.value == '' || document.forms[0].naam.value == null) {
		alert('Je hebt geen naam ingevuld.');
		return false;
	}
 	if (document.forms[0].email.value != '') {
  		if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(document.forms[0].email.value)) == false)	{
			alert('Je e-mail adres is niet juist.');
			return false;
		}
  	} 
 	if (document.forms[0].bericht.value == '' || document.forms[0].bericht.value == null) {
  		alert('Je hebt geen bericht ingevuld.');  
  		return false;
  	}	
	
};

function CheckFormContact() {
	if(document.forms[0].naam.value == '' || document.forms[0].naam.value == null) {
		alert('Je hebt geen naam ingevuld.');
		return false;
	}
	if(document.forms[0].email.value == '' || document.forms[0].email.value == null) {
		alert('Je hebt geen e-mail adres ingevuld.');
		return false;
	}	
	if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(document.forms[0].email.value)) == false)	{
		alert('Je e-mail adres is niet juist.');
		return false;
	} 
 	if (document.forms[0].bericht.value == '' || document.forms[0].bericht.value == null) {
  		alert('Je hebt geen bericht ingevuld.');  
  		return false;
  	}	
};

function CheckFormWebshop() {
	if(document.forms[0].naam.value == '' || document.forms[0].naam.value == null) {
		alert('Je hebt geen naam ingevuld.');
		return false;
	}
	if(document.forms[0].email.value == '' || document.forms[0].email.value == null) {
		alert('Je hebt geen e-mail adres ingevuld.');
		return false;
	}	
	if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(document.forms[0].email.value)) == false)	{
		alert('Je e-mail adres is niet juist.');
		return false;
	} 
 	if (document.forms[0].bestelling.value == '' || document.forms[0].bestelling.value == null) {
  		alert('Je hebt geen bestelling ingevuld.');  
  		return false;
  	}	
};
/*
	client = client.replace(/'/g, "\'\'"); //search semicolon in string and replace with quotes
	opdracht = opdracht.replace(/'/g, "\'\'");
	inhoud = inhoud.replace(/'/g, "\'\'");	
	inhoud = inhoud.replace(/\r\n/g,"<br/>"); //search for returns and newlines and replace with breaks
*/
