function addToFaves(urlAddress,pageName){ if (window.external) window.external.AddFavorite(location.href, document.title);else alert("Sorry! Your browser doesn't support this function.");}
function pagePrint(){
	if ( window.print ){
	 	if (window.event) window.event.cancelBubble = true;
		window.focus();
		window.print( );
	}
	else alert("Sorry! Your browser doesn't support this function.");
}
function pageLoaded(){if ( window.rollBanner ) rollBanner();}	 
function elResize(){
	el = xbGetElement(window, resizeID);
	if (el){
		newWinWidth = xbWinWidth()-0;
		//elWidth = el.style.width;
		if (newWinWidth != winWidth){
			newElWidth = parseInt(newWinWidth) - adjWidth + 'px'; // 16 for NS
			//alert( 'newWinWidth=[' + newWinWidth + ']  newElWidth[' + newElWidth + ']')	
			el.style.width = newElWidth;
			winWidth = newWinWidth;
		}
	}
}
function openPrintWindow(theURL){ strOptions = "toolbar=no,"; strOptions += "location=no,"; strOptions += "directories=no,";  strOptions += "status=no,"; strOptions += "menubar=yes,"; strOptions += "scrollbars=yes,"; strOptions += "resizable=no"; return (openWindow(theURL,'print',strOptions));}
function openImgWindow(theURL,winName,w,h){
	// adjust w & h
	if (w<300) w = 300;
	w += 50;
	h += 150;
	openWindow(theURL,winName,null, w,h);
	return(false);
}
function openFormWin(winName) {
	//var n = window.open('about:blank', winName, 'scrollbars=yes,height=250,width=350,status=no');
	strOptions='scrollbars=yes,status=no,	menubar=no';
	openWindow('about:blank',winName,strOptions,.75  )
	return true;
}
function openWindow(theURL,winName,strOptions,w, h ){
	if (parseInt(navigator.appVersion)>3) {
 		if (navigator.appName=="Netscape") {
  			winW = window.innerWidth;
  			winH = window.innerHeight;
 		}
 		if (navigator.appName.indexOf("Microsoft")!=-1) {
  			winW = screen.availWidth - 20; //document.body.offsetWidth;
  			winH = screen.availHeight - 50 ; // document.body.offsetHeight;
 		}
	}
	if (w<1 ) {
		 perCent = w;
		 w='';
	}
 	else perCent = .9;
	if ( ! w ) w = winW *perCent;
	if ( ! h ) h=winH*perCent;
	if ( w > winW) w = winW;
	if ( h > winH) h = winH;
	x=(winW - w ) / 2;
	y=(winH - h ) / 2 ;
	if (! strOptions){	
		strOptions = "toolbar=no,"; //no
	   strOptions += "location=no,"; //no
	   strOptions += "directories=no,"; //no
	   strOptions += "status=no,"; //no
	   strOptions += "menubar=no,"; //no
	   strOptions += "scrollbars=yes,"; //no
	   strOptions += "resizable=no"; //no
	}
	   
   strOptions += ",width=" + w + ",";
   strOptions += "height=" + h + ",";
	strOptions += ",left=" + x + ",top=" + y;
	strOptions += ",screenX=" + x + ",screenY=" + y;
	
	if (!window.imageWindow){ // window has not yet been defined
		try{
			imageWindow = window.open(theURL,winName,strOptions);
		}
		catch(e){
			window.alert("Popup window blocked " + e.number);
		}
	} else { // has been defined
		if (!imageWindow.closed){ // window still open
			imageWindow.location=(theURL);
			imageWindow.focus();
		} else {
			try{
				imageWindow = window.open(theURL,winName,strOptions);
			}
			catch(e){
				window.alert("Popup window blocked " + e.number);	
			}
		}
	}
	return(false);
}
var IE = (document.all);
var NS4 = false;
var NS6 = false;
var MAC = (navigator.appVersion.indexOf('Mac') != -1);
var MOZ = (navigator.userAgent.toUpperCase().substr(0,3) == "MOZ");
var formAction = String(""); 
if(navigator.appName.toUpperCase().substr(0,3) == "NET"){
	if (navigator.appVersion.indexOf("4.") > -1)NS4 = true;
	if (navigator.appVersion.indexOf("5.") > -1) NS6 = true
}
