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

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

function voted_embed_147(){
	opc=document.poll_147.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_147');
	divAlert.innerHTML= '<img border="0px" style="border:0;" src="'+server+'/jd_themes/default/images/spinner.gif">';
	
	var send_vars='id=147&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_147(){
	fileref=document.createElement("link");
	fileref.setAttribute("rel", "stylesheet");
	fileref.setAttribute("type", "text/css");
	fileref.setAttribute("href", "http://www.pollkit.com/jd_script/estilos.css.php?n=1");
	document.getElementsByTagName("head").item(0).appendChild(fileref);
}

function form_initialize_147(){
	//formulario de inicio y regresar a la encuesta
	var form_poll_voted='';
	divpoll = document.getElementById('results_147');
			form_poll_voted+='<form action="" name="poll_147" onsubmit="voted_embed_147(); return false" >';
			form_poll_voted+='<div class="alternatives">';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="848" id="alternativa_1470" /><label for="alternativa_1470"> Aero de Windows Vista</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="849" id="alternativa_1471" /><label for="alternativa_1471"> Compiz Fusion (beryl compiz) en Linux</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="850" id="alternativa_1472" /><label for="alternativa_1472"> Ninguno</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="851" id="alternativa_1473" /><label for="alternativa_1473"> Los 2 me encantan!</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_147()">Ver Resultados</span><br /><span class="pk_link_results"><a target="_new" href="http://www.pollkit.com/p/fa00083a6147">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">Interfaz gráfica ¿Windows ó Linux?</div>');document.write('<div style="text-align:center;"><a href="http://www.youtube.com/watch?v=xC5uEe5OzNQ" target="new" rel="vidbox" title="Video YouTube"><img height="70" width="70" alt="Video YouTube" src="http://img.youtube.com/vi/xC5uEe5OzNQ/default.jpg" /></a></div>');document.write('<input type="hidden" value="MTQ3" id="encuesta_id" />');document.write('<div id="results_147">');form_initialize_147();
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_147();