<!-- Login Script -->
function px_enter (username,password) {
  if ( window.location.hostname == 'www.propex.co.uk' ||
       window.location.hostname == 'ssl.propex.co.uk' ||
       window.location.hostname == 'www.primepitch.co.uk' ||
       window.location.hostname == 'www.primepitch.com' ||
       window.location.hostname == '212.54.162.3' ||
       window.location.hostname == '212.54.162.2' ) {
    document.live.elements.username.value = username;
    document.live.elements.password.value = password;
    document.live.submit();
  } else if ( window.location.hostname == 'test.propex.co.uk' ||
              window.location.hostname == '212.54.162.6' ) {
    document.test.elements.username.value = username;
    document.test.elements.password.value = password;
    document.test.submit();
  } else if ( window.location.hostname == 'demo.propex.co.uk' ||
              window.location.hostname == '212.54.162.4' ) {
    document.demo.elements.username.value = username;
    document.demo.elements.password.value = password;
    document.demo.submit();
  } else if ( window.location.hostname == 'training.propex.co.uk' ||
              window.location.hostname == '212.54.162.5' ) {
    document.training.elements.username.value = username;
    document.training.elements.password.value = password;
    document.training.submit();
  } else {
    // Development
    document.dev.elements.username.value = username;
    document.dev.elements.password.value = password;
    document.dev.submit();
  }
}

function pp_enter () {
  var url;

  if ( window.location.hostname == 'www.propex.co.uk' ||
       window.location.hostname == 'ssl.propex.co.uk' ||
       window.location.hostname == 'www.primepitch.co.uk' ||
       window.location.hostname == 'www.primepitch.com' ||
       window.location.hostname == '212.54.162.3' ||
       window.location.hostname == '212.54.162.2' ) {
//    url = "http://www.primepitch.com/cgi-bin/portal.cgi";
    url = "http://ssl.propex.co.uk/cgi-bin/pp.cgi";
  } else if ( window.location.hostname == 'test.propex.co.uk' ||
              window.location.hostname == '212.54.162.6' ) {
    url = "http://test.propex.co.uk/cgi-bin/pp.cgi";
  } else if ( window.location.hostname == 'demo.propex.co.uk' ||
              window.location.hostname == '212.54.162.4' ) {
    url = "http://ssl.propex.co.uk/cgi-bin/pp.cgi";
  } else if ( window.location.hostname == 'training.propex.co.uk' ||
              window.location.hostname == '212.54.162.5' ) {
    url = "http://ssl.propex.co.uk/cgi-bin/pp.cgi";
  } else {
    // Development
    url = "http://192.168.100.42/cgi-bin/portal.cgi";
  }

  window.location.href = url;
}
