//===================================================================
function buildQuery()
{
	with (document.languages)	{
//		h = HTML.checked ? "on" : "off";
//		$cf = CF.checked   ? "on" : "off";
//		$cf = 'off';
		$j   = JS.checked   ? "on" : "off";
		$p   = Perl.checked ? "on" : "off";
		$Ph  = PHP.checked  ? "on" : "off";
	}
//	$query = "?JS="   + $j        // old "?" prefix is wrong for HTML Forms after Feb, 2010 rewrite
	$query = "JS="   + $j
		+ "&Perl=" + $p
		+ "&PHP="  + $Ph;
//		+ "&CF=" + $cf;
//alert ("Query=" + $query);
	return $query;
}

//===================================================================
// Feb, 2010 ... adding $ prefix to variables in this old code.
// As a 2010 aside, only lang dependent pages call this function ... so could simplify the code
function load($URL)
{
	$query = buildQuery();
	if ($query.indexOf("on") == -1)	{     // was okay ... not the problem
		alert ("You must select at least one language for a starred page.");
		return;
	}
	
//  if ($URL.match(/Crib/)) {     // remember, no quote marks delimit the regexp
    // after revisions, HTML forms also needs normal append of query string
    $URL += '?' + $query;
//  }
//  else  {   // HTML forms
//    $URL += '&' + $query;
//  }
    // debug
//    $msg = 'URL: ' + $URL;
//	  alert ($msg);

	  location = $URL;
	return;
}

