function actionTo( form, path ){
  actionTo( form, path, 0 );
}

function actionToSSL( form, path ){
  actionToSSL( form, path, 0 );
}

function actionTo( form, path, newWin ){
  var uri = 'http://' + window.location.host + path;
  form.action = uri;
  if( newWin ){
    form.target = '_blank';
  }
}

function actionToSSL( form, path, newWin ){
  var uri = 'https://' + window.location.host + path;
  form.action = uri;
  if( newWin ){
    form.target = '_blank';
  }
}

function moveTo( path ){
  moveTo( path, 0 );
}

function moveToSSL( path ){
  moveToSSL( path, 0 );
}

function moveTo( path, newWin ){
  var uri = 'http://' + window.location.host + path;
  moveToCommon( uri, newWin );
}

function moveToSSL( path, newWin ){
  var uri = 'https://' + window.location.host + path;
  moveToCommon( uri, newWin );
}

function moveToCommon( uri, newWin ){
  var pattern = 0;
  var appVer;
  var version;
  if(navigator.userAgent.indexOf("Win")!=-1){
    if(navigator.appName.indexOf("Microsoft")!=-1) {
      appVer = navigator.appVersion;
      x = appVer.indexOf("MSIE",0);
      if (appVer.substring(x+8, x+9) == ";") {
        version = appVer.substring(x+5,x+8);
      } else {
        version = appVer.substring(x+5,x+9);
      }
      if (parseInt(version) >= 6) {
        pattern = 1;
      }
    }
  }
  if (pattern == 1) {
    var tagA = document.createElement('a');
    var attHref = document.createAttribute('href');
    var attTarget = document.createAttribute('target');
    attHref.nodeValue = uri;
    if( newWin == 1 ){
      attTarget.nodeValue = '_blank';
    } else if( newWin ){
      attTarget.nodeValue = newWin;
    } else{
      attTarget.nodeValue = '_self';
    }
    tagA.setAttributeNode(attHref);
    tagA.setAttributeNode(attTarget);
    document.body.appendChild(tagA);
    tagA.click();
  } else {
    if( newWin == 1 ){
      w = window.open(uri, '_blank');
    }
    else if( newWin ){
      w = window.open(uri, newWin);
    }
    else{
      window.location = uri;
    }
  }
}

