function getWidth(name, text, col, file, id) { 
	var str = document.createTextNode( name.replace('&#38;', '&') );
	var obj = document.createElement( 'A' );
	obj.appendChild( str );
	document.body.appendChild( obj );
	var width = obj.offsetWidth;
		if (!width) width = obj.clientWidth;
		if (!width) width = (str.length>11)?str.length*7.5:str.length*8;
	document.body.removeChild( obj );
	JsHttpRequest.query(
		'/en/image/image?n=' + text + '&w=' + width + '&col=' + col + '&f=' + file,                     
		1,                        
		function (){   
			var img = document.getElementById(id); 
			img.setAttribute("src", "/images/" + file + ".jpg?" + Math.random()*999);
			return true;
		}, 
		true                      
	);
	return true;
}

function getCaptcha(id) {  
	JsHttpRequest.query(
		'/en/image/captcha/',                     
		1,                        
		function (result){   sss = result['code'];
			var img = document.getElementById(id);
			img.setAttribute('src', '/images/captcha.jpg?' + Math.random()*999);
			return true;
		}, 
		true                      
	);
	return true;
}


