function gostatic(url,useW,target,type)
{
	if (url == null)
		return;
	if (useW == null)
		useW = false;
	if (target == null)
		target = "main";
	if (type == null)
		type="text/html";


	var hostUrl = document.getElementById("staticHostURL").value;
	var appUrl = document.getElementById("staticAppURL").value;
	var webRelUrl = document.getElementById("staticWebServer").value;
	var webSponsor = document.getElementById("staticSponsor").value;

	if (webRelUrl == null)
	{
		alert("An error has occured trying to process your request.\nPlease contact a systems administrator");
		return;
	}

	if (type == "text/html")
	{
		if (useW)
			document.location.href = hostUrl + appUrl + "/static.w?page=" + webRelUrl + url + "&target=" + target + "&sponsor=" + webSponsor;
		else
			document.location.href = hostUrl + webRelUrl + url;
	}
	else // Not a webpage, open in a new window without passing any parameters.
	{
		if (target != "main")
		{
			window.open(hostUrl + webRelUrl + url, "", "");
		}
		else 
		{
			document.location.href=hostUrl + webRelUrl + url;
		}		
	}
}

function goStatic(url,useW,target,type)
{	return gostatic(url,useW,target,type);	}
loadCSS = function(href) {

   if (document.getElementsByTagName("head")[0])
   {
      var vSiteHead = document.getElementsByTagName("head")[0];
      var vCSS = document.createElement("link");

      vCSS.type = "text/css";
      vCSS.rel = "stylesheet";
      vCSS.href = href;
      vSiteHead.appendChild(vCSS); 
   }
}
