// JavaScript Document

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function checkit_contact() {

    txt=document.create.email_address.value;
    txt2=document.create.email_address2.value;
	
	if (document.create.realname.value=='') {
		alert('Please tell us your name.'); 
		document.create.realname.focus(); 
		return false;
	} 
	if (document.create.company.value=='') {
		alert('Please tell us your company.'); 
		document.create.company.focus(); 
		return false;
	} 
	if (document.create.email_address.value=='') {
		alert('Please tell us your email address.'); 
		document.create.email_address.focus();           
		document.create.email_address.select(); 
		return false;
	}
	if (txt.indexOf("@")<1) { 
		alert("Your email address seems wrong. Please check the prefix and '@' sign.");  
	    document.create.email_address.focus();           
	    document.create.email_address.select();
		return false;
	}
    if (txt.indexOf(".")<1) { 
		alert("Your email address seems wrong. Please check the suffix for accuracy. (It should include a  .com,.net,.org,.gov or .mil)");
		document.create.email_address.focus();           
	    document.create.email_address.select();
	    return false;
	}
    if (document.create.email_address2.value=='Please re-enter your email address') {
		alert('Please re-enter your email address.'); 
		document.create.email_address2.focus();           
		document.create.email_address2.select(); return false;
	}
	if(txt != txt2) {
		alert('I\'m sorry the two email addresses you entered do not match. Please correct your email address.'); 
		document.create.email_address2.focus();           
		document.create.email_address2.select();
		return false;
	}
	if (document.create.phone.value=='') {
		alert('Please tell us your Phone Number.'); 
		document.create.phone.focus(); 
		return false;
	} 
 if ((!document.create.purpose_of_site[0].checked)&&
(!document.create.purpose_of_site[1].checked)&&
(!document.create.purpose_of_site[2].checked)&&
(!document.create.purpose_of_site[3].checked))
   {
    alert('Please tell us what would be the purpose of your website.');
	return false;
	}
	if ((!document.create.intended_audience[0].checked)&&
	   (!document.create.intended_audience[1].checked)&&
	   (!document.create.intended_audience[2].checked))
	{
     alert('Please tell us your intended audience.');
    return false;
    }
 
	if ((!document.create.budget[0].checked)&&
	   (!document.create.budget[1].checked)&&
	   (!document.create.budget[2].checked)&&
	   (!document.create.budget[3].checked)&&
	   (!document.create.budget[4].checked))
	{
     alert('Please tell us your budget.');
    return false;
    }
	
	if ((!document.create.completion_date[0].checked)&&
	   (!document.create.completion_date[1].checked)&&
	   (!document.create.completion_date[2].checked)&&
	   (!document.create.completion_date[3].checked)&&
	   (!document.create.completion_date[4].checked)&&
	   (!document.create.completion_date[5].checked)&&
	   (!document.create.completion_date[6].checked)&&
	   (!document.create.completion_date[7].checked))
	{
     alert('Please tell us your desired completion date.');
    return false;
    }
	
if ((!document.create.contact_by[0].checked)&&
   (!document.create.contact_by[1].checked))
	{
   alert('Please tell us how you would like to be contacted.');
    return false;
    }
 
	if ((!document.create.discover_us[0].checked)&&
	   (!document.create.discover_us[1].checked)&&
	   (!document.create.discover_us[2].checked)&&
	   (!document.create.discover_us[3].checked))
	{
     alert('Please tell us how you discovered us.');
    return false;
    }
 
	if ((!document.create.find_infomation_needed[0].checked)&&
	   (!document.create.find_infomation_needed[1].checked))
	{
     alert('Please tell us if you found everything that you were looking for.');
    return false;
    }
	
	if ((document.create.find_infomation_needed[1].checked)&&
	   (document.create.info_lacking.value==''))
	{
     alert('Please tell us what specific information was not found.');
    return false;
    }
 
  return true;
}    