function open_window(fileName, windowName, windowWidth, windowHeight, scrollbars, resizable) {
	window.open(fileName, windowName, 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=' + scrollbars + ', resizable=' + resizable + ', left=' + centre(windowWidth, screen.availWidth) + ', top=' + centre(windowHeight, screen.availHeight) + ', width=' + windowWidth + ', height=' + windowHeight);
}

function centre(size,area) {
	return (area/2)-(size/2);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var menualive=0;
var oldlastobj='';

function showit(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	document.getElementById(objectId).style.visibility='visible';
    } else if (document.all && document.all(objectId)) {
	return document.all(objectId).style.visibility='visible';
    } else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId].visibility='visible';
    }
}

function over(thisobj,islink){
	if (islink == "link") {thisobj.className = 'mainmenu';} else {thisobj.className = 'mainmenu';}
}

function hideit(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	document.getElementById(objectId).style.visibility='hidden';
    } else if (document.all && document.all(objectId)) {
	return document.all(objectId).style.visibility='hidden';
    } else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId].visibility='hidden';
    }
}

function out(thisobj){
		thisobj.className = 'mainmenu';
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 101);
	object.MozOpacity = (opacity / 101);
	object.KhtmlOpacity = (opacity / 101);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function getElement(id)
{
  return document.getElementById ? document.getElementById(id) : document.all[id];
}

function showThumbnailViewer()
{
  var e = getElement("thumnbailViewer");
  if(e)
  {
    e.style.display = "inline";
    e.style.left = "50%";
    e.style.top = "50%";
    e.style.left = e.offsetLeft - (e.offsetWidth / 2);
    e.style.top = e.offsetTop - (e.offsetHeight / 2);
  }
}

function hideThumbnailViewer()
{
  var e = getElement("thumnbailViewer");
  if(e)
  {
    e.style.display = "none";
  }
}




