function sendPic(picture)
	{
	ext = 'width=620,height=680,top=0'
	ur = 'sendpic2.php?p='+picture
	send = window.open(ur,'Send',ext);
	
    //alert(picture);
	}
	
function printPic(picture)
	{
	//alert(picture)
	ext = 'width=620,height=530,top=10'
	ur = 'printpic.php?p='+picture
	send = window.open(ur,'Print',ext);
	}
	
function WisselKleur(what,onoff)
	{
	if (onoff == 1) what.style.backgroundColor = '#006FCA';
	if (onoff == 0) what.style.backgroundColor = '';
	}

function ChBk(what,onoff)
	{
	if (onoff == 1) what.style.backgroundColor = '#d8d8d8';
	if (onoff == 0) what.style.backgroundColor = '';
	}	
	
function bigger()
{
document.getElementById('picture').style.display = 'block';
}	

function closediv()
{
document.getElementById('picture').style.display = 'none';
}

function CheckEmpty(what)
{
if (what == "") return false;
else return true;
}

function ShowBigger(pic,w,h)
{
w = w + 20;
h = h + 60;

widthmid = screen.availWidth / 2;
heightmid = screen.availHeight / 2;
left = widthmid - (w / 2);
boven = heightmid - (h / 2);


ext = 'width='+w+',height='+h+',left='+left+',top='+boven;
url = '../upload/'+pic;
win = window.open('./xhtml/blank.html','',ext);
win.document.write('<body style="background-color:#EDF4D3;font-family:Verdana;font-size:11px;">');
win.document.write('<img src="'+url+'" border="1" style="border-color:#00432C;padding:2px;"><p />');
win.document.write('<div align="center"><a href="javascript:window.close();" style="color:#00432C;">Sluit venster</a></div>');
}

function sendLink(name, email)
{
url = 'sendlink.php?n='+name+'&e='+email;
ext = 'width=100,height=100';
wo = window.open(url,'send',ext);
wo.blur();
window.focus();
}

function formCheck(formobj){
	//1) Enter name of mandatory fields
	var fieldRequired = Array("Naam","Adres","Postcode","Plaats","Telefoon", "Email");
	//2) Enter field description to appear in the dialog box
	var fieldDescription = Array("Naam","Adres","Postcode","Woonplaats","Telefoon", "E-mailadres");
	//3) Enter dialog message
	var alertMsg = "Wilt u de volgende velden a.u.b. invullen:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}
