function dataholder() {
};
dataholder.prototype.initiate = function() {
	try {
		// Mozilla / Safari
		this._xh = new XMLHttpRequest();
	} catch (e) {
		// Explorer
		var _ieModelos = new Array(
		'MSXML2.XMLHTTP.5.0',
		'MSXML2.XMLHTTP.4.0',
		'MSXML2.XMLHTTP.3.0',
		'MSXML2.XMLHTTP',
		'Microsoft.XMLHTTP'
		);
		var success = false;
		for (var i=0;i < _ieModelos.length && !success; i++) {
			try {
				this._xh = new ActiveXObject(_ieModelos[i]);
				success = true;
			} catch (e) {
				// To implement handling of exceptions
			}
		}
		if ( !success ) {
			// To implement handling of exceptions, while it alerts.
			return false;
		}
		return true;
	}
}

dataholder.prototype.occupied = function() {
	aktstatus = this._xh.readyState;
	return (aktstatus && (aktstatus < 4));
}

dataholder.prototype.procesa = function() {
	if (this._xh.readyState == 4 && this._xh.status == 200) {
		this.procesado = true;
	}
}

dataholder.prototype.send = function(urlget,data) {
	if (!this._xh) {
		this.initiate();
	}
	if (!this.occupied()) {
		this._xh.open("GET",urlget,false);
		this._xh.send(data);
		if (this._xh.readyState == 4 && this._xh.status == 200) {
			return this._xh.responseText;
		}
		
	}
	return false;
}


function _gr(reqseccion,divcont) {
	remote = new dataholder;
	nt = remote.send(reqseccion,"");
	document.getElementById(divcont).innerHTML = nt;
}

var urlBase = "../links_fun_rate_update.php?";


function rate(rating,id)  {
		remote = new dataholder;
		nt = remote.send('../links_fun_rate_update.php?rating='+rating+'&link_fun_id='+id);
		rating = rating * 25;
		document.getElementById('current-rating').style.width = rating+'px';
}