function changeDiv(the_div,the_change)
{
  var the_style = getStyleObject(the_div);
  if (the_style != false)
  {
    the_style.display = the_change;
  }
}

function hideAll()
{
  changeDiv("uce_ube_spam","none");
  changeDiv("virus","none");
  changeDiv("hacking","none");
  changeDiv("intruder_alert","none");
  changeDiv("others","none");
  changeDiv("phishing","none");
  changeDiv("command_n_control","none");
}

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    return document.all(objectId).style;
  } else {
    return false;
  }
}

function disablesubmit() 
{
	document.the_form.submit.disabled = true;
}

function checkdisabled()
{
	if(document.the_form.submit.disabled = true) {
		document.the_form.submit.disabled = false;
	}
}

function Validate_form(the_form)
{
	// text validates
	if (document.the_form.name.value == "")
  	{
   		alert("Please specify your name.");
		document.the_form.name.focus();
   		return (false);
  	}

  	if (document.the_form.emailadd.value == "")
  	{
   		alert("Please specify your email address.");
		document.the_form.emailadd.focus();
   		return (false);
  	}

	if(-1 == document.the_form.emailadd.value.indexOf("@")) { 
       alert("Please submit a proper email address."); 
       document.the_form.emailadd.focus(); 
	   return false; 
       }

	 if (!(document.the_form.subject[0].checked || document.the_form.subject[1].checked || document.the_form.subject[2].checked || document.the_form.subject[3].checked || document.the_form.subject[4].checked || document.the_form.subject[5].checked || document.the_form.subject[6].checked)) 
	{
		alert('Please choose a subject.');
		return (false);
	}
}
