
MidX=screen.availWidth/2
MidY=screen.availHeight/2

function popup(URL,WIDTH,HEIGHT) 
	{
	popupdate = new Date()	
	window.open(URL,'NewWindow'+popupdate.getTime(),'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,top='+(MidY-(HEIGHT/2)-30)+',left='+(MidX-(WIDTH/2))+',width='+WIDTH+',height='+HEIGHT);
	}

function changeval(v,val){
	v.style.color = '#000000';
	if (v.value == val){
		v.value= '';	
	}
}
function checkval(v,val){
	if (v.value == ''){
		v.style.color ='';
		v.value=val;
	}
}

function validateForm()
{
	if(InputForm.Name.value == "Name" || InputForm.Name.value == "")
	{
		alert("Please enter your Name");
		InputForm.Name.focus();
		return false;
	}
	
	if(InputForm.Surname.value == "Company" || InputForm.Company.value == "")
	{
		alert("Please enter your Company");
		InputForm.Company.focus();
		return false;
	}
	
	if(InputForm.Contactnum.value == "Contact Number" || InputForm.ContactNumber.value == "")
	{
		alert("Please enter your Contact Number");
		InputForm.ContactNumber.focus();
		return false;
	}
	
	if(InputForm.Organisation.value == "Email Address" || InputForm.EmailAddress.value == "")
	{
		alert("Please enter your Email Address");
		InputForm.Organisation.focus();
		return false;
	}
	
	if(InputForm.Message.value == "Message" || InputForm.Message.value == "")
	{
		alert("Please enter your message");
		InputForm.Message.focus();
		return false;
	}
	return true;
}
