//vpass cookie
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 fullpath() {
  var _url = location.href;
  return _url.htmlspecialchars();
}
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;}


// update 11/06/03
String.prototype.htmlspecialchars = function(){
  var string = this;
  var table = [
    [/&/g, '&amp;'],
    [/</g, '&lt;'],
    [/>/g, '&gt;'],
    [/"/g, '&quot;'],
    [/'/g, '&#039;']
  ];
  for (var i in table) {
    string = string.replace(table[i][0], table[i][1]);
  }
  return string;
}




