/*  BROWSER CHECK  */

function Browser(){

	this.ver = navigator.appVersion;

	this.app = navigator.appName; 

	this.agt = navigator.userAgent;

	this.mac = (this.agt.indexOf("Mac")>-1)?1:0;

	this.win = (this.agt.indexOf("Win")>-1)?1:0;

	

	this.nn = (this.app == "Netscape")?1:0;

	this.ie = (this.app.indexOf("Microsoft")>-1)?1:0;

	this.ie4win = ((this.ie) && (this.win) && (this.agt.indexOf('MSIE 4')>-1))?1:0;

	this.ns6mac = ((this.mac) && (this.nn) && (parseInt(this.ver)>=4))?1:0;

	return this



}

b = new Browser()

/*************************** POP UP **************************************/
function popup(name, URL, height, width){
	name = window.open(URL,name,'width='+width+',height='+height+',left=0,top=0,resizable=no,titlebar=yes,menubar=no,status=no,scrollbars=no,toolbars=no,location=no,screenX=20,screenY=20,top=20,left=20');
	name.focus();
}


/*************************** DIV VISIBILITY********************************/ 

if (document.layers) {

  visible = 'show';

  hidden = 'hide';

} else if (document.all) {

  visible = 'visible';

  hidden = 'hidden';

}

function reveal(div, parent) {

  if (document.layers) {

    theDiv = document.layers[div];

  } else if (document.all) {

    theDiv = document.all(div).style;

  }

  if (theDiv.visibility == visible) {

    theDiv.visibility = hidden;

  } else {

    theDiv.visibility = visible;

  }

  lastDiv = theDiv;

}

function hide(div, parent) {

  if (document.layers) {

    theDiv = document.layers[div];

  } else if (document.all) {

    theDiv = document.all(div).style;

  }

  if (theDiv.visibility == visible) {

    theDiv.visibility = hidden;

  } else {

    theDiv.visibility = hidden;

  }

  lastDiv = theDiv;

}

function showoff(div, parent) {

  if (document.layers) {

    theDiv = document.layers[div];

  } else if (document.all) {

    theDiv = document.all(div).style;

  }

  if (theDiv.visibility == visible) {

    theDiv.visibility = visible;

  } else {

    theDiv.visibility = visible;

  }

  lastDiv = theDiv;

}



// Some variables

var base= "images/ww_subnav_"
var off = new Array();
var on = new Array();
var stuff = new Array('author','illus','praise','about');

// Pre-load part.

if (document.images)
{
	for (i=0;i<stuff.length;i++)
	{
		off[i] = new Image;
		off[i].src = base + stuff[i] + "_off.gif"
		on[i] = new Image;
		on[i].src = base + stuff[i] + "_on.gif";
	}
}


// The functions: first mouseover, then mouseout

function over(no)
{
	if (document.images)
	{
		document.images[stuff[no]].src = on[no].src
	}

}

function out(no)
{
	if (document.images)
	{
		document.images[stuff[no]].src = off[no].src
	}
}

