function __getURL(u) {
	var h = new String(window.location.host);
	if(window.location.protocol == "https:") {
		if(u.substring(0,1) != "/") {
			u = window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")) + "/" + u;
		}
		if(window.location.port != "") {
			u = "http://" + h.substring(0, h.length - (new String(window.location.port)).length - 1) + u;
		} else {
			u = "http://" + window.location.host + u;
		}
	}
	return u;
}
