function validation_control()
{
if(!emptyCheck(document.contactbox.name.value))
	{
	alert('Please fill in name field');
	return false;
	}
if(!isEmail(document.contactbox.email.value))
	{
	alert('Please fill in correct e-mail address');
	return false;
	}
if(!emptyCheck(document.contactbox.company.value))
	{
	alert('Please fill in company field');
	return false;
	}
if(!emptyCheck(document.contactbox.country.value))
	{
	alert('Please fill in country field');
	return false;
	}
if(!emptyCheck(document.contactbox.message.value))
	{
	alert('Please fill in message field');
	return false;
	}
}

function validate_winD700()
{
if (!document.winD700.units[0].checked && !document.winD700.units[1].checked && !document.winD700.units[2].checked && !document.winD700.units[3].checked && !document.winD700.units[4].checked && !document.winD700.units[5].checked)
	{alert("Please, answer the 1 question"); return false;}

if (!document.winD700.employees[0].checked && !document.winD700.employees[1].checked && !document.winD700.employees[2].checked && !document.winD700.employees[3].checked && !document.winD700.employees[4].checked && !document.winD700.employees[5].checked)
	{alert("Please, answer the 2 question"); return false;}

if (!document.winD700.havesystem[0].checked && !document.winD700.havesystem[1].checked) {alert("Please, answer the 3 question"); return false;}

if (!document.winD700.plan[0].checked && !document.winD700.plan[1].checked && !document.winD700.plan[2].checked && !document.winD700.plan[3].checked)
	{alert("Please, answer the 4 question"); return false;}

if (!document.winD700.motivation[0].checked && !document.winD700.motivation[1].checked && !document.winD700.motivation[2].checked && !document.winD700.motivation[3].checked && !document.winD700.motivation[4].checked && !document.winD700.motivation[5].checked)
	{alert("Please, answer the 6 question"); return false;}

if (!document.winD700.learned[0].checked && !document.winD700.learned[1].checked && !document.winD700.learned[2].checked && !document.winD700.learned[3].checked && !document.winD700.learned[4].checked)
	{alert("Please, answer where have you learned about the D700 campaign/competition"); return false;}

if (!document.winD700.winD700_name.value) {alert("Please fill in name field"); return false;}
if (!document.winD700.winD700_title.value) {alert("Please fill in title field"); return false;}
if (!document.winD700.winD700_country.value) {alert("Please fill in country field"); return false;}
if (!isEmail(document.winD700.winD700_email.value))
	{alert('Please fill in correct e-mail address');return false;}
if (!document.winD700.winD700_phone.value) {alert("Please fill in phone field"); return false;}
}

function validation_control_downloadbrochure()
{
if(!isEmail(document.downloadbrochure.email.value))
	{
	alert('Please fill in correct e-mail address');
	return false;
	}
if(!emptyCheck(document.downloadbrochure.company.value))
	{
	alert('Please fill in company field');
	return false;
	}
if(!emptyCheck(document.downloadbrochure.country.value))
	{
	alert('Please fill in country field');
	return false;
	}
}

function validate_tais_event()
{
var el1 = false;
var el2 = false;
var el3 = false;
var el4 = false;
var el5 = false;
var el6 = false;
var el7 = false;
var el8 = false;
var el9 = false;
var el10 = false;

if (!document.tais_registration.name.value) {alert("Please, fill in name field"); return false;}
if (!document.tais_registration.company.value) {alert("Please, fill in company field"); return false;}

if (document.getElementById('event1'))
{
    if(document.tais_registration.event1.checked)
    {
       el1 = true;
    }
}
if (document.getElementById('event2'))
{
    if(document.tais_registration.event2.checked)
    {
       el2 = true;
    }
}
if (document.getElementById('event3'))
{
    if(document.tais_registration.event3.checked)
    {
       el3 = true;
    }
}
if (document.getElementById('event4'))
{
    if(document.tais_registration.event4.checked)
    {
       el4 = true;
    }
}
if (document.getElementById('event5'))
{
    if(document.tais_registration.event5.checked)
    {
       el5 = true;
    }
}
if (document.getElementById('event6'))
{
    if(document.tais_registration.event6.checked)
    {
       el6 = true;
    }
}
if (document.getElementById('event7'))
{
    if(document.tais_registration.event7.checked)
    {
       el7 = true;
    }
}
if (document.getElementById('event8'))
{
    if(document.tais_registration.event8.checked)
    {
       el8 = true;
    }
}
if (document.getElementById('event9'))
{
    if(document.tais_registration.event9.checked)
    {
       el9 = true;
    }
}
if (document.getElementById('event10'))
{
    if(document.tais_registration.event10.checked)
    {
       el10 = true;
    }
}
if (el1 == true || el2 == true || el3 == true || el4 == true || el5 == true || el6 == true || el7 == true || el8 == true || el9 == true || el10 == true)
{
   return true;
}
else
{
  alert("Please, select at least one event"); return false;
}
}

function emptyCheck(element)
	{
	    if(element=="") { return false; }
	    else { return true; }
	}

function isEmail(s) {
       var sign = s.indexOf("@");
       if (sign < 1) {
          return false;
       } else {
          var point = s.substring(sign).indexOf(".");
          if (point < 2) {
             return false;
          } else {
             return true;
          }
       }
    }