// JavaScript Document

// VARIABLES
var browser = navigator.appName;
var languageIsPortuguese = navigator.userLanguage=='pt'?true:false;
var ie = navigator.appName=='Microsoft Internet Explorer'?true:false;
var newWindow;

/*
BROWSER SNIFFING
*/
if (browser.indexOf("Microsoft") != -1)
{
	// Browser is MS IE
	// IE-browser-specific code here
	document.write("You are currently using ", browser, " ", bVer, ".");
	alert("You are currently using ", browser, " ", bVer, ".");
}
if (browser.indexOf("Mozilla") != -1)
{
	// Browser is Mozilla
	// Mozilla-browser-specific code here
	document.write("You are currently using ", browser, " ", bVer, ".");
	alert("You are currently using ", browser, " ", bVer, ".");
}
else
{
	document.write("You are currently using ", browser, " ", bVer, ".");
	alert("You are currently using ", browser, " ", bVer, ".");
}

/*
OPEN A NEW WINDOW
*/
function NewWindow(url)
{
	newWindow=window.open(url,"newWindowName","width=800,height=600,left=100,top=100,scrollbars=yes,resizable=yes,toolbar=yes,status=yes");
	if (window.focus)
	{
		newwindow.focus()
	}
}

/*
BUTTON OPERATIONS
*/
// Activate the specified button
function activate(bname)
{
	imageid = bname + "button";
	aname = bname + "-on.jpg";
	document.images(imageid).src = aname;
}

// Deactivate the specified button
function deactivate(bname)
{
	imageid = bname + "button";
	dname = bname + "-off.jpg";
	document.images(imageid).src = dname;
}
