/*
*	Opens a pop-up window to display the bug cause and solution
*	The window's dimensions are: 300,350
*
*	If the error code field is empty, an alert is displayed instead of the pop up
*
*	@param code - the error code as found in the error_code table
*
*/
function showBug(code) {
	
	var contents = document.getElementById('errCode').value
	var trimmed = contents.replace(/^\s+|\s+$/g, '') 
	if (trimmed == "") {
		alert("The error code field is empty")
		return
	}
	var url = "bugviewer.php?bcode=" + code;
	
	//may trigger pop-up blocking software
	popup = window.open(url, 'title', "height=300, width=350")
	popup.moveTo(50,50)

}

function popupWindow(img, name) {
	popup = window.open(img, name, "height=550, width=750");
	popup.moveTo(50,50)
}

