<!-- 
var tags = new Array(" ", "animals", "expos", "people", "places", "things");
//
var version = "0.2b";
var photoIndex;
//////////////// BEFORE
var relativePathPhoto = "http://www.cazucito.com/old/2005/activa/photoblog/photo/";
// GTO
var gto1999_01 = new photoInfo("1999_mx_gto_momias", "Momias en una mina", tags[4], relativePathPhoto, "Momias en una mina. Presuntamente el perro se quedo con su amo aún cuando murio", "130", new measures('592', '888', '72'), '1999/06/15', gto, cazucito, by_nc);
var gto1999_02 = new photoInfo("1999_mx_gto_pipila", "Monumento al Pípila", tags[4], relativePathPhoto, "Monumento al Pípila", "88", new measures('594', '886', '72'), '1999/06/15', gto, cazucito, by_nc);
//////////////// 2003
var oct2003_01 = new photoInfo("2003_gr_partenon", "El Partenón", tags[4], relativePathPhoto, "El Partenón en restauración", "1160", new measures('3563', '2390', '600'), '2003/10/15', athens, beemagic, by_nc);
var oct2003_02 = new photoInfo("2003_gr_ruinas", "Ruinas", tags[4], relativePathPhoto, "Una de las tantas ruinas de Atenas", "1270", new measures('3569', '2377', '600'), '2003/10/15', athens, beemagic, by_nc);
//
var oct2003_03 = new photoInfo("2003_uk_bridge", "The Bridge", tags[4], relativePathPhoto, "The Bridge (El Puente)", "117", new measures('892', '597', '150'), '2003/10/15', london, beemagic, by_nc);
var oct2003_04 = new photoInfo("2003_uk_londoneye", "The London Eye", tags[4], relativePathPhoto, "The London Eye de British Airways (El Ojo de Londres)", "1190", new measures('3568', '2384', '600'), '2003/10/15', london, cazucito, by_nc);
var oct2003_05 = new photoInfo("2003_uk_m_britanico", "Museo Británico", tags[4], relativePathPhoto, "Dentro del Museo Británico", "96", new measures('891', '600', '150'), '2003/10/15', london, beemagic, by_nc);
var oct2003_06 = new photoInfo("2003_uk_shakespeares_home", "Casa de nacimiento de W. Shakespeare", tags[4], relativePathPhoto, "Casa en la que nació William Shakespeare", "109", new measures('892', '596', '150'), '2003/10/15', london, beemagic, by_nc);
//////////////// 2005
// bellas artes
var ago20050817_01 = new photoInfo("20050817_mx_ba_lat", "Palacio de Bellas Artes", tags[4], relativePathPhoto, "Palacio de Bellas Artes por la tarde", "850", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
var ago20050817_02 = new photoInfo("20050817_mx_ba_aerea", "Palacio de Bellas Artes (Vista aérea)", tags[4], relativePathPhoto, "Vista aérea del Palacio de Bellas Artes", "1270", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
var ago20050817_03 = new photoInfo("20050817_mx_ba_fachada", "Palacio de Bellas Artes (Fachada)", tags[4], relativePathPhoto, "Fachada del Palacio de Bellas Artes", "774", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
var ago20050817_04 = new photoInfo("20050817_mx_ba_fuente", "Palacio de Bellas Artes (Fuente)", tags[4], relativePathPhoto, "Fuente de la Palacio de Bellas Artes", "907", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
// torre latinoaméricana
var ago20050817_05 = new photoInfo("20050817_mx_df_torre_latino", "Vista Nocturna de la Ciudad de México", tags[4], relativePathPhoto, "Vista nocturna de la Ciudad de México desde la Torre Latinoaméricana", "891", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
var ago20050817_06 = new photoInfo("20050817_mx_lampara_torre_latino", "Lampara Exterior", tags[5], relativePathPhoto, "Lampara en el Mirador de la Torre Latinoamérica", "963", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
// ciudad
var ago20050817_07 = new photoInfo("20050817_mx_eje_central_00", "Eje Central", tags[4], relativePathPhoto, "Eje central vista aérea por la noche", "963", new measures('2576', '1932', '230'), '2005/08/17', df, cazucito, by_nc);
var ago20050817_08 = new photoInfo("20050817_mx_chiquihuite", "Aterdecer en el Chiquihuite", tags[4], relativePathPhoto, "Atardecer del Chiquihuite", "748", new measures('1932', '2576', '230'), '2005/08/17', df, cazucito, by_nc);
// desc
var photos = new Array(ago20050817_08, ago20050817_07, ago20050817_06, ago20050817_05, ago20050817_04, ago20050817_03, ago20050817_02, ago20050817_01, oct2003_06, oct2003_05, oct2003_04, oct2003_03, oct2003_02, oct2003_01, gto1999_02, gto1999_01);
//
  var photoTable1 = '<table border="0" width="810px" height="200px" cellpadding="0" cellspacing="0">';
  photoTable1 += '<tr>';
  photoTable1 += '<td width="480px"></td>';
  photoTable1 += '<td width="230px" align="center">';
  photoTable1 += '<img id="imgt" name="imgt" onmouseover="';
  var photoTable2 = '" src="';
  var photoTable3 = '" border="2" style="cursor:help;border-color:#ffffff;">';
  photoTable3 += '</td>';	
  photoTable3 += '<td width="100px">';
  photoTable3 += '<table border="0" width="100px" height="200px" cellpadding="0" cellspacing="0" align="center"><tr valign="middle">';
  photoTable3 += '<td width="40px"></td>';
  photoTable3 += '<td width="40px" align="center"><img src="http://www.cazucito.com/mm/static/40x40px_trans.gif" onmouseover="'+toolTipVersion(version)+'" border="0" style="cursor:help;" width="40px" height="40px"><br/><img src="http://www.cazucito.com/mm/static/1px_trans.gif" width="40px" height="150px" border="0"></td>';
  photoTable3 += '<td width="20px"></td>';
  photoTable3 += '</tr></table>';
  photoTable3 += '</td></tr></table>'; 
  var noPhoto = photoTable1 + buildToolTip(null) + photoTable2 + 'http://www.cazucito.com/mm/static/default_photo.jpg' + photoTable3;
// OK
function loadPhoto() {
  document.getElementById("myheader").innerHTML = noPhoto;
  //
  photoIndex = randomImg(1, photos.length);
  var actualImg = photos[photoIndex];
  var img_url;
  var nurl = actualImg.urlimg;
  if(nurl!=null) { img_url = nurl+actualImg.tag+'/'+actualImg.filename+'_t.jpg'; }
  else { img_url = 'http://www.cazucito.com/mm/static/default_photo.jpg'; }
  document.getElementById("myheader").innerHTML = photoTable1 + buildToolTip(actualImg) + photoTable2 + img_url + photoTable3;
}
//
function buildToolTip(_photo) {
	  var tt;
	  var title;
	if(_photo!=null) {
	  title = "<img src=\\\'"+_photo.where.flag+"\\\' border=\\\'1\\\' width=\\\'20px\\\' height=\\\'14px\\\' alt=\\\'"+_photo.where.country+"\\\'>&nbsp;&nbsp;" + _photo.name ;
      tt="<table width=\\\'100%\\\' border=\\\'0\\\' cellspacing=\\\'0\\\' cellpadding=\\\'0\\\'>";
      tt+="  <tr valign=\\\'top\\\'> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="    <td align=\\\'left\\\'>"+_photo.desc+"</td> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="  </tr> ";//desc
      tt+="  <tr> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="    <td width=\\\'100%\\\' height=\\\'1px\\\'>";
	  tt+="<table width=\\\'100%\\\' border=\\\'0\\\' cellspacing=\\\'0\\\' cellpadding=\\\'0\\\'><tr>";
	  tt+="  <td background=\\\'http://www.cazucito.com/mm/static/tt_bg.jpg\\\' align=\\\'center\\\'>"+_photo.date+"</td> ";
	  tt+="  <td width=\\\'2px\\\'></td> ";  
	  tt+="  <td background=\\\'http://www.cazucito.com/mm/static/tt_bg.jpg\\\' align=\\\'center\\\'>"+_photo.where.city+"("+_photo.where.country+")</td> ";
	  tt+="</tr></table>";
      tt+="    </td> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="  </tr> ";// date | place
      tt+="  <tr> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="    <td width=\\\'100%\\\' height=\\\'1px\\\'>";
	  tt+="<table width=\\\'100%\\\' border=\\\'0\\\' cellspacing=\\\'0\\\' cellpadding=\\\'0\\\'><tr>";
	  tt+="  <td background=\\\'http://www.cazucito.com/mm/static/tt_bg.jpg\\\' align=\\\'center\\\'>";
			 tt+="<a href=\\\'"+_photo.urlimg+_photo.tag+"/"+_photo.filename+".jpg\\\' target=\\\'_blank\\\'><img src=\\\'http://www.cazucito.com/mm/static/nw.png\\\' border=\\\'0\\\' alt=\\\'Tamaño original / Original size\\\' title=\\\'Tamaño original / Original size\\\'></a> <strong>|</strong> ";
	         tt+=_photo.size+"KB <strong>|</strong> ";
	         tt+=_photo.dimentions.width+"x"+_photo.dimentions.heigth+"px <strong>|</strong> ";
	         tt+=showLicense(_photo.license)+"</td>";
	  tt+="</tr></table>";
      tt+="    </td> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="  </tr> ";// size KB, dimentions px | original | license
      tt+="  <tr> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="    <td width=\\\'100%\\\' height=\\\'1px\\\' background=\\\'http://www.cazucito.com/mm/static/sitefoot.gif\\\'>";
	  tt+="<table width=\\\'100%\\\' border=\\\'0\\\' cellspacing=\\\'0\\\' cellpadding=\\\'0\\\'><tr>";
	  tt+="  <td align=\\\'center\\\'>"+_photo.user.nick+"(<a href=\\\'mailto:"+_photo.user.email+"?subject=cd_foto_"+_photo.name+"_\\\' target=\\\'_blank\\\' title=\\\'Contacto. / Contact\\\'>"+_photo.user.email+"</a>)</td>";
	  tt+="</tr></table>";
      tt+="    </td> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="  </tr> ";// by
      tt+="</table>";	
	} else {
	  title = "Sin foto / Without photo";
      tt="<table width=\\\'100%\\\' border=\\\'0\\\' cellspacing=\\\'0\\\' cellpadding=\\\'0\\\'><tr>";
      tt+="    <td width=\\\'3px\\\'></td>";
      tt+="    <td>Por favor selecciona otra sección o actualiza la página<br/>Please choose another section or refresh the page</td> ";
      tt+="    <td width=\\\'3px\\\'></td> ";
      tt+="</tr></table>";	
	}
	var tooltip = 'this.T_TITLE=\''+title+'\';this.T_BORDERCOLOR=\'#504f5c\';this.T_BGCOLOR=\'#bababd\';this.T_FONTCOLOR=\'#000000\';this.T_OPACITY=\'50\';this.T_STICKY=true;this.T_LEFT=true;this.T_SHADOWCOLOR=\'#545260\';return escape(\'';
    tooltip += tt + '\');';
	return tooltip;
}
// OK
function toolTipVersion(_ver) {
var tt="<table width=\\\'100%\\\' border=\\\'0\\\' cellspacing=\\\'0\\\' cellpadding=\\\'0\\\'>";
tt+="  <tr> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="    <td rowspan=\\\'3\\\' align=\\\'center\\\'><img src=\\\'"+cazucito.avatar+"\\\' width=\\\'100\\\' height=\\\'100\\\' border=\\\'0\\\'></td> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="    <td colspan=\\\'3\\\' align=\\\'center\\\' background=\\\'http://www.cazucito.com/mm/static/sitefoot.gif\\\'><strong>¡ ¡ ¡ B I E N V E N I D O ! ! !</strong></td> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="  </tr> ";
tt+="  <tr> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="    <td></td> ";
tt+="    <td colspan=\\\'3\\\'><strong>cazucitoDIGITAL</strong> es un sitio web en el que encontrarás los <i>unos</i> y <i>ceros</i> devenidos de mi persona...</td> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="  </tr> ";
tt+="  <tr> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="    <td colspan=\\\'3\\\'  align=\\\'center\\\' background=\\\'http://www.cazucito.com/mm/static/sitefoot.gif\\\'>[Versi&oacute;n 0.2b, M&eacute;xico 2005]</td> ";
tt+="    <td width=\\\'3px\\\'></td> ";
tt+="  </tr>";
tt+="</table>";	
	var tooltip = 'this.T_TITLE=\'cazucitoDIGITAL (Versión '+_ver+')\';this.T_BORDERCOLOR=\'#504f5c\';this.T_BGCOLOR=\'#bababd\';this.T_FONTCOLOR=\'#000000\';this.T_OPACITY=\'50\';this.T_STICKY=true;this.T_TEMP=5000;this.T_LEFT=true;this.T_SHADOWCOLOR=\'#545260\';return escape(\'';
    tooltip += tt + '\');';
	return tooltip;
}
// OK
function showLicense(_lic) {
  var images="Bajo licencia: <a href=\\\'"+_lic.url+"\\\' target=\\\'_blank\\\'>";
  var arr;
  for(var i=0; i<_lic.imgs.length; i++) {
	images += "<img src=\\\'"+_lic.imgs[i].img+"\\\' border=\\\'0\\\' alt=\\\'"+_lic.imgs[i].desc+"\\\' title=\\\'"+_lic.imgs[i].desc+"\\\'>"; 
  }
  images += "</a>";
  return images;
}
// OK
function randomImg(minimum,maximum){
    probabiliesNum = maximum - minimum;
    num = Math.random() * probabiliesNum;
    num = Math.round(num);
    return parseInt(minimum) + num;
} 
//-->