		function open_window () {
		var intwidth,intheight;
		var pstrName 
		var intx,inty;
		var strOption
		var cgisns = false;
		var intwd,intht
		var strscroll;
			
		pstrName = arguments [0]
//		alert (arguments.length)
		if (arguments.length==3) {
			intwd = arguments [1]
			intht = arguments [2]
		}
		else {
			intwd = 700
			intht = 550
		}
		
//		alert (" intwd = " + intwd + "\n intht = " + intht)
		if (cgisns) {
			intx = window.screen.availLeft;
			inty = window.screen.availTop;
		}
		else { 
			intx = 50;
			inty = 50;
		};
			strscroll = "";
			
			intwidth = window.screen.availWidth - intx - 50;
			if (intwidth > intwd) {
				intwidth=intwd;
			};

			intheight = window.screen.availHeight - inty -30;
			if (intheight > intht) {
				intheight=intht;
			}
			if (intheight != intht) strscroll = "scrollbars,";
			if (intwidth != intwd) strscroll = "scrollbars,";

			
//			alert ("x = " + intx + "\ny = " + inty + "\nwidth = " + intwidth + "\nheight = " + intheight)
			strOption = strscroll + "alwaysRaised"
			strOption = strOption + ",top=" + inty +",screenY=" + inty
			strOption = strOption + ",left=" + intx + ",screenX=" + intx
			strOption = strOption + ",height=" + intheight
			strOption = strOption + ",width=" + intwidth

			strOption = strOption + ",status=no,menubar=no,scrollbars=yes,resizable=yes "
		
			return window.open('',pstrName,strOption);
		}
function view_message (pstrref) {
var winhandle

	winhandle = open_window ("Message_View")
	winhandle.location.href = "messageview.asp?Ref=" + pstrref
}

function view_window() {
var winhandle
var strURL
	winhandle = open_window (arguments[3],arguments[1],arguments[2]);
	strURL = arguments [0];
	winhandle.location.href = strURL;
}

