function GetXMLHttpRequest() 
{
    var object = null;
    if (window.XMLHttpRequest) { // Mozilla, Safari, ...
        object = new XMLHttpRequest();
    } else if (window.ActiveXObject) { // IE
        try {object = new ActiveXObject("Msxml2.XMLHTTP");}
        catch(e) {
        }
        if (object == null) {
            try {object = new ActiveXObject("Microsoft.XMLHTTP");}
            catch(e) {
            }
        }
    }
    if (object == null) {alert("Your browser does not support AJAX");}
    return object;
}

/* -----------------------------------------*/
function uclick(type, rid, uid, ssid)
{
/*	if (typeof XMLHttpRequestObject == 'undefined'){XMLHttpRequestObject = new Array;}  
    if(XMLHttpRequestObject != null){ return;}
*/
    var hitsObject = GetXMLHttpRequest();
    if (hitsObject) {
		var URL = 'http://www.clearstocks.com/apps/uclick.php';
		if(uid !=''){
        	var url = URL + "?" + "type=" + type + "&rid=" + rid + "&uid=" + uid + "&ssid=" + ssid;
		} else {
        	var url = URL + "?" + "type=" + type + "&rid=" + rid + "&ssid=" + ssid;
		}
//		hitsObject.open("POST", url, true);
		hitsObject.open("GET", url, false); //If TRUE, the execution of the JavaScript function will continue while the response of the server has not yet arrived. in this case the hits count may not be updated (due to slow server response) and the user may already been redirected to the new url
        hitsObject.setRequestHeader( "Content-Type" , "application/x-www-form-urlencoded; charset=UTF-8" );
        hitsObject.send("");
	}
return;
}




