var RIGHT= 0;
var CENTER= 0;
var OFFSETX= 0;
var OFFSETY= 0;
var WIDTH= 0;
var STATUS= 0;
var HEIGHT= 0;
var FULLHTML= 0;
var ABOVE= 0;
var BELOW= 0;
var FRAME= 0;
var init_captionsize = "3";
var init_width = "245";
var init_offsetx = 10;
var init_offsety = 10;
var init_cap = ""; 
var init_onoff = 0; 
var init_close = "Close"; 
var init_hpos = RIGHT; 
var init_status = ""; 
var init_height = -1; 
var init_fullhtml = 0; 
var ltr_tracker = 0; 
var init_vpos = BELOW; 
var init_aboveheight = 0; 
var init_frame = self; 
var ltr_cap = "";
var ltr_onoff = 0;
var ltr_close = "Close";
var ltr_hpos = RIGHT;
var ltr_offsetx = 2;
var ltr_offsety = 2;
var ltr_width = 100;
var ltr_status = "";
var ltr_height = -1;
var ltr_fullhtml = 0;
var ltr_vpos = BELOW;
var ltr_aboveheight = 0;
var ltr_captionsize = "1";
var ltr_frame = self;
var ltr_x = 0;
var ltr_y = 0;
var ltr_allowmove = 0;
var displvanish = 0;
var ooswitch = 0;
var ffcount = 0;
var placeX = 0;
var placeY = 0;
var ffX = 0;
var ffY = 0;
var over = null;
var ltr_positn = screen.width;
if (ltr_positn > 1200) {ltr_positn = 1200};
var ap = "&#146;";
var qo = "&#147;";
var qc = "&#148;";
var dash = "&#151;";
var half = "&#189;";
var ital = "<em>";
var cit = "</em>";
var brk = "<br>"
var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false
var ie5 = false;
var ff = (!document.all && document.getElementById)? true:false
var subtractor = screen.height 
var nearfull = subtractor - 100
if (ff) {ap = "'";
  qo = "\"";
  qc = "\"";
  ital = "\"";
  cit = "\"";
  brk = "\n";
  dash = "--";
  half = " 1/2"};

function dirOpen(msg,wd,ht,scrollans,hash) {
window.open(msg + ".php" + hash,"child1","status=no,width=" + wd + ",height=" + ht + ",left=25,top=25,scrollbars=" + scrollans + ",toolbar=no,location=no,menubar=no,resizable=no")
}

if ((ie4) || (ff)) {
     if (navigator.userAgent.indexOf('MSIE 5')>0) {
     ie5 = true;
     }
}

if ( (ns4) || (ie4) || (ff) ) {
     document.onmousemove = mouseMove
     if (ns4) document.captureEvents(Event.MOUSEMOVE)
} else {
     textTip = no_textTip;
     nd = no_textTip;
     probreprt = true;
}

function msgdeterminer(year,numbr,positn) {
    if (numbr == 1)
    {
    if (year < 1922)
       {
       text = year + " occurred before any " +
       "Hollywood self-censorship. " +
       "There was local censorship " +
       "by numerous state and " +
       "city governments."
       ttwidth = 180;
       }
    if ((year > 1921) && (year < 1924))
       {
       text = year + " falls within the period from when " +
       "the major studios hired Will H. Hays to " +
       "head the Motion Picture Producers and " +
       "Distributors of America (1922), but " +
       "before Hays wielded power (1924)."
       ttwidth = 250;
       }
    if ((year > 1923) && (year < 1927))
       {
       text = year + " was within the period when Will H. Hays" + ap + "s " +
       "office did no more than review properties " +
       "proposed for movie adaptations before studios " +
       "bought them; Hays had no true power."
       ttwidth = 310;
       }
    if ((year > 1926) && (year < 1930))
       {
       text = year + " was in the three-year period when " +
       "the Hays Office imposed upon movies lists " +
       "of " + qo + "Don" + ap + "ts and Be Carefuls" + qc + " although " +
       "these could not be legally enforced."
       ttwidth = 260;
       }
    if (year == 1930)
       {
       text = year + " was the year that the Production " +
       "Code was written. It would not be until " +
       "July 1934 that movies were subject to " +
       "the provisions outlined of that Code."
       ttwidth = 255;
       }
    if ((year > 1930) && (year < 1934))
       {
       text = year + " occurred after the Production Code was " +
       "written (1930) but before it was stringently " +
       "enforced. It would be July 1934 before movies " +
       "were subject to the provisions outlined here."
       ttwidth = 295;
       }
    if (year == 1934)
       {
       text = year + " was the year the Production " +
       "Code began to be stringently enforced."
       ttwidth = 240;
       }
    if ((year > 1934) && (year < 1956))
       {
       text = year + " was during the three decades that " +
       "the Production Code was enforced. Beginning " +
       "mid-1934, Hollywood policed itself, its " +
       "censors having powers to deny distribution."
       ttwidth = 280;
       }
    if (year > 1955)
       {
       text = year + " occurred in the period after 1956, the year " +
       "that the Code changed to allow insightful depictions " +
       "of drug addiction, prostitution, miscegenation, and " +
       "the use of such words as " + qo + "hell" + qc + " and " + qo + "damn." + qc
       ttwidth = 310;
       }
    }
   if (numbr == 2)
   {
    text = ital + "Carousel" + cit + ", having been released in " + year + ", " +
    "followed " + ital + "The Moon is Blue" + cit + ", yet the " +
    "moral climate had not changed, thus the " +
    "shock word " + qo + "virgin" + qc + " remained prohibited."
    ttwidth = 270;
   }
   if (numbr == 3)
   {
    text = ital + "Tarzan and His Mate" + cit + ", " +
    "copyrighted April 13, 1934, " +
    "preceded enforcement of the " +
    "Production Code by 11 weeks."
    ttwidth = 200;
   }
   if (numbr == 4)
   {
    text = "I don" + ap + "t expect this offer " +
    "to be taken seriously." + brk +
    " " + brk +
    dash + "the web site proprietor"
    ttwidth = 170;
   }
   if (numbr == 5)
   {
    text = ital + "Betty Boop" + ap + "s Rise to Fame" + cit + " was copyrighted " +
    "May 17, 1934, and released to theaters the " +
    "following day; thus it beat enforcement of the " +
    "Production Code by one-and-a-half months."
    ttwidth = 290;
   }
   if (numbr == 6)
   {
    text = ital + "Dillinger" + cit + " (" + year + ") preceded " +
    "the precise provision of " +
    "the Production Code that " +
    "it would violate."
    ttwidth = 180;
   }
   if (numbr == 7)
   {
    text = ital + "Housewife" + cit + " was copyrighted " +
    "July 21, 1934, three weeks " +
    "after the Production Code " +
    "began stringent enforcement."
    ttwidth = 190;
   }
   if (numbr == 8)
   {
    text = ital + "Jimmy the Gent" + cit + " was " +
    "copyrighted April 10, " +
    "1934, which was three " +
    "months before enforcement " +
    "of the Production Code."
    ttwidth = 180;
   }
   if (numbr == 9)
   {
    text = ital + "Murder at the Vanities" + cit + " was " +
    "copyrighted May 23, 1934, little " +
    "more than five weeks prior to the " +
    "enforcement of the Production Code."
    ttwidth = 235;
   }
   if (numbr == 10)
   {
    text = ital + "Easy to Love" + cit + " was copyrighted " +
    "December 28, 1933, and released " +
    "early in 1934. Enforcement of the " +
    "Production Code was a half-year away."
    ttwidth = 255;
   }
   if (numbr == 11)
   {
    text = ital + "Four Frightened People" + cit + " was " +
    "copyrighted January 25, 1934, and released " +
    "the following day, more than five months " +
    "before enforcement of the Production Code."
    ttwidth = 235;
   }
   if (numbr == 12)
   {
    text = "Filming completed November 1933 " +
    "except on the finale production number, " +
    "which was shot January 1934.  " +
    "Copyrighted February 23, 1934, four " +
    "months before Code enforcement."
    ttwidth = 255;
   }
   if (numbr == 13)
   {
    text = ital + "Evelyn Prentiss" + cit + " was copyrighted " +
    "November 7, 1934, more than four " +
    "months " + ital + "after" + cit + " the beginning of the " +
    "enforcement of the Production Code."
    ttwidth = 235;
   }
   if (numbr == 14)
   {
    text = ital + "Men in White" + cit + " was released April 6, " +
    "1934, two days after approval was " +
    "granted by the Production Code " +
    "Administration; see the article."
    ttwidth = 230;
   }
   if (numbr == 15)
   {
    text = ital + "Doctor Monica" + cit + " was copyrighted " +
    "July 5, 1934, just days after " +
    "the beginning of enforcement " +
    "of the Production Code."
    ttwidth = 215;
   }
   if (numbr == 16)
   {
    text = ital + "It" + ap + "s a Gift" + cit + " was copyrighted " +
    "November 30, 1934, five months " +
    ital + "after" + cit + " the beginning of enforcement " +
    "of the Production Code."
    ttwidth = 225;
   }
   if (numbr == 17)
   {
    text = ital + "Finishing School" + cit + " was copyrighted " +
    "May 4, 1934, when less than two " +
    "months remained before enforcement " +
    "of the Production Code."
    ttwidth = 235;
   }
   if (numbr == 18)
   {
    text = ital + "Hollywood Party" + cit + " was copyrighted " +
    "May 14, 1934, and released June 1, " +
    "1934, just a month before enforcement " +
    "of the Production Code."
    ttwidth = 245;
   }
   if (numbr == 19)
   {
    text = ital + "Hips, Hips, Hooray" + cit + " was " +
    "copyrighted February 2, 1934, " +
    "five months before enforcement " +
    "of the Production Code."
    ttwidth = 210;
   }
   if (numbr == 20)
   {
    text = ital + "The Girl From Missouri" + cit + " was " +
    "copyrighted July 31, 1934, a " +
    "month after the beginning of " +
    "Production Code enforcement."
    ttwidth = 200;
   }
   if (numbr == 21)
   {
    text = ital + "Babes in Toyland" + cit + " was released " +
    "November 30, 1934, five months " +
    "after the beginning of enforcement " +
    "of the Production Code."
    ttwidth = 215;
   }
   if (numbr == 22)
   {
    text = "Copyrighted September 15, 1934, " +
    "2" + half + " months after the beginning of " +
    "Code enforcement; exploitation " +
    "films such as this typically were " +
    "not submitted for approval."
    ttwidth = 225;
   }
   if (numbr == 23)
   {
    text = "Although copyrighted September 5, 1934, it arrived " +
    "for Production Code review while administrative matters " +
    "usurped PCA attention, and thus was spared the " +
    "excisions made on other films finished after July 1."
    ttwidth = 290;
   }
   if (numbr == 24)
   {
    text = ital + "It Happened One Night" + cit + " rolled " +
    "into premiere engagements in " +
    "February 1934, five months before the " +
    "enforcement of the Production Code."
    ttwidth = 250;
   }
   if (numbr == 25)
   {
    text = "The terms for racial groups and national origins " +
    "are reproduced here in a historical context " +
    "and are not meant to bring offense to any " +
    "person or peoples alive or dead."
    ttwidth = 280;
   }
   if (numbr == 26)
   {
    text = ital + "Search For Beauty" + cit + " was released " +
    "and copyrighted February 2, 1934, five " +
    "months before enforcement of the " +
    "Production Code became stringent."
    ttwidth = 250;
   }
   ltr_positn = positn;
   if (ltr_positn == "av") {
   ltr_positn = screen.width;
   if (ltr_positn > 1200) {ltr_positn = 1200};
   }
   if (ltr_positn == "bv") {
   var pswd = (screen.width / 2) - 35;
   ltr_positn = pswd;
   }
   screenwidth = screen.width;
   return text, ttwidth, positn;
}

function no_textTip() {
     return probreprt;
}

function textTip(year,numbr,positn) {
     msgdeterminer(year,numbr,positn);
     ltr_cap = init_cap;
     ltr_onoff = init_onoff;
     ltr_close = init_close;
     ltr_hpos = init_hpos;
     ltr_offsetx = init_offsetx;
     ltr_offsety = init_offsety;
     ltr_width = ttwidth;
     ltr_status = init_status;
     ltr_height = init_height;
     ltr_fullhtml = init_fullhtml;
     ltr_vpos = init_vpos;
     ltr_aboveheight = init_aboveheight;
     ltr_captionsize = init_captionsize;
     if ( (ns4) || (ie4) || (ff) ) {     // also possible:  || (!e)
     ltr_frame = init_frame;
     if (ns4) over = ltr_frame.document.overDiv
     if (ie4) over = ltr_frame.overDiv.style
     }
     var parsemode = -1;
     for (i = 0; i <1; i++) {
     if (parsemode == 0) {
     if (arguments[0] == RIGHT) { parsemode = opt_HPOS(arguments[0]); }
     if (arguments[0] == CENTER) { parsemode = opt_HPOS(arguments[0]); }
     if (arguments[0] == OFFSETX) { parsemode = OFFSETX; }
     if (arguments[0] == OFFSETY) { parsemode = OFFSETY; }
     if (arguments[0] == WIDTH) { parsemode = WIDTH; }
     if (arguments[0] == STATUS) { parsemode = STATUS; }
     if (arguments[0] == HEIGHT) { parsemode = HEIGHT; }
     if (arguments[0] == FULLHTML) { parsemode = opt_FULLHTML(arguments[0]); }
     if (arguments[0] == ABOVE) { parsemode = opt_VPOS(arguments[0]); }
     if (arguments[0] == BELOW) { parsemode = opt_VPOS(arguments[0]); }
     if (arguments[0] == FRAME) { parsemode = FRAME; }
     } else {
     if (parsemode < 0) {
     ltr_text = arguments[0];
     parsemode = 0;
     } else {
     if (parsemode == OFFSETX) { parsemode = opt_OFFSETX(arguments[0]); }
     if (parsemode == OFFSETY) { parsemode = opt_OFFSETY(arguments[0]); }
     if (parsemode == WIDTH) { parsemode = opt_WIDTH(arguments[0]); }
     if (parsemode == STATUS) { parsemode = opt_STATUS(arguments[0]); }
     if (parsemode == HEIGHT) { parsemode = opt_HEIGHT(arguments[0]); }
     if (parsemode == FRAME) { parsemode = opt_FRAME(arguments[0]); }
     }
     }
     }
     return textTipAddt();
}

function stopTTip() {
     if ( ooswitch >= 1 ) { displvanish = 0 };
     if ( (ns4) || (ie4) ) {
       if ( displvanish == 0 ) {
         ltr_allowmove = 0;
         hideObject(over);
       } else {
       ooswitch++;
       }
     }
     if (ff) {
       document.getElementById("overDiv").style.visibility="hidden";
     }
     return true;
}

function textTipAddt() {
     var layerhtml;
     if (ltr_height > 0) {
     ltr_height = "HEIGHT=" + ltr_height;
     } else {
     ltr_height = "";
     }
     if (ltr_cap == "") {
     layerhtml = thisinfo(text);
     }
     if (ltr_onoff) {
     displvanish = 1;
     ooswitch = 0;
     }
     layerWrite(layerhtml);
     ltr_allowmove = 0;
     disp(ltr_status);
     ltr_allowmove = 0;
     return false;
}

function thisinfo(text) {
     txt = "<TABLE WIDTH="+ltr_width+" BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=\"#000000\" "+ltr_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\"#FFFF00\" " + " "+ltr_height+"><TR><TD VALIGN=TOP><FONT FACE=\"Times\" COLOR=\"#000000\" SIZE=\"3\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
     return txt;
}

function disp(statustext) {
     if ( (ns4) || (ie4) || (ff) ) {
      if (ltr_allowmove == 0) {
     placeLayer();
     showObject(over);
     ltr_allowmove = 1;
     }
     }
     if (statustext != "") {
     self.status = statustext;
     }
}

function placeLayer() {
if (ff){ltr_x = ffX; ltr_y = ffY;}
     if ((ltr_x + ltr_width) >= ltr_positn) {
     ltr_x = ((ltr_positn - ltr_width) - (2 * ltr_offsetx))
     }
     if (ltr_hpos == RIGHT) {
     placeX = ltr_x + ltr_offsetx;
     }
if (ff) {
  if ((ltr_x + ltr_width) > document.width) {
  ltr_x = (document.width - (ltr_width + ltr_offsetx));
  placeX = ltr_x;
  }
  }
     var screenhght = document.documentElement.clientHeight;

if (ff){
screenhghtSafe = screenhght - 175;
mousePostn = ltr_y - document.documentElement.scrollTop;
if ( mousePostn > screenhghtSafe) {
  ltr_y = ltr_y - 125;
  }
ltr_y = ltr_y - document.documentElement.scrollTop;
//if ( ltr_y < 50 ) { ltr_y = 50; }
//if (placeX < 50) { placeX = 50;}

}

  if ((ie5) || (navigator.appName == "Microsoft Internet Explorer")) {
     if (event.y + 175 > screenhght) {
     ltr_y = ltr_y - 125;
     };
     };
     placeY = ltr_y + ltr_offsety + document.documentElement.scrollTop;

  if (ff) {
       var mereme=text;
       document.getElementById("overDiv").firstChild.nodeValue=mereme;
       document.getElementById("overDiv").style.fontface="Times";
       document.getElementById("overDiv").style.top=placeY+"px";
       document.getElementById("overDiv").style.left=placeX+"px";
       document.getElementById("overDiv").style.width=ltr_width+"px";
       document.getElementById("overDiv").style.visibility="visible";
       }
     moveTo(over, placeX, placeY);
}

function mouseMove(e) {
     if (ns4) {ltr_x=e.pageX; ltr_y=e.pageY;}
     if (ie4) {ltr_x=event.x; ltr_y=event.y;}
     if (ie5) {ltr_x=event.x+ltr_frame.document.body.scrollLeft; ltr_y=event.y+ltr_frame.document.documentElement.scrollTop;}
     if (ff){
       ffX=e.pageX;
       ffY=e.pageY;
     }
     if (typeof e != "undefined"){
       ffX=e.pageX;
       ffY=e.pageY;
     }
     if (ltr_allowmove) {
     placeLayer();
     }
}

function mousenow(e){
}

function layerWrite(txt) {
        if (ns4) {
                var lyr = ltr_frame.document.overDiv.document
                lyr.write(txt)
                lyr.close()
        }
        else if (ie4) ltr_frame.document.all["overDiv"].innerHTML = txt
}

function showObject(obj) {
        if (ns4) obj.visibility = "show"
        else if (ie4) obj.visibility = "visible"
}

function hideObject(obj) {
        if (ns4) obj.visibility = "hide"
        else if (ie4) obj.visibility = "hidden"
        self.status = "";
}

function moveTo(obj,xL,yL) {
        obj.left = xL
        obj.top = yL
}

function opt_HPOS(pos) {
     ltr_hpos = pos;
     return 0;
}

function opt_WIDTH(pixels) {
     ltr_width = pixels;
     return 0;
}

function opt_STATUS(text) {
     ltr_status = text;
     return 0;
}

function opt_HEIGHT(pixels) {
     ltr_height = pixels;
     ltr_aboveheight = pixels;
     return 0;
}

function opt_FULLHTML(unused) {
     ltr_fullhtml = 1;
     return 0;
}

function opt_VPOS(pos) {
     ltr_vpos = pos;
     return 0;
}

function opt_FRAME(frm) {
     ltr_frame = frm;
     if ( (ns4) || (ie4) ) {
     if (ns4) over = ltr_frame.document.overDiv
     if (ie4) over = ltr_frame.overDiv.style
     }
     return 0;
}

function vpos_convert(d) {
     if (d == 1) {
     d = RIGHT;
     } else {
     d = CENTER;
     }
     return d
}

