window.status = " Welcome to Enoch Pratt Free Library! ";
window.onbeforeunload = function () { setTimeout('showProgress();',500); }
var showProgressEvent = true;

function printFriendly () {
  var args=printFriendly.arguments, sourceURL = args[0], browserName = navigator.appName;
  var printFriendlyCSS = MM_findObj("printFriendly");
  if (printFriendlyCSS.media == 'print, screen') { 
    if(browserName == "Microsoft Internet Explorer") { location.href=sourceURL; } //IE reloads the page
    else { printFriendlyCSS.media='print'; } //all others reload the CSS
  }
  else { printFriendlyCSS.media='print, screen'; }
  return true;
}
function emailThisPage () {
  var emailForm = MM_findObj("emailThisPageForm");
  open('','emailThisPageWindow','resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=450,height=350')
  emailForm.submit();
  return true;
}
function showProgress() { if (showProgressEvent) {
	var indicator = document.getElementById("inprogress");
	indicator.innerHTML = '<img id="inprogress_img" src="/template_images/animatedProgressIndicator2.gif"><br/><br/>In progress'
	indicator.style.display = "inline";
	}
}
function pc_stv() {
  var a,v,h,pc,args=pc_stv.arguments;a=args[0]; v=(a=='1')?'visible':(a='0')?'hidden':a;h=(a=='1')?'220px':(a='0')?'0px':a;
  if ((pc=MM_findObj("pc"))!=null) { if (pc.style) { pc.style.visibility = v; pc.style.height = h}}}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function openwindow()
{
	showProgressEvent=false;
        popwin=window.open("http://www.prattlibrary.org/locations/sightsandsounds/video/Im_references/Im_references.html","mywindow","menubar=0,resizable=0,scrollbars=0,width=460,height=430");
        if(popwin==null || typeof(popwin)=="undefined"){
                window.location = "http://www.prattlibrary.org/locations/sightsandsounds/video/Im_references/Im_references.html"
                window.onload=redirect()
        }else{
                popwin.focus();
        }
}

function redirect() {
        window.location = "http://pac.epfl.net/login_helpsw.html"
}


