
// Redirect constructor:
function Redirect( url ) {
  this.url = url;
  this.secs = 0;
}

// Perform the redirect:
function Redirect_go() {
  var url = this.url;
  if ( url ) {
    var secs = this.secs;
    if ( secs == 0 ) {
      window.location.replace( url );
    } else {
      var ms = secs * 1000;
      setTimeout( 'window.location.replace( "' + url + '" )', ms );
    }
  }
}
Redirect.prototype.go = Redirect_go;

// Delay the redirect:
function Redirect_delay( secs ) {
  // Try to parse the argument as an integer:
  secs = parseInt( secs );
  // Test for a non-negative integer:
  if ( !isNaN( secs ) && secs >= 0 ) this.secs = secs;
}
Redirect.prototype.delay = Redirect_delay;


function popup(url) {
    var winopts = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + 750 + ",height=" + 600;
                    remote = window.open(url, "Ecommerce", winopts);
 }


