
/*
	"Hemi" JavaScript Framework
	Engine for Web Applications 3.1
	Composite file "hemi.comp.js" release: 3.1.1
	Copyright 2002 - 2010. All Rights Reserved.
	Author: Stephen W. Cote
	Email: sw.cote@gmail.com
	Project: http://www.whitefrost.com/Hemi/
	BSD License: http://www.whitefrost.com/Hemi.license.txt
*/
(function(){H.namespace("util.url",H,{qualifyToHost:
function(u){var _u=H.util.url.newInstance(document.URL,0);return _u.qualify(u);},newInstance:
function(v,b){var n=H.FN("base_object","url_composite","3.1.1");if(b)v=H.util.url.qualifyToHost(v);n.p={ov:0,r:0,d:0,p:0,f:0,q:0,x:(b?1:0)};n.getFile=function(){return this.p.f;};n.getQuery=function(){return this.p.q;};n.getDomain=function(){return this.p.d;};n.getPath=function(){return this.p.p;};n.getProtocol=function(){return this.p.r;};n.qualify=function(u){var f=u,_s,t=this;_s=t.p;if(!u.match(/\/\//)){if(!u.match(/^\//)||u.match(/^\.\//)){if(u.match(/^\.\//))u=u.substring(2,u.length);f=_s.r+"://"+_s.d+_s.p+u;}else{if(u.match(/^\//)){f=_s.r+"://"+_s.d+u;}else{}}}return f;};n._init=function(o){var _s,t=this,u,v,m;_s=t.p;u=_s.ov=o;if(u.match(/\?/)){i=u.indexOf("?");_s.q=u.substring(i+1,u.length);u=u.substring(0,i);}if(u.match(/\/\//)){i=u.indexOf("//");v=u.substring(0,i+2);u=u.substring(i+2,u.length);if(v.match(/:/)){m=v.indexOf(":");_s.r=v.substring(0,m);}else{_s.r="http";}}if(!u.match(/\//)){if(!_s.r)_s.r="http";_s.d=u;u="";}i=u.indexOf("/");if(i>-1){_s.d=u.substring(0,i);u=u.substring(i,u.length);}if(!_s.r)_s.r="http";if(u.length){i=u.lastIndexOf("/");if(i>-1){v=u.substring(0,i+1);_s.p=v;u=u.substring(i+1,u.length);}}if(u.length){_s.f=u;}};n._init(v);return n;}});}());
/* End Hemi Framework 3.1 */
