41
| <![CDATA[<script type="text/javascript">
//Globais
var v_ano = 2013;
var v_uf = '00';
//var estados_array = [11, 12, 13, 14, 15, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 41, 42, 43, 50, 51, 52, 53];
//var v_uf = estados_array[Math.floor(Math.random()*estados_array.length)].toString();
//window.onload = setV_uf();
function setV_uf(){
console.log('Você esta aqui 2');
siglaarr = new Array();
for(key in DicUFsSiglas){
siglaarr.push(key);
}
while(v_uf=='00'){
v_uf = siglaarr[Math.floor(Math.random()*siglaarr.length)];
}
document.getElementById('iframeAGPOP_uf').src = 'box_piramideplay.php?ag='+v_uf+'&ano=2013';
document.getElementById('iframeGRUPETA_uf').src = 'box_gruposetarios.html?ag='+v_uf+'&ano=2013';
document.getElementById('local').innerHTML = DicUFs[v_uf];
document.getElementById('box_popclock_iframe2').src = 'box_popclock.php?ag='+v_uf+'&type=small';
document.getElementById('box_popclock_iframe2b').src = 'box_barra.php?ag='+v_uf+'&type=small';
//Graficos genericos
setGraqficosGenericos(v_uf,'2013');
}
// Slider JQuery
$(function() {
$( "#slider" ).slider({
orientation: "horizontal",
max: 2030,
step: 1,
value: 2013,
min: 2000,
slide: pegaAno,
change: pegaAno
});
});
function pegaAno(){
$("#valor").html($("#slider").slider("value"));
var $v_ano = $("#slider").slider("value");
v_ano = $v_ano;
// loadIframe('iframeAGPOP_br','box_agpop.html?ag=00&ano='+$v_ano);
loadIframe('iframeAGPOP_uf','box_agpop.html?ag='+v_uf+'&ano='+$v_ano);
// document.getElementById("iframeAGPOP_br").contentWindow.seemlesschange($v_ano);
// document.getElementById("iframeAGPOP_uf").contentWindow.seemlesschange($v_ano);
}
function loadIframe(iframeName, url) {
var $iframe = $('#' + iframeName);
if ( $iframe.length ) {
$iframe.attr('src',url);
}
}
function changeGlobalLocal(loc){
v_uf = loc.toString();
if(v_uf == '0'){
v_uf = '00';
}
//Nome
document.getElementById('local').innerHTML = DicUFs[v_uf];
//Popclock
document.getElementById('box_popclock_iframe2').src = 'box_popclock.php?ag='+v_uf+'&type=small';
document.getElementById('box_popclock_iframe2b').src = 'box_barra.php?ag='+v_uf+'&type=small';
//Evoulçoes
document.getElementById('iframeGRUPETA_uf').src = 'box_gruposetarios.html?ag='+v_uf+'&ano='+v_ano;
//Graficos genericos
setGraqficosGenericos(v_uf,v_ano);
if(v_uf != '00'){
//Piramide
document.getElementById('iframeAGPOP_uf').src = 'box_piramideplay.php?ag='+v_uf+'&ano='+v_ano;
//Projeções dosgrupos etarios
document.getElementById('graphs_gruposetarios_uf').src = 'box_gruposetarios.html?ag='+v_uf+'&ano='+v_ano;
}
}
function setGraqficosGenericos(SetUF,SetANO){
document.getElementById('graphTier2_genero_iframe').src = 'box_generos.html?ag='+v_uf;
document.getElementById('gx_1').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=1';
document.getElementById('gx_2').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=2';
document.getElementById('gx_3').src = 'box_generico.html?ag=00&ano='+v_ano+'&id=2';
document.getElementById('gx_4').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=3';
document.getElementById('gx_5').src = 'box_generico.html?ag=00&ano='+v_ano+'&id=3';
document.getElementById('gx_6').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=4';
document.getElementById('gx_7').src = 'box_generico.html?ag=00&ano='+v_ano+'&id=4';
document.getElementById('gx_8').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=5';
document.getElementById('gx_9').src = 'box_generico.html?ag=00&ano='+v_ano+'&id=5';
document.getElementById('gx_10').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=6';
document.getElementById('gx_11').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=7';
document.getElementById('gx_12').src = 'box_generico.html?ag='+v_uf+'&ano='+v_ano+'&id=8';
document.getElementById('gx_13').src = 'box_generico.html?ag=00&ano='+v_ano+'&id=8';
document.getElementById('gx_csv').src = 'box_csv.html?ag='+v_uf;
}
</script>]]>
|