function startUpload()
{
	document.getElementById('msgBlock').innerHTML='';
	var Name = document.getElementById("Name").value;
	var Company = document.getElementById("Company").value;
	var Email = document.getElementById("Email").value;
	var Phone = document.getElementById("Phone").value;
	var Country = document.getElementById("Country").value;
	var Attachment = document.getElementById("Attachment").value;
	var Comments = document.getElementById("Comments").value;
	var captcha = document.getElementById("captcha").value;
	if(Name == ""){
		alert("Please enter your name!");
		document.getElementById("Name").focus();
		return false;
	}
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(Email)){}
	else{	alert("Invalid E-mail Address!")
			document.getElementById('Email').focus();
			return false;
		}
		if(Comments == ""){
		alert("Please enter your comments!");
		document.getElementById("Comments").focus();
		return false;
	}
	if(captcha == ""){
		alert("Please enter the verification code as shown!");
		document.getElementById("captcha").focus();
		return false;
	}
	document.getElementById("btns").value="Please wait";
	document.getElementById("btns").disabled = true;
    document.getElementById('f1_upload_process').style.visibility = 'visible';
    return true;
}

function stopUpload(str)
{
	if("1"==str) // Ok, mail sent
		document.getElementById('msgBlock').innerHTML="Thank you for contacting WIT Innovation, your request will be processed shortly. In case you have any questions please feel free to get in touch at  <a href='mailto:info@witinnovation.com'>info@witinnovation.com</a>";
	else if("-2"==str) // Attachment size more then 1MB 
		document.getElementById('msgBlock').innerHTML='<font color="red"><b>Maximum 1 MB allowed for attachment</b></font>';	
	else if("-3"==str) // Attachment size more then 1MB  INI
		document.getElementById('msgBlock').innerHTML='<font color="red"><b>Maximum 1 MB allowed for attachment.</b></font>';	
	else if("-8"==str) // Extension restriction
		document.getElementById('msgBlock').innerHTML='<font color="red"><b>This type of file is not allowed to attach</b></font>';	
	else if("-99"==str) // Attachemnt failed
		document.getElementById('msgBlock').innerHTML='<font color="red"><b>We are sorry but we can not attach your attachment</b></font>';	
	else if("-9"==str) // mail sent failed 
		document.getElementById('msgBlock').innerHTML='<font color="red"><b>We are sorry but your request can not be process this time, please try again.</b></font>';	

	
		document.getElementById("btns").value = "submit";
    	document.getElementById("btns").disabled = false;  
		document.getElementById('f1_upload_process').style.visibility = 'hidden';
		if("1"==str)
			document.reqForm.reset();
}



