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

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

function voted_embed_673(){
	opc=document.poll_673.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_673');
	divAlert.innerHTML= '<img border="0px" style="border:0;" src="'+server+'/jd_themes/default/images/spinner.gif">';
	
	var send_vars='id=673&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_673(){
	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=6");
	document.getElementsByTagName("head").item(0).appendChild(fileref);
}

function form_initialize_673(){
	//formulario de inicio y regresar a la encuesta
	var form_poll_voted='';
	divpoll = document.getElementById('results_673');
			form_poll_voted+='<form action="" name="poll_673" onsubmit="voted_embed_673(); return false" >';
			form_poll_voted+='<div class="alternatives">';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3738" id="alternativa_6730" /><label for="alternativa_6730"> Seguira cayendo y haremos nuevos minimos de la tendencia principal</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3739" id="alternativa_6731" /><label for="alternativa_6731"> Empezara a rebotar, volvera a maximos y seguiremos subiendo</label></span><br />';
				form_poll_voted+='<span class="alternative"><input name="alternativas"  type="radio"  value="3740" id="alternativa_6732" /><label for="alternativa_6732"> No tengo ni la menor idea</label></span><br />';
			form_poll_voted+='</div>';
		form_poll_voted+='<div style="display:table;width:413px;"><span style="width:auto;display:block;float:left;">';
		form_poll_voted+='<span class="pk_link_results" onclick="showresults_embed_673()">Ver Resultados</span><br /><span class="pk_link_results"><a target="_new" href="http://www.pollkit.com/p/125872ff6673">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:438px;">');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 hara el IBEX35 a medio plazo ?</div>');document.write('<input type="hidden" value="Njcz" id="encuesta_id" />');document.write('<div id="results_673">');form_initialize_673();
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_673();