// JavaScript Document

function checkCheckBox(){
if (document.newmsgform.agree.checked == true )
{
document.newmsgform.formsend.disabled = false;
} else {
document.newmsgform.formsend.disabled = true;
}
}


function chk_tomsg()
{
	missinginfo = "";
if (document.newmsgform.name.value == "") {
missinginfo += "\n     -  Name";
}

if ((document.newmsgform.mailadress.value == "") || 
 (document.newmsgform.mailadress.value.indexOf('@') == -1) || 
 (document.newmsgform.mailadress.value.indexOf('.') == -1)
) 
{
missinginfo += "\n     -  Mail (enter a valid e-mail address)";
}
//if ((document.newmsgform.web.value == "") || 
//(document.newmsgform.web.value.indexOf(".") == -1)) {
//missinginfo += "\n     -  Web site";
//}

if(document.newmsgform.contactn.value == "") {
missinginfo += "\n     -  Contact number";
}
if(document.newmsgform.companyn.value == "") {
missinginfo += "\n     -  Company Name";
}
if(document.newmsgform.occupation.value == "") {
missinginfo += "\n     -  Position";
}
if(document.newmsgform.user.value == "") {
missinginfo += "\n     -  Username";
}
if(document.newmsgform.password.value == "") {
missinginfo += "\n     -  Password";
}
if(document.newmsgform.passwordsure.value == "") {
missinginfo += "\n     -  Confirm Password";
}
if((document.newmsgform.askedQ.value == "")||
(document.newmsgform.askedQ.value == "Type the question here")
)
 {
missinginfo += "\n     -  Question to be Asked";
}
if((document.newmsgform.askedA.value == "")||
(document.newmsgform.askedA.value == "Type the answer here")
)
 {
missinginfo += "\n     -  Answer to the question";
}
if(document.newmsgform.comp_reg.value == "") {
missinginfo += "\n     -  Company registration Number";
}
if(document.newmsgform.director.value == "") {
missinginfo += "\n     -  Company Directors";
}
if(document.newmsgform.employees.value == "") {
missinginfo += "\n     -  Number of Employees";
}
if(document.newmsgform.sector.value == "") {
missinginfo += "\n     -  Sector you service";
}

if (document.newmsgform.password.value!=document.newmsgform.passwordsure.value)
{ 
alert("The Password and Confirmation Password values are not the same");
document.newmsgform.password.focus();
return false
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}



else return true;
}
