
var server='http://pollkit.com/';

function showresults_embed_697(){
	var s = document.createElement("SCRIPT");
	s.src = server + "jd_script/encuesta_resultado.js.php?id=Njk3";
	var h = document.getElementsByTagName("head").item(0);
	h.appendChild(s);
}

function voted_embed_697(){
	opc=document.poll_697.alternativas;
	
	var respuestas = '';
 	var separador = '';
	var ids = '';
 	var j=0;
	for(i=0;i<opc.length;i++){
		check=document.getElementById(opc[i].id).checked;
		if(check){respuestas += separador +'1';//separador = "|";
		j++;
		}else{respuestas += separador + '0';//separador = "|";
		}
		ids += separador + opc[i].value;
		separador = "|";
	}
	if(j==0){alert('Eliga una alternativa');return;}
		
	divAlert = document.getElementById('results_697');
	divAlert.innerHTML= '<img border="0px" style="border:0;" src="'+server+'/jd_themes/default/images/spinner.gif">';
	
	var send_vars='id=697&respuestas='+respuestas+'&votos='+j+'&ids_alternativas='+ids;

	var s = document.createElement("SCRIPT");
	s.src = server + "jd_script/encuesta_votar.js.php?"+send_vars;
	var h = document.getElementsByTagName("head").item(0);
	h.appendChild(s);
}
function styles_697(){
	fileref=document.createElement("link");
	fileref.setAttribute("rel", "stylesheet");
	fileref.setAttribute("type", "text/css");
	fileref.setAttribute("href", "http://pollkit.com/jd_script/estilos.css.php?n=3");
	document.getElementsByTagName("head").item(0).appendChild(fileref);
}

function form_initialize_697(){
	//formulario de inicio y regresar a la encuesta
	var form_poll_voted='';
	divpoll = document.getElementById('results_697');
			form_poll_voted+='<form action="" name="poll_697" onsubmit="voted_embed_697(); return false" >';
			form_poll_voted+='<div class="alternatives">';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3879" id="alternativa_6970" /><label for="alternativa_6970"> Excelente</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3880" id="alternativa_6971" /><label for="alternativa_6971"> Muy Bueno</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3881" id="alternativa_6972" /><label for="alternativa_6972"> Bueno</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3882" id="alternativa_6973" /><label for="alternativa_6973"> Aceptable</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3883" id="alternativa_6974" /><label for="alternativa_6974"> Pésimo / insuficiente</label></span><br />';
			form_poll_voted+='</div>';
		form_poll_voted+='<div style="display:table;width:225px;"><span style="width:auto;display:block;float:left;">';
		form_poll_voted+='<span class="pk_link_results" onclick="showresults_embed_697()">Ver Resultados</span><br /><span class="pk_link_results"><a target="_new" href="http://pollkit.com/p/aeebf4efa697">M&aacute;s detalles</a></span></span>';
		form_poll_voted+='<span style="width:auto;display:block;float:right;padding-top:3px;"><input class="pk_button" type="submit" value="Votar" /></span>';
		form_poll_voted+='</div>';
		form_poll_voted+='</form>';
		divpoll.innerHTML=form_poll_voted;
}

document.write('<div class="pk_poll" style="width:250px;">');document.write('<div class="pk_content">');document.write('<div class="pk_top"><div class="pk_top_left"><div class="pk_top_right">');document.write('</div></div></div>');document.write('<div class="pk_boxcontrol">');document.write('<div class="pk_question">¿Que tan satisfecho estás con el servicio de tu proveedor de Internet?</div>');document.write('<input type="hidden" value="Njk3" id="encuesta_id" />');document.write('<div id="results_697">');form_initialize_697();
document.write('</div>');document.write('</div>');document.write('<div class="pk_bottom"><div class="pk_bottom_left"><div class="pk_bottom_right">');document.write('<p class="pk_link_web"><small>Gestionado por <a href="http://www.pollkit.com" target="_new">PollKit.com</a></small></p>');document.write('</div></div></div>');document.write('</div>');document.write('</div>');styles_697();