/********************************************************/
/* sitescripts.js:	JavaScripts common to most pages on site.		*/
/*				By The Essential Connection					*/
/*				Copyright © 2003, Sheldon J. Potter			*/
/*				All Rights Reserved.							*/
/********************************************************/



/********************************************************/
// Status Bar Messages	
/********************************************************/

/* Global Navigation */
var home_msg = "Return to site Home page";
var catal_msg = "Search John O'Hara's event images catalogs";
var buy_msg = "Learn how to buy or license images";
var svcs_msg = "Learn about our services";
var contact_msg = "Learn how to contact John O'Hara Photography";

var crt_msg = "Read our Copyright Policy";
//var pri_msg = "Read our Privacy Policy";


/* Local Navigation */
var pgtop_msg = "Return to top of page";
var close_msg = "Close Window";


/* Other Navigation */
var tecnav_msg = "Learn more about The Essential Connection (opens new window)";
var res_msg = "Check out this resource (opens new window)";
var ordfrm_msg = "Download our photo order form";



/********************************************************/
// Navigation control rollover effects scripts 
/********************************************************/

/* disp_navinf():	Displays nav control highlight image and status bar 
  *				message for nav control calling the function. 
  *				Parameters: 	ctl_name - name of control
  *							stat_msg - string to display in status bar
  *				Checks for browser capability to deal with this before doing anything.
*/
function disp_navinf(ctl_name, stat_msg)
{
	//alert('disp_navinf entered. Message: ' + stat_msg + " Control Name: " + ctl_name);
	if (document.images)
	{
		document.images[ctl_name].src = eval(ctl_name + '_hl').src;
	}
	
	window.status = stat_msg;
	
	return true;
} 

/* rem_navinf():	Removes nav control rollover effects
  *				for nav control calling the function. 
  *				Parameters: 	ctl_name - name of control
  *				Checks for browser capability to deal with this before doing anything.
*/
function rem_navinf(ctl_name)
{
	//alert('rem_navinf entered. Control Name: ' + ctl_name);
	if (document.images)
	{
		document.images[ctl_name].src = eval(ctl_name + '_uh').src;
	}
	
	window.status = '';
	
	return true;
}

/********************************************************/
// Window Control scripts 
/********************************************************/

/* OpenPopUp(FileName, Features):	Open Pop Up Window & display a file
  *		Parameters: 	FileName -- Path & filename to open.
  *					Featires -- Window features requested
*/
function OpenPopUp(FileName, WName, Features)
{	
window.open(FileName,WName,Features);

}

/* ShowPage(FileName):	Show a page in the parent window & refocus to parent window
  *		Parameters: 	FileName -- Full name of file to open.
*/
function ShowPage(FileName)
{
	opener.document.location = FileName
	opener.focus()
}

/********************************************************/
// Photo Infringer Impediments Scripts 
/********************************************************/
 
/* No rightclick script v.2.5 */
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!

// NOTES by S. J. Potter:  This script does not prevent MAC users from downloading graphics, only PC users.  Only blocks MS Explorer users.  Fairly heavy handed: Essentially disables all right mouse button functions anywhere on page.

// Message for the alert box
var message="Sorry, that function is disabled:\n\nPhotos Copyright © John O'Hara\nGraphics Copyright © Sheldon J. Potter(The Essential Connection)\nPhotos and Graphics are Not in the Public Domain, and may NOT be taken from this site."; 

// Don't edit below!

function click(e) 
{
	if (document.all) 
	{
		if (event.button == 2) 
		{
			alert(message);
			return false;
		}
	}
	if (document.layers) 
	{
		if (e.which == 3) 
		{
			alert(message);
			return false;
		}
	}
}

if (document.layers) 
{
	document.captureEvents(Event.MOUSEDOWN);
}

document.onmousedown=click;

/* End No Right Click Script */


