
     function AJAX_obj()
	{
		var ajaxRequest;
		try{

			ajaxRequest = new XMLHttpRequest();
			} catch (e){

			try{
				ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				alert("Your browser broke!");
				return false;
			}
			}
		}
		return ajaxRequest;
	}


    function save_page()
    {
        var name = document.getElementById("name").value;
        var email = document.getElementById("email").value;
        var phone = document.getElementById("phone").value;
    	var url = 'ajax_page.php?action=add&name='+name+'&email='+email+'&phone='+phone;
    	var ajaxRequest = AJAX_obj();

        if (name==null||name=="")//Start of validation
          {
          alert('Please enter your name');
          name.focus();
          return false;
          }
        else if (email==null||email=="")
          {
         alert('Please enter your email');
         email.focus();
         return false;
          }
         else if (email.indexOf("@")<1||email.lastIndexOf(".")-email.indexOf("@")<2)
         {
          alert('Please enter a valid email');
           email.focus();
          return false;
          }
        else if (phone==null||phone=="")
          {
          alert('Please enter your Phone number');
          phone.focus();
          return false;
          }
        else
          {

    	ajaxRequest.onreadystatechange = function() {

    	if(ajaxRequest.readyState == 4){
    	     document.getElementById("rightcolumn4").style.display ="block";
            document.getElementById("small").innerHTML = 'Processing quote..<img src="7days/ajax-loader.gif" />';
          setTimeout(function(){
             document.getElementById("rightcolumn4").style.display ="block";
             document.getElementById("small").innerHTML = ajaxRequest.responseText;
            },5000
    	 )
          setTimeout(function(){
            document.getElementById("rightcolumn4").style.display ="none";
            },9000
    	 )
         setTimeout(function(){
             document.getElementById("rightcolumn3").style.display ="block";
            },9000
    	 )

    				}
    		}
    	ajaxRequest.open("GET", url, true);
    	ajaxRequest.send(null);

         }//end of validation

    }
    function closeme()
    {
       document.getElementById("rightcolumn3").style.display ="none";
    }
     function viewdoc()
    {
       window.location.href ="7days/Funding.xls";
    }
	    function goToIndex()
    {
       window.location.href ="index.html";
    }

   function validate_email(field,alerttxt)
    {
    with (field)
      {

      if (value.indexOf("@")<1||value.lastIndexOf(".")-value.indexOf("@")<2)
        {
          alert(alerttxt);
          return false;
          }
      else {return true;}
      }
    }


    function swflove()
      {
      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="595" height="373">\n');
      document.write('<param name="movie" value="7days/header.swf">\n');
      document.write('<param name="quality" value="high">\n');
      document.write('<param name="wmode" value="transparent">\n');
      document.write('<embed src="7days/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="595" height="373" wmode="transparent"></embed>\n');
      document.write('</object>\n');
      }

      function popup(url)
      {
       var width  = 900;
       var height = 1000;
       var left   = (screen.width  - width)/2;
       var top    = (screen.height - height)/2;
       var params = 'width='+width+', height='+height;
       params += ', top='+top+', left='+left;
       params += ', directories=no';
       params += ', location=no';
       params += ', menubar=no';
       params += ', resizable=no';
       params += ', scrollbars=1';
       params += ', status=no';
       params += ', toolbar=no';
       newwin=window.open(url,'windowname5', params);
       if (window.focus) {newwin.focus()}
       return false;
      }





