// Homepage comments form validation start
function mark_error(id)
{
	document.getElementById(id).style.backgroundColor = '#f7f7ff';
	document.getElementById(id).style.borderWidth = '1px';
	document.getElementById(id).style.borderStyle = 'solid';
	document.getElementById(id).style.borderColor = '#FF0000';
}
function unmark_error(id)
{
	document.getElementById(id).style.backgroundColor = '';
	document.getElementById(id).style.borderWidth = '';
	document.getElementById(id).style.borderStyle = '';
	document.getElementById(id).style.borderColor = '';
}
function validate()
{
if(document.getElementById('fname').value == '')
{
mark_error('fname');
alert ("Please enter your name.");
document.getElementById('fname').focus();
return false;
} else {
unmark_error('fname');
}

if(document.getElementById('companyname').value == '')
{
mark_error('companyname');
alert ("Please enter your Company Name.");
document.getElementById('companyname').focus();
return false;
} else {
unmark_error('companyname');
}

if(document.getElementById('emailaddr').value == '')
{
mark_error('emailaddr');
alert ("Please enter your Email Address.");
document.getElementById('emailaddr').focus();
return false;
} else {
unmark_error('emailaddr');
}

if(document.getElementById('phonenum').value == '' || isNaN(document.getElementById('phonenum').value))
{
mark_error('phonenum');
alert ("Please enter your Telephone Number. (Numbers only Please)");
document.getElementById('phonenum').focus();
return false;
} else {
unmark_error('phonenum');
}

if(document.getElementById('enquirydetail').value == '')
{
mark_error('enquirydetail');
alert ("Please enter your Questions and comments.");
document.getElementById('enquirydetail').focus();
return false;
} else {
unmark_error('enquirydetail');
}

return true;
}
// Homepage comments form validation end

// Homepage email form validation start
function emailmark_error(id)
{
	document.getElementById(id).style.backgroundColor = '#f7f7ff';
	document.getElementById(id).style.borderWidth = '1px';
	document.getElementById(id).style.borderStyle = 'solid';
	document.getElementById(id).style.borderColor = '#FF0000';
}
function emailunmark_error(id)
{
	document.getElementById(id).style.backgroundColor = '';
	document.getElementById(id).style.borderWidth = '';
	document.getElementById(id).style.borderStyle = '';
	document.getElementById(id).style.borderColor = '';
}
function emailvalidate()
{

if(document.getElementById('emailemailaddr').value == 'Enter your e-mail address')
{
mark_error('emailemailaddr');
alert ("Please enter your Email Address.");
document.getElementById('emailemailaddr').focus();
return false;
} else {
unmark_error('emailemailaddr');
}

return true;
}
// Homepage email form validation end


// Content pages free report form validation start
function repmark_error(id)
{
	document.getElementById(id).style.backgroundColor = '#f7f7ff';
	document.getElementById(id).style.borderWidth = '1px';
	document.getElementById(id).style.borderStyle = 'solid';
	document.getElementById(id).style.borderColor = '#FF0000';
}
function repunmark_error(id)
{
	document.getElementById(id).style.backgroundColor = '';
	document.getElementById(id).style.borderWidth = '';
	document.getElementById(id).style.borderStyle = '';
	document.getElementById(id).style.borderColor = '';
}
function validatereport()
{
if(document.getElementById('reportname').value == 'Enter Your Name Here')
{
repmark_error('reportname');
alert ("Please enter your Name.");
document.getElementById('reportname').focus();
return false;
} else {
repunmark_error('reportname');
}

if(document.getElementById('reportemail').value == 'Enter Your Email Address')
{
repmark_error('reportemail');
alert ("Please enter your Email Address.");
document.getElementById('reportemail').focus();
return false;
} else {
repunmark_error('reportemail');
}

return true;
}
// Content pages free report form validation end