/*AJAX related functions below * * * * * * * * * * * * */
function GetXmlHttpObjectCaptcha()
{
var xmlHttpCaptcha=null;
try
  {
  /* Firefox, Opera 8.0+, Safari*/
  xmlHttpCaptcha=new XMLHttpRequest();
  }
catch (e)
  {
  /* Internet Explorer*/
  try
    {
    xmlHttpCaptcha=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttpCaptcha=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttpCaptcha;
}

var xmlHttpCaptcha;
var strCode;
var strOutputDiv;

function GetCaptchaCode()
{ 
	xmlHttpCaptcha=GetXmlHttpObjectCaptcha();
	if (xmlHttpCaptcha==null)
	  {
	  return;
	  }
	var url="/includes/getcaptchacode.asp?sid=" + Math.random();
	xmlHttpCaptcha.onreadystatechange=function (){ 
		if (xmlHttpCaptcha.readyState==4)
		{
			document.getElementById("captchaimg").src="http://psdruginfo.com/images/captcha.asp?c=" + xmlHttpCaptcha.responseText;
		}
	}
	xmlHttpCaptcha.open("GET",url,true);
	xmlHttpCaptcha.send(null);
}

GetCaptchaCode();