//Detección del Browser
 IE=1;
 IE = (window.navigator.appName == "Microsoft Internet Explorer")? 1:0;
 homepage = 1;

//***************** SCRIPTS PARA LA FECHA ********************** 

 var hoy = new Date();
 
 function DiaSemana(fecha)
 {
  var DiaSemana = fecha.getDay();
  switch(DiaSemana){
    case 0: return "Domingo";
    case 1: return "Lunes";
    case 2: return "Martes";
    case 3: return "Miércoles";
    case 4: return "Jueves";
    case 5: return "Viernes";
    case 6: return "Sábado";
 return "";      }
 }

 function Mes(fecha)
 {
  var Mes = fecha.getMonth();
  switch(Mes){
    case 0: return "Ene";
    case 1: return "Feb";
    case 2: return "Mar";
    case 3: return "Abr";
    case 4: return "Mayo";
    case 5: return "Jun"; 
    case 6: return "Jul";
    case 7: return "Ago";
    case 8: return "Sep";
    case 9: return "Oct";
    case 10: return "Nov";
    case 11: return "Dic";
  return ""; }  
 }

function year() {
 var sisdate=new Date();
 var year2 = sisdate.getFullYear(); 
 document.write(year2);
} 

//***************** FIN DE LOS SCRIPTS PARA LA FECHA ********************** 




//*************** COMIENZA LOS SCRIPTS PARA LOS FAVORITOS *******
function ADD()
{ 
 NS = (document.layers)?true:false;
 IE = (document.all)?true:false;
 if (NS)
 {
  var url="http://www.cuba.cu";
  var title="El Portal de Cuba";
  var dateStr = Math.floor (new Date().getTime() / 1000); 
  var bookmarkPrefix = "<DL><P>"; 
  var bookmarkSuffix = "</DL><P>"; 
  var bookmarkStr = 
    '<DT><A HREF="' 
    + url 
    + '" ' 
    + 'ADD_DATE="' 
    + dateStr 
    + '" LAST_VISIT="' 
    + dateStr 
    + '" LAST_MODIFIED="' 
    + dateStr 
    + '">' 
    + title 
    + '</A>'; 
  netscape.security.PrivilegeManager.enablePrivilege("UniversalPropertyRead"); 
  var userDir = java.lang.System.getProperty("user.home"); 
  var filename = userDir + "\\bookmark.htm"; 
  netscape.security.PrivilegeManager.enablePrivilege("UniversalFileAccess"); 
  var inetShortcutFile = 
    new java.io.FileWriter (filename, true); 
  var line = bookmarkPrefix + "\r\n"; 
  inetShortcutFile.write(line, 0, line.length); 
  line = bookmarkStr + "\r\n";; 
  inetShortcutFile.write(line, 0, line.length); 
  var line = bookmarkSuffix + "\r\n"; 
  inetShortcutFile.write(line, 0, line.length); 
  inetShortcutFile.flush(); 
  inetShortcutFile.close(); 
 } 
 else
 { 
   window.external.AddFavorite(location.href, document.title);
 }
}

function popup(url,name,width,height,resize,scroll) {
var dialogWin = new Object();
dialogWin.width = width;
dialogWin.height = height;
now = new Date();
var millis=now.getTime();
var mstr=""+millis;
if (document.layers) {
dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=yes,menubar=no,location=no,toolbar=no,status=no,directories=no';
} else if (document.all) {
dialogWin.left = (screen.width - dialogWin.width) / 2;
dialogWin.top = (screen.height - dialogWin.height) / 2;
var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=yes,menubar=no,location=no,toolbar=no,status=no,directories=no';
}
//Agrega el codigo anti-caching
tienesp=false;

window.open(url,name,attr);
}

function recomienda()
{
laURL= 'enviar.html'
popup(laURL,'','400','335');
}

function traductor()
{
laURL= 'http://www.cuba.cu/traduce.php'
popup(laURL,'','550','335');
}




//-->
//*************** FIN DE LOS SCRIPTS PARA LOS FAVORITOS *******

