
<!-- hide code
//This script is copyright by Maliyadeva College Computer Club
//designed by Chethiya Abeysinghe

// This is the script file declares required tables for all the menues in this site.

var tClass = 'tableClass';
var mainTableID = 0;
var tableLen = 0;

var firstMenue = Array();

var prevTable = Array();
var prevRow = Array();

var arrID=0;
var arr = Array(
'|Photo Album;photoalbum.htm;',
'|Buildings;photoalbum_buildings.htm;',
'|Main Hall;photoalbum_buildings.htm;',
'Temple;photoalbum_buildings_temple.htm;',
'Other;photoalbum_buildings_other.htm;*',
'Environment;photoalbum_environment.htm;',
'Games & Sports;photoalbum_gamesandsports.htm;',
'General;photoalbum_general.htm;*',
'Downloads;downloads.htm;',
'Competition;competition.htm;',
'Contact Us;contactUs.htm;*',   // end of home menue

'|Beginning Age;history_beginningage.htm;',
'Mid Age;history_midage.htm;',
'Present Age;history_presentage.htm;*', //end of history

'|Achievements;education_achievements.htm;',
'Sections;education_sections.htm;',
'Facilities;education_facilities.htm;*', //end of education

'|Badminton;sports_badminton.htm;',
'Basketball;sports_basketball.htm;',
'Chess;sports_chess.htm;',
'Cricket;sports_cricket.htm;',
'Football;sports_football.htm;',
'Karate;sports_karate.htm;',
'Scrabble;sports_scrabble.htm;',
'Table Tennis;sports_tabletennis.htm;',
'Wrestling;sports_wrestling.htm;*', // end of sports

'|Buddhist Association;clubs_buddhist.htm;',
'Computer Club;clubs_mccc.htm;',
'Media Unit;clubs_media.htm;',
'Photography Association;clubs_photo.htm;',
'Red Cross Society;clubs_redcross.htm;',
'Science Society;clubs_science.htm;',
'UNESCO Society;clubs_unesco.htm;*', //end of clubs

'|Cadetting;activities_cadeting.htm;',
'Cadet Band;activities_cadet_band.htm;', 
'Dramas;activities_dramas.htm;',
'Scouting;activities_scouting.htm;',
'Western Band;activities_western_band.htm;*', //end of activities

'|;;*'
//'|Kurunegala City;kurunegalaCity.htm;',
//'Other Schools;otherSchools.htm;*'
);

function rec(lastTable, lastRow, cs){
var curTable = ++tableLen;
var curRow = 0;

var cmd = '';
var tempCmd = '';
var TiRi='';

var caption=''; 
var curlink='';

//init;
	prevTable[curTable] = lastTable; 
	prevRow[curTable] = lastRow;
	
	cmd = '<table ID="table' + curTable + '" cellSpacing="0" class="' + tClass + '" ';
        cmd += 'style="position:absolute; top:-10000px; left:200px; width:150px;" '; //250
	cmd += 'onMouseOver="showMenues(' + curTable + '); return true;" ';
	cmd += 'onMouseOut="deleteAll(); return true;">'; 
	
	while (true) {
		if (arr[arrID].charAt(0) == '|'){
			arr[arrID] = arr[arrID].substring(1, arr[arrID].length);
			rec(curTable, curRow, cs+1); 
		}
		else{
			if (arr[arrID].charAt(0) == '*'){
				arrID++; break;
			}
			var c=0;
			while (arr[arrID].charAt(c) != ';') c++
			caption = arr[arrID].substring(0, c);
			var beg=c+1; c=arr[arrID].length-1;
			while (arr[arrID].charAt(c) != ';') c--;
			curlink = arr[arrID].substring(beg, c);
			
			curRow++;
			TiRi = 'T' + curTable + 'R' + curRow;

			tempCmd = '<tr ID="' + TiRi + '" ';
			//tempCmd += 'href="' + curlink + '" ';
			
			TiRi = '\'' + TiRi + '\'';
			tempCmd += 'onMouseOver="darkRow(' + TiRi + '); ';
			if ((arr[arrID].charAt(arr[arrID].length-1) != '*') && (arrID < arr.length-1) && (arr[arrID+1].charAt(0) == '|'))
				tempCmd += 'showMenues(' + (tableLen+1) + '); used[usedLen+1] = ' + (tableLen+1) + '; ';
			tempCmd += 'return true;" ';
			tempCmd += 'OnMouseOut="deleteAll(); showMenues(' + curTable + '); brightRow(' + TiRi + '); return true;">';

			tempCmd += '<td style="height:25px;"><a class="tableLink" href="' + curlink + '">' + caption + '</a></td></tr>';
			cmd += tempCmd;
			
			arrID++;
			if (arr[arrID-1].charAt(arr[arrID-1].length-1) == '*') break; 
		}		
	}
	cmd += '</table>';
	document.write(cmd);
	document.all['table'+curTable].style.zIndex = cs;
}

firstMenue[0] = 0;
while (arrID < arr.length){
	arr[arrID] = arr[arrID].substring(1, arr[arrID].length);
	mainTableID--;
	firstMenue[mainTableID*-1] = tableLen+1;
	
	rec(mainTableID, 0, 1);
}

//-->
