
function refreshCache(key)
{
	var result = callHTTPObj_Cache("/refreshCacheInPlace.aspx?refreshcache=1&key="+key);
	
	//just wait 1 sec for reloading, vtcomposer needs time to refresh data
	this.setTimeout("", 1000);
	this.location.href = this.location.href.replace("cache_inplace=1", "cache_inplace=2");
} 



//callbak
function getHTTPObj_Cache()
{
	var httpObj;
	try {
		httpObj = new ActiveXObject('Msxml2.XMLHTTP');
	} catch (e) {
		try {  
			httpObj = new ActiveXObject('Microsoft.XMLHTTP');
		} catch (oc) {
			httpObj = null;
		} 
	}
	if (!httpObj && typeof XMLHttpRequest != 'undefined') 
		httpObj = new XMLHttpRequest();
	if (!httpObj) alert('[getHTTPObj_Cache Error] Could not create connection object');
	
	return httpObj;
}

function callHTTPObj_Cache(url) 
{ 
  var txt = "";
	httpObj = getHTTPObj_Cache();
	if (httpObj.readyState != 4) 
		httpObj.abort();

	httpObj.open("GET", url, true);
	httpObj.onreadystatechange = function() 
	{
		if (httpObj.readyState != 4)
			return; 
		txt = httpObj.responseText;
	}
	httpObj.send(null);

  return txt;
} 					


