   function generateLinksPartners(form_id, form_type, category_id, page_id)
	 {
	  tmp="passForm=document.forms['"+form_id+"'];";
	  eval(tmp);
	  
	  xmlHttp=GetXmlHttpObject();
	  if (xmlHttp==null)
	     {
	      alert("Your browser does not support AJAX!");
	      return;
	     }

	  var url="http://www.nerd.co.il/partners_links.php";
	  var params="form_type="+form_type+"&category_id="+category_id+"&page_id="+page_id;

	  xmlHttp.open("POST", url, true);
	  //Send the proper header information along with the request
	  xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	  xmlHttp.setRequestHeader("Content-length", params.length);
	  xmlHttp.setRequestHeader("Connection", "close");
	  xmlHttp.onreadystatechange=function(){
	  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	     {
	      str="document.getElementById('field2_links_"+form_type+"').innerHTML=xmlHttp.responseText;";
	      eval(str);
	     }
	    };
	  xmlHttp.send(params);
	 }
	 
    function generateLinksPartners2(form_id, form_type, link_id)
	 {
	  tmp="passForm=document.forms['"+form_id+"'];";
	  eval(tmp);
	  
	  xmlHttp=GetXmlHttpObject();
	  if (xmlHttp==null)
	     {
	      alert("Your browser does not support AJAX!");
	      return;
	     }

	  var url="http://www.nerd.co.il/partners_links_2.php";
	  var params="links_type="+form_type+"&link_id="+link_id;
	  
	  xmlHttp.open("POST", url, true);
	  //Send the proper header information along with the request
	  xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	  xmlHttp.setRequestHeader("Content-length", params.length);
	  xmlHttp.setRequestHeader("Connection", "close");
	  xmlHttp.onreadystatechange=function(){
	  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	     {
	      str="document.getElementById('field3_links_"+form_type+"').innerHTML=xmlHttp.responseText;";
	      eval(str);
	     }
	    };
	  xmlHttp.send(params);
	 }

/* validAppContactForm Function */
function validAppContactForm(form_id, button_name)
  {
  tmp="passForm=document.forms['"+form_id+"'];";
  eval(tmp);

   // Beginning of Regular Expressions Creating
   regular_hebrew=/^([^a-zA-Z0-9_]{1,})$/;
   regular_digits=/^([0-9]{1})$/;
   regular_email_address=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
   // End of Regular Expressions Creating

   // Beginning of Full Name Checking
   temp=trim(passForm.full_name.value);
   passForm.full_name.value=temp;
   if ((temp=="") || (temp=="שם פרטי ומשפחה"))
      {
	 alert("אנא רשמו את שמכם.");
	 passForm.full_name.focus();
	 return false;
      }

   exp ="Set_Cookie('application_form[full_name]', '"+temp+"', 30, '/');";
   eval(exp);
   // End of Full Name Checking

   // Beginning of Phone Number Checking
   temp=trim(passForm.phone_number.value);
   passForm.phone_number.value=temp;

   count_digits=0;
   for (i=0; i<=temp.length; i++)
	 {
	  if (regular_digits.test(temp.charAt(i)))
	     { count_digits++; }
	 }

   if (count_digits<9)
	{
	 alert("אנא רשמו את מספר הטלפון שלכם כולל קידומת ב-9 ספרות לפחות.");
	 passForm.phone_number.focus();
	 return false;
	}

   exp ="Set_Cookie('application_form[phone_number]', '"+temp+"', 30, '/');";
   eval(exp);
   // End of Phone Number Checking

   // Beginning of Bulletin Address Checking
   if (passForm.v_bulletin_address.value!="")
	{
	 temp=trim(passForm.bulletin_address.value);
	 passForm.bulletin_address.value=temp;
	 if (passForm.v_must_bulletin_address.value!="")
	    {
	     if ((temp=="") || (temp=="כתובת למשלוח ידיעון"))
		 {
		  alert("אנא רשמו כתובת למשלוח ידיעון.");
		  passForm.bulletin_address.focus();
		  return false;
		 }
          }

       exp ="Set_Cookie('application_form[bulletin_address]', '"+temp+"', 30, '/');";
       eval(exp);
      }
   // End of Bulletin Address Checking

   // Beginning of Living Area Checking
   if (passForm.v_living_area.value!="")
	{
	 temp=trim(passForm.living_area.value);
	 passForm.living_area.value=temp;
	 if (passForm.v_must_living_area.value!="")
	    {
	     if ((temp=="") || (temp=="אזור מגורים"))
		 {
		  alert("אנא רשמו את אזור המגורים שלכם.");
		  passForm.living_area.focus();
		  return false;
		 }
          }

       exp ="Set_Cookie('application_form[living_area]', '"+temp+"', 30, '/');";
       eval(exp);
      }
   // End of Living Area Checking

   // Beginning of E-mail Address Checking
   if (passForm.v_email_address.value!="")
	{
	 temp=trim(passForm.email_address.value);
	 passForm.email_address.value=temp;
	 if (passForm.v_must_email_address.value!="")
	    {
	     if (!(regular_email_address.test(temp)))
		 {
		  alert("אנא רשמו את כתובת הדואר האלקטרוני שלכם בתבנית חוקית.");
		  passForm.email_address.focus();
		  return false;
		 }
          }

       exp ="Set_Cookie('application_form[email_address]', '"+temp+"', 30, '/');";
       eval(exp);
      }
   // End of E-mail Address Checking

   // Beginning of License Agreement Checking
   if (passForm.license_agreement.checked==false)
      {
	alert("עליך להסכים לתנאי השימוש.");
	return false;
      }
   // End of License Agreement Checking
   
   // Beginning of identity Checking
   if (passForm.v_identity.value!="")
	{
	 temp=trim(passForm.identity.value);
	 passForm.identity.value=temp;
	 if (passForm.v_identity.value!="")
	    {
	     if ((temp=="") || (temp=="תעודת זהות"))
		 {
		  alert("אנא רשמו את תעודת הזהות שלכם.");
		  passForm.identity.focus();
		  return false;
		 }
          }

       exp ="Set_Cookie('application_form[identity]', '"+temp+"', 30, '/');";
       eval(exp);
      }
   // End of Living Area Checking

   // Beginning of Message Content Checking
   if (passForm.v_remarks.value!="")
	{
	 temp=trim(passForm.msg_content.value);
	 passForm.msg_content.value=temp;
	 if (passForm.v_must_remarks.value!="")
	    {
	     if ((temp=="") || (temp=="הערות הלקוח"))
		 {
		  alert("אנא רשמו מלל חופשי.");
		  passForm.msg_content.focus();
		  return false;
		 }
          }
      }
   // End of Message Content Checking

   // Beginning of Course of Studies Checking
   if (passForm.v_cos.value!="")
	{
	 temp=trim(passForm.cos.value);
	 passForm.cos.value=temp;
	 if (passForm.v_must_cos.value!="")
	    {
	     if (temp=="")
		 {
		  alert("אנא מלאו את שדה מסלול הלימודים.");
		  passForm.cos.focus();
		  return false;
		 }
          }

       exp ="Set_Cookie('application_form[course_of_study]', '"+temp+"', 30, '/');";
       eval(exp);
      }
   // End of Course of Studies Checking

   // Beginning of Departments Checking
   if (passForm.v_deps.value!="")
	{
	 temp=trim(passForm.deps.value);
	 passForm.deps.value=temp;
	 if (passForm.v_must_deps.value!="")
	    {
	     if (temp=="")
		 {
		  alert("אנא מלאו את שדה החוג.");
		  passForm.deps.focus();
		  return false;
		 }
          }

       exp ="Set_Cookie('application_form[dep_code]', '"+temp+"', 30, '/');";
       eval(exp);   
      }
   // End of Departments Checking
   
   // Beginning of Field 1 Checking
   if (passForm.field1_must.value!="")
      {
      	temp=trim(passForm.field1.value);
	passForm.field1.value=temp;
	if (temp=="")
	   {
	    alert("אנא בחרו אפשרות בשדה הבחירה העליון.");
	    passForm.field1.focus();
	    return false;
	   } 
      }
   // End of Field 1 Checking
   
   // Beginning of Field 2 Checking
   if (passForm.field2_must.value!="")
      {
      	temp=trim(passForm.field2.value);
	passForm.field2.value=temp;
	if (temp=="")
	   {
	    alert("אנא בחרו אפשרות בשדה הבחירה התחתון.");
	    passForm.field2.focus();
	    return false;
	   } 
      }
   // End of Field 2 Checking

   doLoading(form_id, button_name);
   return true;
  }
