// basic.js - JavaScript library for photo database
//
// (c) 1995-98 Puerto Rico Internet Corp.
//
// All Rights Reserved.

function isActiveX()
{
  return ((window.navigator.appName == 'Microsoft Internet Explorer') ||
          (window.navigator.appName == 'MSIE'));
}

function restoreLogo(lang)
{
  if (isActiveX()) {
    if (lang == 'en') {
      parent.frames.logo.document.all.summary.outerHTML = 
	"<DIV CLASS=logo ALIGN=RIGHT ID=summary>" +
	"<B>Puerto Rico&nbsp;<BR>" +
	"Internet&nbsp;<BR>" +
	"Photo Library&nbsp;<BR></B>" +
	"</DIV>";
    } else {
      parent.frames.logo.document.all.summary.outerHTML =
        "<DIV CLASS=logo ALIGN=RIGHT ID=summary>" +
        "<B>Galer&iacute;a de Fotos&nbsp;<BR>" +
        "de&nbsp;<BR>" +
        "P.R. Internet&nbsp;<BR></B>" +
        "</DIV>";
    }
  }
}


function setSummary(someText)
{
  if (someText == "") {
    return false;
  }
  if (isActiveX()) {
    parent.frames.logo.document.all.summary.outerHTML = 
	"<DIV CLASS=summary ALIGN=RIGHT ID=summary>" + 
	someText +
	"</DIV>";
  }
  window.status = someText;
  return true;
}


function onClick(lang, doc, ssi)
{
  mySeed = new Date();

  html = '.shtml';

//  if (ssi == 1) {
//    html = '.shtml';
//  } else {
//    html = '.html';
//  }

  window.open(
	'banner-'+lang+html+'?seed='+mySeed.getTime()+'&doc='+doc,
	'banner'
  );
  return true;
}


function sorryEnglish()
{
  window.alert('\nOur fast Internet link is DOWN. Please try again later.');
  return false;
}

function sorrySpanish()
{
  window.alert('\nNuestra conección rápida al Internet está ABAJO. Por favor trate después.');
  return false;
}
