function orderSubmit(type) 
{
if (type == 'signup') {
 if (!checkRequired() )
   {	
  document.signup.submit();
  return true;
   }
 else {
   return false;
   }
 }
}


function checkRequired() {

if (!document.signup.company.value.length)
{
document.signup.company.focus()
alert('You have not filled out all of the necessary details.\n' +
'Please enter your Company name.');
return true;
}


if (!document.signup.contact.value.length)
{
document.signup.contact.focus()
alert('You have not filled out all of the necessary details.\n' +
'Please enter a Contact name.');
return true;
}


if (!document.signup.tel.value.length)
{
document.signup.tel.focus()
alert('You have not filled out all of the necessary details.\n' +
'Please enter your telephone number.');
return true;
}


if (!document.signup.email.value.length)
{
document.signup.email.focus()
alert('You have not filled out all of the necessary details.\n' +
'Please enter your email address.');
return true;
}


if (!document.signup.confirmemail.value.length)
{
document.signup.confirmemail.focus()
alert('You have not entered all of the necessary details.\n' +
'Please confirm your email address by typing it into the\n' +
'\'Confirm Email\' field.');
return true;
}


if (document.signup.confirmemail.value.length != document.signup.email.value.length)
{
document.signup.confirmemail.focus()
alert('You have not entered your email address correctly.\n' +
'Please check that you have typed a valid and identical email address\n' +
'into the \'Email Address\' field and the \'Confirm Email\' field.');
return true;
}


if (!document.signup.confirmemail.value.length)
{
document.signup.confirmemail.focus()
alert('You have not entered all of the necessary details.\n' +
'Please confirm your email address by typing it into the\n' +
'\'Confirm Email\' field as well.');
return true;
}


var theForm = document.signup;
var chec = 0;

for (i=0; i<theForm.elements.length; i++) {
    if (theForm.elements[i].type == 'checkbox' && theForm.elements[i].checked) chec++;
}

if (chec == 0)
{
document.signup.Win2003Server.focus()
alert('You have not entered all of the necessary details.\n' +
'Please select at least 1 platform.');
return true;
}


if (document.signup.sys.value == 'NA')
{
document.signup.sys.focus()
alert('You have not filled out all of the necessary details.\n' +
'Please select an appropriate answer from the Accounts program dropdown menu.');
return true;
}


if (document.signup.sys.value == 'Other' && !document.signup.sysother.value.length)
{
document.signup.sys.focus()
alert('You have not filled out all of the necessary details.\n' +
'As you have chosen \'Other\' from the Accounts program dropdown menu,\n' +
'please enter what this other system is.');
return true;
}


if (!document.signup.users.value.length)
{
document.signup.users.focus()
alert('You have not filled out all of the necessary details.\n' +
'Please enter the number of users that you require.');
return true;
}


else 
{
return false;
}

}


function checkEmail(myForm) {

if(document.signup.email.value.length) {

if
(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.signup.email.value
)){
return (true)
}
alert('The format of your email address appears to be incorrect. \n' +
      'Please check that your email address is correct before submitting.')
return (false)

}

}


function checkConfirmEmail(myForm) {

if(document.signup.confirmemail.value.length) {

if
(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.signup.confirmemail.value
)){
return (true)
}
alert('The format of your email address appears to be incorrect. \n' +
      'Please check that your email address is correct before submitting.')
return (false)

}

}