function getQuotes(range)
{
  var m = ['The Monster of Phantom Lake','It Came From Another World!','Cave Women on Mars','Terror from Beneath the Earth'];
  
  var mp = ["&quot;Hilarious!&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; <i>Ed Bradley, The Flint Journal</i></div>",
            "&quot;A glowing tribute to the creature features of the 1950's&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; John Behling, Minneapolis/St. Paul City Pages</i></div>",
            "&quot;...one of the best homage films ever created&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Duane L. Martin, Rogue Cinema</i></div>",
            "&quot;...[a] masterful portrayal of those good ol' cheesy 50s flicks.&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Famous Monsters of Filmland</i></div>"];
  var ic = ["&quot;If you like classic B-movies, you'll definitely want to see it&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Duane L. Martin, Rogue Cinema</i></div>",
            "&quot;...imaginative and fun &#0151; the perfect summer drive-in fare&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Peter Schilling, The Rake</i></div>",
            "&quot;...certainly delivers a wonderful tribute to 1950s science fiction movies.&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Famous Monsters of Filmland</i></div>"];
  var cw = ["&quot;...one movie that you definitely need to see&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Duane L. Martin, Rogue Cinema</i></div>",
            "&quot;...really well written, brilliantly acted ... true to the feel of the old films it seeks to emulate&quot;<br><div align=\"right\" class=\"smaller\">&#0151; <i>Duane L. Martin, Rogue Cinema</i></div>",
            "&quot;...the latest B-movie masterpiece ... a real hoot&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Peter Schilling, Mpls/St. Paul StarTribune</i></div>"];
  var tf = ["&quot;Very cool stuff and the creature looked amazing&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Duane L. Martin, Rogue Cinema</i></div>",
            "&quot;A budget production? Undoubtedly, and all the better for not trying too hard to hide it.<br>&nbsp;It's just fake-looking enough to work perfectly.&quot;<br><div align=\"right\" class=\"smaller\"><i>&#0151; Bob Estreich, Synergy Magazine</i></div>"];
  var qs = [mp,ic,cw,tf];

  var ran = (Math.round(((m.length-1)*Math.random())));
  if (range == 'tmopl')
  { ran = 0; }
  else if (range == 'icfaw')
  { ran = 1; }
  else if (range == 'cwom')
  { ran = 2; }
  else if (range == 'tfbe')
  { ran = 3; }

  var q=(Math.round(((qs[ran].length-1)*Math.random())));
  document.write('<table cellpadding="0" cellspacing="0" border="0"><tr valign="top"><td align="right" class="smaller" nowrap><b>'+m[ran]+'</b>&nbsp;&#0150;&nbsp;</td><td class="smaller">'+qs[ran][q]+'</td></tr></table>');
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function swap(thing, newImage) {
  thing.src="images/"+newImage+".gif";
  return true;
}

function getHead()
{
  var q=(Math.round(4*Math.random()))+1;
  document.write('<table cellpadding="0" cellspacing="0" border="0" width="729" style="background:url(images/header'+q+'.gif)"><tr><td><table cellpadding="0" cellspacing="0" border="0"><tr valign="top"><td width="1"><img src="images/trans_spacer.gif" height="74" width="1" alt="the online home of the films of Christopher R. Mihm"></td>');
  document.write('<td width="728" align="right"><img src="images/trans_spacer.gif" width="728" height="10" alt="the online home of the films of Christopher R. Mihm"><br>');
  document.write('<a href="http://www.addthis.com/bookmark.php?v=250&pub=sainteuphoria" onmouseover="return addthis_open(this, \'\', \'[URL]\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=sainteuphoria"></script>');
  document.write('<img src="images/trans_spacer.gif" height="1" width="10" alt=""></td></tr></table></td></tr></table>');
}

function getSpecificHead(q)
{
  document.write('<table cellpadding="0" cellspacing="0" border="0" width="729" style="background:url(images/header'+q+'.gif)"><tr><td><table cellpadding="0" cellspacing="0" border="0"><tr valign="top"><td width="1"><img src="images/trans_spacer.gif" height="74" width="1" alt="the online home of the films of Christopher R. Mihm"></td>');
  document.write('<td width="728" align="right"><img src="images/trans_spacer.gif" width="728" height="10" alt="the online home of the films of Christopher R. Mihm"><br>');
  document.write('<a href="http://www.addthis.com/bookmark.php?v=250&pub=sainteuphoria" onmouseover="return addthis_open(this, \'\', \'[URL]\', \'[TITLE]\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=sainteuphoria"></script>');
  document.write('<img src="images/trans_spacer.gif" height="1" width="10" alt=""></td></tr></table></td></tr></table>');
}

function getDateYear() {

  var Today = new Date();
  var Year = Today.getYear();
  if(Year< 1900) { Year += 1900; }

  return Year;
}

function showPopup(which, h, w, caption, submittedBy)
{
  var popUp = document.getElementById("popupcontent");
  
  if(popUp != null) 
  {
    var baseText = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\""+w+"\" style=\"background:url(images/black_spacer.gif)\"><tr valign=\"top\"><td><span class=\"norm\"><img src=\"images/black_spacer.gif\" height=\"8\" width=\"1\" alt=\"\"><br><img src=\"images/black_spacer.gif\" height=\"1\" width=\"8\" alt=\"\"><font color=\"#FFFFFF\"><b>FAN SUBMITTED PHOTO</b><br><img src=\"images/black_spacer.gif\" height=\"8\" width=\"1\" alt=\"\"></font></span></td>";
    baseText += "<td align=\"right\" nowrap class=\"white\"><img src=\"images/black_spacer.gif\" height=\"8\" width=\"1\" alt=\"\"><br><a href=\"#\" onClick=\"javascript:hidePopup();return false;\">X</a><img src=\"images/black_spacer.gif\" height=\"1\" width=\"12\" alt=\"\"></td></tr></table></td></tr>";
    baseText += "<tr><td style=\"background:url(images/white_spacer.gif)\"><table cellpadding=\"8\" cellspacing=\"0\" border=\"0\"><tr><td align=\"center\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
    baseText += "<tr><td align=\"center\"><table cellpadding=\"0\" cellspacing=\"1\" border=\"0\" style=\"background:url(images/black_spacer.gif)\"><tr><td><img src=\"photos/photo"+which+".jpg\" alt=\"\"></td></tr></table><img src=\"images/white_spacer.gif\" height=\"5\" width=\"1\" alt=\"\"><br><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
    baseText += "<tr><td class=\"smaller\" align=\"center\">"+caption;

    if (submittedBy != '')
    { baseText += "<br><b>submitted by:</b> "+submittedBy; }

    baseText += "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>"; 

    popUp.innerHTML = baseText;
    popUp.style.width = w;
    popUp.style.height = h;
    popUp.style.visibility = "visible";
    popUp.style.display = 'block';
    centerElement(popUp);
    greyout(true);
  }
}

function hidePopup()
{
  var popUp = document.getElementById("popupcontent");
  
  if(popUp != null) 
  {
    greyout(false);
    popUp.style.display = 'none';
    popUp.style.visibility = "hidden";
    window.onresize = null;
  }
}

function getViewportDimensions() {
    var intH = 0, intW = 0;
    
    if(self.innerHeight) {
       intH = window.innerHeight;
       intW = window.innerWidth;
    } 
    else {
        if(document.documentElement && document.documentElement.clientHeight) {
            intH = document.documentElement.clientHeight;
            intW = document.documentElement.clientWidth;
        }
        else {
            if(document.body) {
                intH = document.body.clientHeight;
                intW = document.body.clientWidth;
            }
        }
    }

    return {
        height: parseInt(intH, 10),
        width: parseInt(intW, 10)
    };
}

function centerElement(elem) 
{
    var viewport = getViewportDimensions();
    var left = (viewport.width == 0) ? 50 : parseInt((viewport.width - elem.offsetWidth) / 2, 10);
    var top = (viewport.height == 0) ? 50 : parseInt((viewport.height - elem.offsetHeight) / 2, 10);

    elem.style.left = left + getScrollXY('x');
    elem.style.top = top + getScrollXY('y');;

    viewport, left, top, elem = null;    
}

function greyout(show)
{
  var obj = document.getElementById('greyout');
  if(!obj || obj==null)
  {
    appendElement(document.body,'div','greyout');
    obj = document.getElementById('greyout');
    obj.style.position = 'absolute';
    obj.style.top = getScrollXY('y');
    obj.style.left = getScrollXY('x');
    obj.style.background = '#111';
    obj.style.opacity = '.25';
    obj.style.filter = 'alpha(opacity=25)';
  }

  if (show)
  {
    var viewport = getViewportDimensions();
    var ch = document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
    var cw = document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
    var sh = document.documentElement.scrollHeight ? document.documentElement.scrollHeight : document.body.scrollHeight;
    if(document.body.scrollHeight) sh = Math.max(sh,document.body.scrollHeight)
    var sw = document.documentElement.scrollWidth ? document.documentElement.scrollWidth : document.body.scrollWidth;
    if(document.body.scrollWidth) sh = Math.max(sh,document.body.scrollWidth)
    var wh = window.innerHeight ? window.innerHeight : document.body.offsetHeight;
    var z = 50;
    obj.style.zIndex = z;
    //obj.style.height = Math.max(wh,Math.max(sh,ch))+'px';
    //obj.style.width = Math.max(sw,cw)+'px';
    obj.style.height = parseInt(viewport.height);
    obj.style.width = parseInt(viewport.width);
    obj.style.display = 'block';
    addEvent(window,'resize',greyoutResize);
    addEvent(window,'scroll',greyoutResize);
  }
  else
  {
    obj.style.display = 'none'; 
    removeEvent(window,'resize',greyoutResize);
    removeEvent(window,'scroll',greyoutResize);
  }
}

function greyoutResize()
{
  var ch = document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
  var cw = document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
  var sh = document.documentElement.scrollHeight ? document.documentElement.scrollHeight : document.body.scrollHeight;
  if(document.body.scrollHeight) sh = Math.max(sh,document.body.scrollHeight)
  var sw = document.documentElement.scrollWidth ? document.documentElement.scrollWidth : document.body.scrollWidth;
  if(document.body.scrollWidth) sh = Math.max(sh,document.body.scrollWidth)
  var wh = window.innerHeight ? window.innerHeight : document.body.offsetHeight;
  var obj = document.getElementById('greyout');
  obj.style.height = ch+'px';
  obj.style.width = cw+'px';
  //obj.style.height = Math.max(wh,Math.max(sh,ch))+'px';
  //obj.style.width = Math.max(sw,cw)+'px';

  obj.style.top = getScrollXY('y');
  obj.style.left = getScrollXY('x');
    
  var viewport = getViewportDimensions();
  obj.style.height = parseInt(viewport.height);
  obj.style.width = parseInt(viewport.width);

  centerElement(document.getElementById('popupcontent')); 
}

function getScrollXY(which) 
{ 
  var scrOfX = 0;
  var scrOfY = 0;  
  if( typeof( window.pageYOffset ) == 'number' ) 
  { 
    scrOfY = window.pageYOffset; 
    scrOfX = window.pageXOffset; 
  } 
  else if ( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
  { 
    scrOfY = document.body.scrollTop; 
    scrOfX = document.body.scrollLeft; 
  } 
  else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
  { 
    scrOfY = document.documentElement.scrollTop; 
    scrOfX = document.documentElement.scrollLeft; 
 } 
 
 if (which == 'x')
 { return scrOfX; }
 else
 { return scrOfY; } 
}

function appendElement(node,tag,id,htm)
{
  var ne = document.createElement(tag);
  if(id) ne.id = id;
  if(htm) ne.innerHTML = htm;
  node.appendChild(ne);
}

function addEvent(obj ,evt, fnc)
{
if (obj.addEventListener)
obj.addEventListener(evt,fnc,false);
else if (obj.attachEvent)
obj.attachEvent('on'+evt,fnc);
else
return false;
return true;
}

function removeEvent(obj ,evt, fnc)
{
if (obj.removeEventListener)
obj.removeEventListener(evt,fnc,false);
else if (obj.detachEvent)
obj.detachEvent('on'+evt,fnc);
else
return false;
return true;
}