function FrameURL( URL, FrameName )
{
  TargetFrame = eval( FrameName );
  TargetFrame.location.href = URL;
}

function ConfirmDelete( text, link )
{
  returnvalue = confirm( text );
  if ( returnvalue )
  {
    FrameURL( link, "this" );
  }
}

function valid_date( datum )
{
  for ( i = 0; i < datum.length; i++ )
  {
    if ( ( datum.charAt( i ) < "0" )
    ||   ( datum.charAt( i ) > "9" ) )
    {
      if ( ( i != 2 )
      &&   ( i != 5 ) )
      {
        return 0;
      }
    }
  }
  return 1;
}

function trim( str )
{
  while ( str.substr( 0, 1 ) == " " )
  {
    str = str.substr( 1, str.length - 1 );
  }
  while ( str.substr( str.length - 1, 1 ) == " " )
  {
    str = str.substr( 0, str.length - 1 );
  }
  return str;
}

function NewImage( Path )
{
  if ( document.images )
  {
    Result = new Image();
    Result.src = Path;
    return Result;
  }
}

function ChangeImage( Name, ObjectName )
{
  if ( document.images && ( bPreloadFlag == true ) )
  {
    document[Name].src = ObjectName.src;
  }
}

function GetElement( ObjectId )
{
  return document.getElementById( ObjectId );
}

function SetContent( ObjectId, Content )
{
  document.getElementById( ObjectId ).firstChild.nodeValue = Content;
}
