// JavaScript Document
function setStilo(x)
{
document.getElementById(x).style.background="#ffffcc";
}
function setStyle2(x)
{
document.getElementById(x).style.background="white";
}

function changeLabels(lista_ids, id_form, id_check)
{
	var i;
	eval('var check=document.'+id_form+'.'+id_check);
	if (check.checked)
	{
		for (i=0;i<lista_ids.length;i++)
		{
			label=document.getElementById(lista_ids[i]).getElementsByTagName('label')[0].innerHTML;
			label+=" *";
			document.getElementById(lista_ids[i]).getElementsByTagName('label')[0].innerHTML=label;
		}
	}
	else
	{
		for (i=0;i<lista_ids.length;i++)
		{
			label=document.getElementById(lista_ids[i]).getElementsByTagName('label')[0].innerHTML;
			label=label.substr(0,label.length-2);
			document.getElementById(lista_ids[i]).getElementsByTagName('label')[0].innerHTML=label;
		}
	}
}

String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
return this.replace(/^\s+/g,"");
}
String.prototype.rtrim = function() {
return this.replace(/\s+$/g,"");
}
