function goPortal()
{
	//Redirects the user to the portal if a portal cookie is found.
        var c = document.cookie;
        var cIndex = c.indexOf("PortalUser");
        var cLength = c.length;
        var cID  = c.substr(cIndex+11, cLength);
	var loc = "/";
        if ( cIndex >= 0 ) //a portal cookie was found
        {
                var cEnd = c.indexOf(";",cIndex);
                if (cEnd > 0)  // there are other cookies
                    cID = c.substring(cIndex+11, cEnd);
                else           // No other cookies
                    cID = c.substring(cIndex+11, cLength);
                if (cID.valueOf() > 1)  //not the default user
                    loc = "/wobin/WebObjects/Portal";
        }
	window.location = loc;
}

