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);

var state = 'hidden';

function showhide(layer_ref) {

	maxwell_smart = document.getElementById(layer_ref);
	state = maxwell_smart.style.visibility;
	
	if (state == 'visible') {
		state = 'hidden';
	}
	else {
		state = 'visible';
	}

	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
	}
	
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
	}
	
	if (document.getElementById && !document.all) {
		//maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
	}
}

function switcharea(layer_ref, state){
	
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
	}
	
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
	}
	
	if (document.getElementById && !document.all) {
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}