/** Adds a trim function to the String class. */

String.prototype.trim = function() {
  var x=this;

  x=x.replace( /^\s*/, "" );
  x=x.replace( /\s*$/, "" );

  return x;
}

/** Function to generate popup windows. */

function launch(url, options) { 
	window.name = "opener";
	var remote = open(url, "remote", options);
}

/** Check that at least 1 item from the select list has been chosen. (assumes selectIndex 0 
corresponds to the --- Choose One --- option and is thus invalid. */

function validateFormSelection( myForm, mySelectList )
{
	// myForm.ID = spouse selection from drop-list
	if ( mySelectList.selectedIndex == 0 ) {
		alert( "Bitte wählen Sie eine Seite aus." );
	}
	else {
		myForm.submit();
	}
}

