﻿var r_text = new Array ();
r_text[0] = "Nixon poured Heinz ketchup on cottage cheese. Elvis loaded it on top of sweet potato pie. The Japanese eat it on rice, and the Swedes eat it on spaghetti.";
r_text[1] = "Heinz ketchup was introduced in 1876 as a 'Blessed relief for Mother and the other women in the household!'";
r_text[2] = "In Bad Day at Black Rock, Spencer Tracy's character heaves himself up on a diner stool and mutters, 'If you don't like the food, that's what they made ketchup for.'";
r_text[3] = "Heinz ketchup was one of the first products to be sold in clear glass bottles.";
r_text[4] = "For most of us, Anticipation is waiting for the Heinz ketchup to come out of the bottle. But did you know that Carly Simon wrote it while waiting for date Cat Stevens to show up?";
r_text[5] = "Heinz ketchup is rich, er, thick and rich in lycopene, a cancer-fighting antioxidant.";
r_text[6] = "The word 'ketchup' comes from 'kecap,' the Malayan word for condiment.";
r_text[7] = "Once abandoned for more than 50 years, the Heinz Hitch wagon was discovered in a storage shed in central Pennsylvania with a tree growing right through its floor.";
r_text[8] = "According to psychologist Donna Dawson, people who dunk their food in a puddle of Heinz ketchup are methodical and trustworthy—while those who smother their food are the life and soul of the party.";
r_text[9] = "Heinz buys more tomatoes than any other company in the world—more than 2 million tons a year.";
r_text[10] = "Four tablespoons of Heinz ketchup have the nutritional value of an entire ripe tomato.";
r_text[11] = "Ketchup is found in more homes than salt and pepper.";
r_text[12] = "Before he had Friends, Matt LeBlanc starred in a Heinz ketchup commercial. The ad won a Gold Lion at Cannes in 1987.";
r_text[13] = "Collectively, Americans eat 11 billion ounces of ketchup per year.";
r_text[14] = "French fries were not invented by the French. That honor goes to the Belgians.";
r_text[15] = "In 1896, Scientific American magazine named ketchup 'America's Favorite Condiment.'";
r_text[16] = "The world's largest ketchup bottle—170 feet—is located in Collinsville, Ill. where it's the town's water tower.";

function getObjByName(name,doc) {
  var o = 0;
  if(!doc) doc = document;
  if(doc[name]) o=doc[name];
  if(document.all && doc.all[name]) o=doc.all[name];
  if(o) {
    if(!o.getElementsByTagName) o.getElementsByTagName = getElementsArray;
    return o;
  }
  if(document.layers) {
    for(var i=0;i < doc.layers.length;i++){
      var lyrdoc = doc.layers[i].document;
      if(lyrdoc[name]) return lyrdoc[name];
      if(lyrdoc.layers.length > 0) {
        var o = getObjByName(name,lyrdoc);
        if(o) return o;
      }
    }
  }
  return 0;
}
if(!document.getElementById) document.getElementById = getObjByName;

function getElementsArray(el) {
  if(document.layers) {
    var doc = (this == document) ? document : this.document;
    switch(el) {
      case 'img' : return doc.images;
      case 'a' : return doc.links;
      case 'div' : return doc.layers;
      case 'form' : return doc.forms;
      default : return 0;
    }
  }
  if(document.all) return this.all.tags(el);
  return 0;
}
if(!document.getElementsByTagName) document.getElementsByTagName = getElementsArray;
if(document.layers) Layer.prototype.getElementsByTagName = getElementsArray;

function show(div){
  if(document.all) window.document.all[div].style.visibility = 'visible';
  else if(document.layers) getObjByName(div).visibility = 'show';
  else document.getElementById(div).style.visibility = 'visible';
}
function hide(div){
  if(document.all) window.document.all[div].style.visibility = 'hidden';
  else if(document.layers) getObjByName(div).visibility = 'hide';
  else document.getElementById(div).style.visibility = 'hidden';
}

function swapImage() {
  if(!document.images) return;
  var args = swapImage.arguments;
  for(var i=0;i < args.length;i+=2) {
    var imgSrc = (args[i + 1].indexOf('[') != -1) ? eval(args[i + 1] + '.src') : args[i + 1];
    if(getObjByName(args[i])) getObjByName(args[i]).src = imgSrc;
  }
}

function popUpVideo(URL) {
window.open(URL, 'PopupVideo', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=420,left = 440,top = 200');
}

function popUpTerms(URL) {
window.open(URL, 'PopupTerms', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=500,left = 440,top = 200');
}