function popUp(theurl,thewindow,thewidth,theheight,thescroll,theResize) {
	var iMyWidth;
	var iMyHeight;
	var scroll;
	var win2;
	var features = '';
	var isResizable;

	if (theResize)
		isResizable = 'yes';
	else
		isResizable = 'no';

	if(thescroll)
	 scroll = 'yes';
	else
	 scroll = 'no'

	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - ((thewidth/2) + 10);
	//half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - ((theheight/2) + 50);
	//half the screen height minus half the new window height (plus title and status bars).

	features = "status=yes,height="+theheight+",width="+thewidth+",titlebar=no"+",resizable="+isResizable+",left="+iMyWidth+",top="+
		iMyHeight+",screenX="+iMyWidth+",screenY="+iMyHeight+",scrollbars="+scroll;

	win2 = window.open(theurl,thewindow,features);
	win2.focus();

	return win2;
}

function mark_by_value(obj){
	var m = 0;
	var obj2 = mark_by_value.arguments;

	if(obj && obj2.length > 1)
		for(i=0;i<obj.length;i++){
			for(var x=1;x<obj2.length;x++)
				if(obj2[x] == obj.options[i].value){
					obj.options[i].selected = true;
					m++;
					break;
				}

			if(m == obj2.length - 1)
				break;
		}
}

function findFormObj(Form, Name){
	for(var i=0;i < Form.elements.length;i++)
		if(Form.elements[i].name == Name)
			return Form.elements[i];
			
	return false;
}
