// JavaScript Document


function checkFields()
{
  if (document.form1.name.value == "")
    { alert("Please tell us your name...");
     form1.name.focus();
     return false;  }
	 
  if ((document.form1.email.value == "") ||
  (document.form1.email.value.indexOf('@') == -1) ||
  (document.form1.email.value.indexOf('.') == -1))
  { alert("We need a valid email address...");
     form1.email.focus();
     return false;  }
	 
   if (document.form1.country.value == "")
    { alert("Which country is your site based in?");
     form1.country.focus();
     return false;  }
	 
   if (document.form1.language.value == "")
    { alert("Which language is your site displayed in?");
     form1.language.focus();
     return false;  }	 

  if ((document.form1.url.value == "") || (document.form1.url.value == "http://"))
    { alert("We need your URL - web address please!");
     form1.url.focus();
     return false;  }	 
	 
   if (document.form1.purpose.value == "")
    { alert("Please describe the content of your site...");
     form1.purpose.focus();
     return false;  }	 

  /*  deprecated section: begin -->
  if ((document.form1.knowledge.value == "") || (document.form1.knowledge.value == "received Knowledge?"))
    { alert("Do you currently practice \n Prem Rawat's teachings\nof inner peace?\n\n If so, how many years?");
     form1.knowledge.focus();
     return false; }
  */

  return true; }
  
// event for form input box color change ...


	sfFocus = function() { 
		var sfEls = document.getElementsByTagName
		("INPUT"); 
		for (var i=0; i<sfEls.length; i++) { 
		sfEls[i].onfocus=function() { 
			this.className+=" sffocus"; 
							} 
			sfEls[i].onblur=function() { 
				this.className=this.className.replace
				(new RegExp(" sffocus\\b"), "");
				 } 
				 } 
				 } 
				 if (window.attachEvent) window.attachEvent
				 ("onload", sfFocus);
				 
// new part for TEXTAREA!!

	staFocus = function() { 
		var staEls = document.getElementsByTagName
		("TEXTAREA"); 
		for (var i=0; i<staEls.length; i++) { 
		staEls[i].onfocus=function() { 
			this.className+=" sffocus"; 
							} 
			staEls[i].onblur=function() { 
				this.className=this.className.replace
				(new RegExp(" sffocus\\b"), "");
				 } 
				 } 
				 } 
				 if (window.attachEvent) window.attachEvent
				 ("onload", staFocus);

//  End -->

