function jumpPage(memPav) {
   if (memPav.options[memPav.selectedIndex].value == "foobar")
   {
	var url = "http://www.techonline.com/t/t?url_id=1019";
	var email = get_tol_username();

	if (email != '')
	{
	   url = url + '&email=' + email;
	}

	tiWindow(url);

   } else {
     newPage = memPav.options[memPav.selectedIndex].value
     if (newPage != "") {
        window.location = newPage
     }
   }
}

function tiWindow(mylinks) {
		linkwindow = window.open(mylinks,'tol_ti','width=600,height=400,location=yes,scrollbars=yes,resizable=yes,toolbar=yes,top=130')
		linkwindow.focus()
}

function get_tol_username()
{
  // first, get extract the value of the cookie for the TOL Community Site
  //var cookie_val = getCookieValue('Apache::TOL::AuthTicket_TOL_community');
  var cookieName = 'Apache::TOL::AuthTicket_TOL_community';
  var allcookies = document.cookie;
  var pos = allcookies.indexOf(cookieName);
  if (pos != -1) {
        var start = pos + cookieName.length;
        var end = allcookies.indexOf(';', start);
        if (end == -1)
                end = allcookies.length;
        var cookie_val = allcookies.substring(start, end);
        // now split cookie value at ':'
        var myArray = cookie_val.split(':');
        // the sixth index in the array (index 5) is the username
        return myArray[7];
        }
  else
        return '';
}

