function get_offer()
{  
  var xmlHttp;

  document.getElementById('right_content').innerHTML="";

  try
    {    
     // Firefox, Opera 8.0+, Safari    
     xmlHttp=new XMLHttpRequest();    
    }
  catch (e)
    {
      // Internet Explorer    
      try
        {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
      try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        
          alert("Your browser does not support AJAX!");        
          return false;        
        }      
       }    
     }

    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
          document.getElementById('right_content').innerHTML=xmlHttp.responseText;
        }
      }

    var rn=Math.floor(Math.random()*1000000);
    xmlHttp.open("GET","/ajax/get_offer.php?rn="+rn, true);
    xmlHttp.send(null);  

}

function send_offer()
{  
  var xmlHttp;

	var fullname,tel,company,accept,email,note,target,mission,security_code2,camp="";
	
	fullname=document.getElementById("fullname").value;
	company=document.getElementById('company').value;
	email=document.getElementById('email').value;
	tel=document.getElementById('tel').value;
	note=document.getElementById('note').value;
	target=document.getElementById('target').value;
	security_code2=document.getElementById('security_code2').value;
	mission=document.getElementById('mission').options[document.getElementById('mission').selectedIndex].value;

	with(document.offerform) {
		for(var i = 0; i < campaign.length; i++){
			if(campaign[i].checked) {
				if(camp!="")
					camp += '|'+campaign[i].value;
				else
					camp += campaign[i].value;
			}
		}
	}

  document.getElementById('right_content').innerHTML="";


  try
    {    
     // Firefox, Opera 8.0+, Safari    
     xmlHttp=new XMLHttpRequest();    
    }
  catch (e)
    {
      // Internet Explorer    
      try
        {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
      try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        
          alert("Your browser does not support AJAX!");        
          return false;        
        }      
       }    
     }

    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
          document.getElementById('right_content').innerHTML=xmlHttp.responseText;
        }
      }

    var rn=Math.floor(Math.random()*1000000);
    xmlHttp.open("GET","/ajax/send_offer.php?security_code2="+security_code2+"&fullname="+fullname+"&tel="+tel+"&company="+company+"&email="+email+"&note="+note+"&target="+target+"&mission="+mission+"&campaign="+camp+"&rn="+rn, true);
    xmlHttp.send(null);  

}

function get_reg()
{  
  var xmlHttp;

  document.getElementById('right_content').innerHTML="";

  try
    {    
     // Firefox, Opera 8.0+, Safari    
     xmlHttp=new XMLHttpRequest();    
    }
  catch (e)
    {
      // Internet Explorer    
      try
        {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
      try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        
          alert("Your browser does not support AJAX!");        
          return false;        
        }      
       }    
     }

    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
          document.getElementById('right_content').innerHTML=xmlHttp.responseText;
        }
      }

    var rn=Math.floor(Math.random()*1000000);
    xmlHttp.open("GET","/ajax/get_reg.php?rn="+rn, true);
    xmlHttp.send(null);  

}

function send_reg()
{  
	
	var lastname,firstname,company,accept,email;
	
	lastname=document.getElementById('lastname').value;
	firstname=document.getElementById('firstname').value;
	company=document.getElementById('company').value;
	email=document.getElementById('email').value;
	accept=document.getElementById('accept').value;
	security_code2=document.getElementById('security_code2').value;
	
	
  var xmlHttp;

  document.getElementById('right_content').innerHTML="";

  try
    {    
     // Firefox, Opera 8.0+, Safari    
     xmlHttp=new XMLHttpRequest();    
    }
  catch (e)
    {
      // Internet Explorer    
      try
        {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
      try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        
          alert("Your browser does not support AJAX!");        
          return false;        
        }      
       }    
     }

    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
          document.getElementById('right_content').innerHTML=xmlHttp.responseText;
        }
      }

    var rn=Math.floor(Math.random()*1000000);
    xmlHttp.open("GET","/ajax/send_reg.php?security_code2="+security_code2+"&firstname="+firstname+"&lastname="+lastname+"&company="+company+"&email="+email+"&accept="+accept+"&rn="+rn, true);
    xmlHttp.send(null);  

}

function showReference(url)
{  
  var xmlHttp;

  document.getElementById('ajax_ref').innerHTML="";

  try
    {    
     // Firefox, Opera 8.0+, Safari    
     xmlHttp=new XMLHttpRequest();    
    }
  catch (e)
    {
      // Internet Explorer    
      try
        {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
      try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        
          alert("Your browser does not support AJAX!");        
          return false;        
        }      
       }    
     }

    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
          document.getElementById('ajax_ref').innerHTML=xmlHttp.responseText;
        }
      }

    var rn=Math.floor(Math.random()*1000000);
    xmlHttp.open("GET","/ajax/showRef.php?url="+url+"&rn="+rn, true);
    xmlHttp.send(null);  

}

