function checkform(form1)
{
	if (!check_empty(document.form1.txtTarget.value))
    { 
		alert('Please select your Target'); 
		form1.txtTarget.focus();
		form1.txtTarget.select();
		return false;
    }
	if (!check_empty(document.form1.txtName.value))
    { 
		alert('Please enter your Name'); 
		form1.txtName.focus();
		form1.txtName.select();
		return false;
    }
	if (!check_empty(document.form1.txtEmail.value))
    { 
		alert('Please enter your Email address'); 
		form1.txtEmail.focus();
		form1.txtEmail.select();
		return false;
    }
    if (!isEmail(document.form1.txtEmail.value))
    { 
		alert('Please enter a valid Email address'); 
		form1.txtEmail.focus();
		form1.txtEmail.select();
		return false;
    }
	if (!check_empty(document.form1.txtPhone.value))
    { 
		alert('Please enter your Phone'); 
		form1.txtPhone.focus();
		form1.txtPhone.select();
		return false;
    }
	if (!check_empty(document.form1.txtCompany.value))
    { 
		alert('Please enter your Company'); 
		form1.txtCompany.focus();
		form1.txtCompany.select();
		return false;
    }	
}//end checkform

function check_empty(text)
{
	  return (text.length > 0); // returns false if empty
}

function isEmail(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}
