// JavaScript Document
	 var xmlHttpc; 
	 var reqc; 
    var requestURLc = getURI()+'/codebehind/contactcount.aspx?ID='; 
	 
	 function getURI() {
		var URLTemp = window.location.href
		var regexS = "(http://.*)/.*";
		var regex = new RegExp( regexS );
		var results = regex.exec( URLTemp );
		if( results == null ) {
			regex5 = "(https://.*)/.*";
			results = regex.exec(URLTemp);
			if (results == null)
				return "";
			else
				return results[1];
		} else
			return results[1];
	 }
	 
	 function ContactCount(intEscape) {
		 var url = requestURLc+intEscape;
		 GetXmlHttpObjectc(stateChangeHandlerc,url);
	 }
	 
    //stateChangeHandler will fire when the state has changed, i.e. data is received back 
    // This is non-blocking (asynchronous) 
    function stateChangeHandlerc() 
    { 
        //readyState of 4 or 'complete' represents that data has been returned 
        if (xmlHttpc.readyState == 4 || xmlHttpc.readyState == 'complete'){ 
            //Gather the results from the callback 
            var strc = xmlHttpc.responseText; 

            //Populate the innerHTML of the drp with the results
			document.getElementById('divContactBox').innerHTML = strc; 
		} 
    } 


    function GetXmlHttpObjectc(handler,url) { 
		xmlHttpc=false;
		/*@cc_on @*/
		/*@if (@_jscript_version >= 5)

		 try {
		  xmlHttpc = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) {
		  try {
			xmlHttpc = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) {
			xmlHttpc = false;
		  }
		 }
		@end @*/
		if (!xmlHttpc && typeof XMLHttpRequest!='undefined') {
			try {
				xmlHttpc = new XMLHttpRequest();
			} catch (e) {
				xmlHttpc=false;
			}
		}
		if (!xmlHttpc && window.createRequest) {
			try {
				xmlHttpc = window.createRequest();
			} catch (e) {
				xmlHttpc=false;
			}
		}
		if(xmlHttpc) {
			sndReqc(handler,url);
		}
        
    } 
	 
	function sndReqc(handleResponse,url) {
		 var randNum = Math.round(100*Math.random());
		 xmlHttpc.open("GET", url+'&randomStuff=' + randNum, true);
		 /* Prevent Memory Leak on IE */
		 xmlHttpc.onreadystatechange = function() {};
		 xmlHttpc.onreadystatechange = handleResponse;
		 xmlHttpc.send(null);
	}
