function ValidateForm() {

	// Name
	if (document.forms.contact.cname.value=="") {
		alert("Error: Please enter your name.");
		document.forms.contact.cname.focus();
		return false;
	}


	//Telephone
	if (document.forms.contact.cphone.value == "") {
		alert("Error: Please enter your Telephone Number.");
		document.forms.contact.cphone.focus();
		return false;
	}

	var valid = "0123456789+.() "
	var ok = "yes";
	var temp;

	for (var i=0; i<document.contact.cphone.value.length; i++) {
	temp = "" + document.contact.cphone.value.substring(i, i+1);
	if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
	alert("Error: Please enter a valid Telephone Number.");
	document.contact.cphone.focus();
	return false;
	}


	//Email
	checkEmail = document.contact.cemail.value;
	if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))  {
		alert("Error: Please enter a valid email address.");
		document.contact.cemail.focus();
		//window.location = '#strEmail';
		return false;
	}

	//Subject
	if (document.forms.contact.csubject.value == "") {
		alert("Error: Please enter a subject.");
		document.forms.contact.csubject.focus();
		return false;
	}
	//Query
	if (document.forms.contact.cquery.value == "") {
		alert("Error: Please enter your Query.");
		document.forms.contact.cquery.focus();
		return false;
	}



	
	
	



	
	//submit form
	
	return true;
}

var nc = (document.layers) ? true:false
var ie = (document.all) ? true:false
var n6 = (document.getElementById) ? true:false
/** */
function show(div_name) {
	if(ie) {
	  document.all[div_name].style.display="block";
	} else if(nc) {
	  document.layers[div_name].display="block";
	} else if(n6) {
	  document.getElementById(div_name).style.display="block";
	}
}
/** */
function hide(div_name) {
	if(ie) {
	  document.all[div_name].style.display="none";
	} else if(nc) {
	  document.layers[div_name].display="none";
	} else if(n6) {
	  document.getElementById(div_name).style.display="none";
	}
}
/** */
/*function showhide(show_name,id_list){
	var id_array = new Array();
	id_array = id_list.split(";");
	
	for(index=1;index<id_array.length;index++){
		if(id_array[index]==show_name){
			show(show_name);
		}else{
			hide(id_array[index]);
		}
	}
}
*/

function showhide(div_name){

	if(ie) {
	  if(document.all[div_name].style.display=="none"){
		  show(div_name);
	  }else{
		  hide(div_name);
	  }
	} else if(nc) {
	  if (document.layers[div_name].display=="none"){
		  show(div_name);
	  }else{
		  hide(div_name);
	  }
	} else if(n6) {
	  if (document.getElementById(div_name).style.display=="none"){
		  show(div_name);
	  }else{
		  hide(div_name);
	  }
	}
	
}


var ContentHeight = 90;
var TimeToSlide = 250.0;

var openAccordion = '';

function runAccordion(index)
{
  var nID = "Accordion" + index + "Content";
  if(openAccordion == nID)
    nID = '';
   
  setTimeout("animate("
      + new Date().getTime() + "," + TimeToSlide + ",'"
      + openAccordion + "','" + nID + "')", 33);
 
  openAccordion = nID;
}


function animate(lastTick, timeLeft, closingId, openingId)
{ 
  var curTick = new Date().getTime();
  var elapsedTicks = curTick - lastTick;
 
  var opening = (openingId == '') ?
      null : document.getElementById(openingId);
  var closing = (closingId == '') ?
      null : document.getElementById(closingId);
 
  if(timeLeft <= elapsedTicks)
  {
    if(opening != null)
      opening.style.height = ContentHeight + 'px';
   
    if(closing != null)
    {
      closing.style.display = 'none';
      closing.style.height = '0px';
    }
    return;
  }
 
  timeLeft -= elapsedTicks;
  var newClosedHeight =
      Math.round((timeLeft/TimeToSlide) * ContentHeight);

  if(opening != null)
  {
    if(opening.style.display != 'block')
      opening.style.display = 'block';
    opening.style.height =
        (ContentHeight - newClosedHeight) + 'px';
  }
 
  if(closing != null)
    closing.style.height = newClosedHeight + 'px';

  setTimeout("animate(" + curTick + "," + timeLeft + ",'"
      + closingId + "','" + openingId + "')", 33);
}
