function write_calendar(dia)
{
  write_flash("http://cr.i.uol.com.br/diadascriancas/2008/calendario2008.swf?dia="+dia,579,200);
}

function write_flash(url, width, height)
{
  var html="";
  html+="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" id=\"\" width=\""+width+"\" height=\""+height+"\">";
  html+="  <param name=\"movie\" value=\""+url+"\">"; 
  html+="  <param name=\"quality\" value=\"high\"> ";
  html+="  <param name=\"allowScriptAccess\" value=\"always\"> ";
  html+="  <param name=\"wmode\" value=\"transparent\" />";
  html+="  <embed src=\""+url+"\" allowScriptAccess=\"always\" quality=\"high\" wmode=\"transparent\" swliveconnect=\"FALSE\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" width=\""+width+"\" height=\""+height+"\">";
  html+="</object>";
  document.write(html);  
}

///// funções para home especial de UOL Crianças

function show_chamadas()
{
  if(xmlChamadas.complete!=1)
  {
    setTimeout("show_chamadas()",100);
  }
  else
  {
    dia = parseInt(dia.toString().replace(/0*/,""));
    document.getElementById("esp-chapeu").innerHTML = "Dia "+dia+":";
    document.getElementById("esp-imagem").src="http://cr.i.uol.com.br/diadascriancas/2008/thumb/dia"+dia+".jpg";
    document.getElementById("esp-link").href="/diadascriancas/2008/dia"+dia+".jhtm";
    document.getElementById("esp-chamada").innerHTML=xmlChamadas.xmlhttp.responseXML.getElementsByTagName("chamada")[dia-1].attributes[1].value;
  } 
}