﻿function clearField(aControl) {
  aControl.className = "user";
  aControl.value = "";
}

function goFind(aString) {
  qry = "http://www.google.co.uk/search?q=";
  qry += "site%3Awww.dyalog.com+";
  window.location = qry + aString;
  return false; // prevents submitting form to server
}

///////////////////////////////////////////////////////////////////////////////
// eduapprove.php /////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

function hilite(thatid,aclass)	// aclass is [accept|reject]
{// handles text highlighting from radio buttons in table
	if (aclass=='accept') {var clr = '#090'}
	else									{var clr = '#999'}
	document.getElementById(thatid).style.color = clr;
}

function showdetails(thisrow)
{// highlights table rows and corresponding application details
	var appid = thisrow.id.substr(1);						// fpath
	var tbl 	= thisrow.parentNode;
	// highlight the table row
	var rws = tbl.getElementsByTagName('tr');
	for (i=1; i<rws.length; i++)
	{
		var rid = rws[i].id;
		if (rid.match('x'+appid)) {
			// assumes no other style settings required on rows
			rws[i].style.background = '#FFD';				// highlight row
		} else {
			rws[i].style.background = 'none';				// mute row
		}
	}
	// reveal the corresponding comment; hide others
	var plug 	= document.getElementById('PLUG');
	var items = plug.getElementsByTagName('p');
	for (i=0; i<items.length; i++)
	{
		var pid = items[i].id;
		if (pid.match('p'+appid)) {
			items[i].style.display 		= "block";
		} else {
			items[i].style.display 		= "none";
		}
	}
}
///////////////////////////////////////////////////////////////////////////////

