function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function agregar_favoritos (url, title)
{
	if (window.sidebar) // Mozilla Firefox Bookmark		
	{ 
		window.sidebar.addPanel(title, url, "");	
	} 
	else if (window.external) // IE Favorite
	{
		window.external.AddFavorite(url, title);
	}
} 


function encuesta (id_encuesta)
{
	respuesta = 0;
	for(i=0; i<document.forms['frmEncuestas'].respuesta.length; i++)
	{
		if (document.forms['frmEncuestas'].respuesta[i].checked)
		{
			respuesta = document.forms['frmEncuestas'].respuesta[i].value;
		}
	}

	if (respuesta > 0)
	{
		url = 'encuestas.php?op=votar&id_encuesta=' + id_encuesta + '&respuesta=' + respuesta;
		MM_openBrWindow(url, 'encuesta', 'width=360px,height=250px');
	}
	else
	{
		alert('Debe elegir una respuesta para poder votar.');
	}
}

