<!--//
function selectOption(targetForm, targetElement, selectedOption){
	//document.targetForm.targetElement.select(selectedOption);???
}


function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}
//usage: <BODY OnLoad="placeFocus()"> // places focus on first editable element
//<!-- Original:  Tom Khoury (twaks@yahoo.com) -->
//<!-- The JavaScript Source!! http://javascript.internet.com -->
var childWindow=null;
//function show_window(template_url, close_window, win_height, win_width) {
function show_window(template_url, win_height, win_width) {
	// are we closing the window?
	/*if (close_window == "yes" ) {
		if ( childWindow != null ) {
			if (!childWindow.closed) {
				childWindow.close();
				childWindow=null;
			}
		} // endif window !null
		return;		
	} // endif cancel window
	 */
	// open window -- defaults for width and height
	var left = Math.floor((screen.width - win_width) / 2);
	var top = Math.floor(((screen.height - win_height) / 2) - 10);
	var height = Math.floor(screen.height * 0.5); 
    var width = Math.floor(screen.width * 0.5);
	if ( win_height != null ) {
		height = win_height;
	}
	if ( win_width != null ) {
		width = win_width;
	}
	var winParms = ",top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
	//if (parms) { winParms += "," + parms; }

	var winOptions = "resizable=yes,"
		+"scrollbars=yes,"
		+"dependent=no,"
		+"status=no,"
		+"toolbar=no,"
		+"directories=no,"
		+"menubar=no"+winParms;
		
	childWindow = open(
		template_url, 
		"tp_child_window",
		winOptions );
	//if (parseInt(navigator.appVersion) >= 4) { childWindow.window.focus(); }
	
	// set caller atributes
	childWindow.opener=this;

	// focus window
	childWindow.focus();
  
} // end show_window

function setCmd(formElement, theValue){
	theForm = formElement.form;
	theForm.cmd.value = theValue;
	theForm.submit();
}
//-->