function getCookie(){
        str = document.cookie;
        return ((str.match("LOGIN=u") == null) && (str.match("LLOGIN=l") == null)) || (str.match("BASE=i") == null);
}
function getUid(){
    if(getCookie()) {
        return "ƒQƒXƒg";
    } else {
	if(document.cookie.match("BASE=i") == null)
		return "WHO?";
        bpos=document.cookie.indexOf("BASE=i");
        bpoe=document.cookie.indexOf("%26",bpos);
        bco=document.cookie.substr(bpos+9,bpoe-bpos-9);
        return decodeURIComponent(bco);
    }
}
function hostpath(){
    return location.protocol+"//"+location.host+location.pathname;
}
function hostpath2(){
    return location.protocol+"//"+location.host;
}
function hostpath3(){
    return location.protocol+"//"+location.host+"/servlet/Login.Login%3FDONE="+location.protocol+"//"+location.host+location.pathname;
}
function messInsert() {

  return;

  var insert_page_path='http://my.vector.co.jp/info/info.html';
  if (document.cookie.match("PACK=") == null) {
    return;
  }
  if (document.cookie.match("BASE=i") != null) {
    return;
  }
  if (document.cookie.match("LOGIN=") != null) {
    return;
  }
  if (document.cookie.match("verup=scn") != null) {
    return;
  }
  if (document.cookie.match("vucount=1") != null) {
    return;
  }
  for (i = 0; i < document.links.length; i++) {
    var pathname = document.links[i].pathname;

    if (pathname.match("^download/file/") == "download/file/") {
      document.links[i].href = insert_page_path + "?" + escape("/" + pathname);
    } else if (pathname.match("^/download/file/") == "/download/file/") {
      document.links[i].href= insert_page_path + "?" + escape(pathname);
    }

  }
}
