function Uri(){ if (Uri.__el) return Uri.el; Uri.__el = this; var me = this; this.get_Host=function(){return location.host;} this.get_HostName = function(){return location.hostname;} this.get_Port = function(){return location.port;} this.get_Query = function(){return location.search;} this.get_File = function(){return me.file;} this.get_FileName = function(){return me.fileName;} this.get_FileExt = function(){return me.fileExt;} this.get_Param = function(key){return me.param[key];} this.toString = function(){return location.href;} var s = location.href; var sAt = s.indexOf("?"); if (sAt>0)s = s.substr(0,sAt); var s1 = s.split('/'); if (s1.length>0){ var file = me.file =s1[s1.length-1]; var dotAt = file.indexOf("."); if (dotAt>0){ me.fileExt = file.substr(dotAt+1); me.fileName = file.substr(0,dotAt); } }else{ me.file = s;me.fileExt = "";} var q = location.search; var param = me.param ={}; if (q){ q = q.substr(1); var x1 = q.split('&'); for(var i=0;i=0&&eqAt0){return ins(heads[0]);} } if (document.documentElement) return ins(document.documentElement); if (document.body)return ins(document.body); document.open(); document.write("