
/*this is a collection of standard functions to popup windows
 *it contains:
*popupFullScreen(url, name) creates a window the size of the users screen;  NEEDS is.js file
*popup(url,name,height,width) create a popup window that unresizable and has no nav or any of the other features
*popupNoScroll(url,name,height,width) create a popup window that unresizable and has no nav or any of the other features and has no scroll bars
 */

//pops up a window that covers the full screen
//and comes with only a title bar
//get passed the url to use and the window name
/*
function full_screen(){
window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)
}

*/

function popupFullScreen(url, name){
	var features = "status=0,toolbar=0,location=0,scrollbars=1,";

	if(is.ie){
		features = features + "left=0,top=0,width=" + (screen.width-10) + ",height=" + (screen.height-52);
	}else if (is.ns){
		features = features + "screenX=0,screenY=0,outerWidth=" + (screen.width) + ",outerHeight=" + (screen.height);
	}else{
		alert('Netscape or IE 4 or higher required');
		return false;
	}

	var winObj = window.open(url, name, features);
	winObj.focus();
	return true;
}

function popupFullScreenNoScroll(url, name){
	var features = "status=0,toolbar=0,location=0";

	if(is.ie){
		features = features + "left=0,top=0,width=" + (screen.width-10) + ",height=" + (screen.height-52);
	}else if (is.ns){
		features = features + "screenX=0,screenY=0,outerWidth=" + (screen.width) + ",outerHeight=" + (screen.height);
	}else{
		alert('Netscape or IE 4 or higher required');
		return false;
	}

	var winObj = window.open(url, name, features);
	winObj.focus();
	return true;
}

//makes the popup window for sending pages
function popup(url,name,height,width){
	var features = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height;
	
	var winObj = window.open(url, name, features);
	winObj.focus();
	return true;
}

//makes the popup window for sending pages
function popupNoScroll(url,name,height,width){
	var features = "width="+width+",height="+height;
	
	var winObj = window.open(url, name, features);
	winObj.focus();
	return true;
}

//makes the popup window for printing pages
function popupPrint(url,name,height,width){
	var features = "status=1,resizable=1,menubar=1,location=0,scrollbars=1,width="+width+",height="+height;
	
	var winObj = window.open(url, name, features);
	winObj.focus();
	return true;
}

// PassItOn smart popup
function passItOn(){
	popup("/passiton.cfm?passon=" + self.location, "PassItOn", 520,400);
	return true;
}

// used at practices and with external links to open a new window
// call with onClick="return popupExternalLink(this)"
function popupExternalLink(myLink) {
  alert("Gratefulness.org: Your browser will now open a new window.\rTo return to this page simply close the new\r window after you are done with it.");
  window.open(myLink.href,'','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,status=yes');
  return false;
}
function nclick(){ var nclick= false;	return eval("nclick");}//nn
