var myFilterFunc = function(dataSet, row, rowNumber)
{
	document.formname.selectname2[0].selected = true;
	document.formname.selectname3[0].selected = true;
	document.formname.selectname4[0].selected = true;
	expression = new
RegExp(document.formname.selectname[document.formname.selectname.selectedIndex].value);
if (row["code"].search(expression) != -1)
	return row;                     // Return the row to keep it in the data set.
	return null;                    // Return null to remove the row from the data set.
	
}

var myFilterFunc2 = function(dataSet, row, rowNumber)
{
	document.formname.selectname[0].selected = true;
	document.formname.selectname3[0].selected = true;
	document.formname.selectname4[0].selected = true;
	expression2 = new
RegExp(document.formname.selectname2[document.formname.selectname2.selectedIndex].value);
if (row["location"].search(expression2) != -1)
	return row;                     // Return the row to keep it in the data set.
	return null;                    // Return null to remove the row from the data set.
	
}

var myFilterFunc3 = function(dataSet, row, rowNumber)

	{
	document.formname.selectname[0].selected = true;
	document.formname.selectname2[0].selected = true;
	document.formname.selectname4[0].selected = true;
expression3 = new
RegExp(document.formname.selectname3[document.formname.selectname3.selectedIndex].value);
if (row["method"].search(expression3) != -1)
	return row;                     // Return the row to keep it in the data set.
	return null;                    // Return null to remove the row from the data set.
	
}

var myFilterFunc4 = function(dataSet, row, rowNumber)

	{
	document.formname.selectname[0].selected = true;
	document.formname.selectname2[0].selected = true;
	document.formname.selectname3[0].selected = true;
expression4 = new
RegExp(document.formname.selectname4[document.formname.selectname4.selectedIndex].value);
if (row["session"].search(expression4) != -1)
	return row;                     // Return the row to keep it in the data set.
	return null;                    // Return null to remove the row from the data set.
	
}



function checkSeats(region, search){
    var seats = search('{totalseats}');
    return seats >= 0 ? 'classfull' : ''
}


function checkMethodRow(region, search){
    var methodrow = search('{method}');

   	if (methodrow=='WEB')
	  {return 'onlinerow'}
	
	if (methodrow=='HYB' || methodrow=='HYBX')
		{return 'hybrow'}
		
	if (methodrow=='VDC')
		{return 'videorow'}
		
	if (methodrow=='TWY' || methodrow=='TWA')
		{return 'distrow'}
		
	if (methodrow=='TWYX' || methodrow=='TWAX')
		{return 'disthybrow'}
}

function checkMethodPrint(region, search){
    var methodrow = search('{method}');

   	if (methodrow=='WEB')
	  {return '<span class="printinfo bold"> - ONLINE</span>'}
	
	if (methodrow=='HYB' || methodrow=='HYBX')
		{return '<span class="printinfo bold"> - HYBRID</span>'}
		
	if (methodrow=='VDC')
		{return '<span class="printinfo bold"> - VIDEO</span>'}
		
	if (methodrow=='TWY' || methodrow=='TWA')
		{return '<span class="printinfo bold"> - DISTANCE</span>'}
		
	if (methodrow=='TWYX' || methodrow=='TWAX')
		{return '<span class="printinfo bold"> - DISTANCE/HYBRID</span>'}
}



function changecourse(){  		
	var userInput = document.getElementById(document.formname.selectname.value).title;
	document.getElementById('pagetitle').innerHTML = userInput;
	document.getElementById('nocoursetitle').innerHTML = userInput;
}
	
function changelocation(){  		
	var userInput = document.getElementById(document.formname.selectname2.value).title;
	document.getElementById('pagetitle').innerHTML = userInput;
	document.getElementById('nocoursetitle').innerHTML = userInput;
}

function changemethod(){  		
	var userInput = document.getElementById(document.formname.selectname3.value).title;
	document.getElementById('pagetitle').innerHTML = userInput;
	document.getElementById('nocoursetitle').innerHTML = userInput;
}

function changesession(){  		
	var userInput = document.getElementById(document.formname.selectname4.value).title;
	document.getElementById('pagetitle').innerHTML = userInput;
	document.getElementById('nocoursetitle').innerHTML = userInput;
}



/* getElementByClass
/**********************/

var allHTMLTags = new Array();

function getElementByClass(theClass) {

//Create Array of All HTML Tags
var allHTMLTags=document.getElementsByTagName("td");

//Loop through all tags using a for loop
for (i=0; i<allHTMLTags.length; i++) {

//Get all tags with the specified class name.
if (allHTMLTags[i].className==theClass) {

//Place any code you want to apply to all
//pages with the class specified.
//In this example is to “display:none;” them
//Making them all disappear on the page.

allHTMLTags[i].style.display='none';

}
}
}