if (document.images)
{
	image1on = new Image();
  	image1on.src = "images/menu1on.gif";
  	image2on = new Image();
  	image2on.src = "images/menu2on.gif";
  	image3on = new Image();
  	image3on.src = "images/menu3on.gif";
  	image4on = new Image();
  	image4on.src = "images/menu4on.gif";
  	image5on = new Image();
  	image5on.src = "images/menu5on.gif";
  	image6on = new Image();
  	image6on.src = "images/menu6on.gif";
  	image1off = new Image();
  	image1off.src = "images/menu1off.gif";
  	image2off = new Image();
  	image2off.src = "images/menu2off.gif";
  	image3off = new Image();
  	image3off.src = "images/menu3off.gif";
  	image4off = new Image();
  	image4off.src = "images/menu4off.gif";
  	image5off = new Image();
  	image5off.src = "images/menu5off.gif";
  	image6off = new Image();
  	image6off.src = "images/menu6off.gif";
}

function turnOn(imageName)
{
  	if (document.images)
	{
    		document[imageName].src = eval(imageName + "on.src");
  	}
}

function turnOff(imageName)
{
	if (document.images)
	{
    		document[imageName].src = eval(imageName + "off.src");
	}
}

window.name = "opener";

function openWindow(url, name, rs, st, mnu, tool, w, h)
{
	// for images, add 20 pixels to w and h each
  	var resize = "";
	var stat = "";
	var menu = "";
	var toolb = "";
  	if (rs)
	{
    		resize = "resizable,";
  	}
	if (st)
	{
		stat  =  "status,";
	}
	if (mnu)
	{
		menu = "menubar,";
	}
	if (tool)
	{
		toolb = "toolbar,";
	}
  	popupWin = window.open(url, name, 'scrollbars,' + resize + stat + menu + toolb + 'width=' + w + ',height=' + h);
	// focus window (only for Navigator >= 3.0)
	if ((navigator.appName != "Microsoft Internet Explorer") && (navigator.appVersion.substring(0, 1) == "3"))
		popupWin.focus();
}

function formTextBoxOnFocus(objTextBox)
{
	objTextBox.style.backgroundColor = "#595959";
}

function formTextBoxOffFocus(objTextBox)
{
	objTextBox.style.backgroundColor = "";
}

function tableCellOnFocus(objCell)
{
	objCell.style.backgroundColor = "#202020";
	objCell.style.border = "1px solid #505050";
}

function tableCellOffFocus(objCell)
{
	objCell.style.backgroundColor = "";
	objCell.style.border = "1px solid #000000";
}

function frmGoogleSearchCheck()
{
	if (document.frmGoogleSearch.q.value == "")
	{
		alert("Please enter search term, then click 'Search' button.");
		document.frmGoogleSearch.q.focus();
		return false;
	}
	else
		return true;
}
