// +------------------------------------------------------------+
// | Created 07/29/2002              Last Modified 01/31/2002   |
// | Web Site:                 http://www.AmericanCatholic.org  |
// +------------------------------------------------------------+
// | Contains all the scripts for the SAMO feature;	        |
// | Less clutter on page				        |
// |                                                            |
// | 								|
// +------------------------------------------------------------+

// "Poll" Script begins
<!--
var objPoll;
var polURL;
var polWinWidth;
var polWinHeight;
var polOptions;


function openPoll(polURL) {
polWinWidth = 460;
polWinHeight = 240;
var polOptions = "width=" + polWinWidth + ",height=" + polWinHeight + ",scrollbars=no,resizable=yes,menubar=no,status=no,toolbar=no,location=no,directories=no";
 if (polURL) {  
  if (!objPoll || objPoll.closed){
    objPoll = window.open(polURL,'Pollwin', polOptions);  // Open a new window and show the specified page
    objPoll.focus();
	objPoll.moveTo(506,40);   
   									  }
  else{
    objPoll.close();
	objPoll = window.open(polURL,'Pollwin', polOptions);  // Open a new window and show the specified page
    objPoll.focus();
	objPoll.moveTo(506,40);
  	  }
 	    }
}

// Script Ends -->
// +------------------------------------------------------------+
// "blurred and focused" Script begins
<!--
var timer = '';
function blurred() {
    timer = setTimeout('self.close()',7000);
}

function focused() {
    if (timer != '')
        clearTimeout(timer);
}
//-->

// Script Ends -->
// +------------------------------------------------------------+
// "updateClose" Script begins
<!--
var timerOnLoad = '';
var agent = navigator.userAgent;

function updateClose() {
		if (agent.indexOf("Netscape6")!= -1) {
			window.opener.document.location.reload()
		}
		else if (agent.indexOf("MSIE")!= -1) {
			window.opener.navigate(window.opener.document.location.href);
		}
		else if (agent.indexOf("Mozilla/4")!= -1) {
			
			window.opener.document.location.reload()
		}
		else { 
			window.opener.document.location.reload()
		}
    timerOnLoad = setTimeout('self.close()',3000);
    
}
//-->

// Script Ends -->
// +------------------------------------------------------------+
// "refreshParent" Script begins
<!--

function refreshParent() {
//  window.opener.navigate(window.opener.document.location.href);
//  self.close()
  window.opener.location.href = window.opener.location.href;
  if (window.opener.progressWindow) 
    window.opener.progressWindow.close();
  window.close();
}
//-->

// Script Ends -->
// +------------------------------------------------------------+
