Ext.tsinnet.URL=function(urlPara){
  this._searchObject={};
  this._path="";
  
  var _href=urlPara;
  var iIndex=_href.indexOf("?");
  if (iIndex>=0){
    this._path=_href.substring(0,iIndex);
    this._searchObject=Ext.urlDecode(_href.substring(iIndex+1));
  }else{
    this._path=_href;
  }
};

Ext.tsinnet.URL.prototype.url=function(){
  return decodeURIComponent(this.path() + this.search()); 
};

/*
 * 设置或获取 href 属性中跟在问号(包括问号)后面的部分。 
 */
Ext.tsinnet.URL.prototype.search=function(){
  if (this.searchObject()){
	  var _search=Ext.urlEncode(this.searchObject());
	  if (_search.length>0){
	    return "?" + _search;
	  }else{
	    return "";
	  }
  }else{
    return "";
  }
};

Ext.tsinnet.URL.prototype.searchObject=function(){
    return this._searchObject;
};

Ext.tsinnet.URL.prototype.path=function(){
  return this._path;
};

/*
 * 设置或获取 href 属性中在井号“#”后面的分段。 
 */
Ext.tsinnet.URL.prototype.hash=function(){
  
};
/*
 * 设置或获取 location 或 URL 的 hostname 和 port 号码。
 */
Ext.tsinnet.URL.prototype.host=function(){
  
};
/*
 * 设置或获取 location 或 URL 的主机名称部分。
 */
Ext.tsinnet.URL.prototype.hostname=function(){
  
};
/*
 * 设置或获取整个 URL 为字符串。
 */
Ext.tsinnet.URL.prototype.href=function(){
  
};
/*
 * 设置或获取对象指定的文件名或路径。
 */
Ext.tsinnet.URL.prototype.pathname=function(){
  
};
/*
 * 设置或获取与 URL 关联的端口号码。
 */
Ext.tsinnet.URL.prototype.port=function(){
  
};
/*
 * 设置或获取 URL 的协议部分。
 */
Ext.tsinnet.URL.prototype.protocol=function(){
  
};



