function rightAlign(div,offset){
  if(typeof div=='string'){div=document.getElementById(div)}
  if(isNaN(offset)){offset=0}
  div.style.left=document.body.clientWidth-parseInt(div.offsetWidth)+offset;
}
function stretchRight(div,offset){
  if(typeof div=='string'){div=document.getElementById(div)}
  if(isNaN(offset)){offset=0}
  if(document.body.clientWidth-parseInt(div.offsetLeft)+offset>=0){
    div.style.width=document.body.clientWidth-parseInt(div.offsetLeft)+offset;
  }
}
function stretchBottom(div,offset){
  if(typeof div=='string'){div=document.getElementById(div)}
  if(isNaN(offset)){offset=0}
  if(document.body.clientHeight-parseInt(div.offsetTop)+offset>=0){
    div.style.height=document.body.clientHeight-parseInt(div.offsetTop)+offset;
  }
}


function mostrafoto(Foto,aux){

 if (aux==3)
 {
	var fecha=new Date()
	var mes=fecha.getMonth()+1
	var ano=fecha.getFullYear()	 
	var dia=fecha.getDate()

	var cadena= new String()
	cadena="http://www.meteoclimatic.com/maps/maplib/ESCAT_"+ano;



	if (mes<10){
		cadena=cadena+"0"+mes;
	}
	else
	{
		cadena=cadena+mes;
	}	
	if (dia<10){
		cadena=cadena+"0"+dia;
	}
	else
	{
		cadena=cadena+dia;
	}	
	
	cadena=cadena+"_rain_v.jpg";
	Foto=cadena
 }
	
 document.getElementById("foto").src =Foto; 
 dh=document.getElementById('iframeDiv');
 dh.style.visibility='visible'; 
}
