var HHMIBubble, HHMINavPop;

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 safely loads the main window with URL and closes the current bubble

function burstBubble(URL) {

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

		if (HHMIBubble.opener) {

			HHMIBubble.opener.location = URL;

			HHMIBubble.close();

		}

	}

}

*/



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

function loadBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=468,height=560');			
	HHMIBubble.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=yes,width=420,height=650');			
	HHMIStoreBubble.focus();	
	
}

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

function loadWideBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=680,height=440');			
	HHMIBubble.focus();
}

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

function loadHrBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=yes,resizable=yes,width=350,height=480');			
	HHMIBubble.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 (one bubble per page)

function load755Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=755,height=705');			
	HHMIBubble.focus();	
	
}

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

function load785Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=785,height=900');			
	HHMIBubble.focus();	
	
}

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

function load785NBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=785,height=450');			
	HHMIBubble.focus();		
		
}


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

function load785x550Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=785,height=550');			
	HHMIBubble.focus();		
		
}


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

function load850x450Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=850,height=450');			
	HHMIBubble.focus();		
		
}


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


function load785SQBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=785,height=785');			
	HHMIBubble.focus();		
		
}

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

function load940Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=yes,resizable=yes,width=940,height=750');			
	HHMIBubble.focus();
}

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

function load940_520Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=yes,resizable=yes,width=940,height=520');			
	HHMIBubble.focus();
}

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

function load1024x768Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=no,resizable=no,width=1024,height=768');			
	HHMIBubble.focus();
}

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

function loadNavBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=yes,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=600,height=570');			
	HHMIBubble.focus();
}


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

function loadNav2Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=yes,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=600,height=800');			
	HHMIBubble.focus();
}

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

function loadNav2bBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=yes,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=620,height=800');			
	HHMIBubble.focus();
}

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

function load525Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=525,height=575');			
	HHMIBubble.focus();
}

function load550Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=550,height=750');			
	HHMIBubble.focus();
}

// function that safely closes the bubble

function load630sqBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=yes,resizable=yes,width=630,height=630');			
	HHMIBubble.focus();
}

function load660sqBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=660,height=660');			
	HHMIBubble.focus();
}

function load680sqBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=680,height=680');			
	HHMIBubble.focus();
}

function load1024sqBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=800,height=800');			
	HHMIBubble.focus();
}

function load680WideBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=680,height=500');			
	HHMIBubble.focus();
}


function load480sqBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=480,height=480');			
	HHMIBubble.focus();
}

function load680rectBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=680,height=800');			
	HHMIBubble.focus();
}

function load720rectBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=720,height=800');			
	HHMIBubble.focus();
}

function load330Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=330,height=540');			
	HHMIBubble.focus();

}

function load330NBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=330,height=465');			
	HHMIBubble.focus();	
		
}

function loadAudioBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=330,height=50');			
	HHMIBubble.focus();
}

function loadVideoBubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=yes,width=350,height=300');			
	HHMIBubble.focus();
}

function load440x400Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=440,height=400');			
	HHMIBubble.focus();
}

function load650x380Bubble(URL) {
   	self.name = "hhmiabout";
	HHMIBubble = window.open(URL, window.name+'bubble', 'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=yes,width=650,height=380');			
	HHMIBubble.focus();
}

// function that safely closes the bubble

function closeBubble() {

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

		HHMIBubble.close();

	}

}



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

function loadNavPop(URL) {

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

	HHMINavPop.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();

	}

}


