// JavaScript Document
//start--------------------------------------------------------------------------------------
var item = new Array();

/* Here is where all the magic happens.  
    Just enter as many additional pages that
    that you want to search, then fill in the
    additional listings for each page.
*/

// "Page Name","path","Page Title","Many,Key,Words","Descriptive Comments"

c=0; item[c]=new Array("Index.html","../","Home :: Sri Lanka Institute of Information Technology","sliit , sri , lanka , institute , information , technology , bsc, bsc 7th intake","Sri Lanka Institute of Information Technology (SLIIT) is the leading degree awarding institute in Sri Lanka in the field of Information Technology, recognized by the University Grants Commission under the Universities Act. ");
c++; item[c]=new Array("AboutUs.htm","../SLIIT_Related/","SLIIT :: Vision Mission Objectives","vision , mision , objectives , goals , sri lanka, sliit","Our Vision, Objectives and Goals. Enhance the IT Education & Industry in Sri Lanka");
c++; item[c]=new Array("Campuses.html","../Campuses/","SLIIT :: Where We Are","campus, malabe,kollupitiya,matara,kandy, malabe kampus,metro,metropolitan, metro campus, kandy center,","Sri Lanka Institute of Information Technology (sliit) located in Malabe,Kollupitiya,Matara and Kandy");
c++; item[c]=new Array("Malabe_Campus.htm","../Campuses/","SLIIT :: Malabe Campus","campus, malabe , location , located , lab, library, courses, undergraduate, bsc, bsc it, bsc is, bsc cn , computer, networks, information systems, systems, computer networks, computer systems","The Malabe Campus of the SLIIT is situated on a 25 acre site in a serene environment in Malabe overlooking the central hills of the country.");
c++; item[c]=new Array("Metro_Campus.htm","../Campuses/","SLIIT :: Metropolitan Campus","metro , metropolitan , bsc , msc , msc it , msc im , msc is , bsc it , bsc is , bsc cn, ccna , cisco , microsoft , linux , linux administration , web development , bsc curtin , postgraduate , programmes , undergraduate , m.sc , b.sc ","The Metropolitan Campus of the SLIIT is located at the BoC Merchant Tower at Kollupitiya, Colombo 03. This building is centrally located and is very close to the Kollupitiya Junction with readily available public transport service to all directions.");
c++; item[c]=new Array("Matara_Campus.htm","../Campuses/","SLIIT :: Matara Campus","matara , bsc , undergraduate   ","The Southern Centre of the SLIIT was inaugurated on October 2004 at Broadway, Matara Town. This centre will accommodates 75 students for the first year of the Degree/Diploma programme in IT and other short term programmes.");
c++; item[c]=new Array("Kandy_Campus.htm","../Campuses/","SLIIT :: Kandy Campus"," kandy , bsc , undergraduate   ","The Kandy Centre of the SLIIT was established in January 2002 in collaboration with East West Information Systems Ltd to admit 100 students for the first year of the study programme.");
c++; item[c]=new Array("Affliations.htm","../Campuses/","SLIIT :: Affiliations"," curtin , australia , uppsala, rmit , deakin , sheffield hallam , shefield , hallam , bsc , bsc it  ","SLIIT Global Partners");
c++; item[c]=new Array("Industry.htm","../SLIIT_Related/","SLIIT :: Industry Partnerships"," cisco , network academy, microsoft, ibm , ibm ace , mcp, mcsd , mcse , mcsa ","The SLIIT has strong links with IT industry in Sri Lanka and abroad. World leaders in IT such as CISCO and IBM have established partnerships with SLIIT in conducting world renowned training programmes at the SLIIT. ");
c++; item[c]=new Array("Board_of_Directors.htm","../Staff/","SLIIT :: Board of Directors"," professor , lalith , gamage , lalith gamage , s.karunaratne , karunaratne , board of directors , board , directors , ","SLIIT Board if Directors ");
c++; item[c]=new Array("Sports.htm","../SLIIT_Related/","SLIIT :: Sports Cubs Societies"," sports , clubs , societies  ","Sports, Clubs and  Societies are an important part  of student life, providing a social  environment  for students  who share similar interests. Clubs also  provide the perfect opportunity to meet  people, gain  skills  and  experience  new  and  exciting  opportunities. ");
c++; item[c]=new Array("CG_Main.htm","../Career_Guidence/","SLIIT :: Career Guidance"," jobs , career , guidance , career guidance , cv formats , sample cv  ","Career Guidance Unit of the SLIIT ");
c++; item[c]=new Array("Malabe_Academics.htm","../Staff/","SLIIT ::  Academic Staff Malabe"," koliya , koliya pulasinghe , malitha , malitha wijesundara , nuwan , nuwan kodagoda , lakshman , lakshman fernando , jayantha , jayantha amararachchi , jinnah , kanagasabhapathy , prathayinee , roshan , roshan chandraguptha , pradeepa , pradeepa samarasinghe , medha , medha alwis , arundathie , arundathie abeysinghe , lakmal , lakmal rupasinghe , aruna , dilshan , dilshan de silva , kamal , kamal siriwardene , manel , sathya , sathya wijekoon, John, john n.l.f fernando, fernando, john fernando ","Academic Staff of the Malabe Campus");
c++; item[c]=new Array("Matara_Academics.htm","../Staff/","SLIIT ::  Academic Staff Matara Campus"," upasena , liyanage , sampath , anditharathna ","Academic Staff of the Matara Campus");
c++; item[c]=new Array("BSc_Overview.htm","../BSC/","SLIIT ::  BSc Degree Programme"," bsc , bsc (hons) , special , bsc it , bsc is , degree path , curtin university , curtin , apply , apply now , bsc. in information technology , bsc. in information systems ","B.Sc Special Honours Degree programme is of 4 years' duration with two semesters per year. Each semester consists of a number of courses carrying a total of 16-20 credits.");
c++; item[c]=new Array("Apply_Now.htm","../BSC/","SLIIT ::  BSc Degree Programme - application"," bsc , bsc (hons) , special , bsc it , bsc is , degree path , curtin university , curtin , apply , apply now , bsc. in information technology , bsc. in information systems ","B.Sc Special Honours Degree programme is of 4 years' duration with two semesters per year. Each semester consists of a number of courses carrying a total of 16-20 credits.");
c++; item[c]=new Array("Postgraduate.htm","../BSC/","SLIIT ::  MSc Degree Programme"," msc , msc in it , it , im , is , msc is , msc it , msc im ","The Sri Lanka Institute of Information Technology offers planned and targeted Masters' Programmes to meet demands in the Information Technology (IT) industry.");
c++; item[c]=new Array("BSc_IT.htm","../BSC/","SLIIT ::  BSc in Information Technology"," bsc in it, it , bsc , bsc in information technology , information , technology  ","The degree programme specializing in Information Technology covers the more technological and applied aspects of computing including Programming, Software Design, Networking, Graphics and Systems Programming.");

//c++; item[c]=new Array("BSc_Curtin.htm","BSC/","BSc in Information Technology (Curtin)","BSc, IT, Curtin","The degree programme specializing in Computer Systems and Networking is for those whose interests are in distributed computing environments, computer communications and networking incorporating Local Area Networks (LANs), Metropolitan Area Networks (MANs) and Wide Area Networks (WANs) together with network management.");





page="<html><head><LINK href='Styles/MainStyle.css' type=text/css rel=stylesheet><title>Search Results</title></head><body>  <table width='800'  border='0' align='center'>  <tr><td><div align='center'><img src='../Images/Background1.jpg' width='800' height='155'></div></td> </tr></table><center><table border=0 cellspacing=10 width=80%>";

//toLowerCase().
function search(frm) {
win = window.open("","","scrollbars");
win.document.write(page);
txt = frm.srchval.value.split(" ");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++) {
fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if (item[i][order[j]].indexOf(txt[k]) > -1 && txt[k] != "")
fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++) {
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)
if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w] = 0;
}
win.document.write("</table><br>Total found: "+total+"<br></body></html>");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0]; 
line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a> Score: "+num+"<br>";
line += item[which][4] + "<br>"+link+"</td></tr>";
wind.document.write("<p class='styleDarkAshNormal'" +line + "</p>");
return 1;
}

//end-----------------------------------------------------------------------------------------
//---------------------Mail Start---------------------------------------------------
function mailsome1(){
who=prompt("Enter recipient's email address: ","antispammer@earthling.net");
what=this.document.title;
if (confirm("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true){
parent.location.href='mailto:'+who+'?subject='+what+'';
   }
}
//------------------mail End-----------------------------------------------------------------

//-------------Print this page----------------------------------------------------
function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}
//---------------------------end print-----------------------------------------



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//-----------------New Window---------------------------------------------------------------------------------
function popupWin() {
text =  "<html>\n<head>\n<title>Pop Window</title>\n<body>\n";
text += "<center>\n<br>";
text += "<a href='http://javascript.internet.com/new' target='_blank'><h2>New JavaScripts</h2></a>";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text)', 3000); 		// delay 3 seconds before opening
}
function windowProp(text) {
newWindow = window.open('','','width=300,height=100');
newWindow.document.write(text);
setTimeout('closeWin(newWindow)', 5000);	// delay 5 seconds before closing
}
function closeWin(newWindow) {
newWindow.close();				// close small window and depart
}
/*
//--------------------------------Logo Animator------------------------------------------------------------------
if (document.all) {
//Things you can alter
yourLogo = "Sri Lanka Institute of Information Technology   SLIIT   ";  //Not less than 2 letters!
logoFont = "Verdana, Arial, Helvetica, sans-serif";
logoColor = "FF6600";
//Nothing needs altering below!
yourLogo = yourLogo.split('');
L = yourLogo.length; 
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;font-weight: bold;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop; 
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
//---------------------------------------------------------------------------------------------------------------------------
*/
//-----------------Validating NewUserSTP1.html in career guidence
valid=true;
function validate(Form){
if(Form.ID.value==""){

alert("Enter The ID Correctly");
valid= false;
}

else if(Form.password.value==""){
alert("Password Field Cannot Be Blank");
valid= false;
}
else if(Form.repassword.value==""){
alert("Re-Enter Password Field Cannot Be Blank");
valid= false;
}

else if(Form.repassword.value!=Form.password.value){
alert("Password and Re-Enter Passwords Are Not Equal");
Form.repassword.value="";
valid= false;
}else{
valid=true;
}

return valid;

}


//-------------------------------------------------------------------------------

//------------------Validate STudentSTP2-----------------------------------------
function validateSTP2(Form){
valid=true;
	if(Form.FieldStudy.value==''){
		alert("Enter The Field Of Studies Correctly");
		valid=false;
	}
	else if(Form.FullNameField.value==''){
		alert('Enter The Full Name Correctly');
		valid=false;
	}
	else if(Form.FirstNameField.value==''){
		alert('Enter The First Name Correctly');
		valid=false;
	}
	else if(Form.LastNameField.value==''){
		alert('Enter The First Name Correctly');
		valid=false;
	}
	else if(Form.YearField.value==''){
		alert("Enter The Birth Year Correctly");
		valid=false;
	}
	else if(Form.GenderField.value==''){
		alert('Enter The Gender Correctly');
		valid=false;
	}
	else if(Form.AddressField.value==''){
		alert('Enter The Address Correctly1');
		valid=false;
	}
	else if(Form.DegreeField.value==''){
		alert('Enter The Degree Of Study Correctly');
		valid=false;
	}
	else if(Form.SchoolField.value==''){
		Form.SchoolField.value="-";
	}
	
	
	return valid;
}
//--------------------------------------------------------------------------------

function validateCG(Form){
valid=true;
	if(Form.FieldStudy.value==''){
		alert("Enter The Field Of Studies Correctly");
		valid=false;
	}
	else if(Form.FullNameField.value==''){
		alert('Enter The Full Name Correctly');
		valid=false;
	}
	else if(Form.FirstNameField.value==''){
		alert('Enter The First Name Correctly');
		valid=false;
	}
	else if(Form.LastNameField.value==''){
		alert('Enter The First Name Correctly');
		valid=false;
	}
	else if(Form.YearField.value==''){
		alert("Enter The Birth Year Correctly");
		valid=false;
	}
	else if(Form.GenderField.value==''){
		alert('Enter The Gender Correctly');
		valid=false;
	}
	else if(Form.AddressField.value==''){
		alert('Enter The Address Correctly1');
		valid=false;
	}
	else if(Form.DegreeField.value==''){
		alert('Enter The Degree Of Study Correctly');
		valid=false;
	}
	else if(Form.SchoolField.value==''){
		Form.SchoolField.value="-";
	}
	
	
	return valid;
}

//-----------------------Seat Reservation validation -------
function validateSeat(Form){
valid=true;
	if(Form.FirstName.value==''){
		alert("Enter Your First Name..... Blank Field Found");
		Form.FirstName.focus();
		valid=false;
	}
	else if(Form.LastName.value==''){
		alert('Enter Your Last Name..... Blank Field Found');
		Form.LastName.focus();
		valid=false;
	}
	else if(Form.Contact.value==''){
		alert('Enter Your Contact Phone Number..... Blank Field Found');
		Form.Contact.focus();
		valid=false;
	}
	else if(-1 == Form.email.value.indexOf("@")) { 
       Form.email.focus(); 
       alert("Your email must have a '@'."); 
       valid=false;
       }
	   else if( 0 == Form.email.value.indexOf("@")) { 
       Form.email.focus(); 
       alert("Your email cannot start with a '@'."); 
       valid=false;
       }
   else if(-1 != Form.email.value.indexOf(",")) { 
       Form.email.focus(); 
       alert("Your email must not have a ',' in it"); 
       valid=false; 
       }
    else if(-1 != Form.email.value.indexOf("#")) { 
       Form.email.focus(); 
       alert("Your email must not have an '#' in it." ); 
       valid=false;
       }
    else if(-1 != Form.email.value.indexOf("!")) { 
       Form.email.focus(); 
       alert("Your email must not have a '!' in it." ); 
       valid=false;
       }
    else if(-1 != Form.email.value.indexOf(" ")) { 
       Form.email.focus(); 
       alert("Your email must not have a space in it." ); 
       valid=false;
       }
    else if(Form.email.value.length == (Form.email.value.indexOf("@")+1) ) {
       Form.email.focus();
       alert("Your email must have a domain name after the '@'.");
       valid=false;
       }

    else if(Form.email.value.length == 0) { 
      Form.email.focus(); 
      alert("Please enter your email."); 
      valid=false;
      }


	
	
	return valid;
}