function addOption(selectId, val, txt) 
{
	var objOption = new Option(txt, val);
	document.getElementById(selectId).options.add(objOption);
}

function Preview(user_ad_image_id)
{
	document.getElementById("mainImage").src="images/usrthumbs.php?id=" + user_ad_image_id + "&w=250&h=166";
}

function CheckField(obj_id, alert_txt, type)
{
	if(type.match("empty"))
	{
		// Tenemos que chequear que no este vacio
		if(document.getElementById(obj_id).value=="")
		{
			alert(alert_txt);
			document.getElementById(obj_id).focus();
			return false;
		}
	}
	return true;
}
