//------------------------------------------------
//Function to pop up a window for Linked Documents
//------------------------------------------------
var PopUpURL = "";
var PopUpTitle = "";
var PopWinUrl = "";
function popupLink( url, title, width, height, stuff )
{
  var now = new Date();
  var PopWinUrl = "/snp/fpopwind.htm";
  var winName = "pop" + now.getMinutes() + "x" + now.getSeconds();
  url = url.replace( //g, "^15" );
  url = url.replace( /\"/g, "%22" );
  if( typeof( title ) == 'undefined' )
    title = "Loislaw.com";
  if( typeof( width ) == 'undefined' )
    width = 790;
  if( typeof( height ) == 'undefined' )
    height = 480;
  if( typeof( stuff ) == 'undefined' )
    stuff = true;
  
  PopUpURL = url;
  PopUpTitle = title;

	//CR 3454
	if(url=="spotlight")
  {
    PopUpURL = "/info/product/pubrecordscorp.htm"; //content frame url
  	PopWinUrl = "/spotlight.htm?linkid=home_spotlight"; // framset url
  }
  
  if( !stuff || Site == 'MPS' )
  	popupWin = window.open( PopWinUrl, winName, 'scrollbars,status=no,toolbar=no,menubar=no,resizable,width='+width+',height='+height);
  else
  	popupWin = window.open( PopWinUrl, winName, 'scrollbars,status,menubar,resizable,width='+width+',height='+height);
  //return popupWin;
}

function popupNoFrameLink( url, title, width, height, stuff )
{
  var now = new Date();
  var winName = "pop" + now.getMinutes() + "x" + now.getSeconds();
  url = url.replace( //g, "^15" );
  url = url.replace( /\"/g, "%22" );
  if( typeof( title ) == 'undefined' )
    title = winName;
  if( typeof( width ) == 'undefined' )
    width = 790;
  if( typeof( height ) == 'undefined' )
    height = 480;
  if( typeof( stuff ) == 'undefined' )
    stuff = true;
  if( !stuff || Site == 'MPS' )
  	popupWin = window.open( url, winName, 'scrollbars,status=no,toolbar=no,menubar=no,resizable,width='+width+',height='+height);
  else
  	popupWin = window.open( url, winName, 'scrollbars,status,menubar,resizable,width='+width+',height='+height);
}

//WritePopInfoLink: Pop a new bottom framed window with content frame DHTML
function WritePopInfoLink(text,content){
  var id = "InfoLink"+(new Date()).valueOf();
  var title = text.replace(/\'/g,"\\\'").replace(/\"/g,"");
  window[id] = content;	  
  var s = "<a class=\"infoRedLink\" onclick=\"try{top['w"+id+"'].focus();}catch(e){}\""
    +" href=\"javascript:PopInfoText('"+id+"','"+title+"',window."+id+");\"><span class=\"infoRedLink\">"+text+"</span></a>";
  return s;
}
function PopInfoText(id,text,content){
  var win = window.open( "", id, 'scrollbars,status=no,toolbar=no,menubar=no,resizable,width='+400+',height='+300);
  win.document.open();
  var html = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">'
     +"<html><head><title>"+text+"</title><link rel='stylesheet' type='text/css' href='/css/loisnew.css'>"
     +"<script type='text/javascript' src='/js/onload.js'><\/script>"
     +"<script type='text/javascript'>function Sync(){ try{bottom.BottomSync('close',self);}catch(e){} }<\/script>"
     +"</head><body onload='Sync()'>"+content
     +"<div class='bottomContainer' style='position:absolute;bottom:0;'><center><span class='bottomButton'><span class='button' onclick='window.close()'>Close</span></span></center></div></body></html>";
  win.document.write(html);
  win.document.close();
  top["w"+id] = win;    
}
  