function Popup(strURL, strName, intWidth, intHeight, strStatus, strScroll, strResize, strToolbar, strMenu, intTop, intLeft) {
	if (!strURL) {
		alert('A link must be specified when using the Popup function.');
	}
	else {
		window.name = 'popupopener';
		var strTop, strLeft;
		if (!strName) strName = 'popup';
		if (!intWidth) intWidth = 600;
		if (intWidth > (window.screen.width - 25)) intWidth = (window.screen.width - 25);
		if (!intHeight) intHeight = 400;
		if (intHeight > (window.screen.height - 125)) intHeight = (window.screen.height - 125);
		if (!strStatus) strStatus = 'yes';
		if (!strScroll) strScroll = 'yes';
		if (!strResize) strResize = 'yes';
		if (!strToolbar) strToolbar = 'no';
		if (!strMenu) strMenu = 'no';
		if (intTop && !isNaN(intTop)) strTop = ',top=' + intTop;
		if (intLeft && !isNaN(intLeft)) strLeft = ',left=' + intLeft;
		var objWindow = window.open(strURL, strName, 'width=' + intWidth + ',height=' + intHeight + ',status=' + strStatus + ',scrollbars=' + strScroll + ',resizable=' + strResize + ',toolbar=' + strToolbar + ',menubar=' + strMenu + strTop + strLeft);
		objWindow.focus();
	}
}
function LeftMenu(blnOver, strId, strId2) {
	var obj1 = document.getElementById(strId);
	var obj2 = document.getElementById(strId2);
	if (obj1 != null) {
		if (blnOver) {
			if (obj1.className == 'lefttext bottom') { obj1.className = 'lefton bottomon'; } 
			else { obj1.className = 'lefton'; }	
			if (obj2 != null) { obj2.className = 'leftparenton'; }	
		}
		else {
			if (obj1.className == 'lefton bottomon') { obj1.className = 'lefttext bottom'; } 
			else { obj1.className = 'lefttext'; }	
			if (obj2 != null) { obj2.className = 'lefttext'; }
		}
	}
}

function BrowseImages(strForm, strField, strWidth, strHeight, strSource) {
	var strURL = '/assets/imagebrowser/'
	if (strForm && strField) {
		strURL += '?form=' + strForm + '&field=' + strField;
		if (document[strForm][strField].value) strURL += '&source=' + document[strForm][strField].value;
		else if (strSource) strURL += '&source=' + strSource;
		if (strWidth) strURL += '&width=' + strWidth;
		if (strHeight) strURL += '&height=' + strHeight;
	}
	Popup(strURL, 'image', 600, 450);
}
