var xmlHttp;

function createAjax(){
try
  { 
  // Firefox, Opera 8.0+, Safari  
  xmlHttp=new XMLHttpRequest(); 
if ( xmlHttp.overrideMimeType ) xmlHttp.overrideMimeType ( "text/xml" ); 
  }
  catch (e)
	    { 
	  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; 
	      } 
	    } 
	 } 
	
  }
var xmlHttpStr="";
var divScrollTop=0;

function ajaxFunction(){
	createAjax();
	
	nameStr=document.getElementById('mb-name').value;
	emailStr=document.getElementById('mb-dktdk-dktdk').value;
	conameStr=document.getElementById('Companyname').value;
	telnoStr=document.getElementById('Contacttelephone').value;
	moreStr=document.getElementById('more').checked;
	
  	xmlHttp.onreadystatechange=function(){
		 if(xmlHttp.readyState==4){
			xmlHttpStr=xmlHttp.responseText;
			if(xmlHttpStr!="not"){
				location.href="thanks.html";
				}
				else
				{
				alert("There has been a problem\nPlease try again later.");
				}

			}
			
		}
	if(!radioFlag){
		xmlHttp.open("GET","sendmail.asp?email=" + emailStr + "&name=" + nameStr +"&coname=" + conameStr + "&telno=" + telnoStr + "&inform=" + moreStr ,true);
		xmlHttp.send(null);		
	}
	else
	{
		document.reqForm.action="http://rawww.createsend.com/t/1/s/dktdk/?mb-dktdk-dktdk="+ emailStr +"&mb-name=" + nameStr;
		document.reqForm.submit();
	}
  }
  
  radioFlag=false;

  function radioSelect(obj){
  if(obj.checked)radioFlag=true;else radioFlag=false;
  }