
		<!--
function validate (form) 
{
/******************************************************************/
	/*******************************************************************
	Do not edit above this line!!!!!
	Change these values to reflect the email address that you want request to go to
	*******************************************************************/
	var uname = 'aaronwitten'; //add the reps emailaddress username
	var domain = 'legendequities.com'; //add the reps domain
	var subject = 'Request for more information from web site';// add their personalized subject line
	/*******************************************************************
	Do not edit below this line!!!!!
	*******************************************************************/
	/******************************************************************/

var TestVar = form.Name.value;

var strmessage = "";

	if(form.Name.value == "")
	{
		strmessage +="\n	- Enter Your Name";
	};

	if(form.StreetAddress.value == "")
	{
	strmessage +="\n	- Enter Your Address";
	};

	if(form.City.value == "")
	{
	strmessage +="\n	- Enter Your City";
	};

	if(form.State.value == "")
	{
	strmessage +="\n	- Enter Your State";
	};

	if(form.ZipCode.value == "")
	{
	strmessage +="\n	- Enter Your Zip Code";
	};

	if(form.Emailaddress.value == "")
	{
	strmessage +="\n	- Enter Your email address";
	};

	if(form.PhoneDay.value == "")
	{
	strmessage +="\n	- Enter Your day phone";
	};

	if(form.PhoneEves.value == "")
	{
	strmessage +="\n	- Enter Your eve. Phone";
	};

	if(form.BestTime.value == "")
	{
	strmessage +="\n	- Enter best time to call";
	};

	if ((form.Emailaddress.value == "")||
		(form.Emailaddress.value.indexOf('@') == -1)||
		(form.Emailaddress.value.indexOf('.') == -1))
		{
	strmessage +="\n	- Enter valid emaill";
	};
	/*
	if(form.How_Did_You_Hear_About_Us.value == "")
	{
	strmessage += "\n   - How did you hear about us";
	};

	if(form.Comments.value == "")
	{
	strmessage += "\n   -  enter your Comments";
	};
	*/
		
  var strProducts = "";
  for(var i=0;i<form.ProductsServices.length;i++)
	{
		if (form.ProductsServices[i].checked == true)
		{
			strProducts += form.ProductsServices[i].value + ",";
		};
		document.all("txtProducts").value = strProducts
	}
	//alert (strProducts);
	if (strProducts == "")
	  {
	 strmessage += "\n   - Please select product(s) you are interested in";
	   };
  
if(strmessage != "")
	{
	strmessage = "You failed to correctly enter in the following:\n" + strmessage + "\n";
	alert(strmessage);
	return false;
	}
	document.all("subject").value = subject
	document.all("Email").value = uname+"@"+domain;
	
	//document.Form1.action = "email.asp"
	//document.Form1.submit()
	var result = callToServer(form.name)
	if (result == true)
	{
	alert('form was NOT sent')
	return true
	}
	else
	{
	form.reset();
	//*************************************************
	//*********** edit submit text ********************
	alert('Thank you. Your form has been sent.')
	//*************************************************
	
	return false
	}
}
	
	


var IFrameObj; // our IFrame object
function callToServer(theFormName) {
  if (!document.createElement) {return true};
  var IFrameDoc;
 
var URL = 'http://www.legendgroup.com/email.asp' 
  + buildQueryString(theFormName);
  //alert(URL);
  if (!IFrameObj && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
    var tempIFrame=document.createElement('iframe');
    tempIFrame.setAttribute('id','RSIFrame');
    tempIFrame.style.border='0px';
    tempIFrame.style.width='0px';
    tempIFrame.style.height='0px';
    IFrameObj = document.body.appendChild(tempIFrame);
  
    if (document.frames) {
      // this is for IE5 Mac, because it will only
      // allow access to the document object
      // of the IFrame if we access it through
      // the document.frames array
      IFrameObj = document.frames['RSIFrame'];
    }
  }
  
  if (navigator.userAgent.indexOf('Gecko') !=-1 
    && !IFrameObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callToServer()',10);
    return false;
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);

  return false;
}


function handleResponse() {
  alert('this function is called from server.html')
}


function buildQueryString(theFormName) {
	theForm = document.forms[theFormName];
	var qs = ''
	for (e=0;e<theForm.elements.length;e++) {
		if (theForm.elements[e].name!='') {
			qs+=(qs=='')?'?':'&'
			qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value)
			}
		}
	return qs
}

	
-->
		