//--Submit Form--//
function fnSubmit(formName) {	
	eval("document." + formName + ".submit();");
}	

//--Log in using if enter key is pressed in password box--//
function entsub(event,formName) {
	if (event && event.which == 13){
		fnSubmit(formName)
		return false;
	}else{

		return true;
	}
}

function gotoSearchPage(formName,iPage){
	var oPageField = eval("document." + formName + ".page;")
	oPageField.value = iPage;
	fnSubmit(formName);	
	return;
}

//--Open pop up window and centre in the middle of the screen--
function fnPopUp(filePath,height,width,attributes){
	var sScreenX = screen.width
	var sScreenY = screen.height
	var x = sScreenX - width
	var y = sScreenY - height
	var winLeft = x/2
	var winTop =  y/2 
	window.open(filePath,"","width=" + width + ",height=" + height + "," + attributes + ",left=" + winLeft + ",top=" + winTop)
}