//General Functions
function LoginFTP( un, pw )
{
    var varURL = 'ws_ftp_login.php?un=' + un + '&pw=' + pw;
    var ajax = new AjaxNow();
    ajax.id = 'ftp_login_result';
    ajax.url = varURL;
    ajax.async = false;
    if ( ajax.Run() == 'true' )
    {
        alert( 'Login Successfull!\n\nIf your browser does not automatically\nopen the FTP location, please open an FTP\nclient and enter the following information:\n\nHOST: ftp.comec-usa.com\nUN: ' + un + '\nPW: ' + pw + '\n' );
        window.location = 'ftp:\/\/' + un + ':' + pw + '@ftp.comec-usa.com';
    }
    else
    {
        alert( 'Incorrect login ...' );
    }
    return true;
}

//Email form
function EmailForm( id )
{
  var fc = new FormElementsFromId()
  fc.SetId( id );
  
  var ajax = new AjaxNow();
  ajax.id = 'contact_status';
  //ajax.statusId = 'contact_status';
  ajax.url = 'ws_contact.php';
  ajax.async = true;
  ajax.method = 'POST';
  ajax.send = fc.ValueString;
  ajax.indicator = '<img src="img/ajax_spinner.gif"/>';
  ajax.Run();
  
  return false;
}