/*
common.js
*/

function onSubmit(url,id) {
    window.document.getElementById(id).action = url;
    window.document.getElementById(id).target = '_self';
    window.document.getElementById(id).method = 'POST';
    window.document.getElementById(id).submit();
}

function Pagelink(Place) {

    var url = document.URL;
    var pass;

    //URLより/と#の間の文字列を求める
    slash= url.lastIndexOf("/");
    sharp= url.lastIndexOf("#");

    if (sharp == -1){
    // URL中に#が存在しない場合
        pass = url.substring(slash, url.length);
    } else {
        pass = url.substring(slash, sharp);
    }

    location.href = "/servlet" + pass + "#" + Place;
}

