function videoCounterControl() 
{
    var me = this;	    
	var xmlHttp = createXmlHttpRequest();    
    
    function createXmlHttpRequest() 
    {
    	var xmlHttp = false;
    
    	try {
    	  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    	} catch (e) {
    	  try {
    	    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    	  } catch (e2) {
    	    xmlHttp = false;
    	  }
    	}
    	
    	if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
    	  xmlHttp = new XMLHttpRequest();
    	}    
    	    if (xmlHttp) 
    	        return xmlHttp;
    }
    
	this.click = function()
	{
		xmlHttp.open('POST', 'http://www.extrimdrive.ru/ajax/video_counter.php', true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.send('click=1');
		xmlHttp.onreadystatechange = function (oEvent) {
	        if (!oEvent) {
	            oEvent = window.event;
	        }    
	        me.handleServerResponce(oEvent);
	    };
	}
	
	this.handleServerResponce = function()
	{
		if (xmlHttp.readyState == 4)
			if (xmlHttp.status == 200)
			{
				return;		
			}
	}	
}
