// JavaScript Document

//  Resize a Popup to Fit an Image's Size Script 

function popImage(imageURL) {
	popupURL = 'popup.htm?'+ imagePath + imageURL;
	closeChildWindow();
	openChildWindow(popupURL);
}

function openChildWindow(popupURL) {
	if (childWindow.closed) {
		var controlString = "width=1,height=1,top=20,left=20,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
		childWindow = window.open(popupURL,"popupwin",controlString);
		childWindow.focus();
	}
}

function closeChildWindow() {
	if (!childWindow.closed) childWindow.close();
}

// End Resize a Popup to Fit an Image's Size Script


//**********
// Sets the images that are 'on'. Needs variables passed from the page in an array
//**********

function openWindow(pageName,pageWidth,pageHeight) {

window.open(pageName,"remote","width=" + pageWidth + " ,height=" + pageHeight + ",menubar=yes");

}

function UC4_setMenuImage(navframeno) { //modified by BL 27.10.03 to work with frames
	if(document.BL_images){
		var i,m,a=document.BL_images;
		for(i=0;i<(a.length-1);i+=2){
			if (navframeno != null){
				if ((x=MM_findObj(a[i] + '?' + navframeno))!=null){
					parent.frames[navframeno].location.reload();
				}
			} else {
				if ((x=MM_findObj(a[i]))!=null){
				x.src=a[i+1];
				}
			}
		}
	}
}

//**********
// end
//**********
