/* Open a new window of specified width and height, without
 * navigationa aids, and with optional scroll bars.
 */
function fOpenNewPage( PageName, w, h, s) {
	// open the application window
	var vWindowDecor = "status=1,top=0,left=0,width="+w+",height="+h+",scrollbars="+s;
	vWindow = window.open(PageName,"", vWindowDecor);
}

/* Code to eat right click mouse events.
 */
function click1(e){
	if (document.all) 
		if (event.button == 2) return false;
	if (document.layers) 
		if (e.which == 3) return false;
}
function click2(){
	event.returnValue=false;
	return false;
}

/* Get a reference to a DHTML object by name
 *	obj = new getObj("name");
 */
function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

/* Hide and show an Object
 */
function fHide(oName)
{
	if (!DHTML) return;
	var obj = new getObj(oName);
	obj.style.visibility = 'hidden';
}
function fShow(oName)
{
	if (!DHTML) return;
	var obj = new getObj(oName);
	obj.style.visibility = 'visible';
}

/* Code that runs in any page that includes this file:
 *	1) Disable all right mouse Clicks
 *	2) Set DHTML capable variable
 */
if (document.layers)
	document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=click1;
document.oncontextmenu=click2;
var DHTML = (document.getElementById || document.all || document.layers);
