var HHMIStoreBubble, HHMIStoreNavPop;

var currentNavURL;



self.onerror = function() {

	return true;

}


function di(id,name){

  if (document.images) {document.images[id].src=eval(name+".src"); }

}


// function that displays status bar message



function dm(msgStr) {

  document.returnValue = false;

  if (document.images) { 

     window.status = msgStr;

     document.returnValue = true;

  }

}

var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";

function dmim(msgStr) {

  document.returnValue = false;

  if (showMsg) { 

    window.status = msgStr;

    document.returnValue = true;

  }

}



function setNav(navURL) {

	if (navURL != currentNavURL) {

		parent.nav.location.href=navURL;

	}

}



function setContent(contentURL) {

	parent.content.location.href=contentURL;

}



// function that will load clicked links into a separate window if the spearate window checkbox is checked

function targetSeparate(boNew)
{
	if (boNew) where = window.name+"separate";
	else where = "_self";
	for (var i=0; i<=(document.links.length-1); i++) {
//		if (document.links[i].id.substr(0,2) == "a_") {
			document.links[i].target = where;
//		}
	}
}

// function that will load the bubble with URL, opening the bubble if necessary (one bubble per page)

function loadBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=no,width=340,height=350');			
	HHMIStoreBubble.focus();
}

// function that will load a RESIZABLE bubble with URL, opening the bubble if necessary)

function loadReBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=360,height=400');			
	HHMIStoreBubble.focus();
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=340,height=420');			
	HHMIStoreBubble.focus();
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigaBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=400,height=420');			
	HHMIStoreBubble.focus();		
	
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function load750Bubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=750,height=450');			
	HHMIStoreBubble.focus();
	
}


// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFighBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=500,height=470');			
	HHMIStoreBubble.focus();
	
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigpBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=375,height=320');			
	HHMIStoreBubble.focus();	
	
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigeBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=640,height=425');			
	HHMIStoreBubble.focus();
	
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigesBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=640,height=300');			
	HHMIStoreBubble.focus();			

}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigetBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=640,height=500');			
	HHMIStoreBubble.focus();		
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigevBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=600,height=700');			
	HHMIStoreBubble.focus();		
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFighsBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=500,height=420');			
	HHMIStoreBubble.focus();		
		
			
	
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigbBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=500,height=525');			
	HHMIStoreBubble.focus();
			
		
}

// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadFigtBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=375,height=525');			
	HHMIStoreBubble.focus();				
		

}

// function that will load a wide RESIZABLE bubble with URL, opening the bubble if necessary)

function loadFacesBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=yes,resizable=yes,width=360,height=425');			
	HHMIStoreBubble.focus();


}
// function that will load the bubble with URL, opening the bubble if necessary)	
	
function loadExropBubble(URL) {
   	self.name = "hhminews";
	HHMIStoreBubble = window.open(URL, window.name+'bubble', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=400,height=600');			
	HHMIStoreBubble.focus();			

}


// function that safely closes the bubble

function closeBubble() {

	if ((HHMIStoreBubble != undefined) && (HHMIStoreBubble.close != undefined)) {

		HHMIStoreBubble.close();

	}

}



// function that (re)opens a navpop with URL (one navpop per page)

function loadNavPop(URL) {

	HHMIStoreNavPop = window.open(URL, window.name+'navpop', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=no,width=340,height=350');			

	HHMIStoreNavPop.focus();

}



// function that safely loads and focuses on the main window with URL

function loadMain(URL) {

	if (window.opener) {

		window.opener.location = URL;

		window.opener.focus();

	}

}

