//creates a new window centred on screen, options are passed in
function mojFormOpenOptions(strLoc, strName, w,h,o){
	var winW=screen.availWidth;
	var winH=screen.availHeight;

//added to place window in top left if the new window is bigger than the users resolution allows	
	var left=((winW - w - 10) * .5);
	
	if (left < 0)
		{
		left=0;
		}
	
	var top=((winH - h - 30) * .25)
	
	if (top < 0)
		{
		top=0;
		}
		
	window.open(strLoc,strName,'width=' + w + ',height=' + h + ',left=' + left + ',top=' + top+ "," + o);
}

//exactly the same as mojFormOpen, except returns newly created window object
function mojFormOpenObj(strLoc, strName, w,h,o){
	var winW=screen.availWidth;
	var winH=screen.availHeight;
	
	//added to place window in top left if the new window is bigger than the users resolution allows	
	var left=((winW - w - 10) * .5);
	
	if (left < 0)
		{
		left=0;
		}
	
	var top=((winH - h - 30) * .25)
	
	if (top < 0)
		{
		top=0;
		}
		
	var tmp=window.open(strLoc,strName,'width=' + w + ',height=' + h + ',left=' + left + ',top=' + top+ "," + o);
	return tmp;
}
