function sendMail() {
  var name = document.mailForm.name.value;
  var email = document.mailForm.email.value;
  var website = document.mailForm.website.value;
  var subject = document.mailForm.subject.value;
  var message = document.mailForm.message.value;

  //check if fields have valid values
  var validFields = 0;
  if( (name=="") || (email=="") || (subject=="") || (message=="")) validFiels = 0;
  if ( (email.indexOf('.') > 2) && (email.indexOf('@') > 0) ) validFields = 1;
   else validFields = 0;

   if(validFields==1) document.mailForm.submit();
   else alert('Please use valid values in each field');
}



// ======================== PORTFOLIO =============================

    function writePhoto(quantityPhotos) {
      for(var i=1; i<(quantityPhotos+1); i++) {
        document.write('<TD CLASS=\"portfolio_cell\"><IMG SRC=\"' +galleryname+ '/' +i+ '.jpg\" onMouseDown=\'showCopyright()\'/></TD>');
      }
    }

    function showCopyright() {
      alert('Copyright By Tensive.nl ©');
    }


    function mouseDown(e) {
	if (parseInt(navigator.appVersion)>3) {
		var clickType=1;
		if (navigator.appName=="Netscape") clickType=e.which;
		else clickType=event.button;
		if (clickType!=1) {
			alert ('Copyright By Tensive.nl ©');
			return false;
		}
	}
	return true;
}

if (parseInt(navigator.appVersion)>3) {
	document.onmousedown = mouseDown;
	if (navigator.appName=="Netscape")
	document.captureEvents(Event.MOUSEDOWN);
}