<!--
// FILE NAME:  GLOBAL_FUNCTIONS.JS
// PURPOSE: THIS FILE HOLDS COMMON CODE USED BY MOST PAGES IN THE SITE

/******************************************************************************/

var isHome = false;

/******************************************************************************/

//  BROWSER DETECTION
var NS;
var IE;
var PC;
var MAC;


brName = navigator.appName;
brVer = parseInt(navigator.appVersion);
	

if ((brName == "Netscape" && brVer >=4) ||
		(brName == "Microsoft Internet Explorer" && brVer >=4)) br = "o4";
	else br = "u4";


if(document.all) {
	NS = false;
	IE = true;
} else {
	NS = true;
	IE = false;
}


var LayerObject = (document.layers)? true:false;
var DocumentObject = (document.all)? true:false;


/******************************************************************************/

// This code creates the EasyWebFill pop-up window.

var x = null;
	if ( br == "o4" ) {
var chasm = screen.availWidth;
var mount = screen.availHeight;
} else {
var chasm = 800;
var mount = 600;
}


var w = 0;
var h = 0;

function launchWindow(w,h,source,menubarsYN,scrollbarsYN) {
	if ( br == "o4" ) {
          if (NS) {
		h += (35)
	}
	x = window.open(source,'posB','width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5) + ',scrollbars=' + scrollbarsYN);
}

}

/******************************************************************************/
// This code creates the pop-up window with menu bar.


var x = null;

	if ( br == "o4" ) {
var chasm = screen.availWidth;
var mount = screen.availHeight;
} else {
var chasm = 800;
var mount = 600;
}

var w = 0;
var h = 0;

function Windowpop(w,h,source,scrollbarsYN) {
	if (NS) {
		h += (35)
	}
	x = window.open(source,'posB','width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5) + ',menubar=' + scrollbarsYN);
}

// code to disable right mouse button.

if (document.layers){
	window.captureEvents (Event.MOUSEDOWN);
	window.captureEvents (Event.MOUSEUP);
	
}

document.onmousedown = captureMouse;
document.onmouseup = captureMouse;

function captureMouse(evt){
	if (evt) {
		mouseClick = evt.which;
	}
	else{
		mouseClick = window.event.button;
	}
	
	if (mouseClick==2 || mouseClick==3){
		if (navigator.appName == 'Netscape'){
			return false;
		}
		else{
		alert ("Items on this page are Copyright WebFMH");
		return false;
	}
}
}
//-->
	
