
// JavaScript URL Functions //
function url_get()
{
	return location.href;
}

function url_get_anchor()
{
	return location.hash;
}

function url_get_host()
{
	return location.hostname;
}

function url_get_path()
{
	return location.pathname;
}

function url_get_port()
{
	return (location.port.length < 1) ? 80 : location.port;
}

function url_get_protocol()
{
	return location.protocol;
}

function url_get_query()
{
	return location.search
}

function url_set(url)
{
	location.href	= url;
}

function url_set_anchor(name)
{
	location.hash	= name;
}

function url_set_path(path)
{
	location.pathname	= path;
}

// JavaScript Window Functions //
function window_open(url, windowname, features)
{
	window.open(url, windowname, features);
}
function window_open_minimal(url, windowname, width, height)
{
	var features	= 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no';
	features		+= ',width=' + (width == "fullscreen") ? screen.availWidth : width;
	features		+= ',height=' + (width == "fullscreen") ? screen.availHeight : height;
	window.open(url, windowname, features);
}