var ie=(document.all)?1:0;
var hide=-1;
var swidth=(screen.width == 800)?661:885;

function Trim(nStr){return nStr.replace(/(\s*$)/g, "");}
function fnSubmit()
	{
	if (Trim(document.frmIndex.txtSearch.value)=="")
		{
	 	alert("Search key should not be blank");
		document.frmIndex.txtSearch.focus();
		return false;
		}
	else
		{
		document.frmIndex.submit();
		}
	}

function  fnopen(sPath)
{
var strUser="Guest";
fnOpenWindowChat(sPath + "chat/chatmain.asp?sPath="+sPath,322,221,strUser,strUser+'_new_main');
}


function fnOpenWindowChat(nURL,nHeight,nWidth,suser,win_name)
{
	try{
	  if(Trim(suser).substr(0,1).match(/^[a-zA-Z]$/) == null) {suser="ChatX"+suser;}
	  var xwindow=eval(suser);
	  xwindow.focus();
	}catch(e){
	  if(Trim(suser).substr(0,1).match(/^[a-zA-Z]$/) == null) {suser="ChatX"+suser;}
	  eval(suser + "=window.open(nURL,win_name,'height='+nHeight+',width='+nWidth+',top='+ (screen.height-nHeight-55) +',left='+(screen.width-nWidth-9)+',resize=no,resizable=no,scrollbars=no,statusbar=1');");
	}
}


function SetTop(srcPath)
{
var str=""
if (srcPath==0)sPath="";
if (srcPath==1)sPath="../";
if (srcPath==2)sPath="../../";
str+="<TABLE WIDTH=100% align=center BORDER=0 CELLPADDING=0 CELLSPACING=0 background='" + sPath + "innerimg/top_bg.gif' height=71 onmouseover='hideall()'>";
str+="<TR><TD width=100%><TABLE WIDTH=100% align=center BORDER=0 CELLPADDING=0 CELLSPACING=0 background=''><tr><Td rowspan=2><a href='"+sPath+"index.asp'><IMG SRC='" + sPath + "innerimg/bharathiaruniversity.gif' WIDTH=330 HEIGHT=62 border=0></a></td><Td rowspan=2><IMG SRC='" + sPath + "innerimg/indian_flag.gif' WIDTH=110 HEIGHT=65 border=0></td><td align=right valign=top colspan=4><IMG SRC='" + sPath + "innerimg/accredited.gif' width=249 height=19 border=0></td><td width=9 rowspan=2><img SRC='" + sPath + "innerimg/spacer.gif' width=9 height=1></td></tr><tr align=right><td align=right width='76' height='42'><a href='"+sPath+"tenders/tenders.asp'><img src='" + sPath + "innerimg/tenders.gif' alt='Tenders' border='0'></a></td><td align=right width='103' height='42'><a href='"+sPath+"recruitment.asp'><img src='" + sPath + "innerimg/recruitment.gif' alt='Recruitment' border='0'></a></td><td width='69' height='42'><a href='"+sPath+"results/index.html'><img src='" + sPath + "innerimg/results.gif' width='69' height='42' alt='Results' border='0'></a></td><td align=right width='138' height='42' ><a href=javascript:fnopen('"+sPath+"');><img src='" + sPath + "innerimg/online_helper.gif' width='138' height='42' alt='Online Helper' border='0'></a></td></tr></table></TD></TR>";
str+="</TABLE>";
document.write(str);

}

// Script to display the side links

function SetMid(srcPath)
{
var str="";
if (srcPath==0)sPath="";
if (srcPath==1)sPath="../";
if (srcPath==2)sPath="../../";

str+="<TABLE WIDTH=119 BORDER=0 CELLPADDING=0 CELLSPACING=0  onmouseover='hideall()'>";
str+="<TR><TD><IMG SRC='" + sPath + "innerimg/buright-top.gif' WIDTH=119 HEIGHT=21 border=0 usemap='#home'></TD></TR>";
str+="<TR><TD height=112 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/departments.gif' WIDTH=119 HEIGHT=92 usemap='#departments_map' border=0></TD></TR>";
str+="<TR><TD height=112 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/as_college.gif' WIDTH=119 HEIGHT=82 usemap='#asc' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/alumni.gif' WIDTH=119 HEIGHT=65  usemap='#alumni_map' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/placement.gif' WIDTH=119 HEIGHT=65  usemap='#placement_map' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/faq.gif' WIDTH=119 HEIGHT=65  usemap='#faq_map' border=0></TD></TR>";
str+="<TR><TD height=102 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/sde.gif' WIDTH=119 HEIGHT=82 usemap='#sde_map' border=0></TD></TR>";
str+="<TR><TD height=102 onmouseover='hideall()' background='" + sPath + "innerimg/searchbg.gif' WIDTH=119 HEIGHT=102 valign=top>";
str+="<form name='frmIndex' method ='post' action='../searchresults.asp' onSubmit='return fnSubmit();'>";
str+="<IMG SRC='" + sPath + "innerimg/spacer.gif' border=0 width=1 height=42>";
str+="	<table cellpadding=1 cellspacing=0 border=0 width=90 align=center>";
str+="	<tr><td>Enter keyword</td></tr>";
str+="	<tr><td><input type='text' name=txtSearch style='width:90px;height:18px;'></td></tr>";
str+="	<tr><td align=right><input type='image' src='" + sPath + "innerimg/go.gif'></td></tr>";
str+="	</table>";
str+="</form>";
str+="</TD></TR>";
str+="</TABLE><br>";
str+="<map name='home'><area shape=rect alt='Home page' coords='47,3,102,21' href='" + sPath + "index.asp'></map>";
str+="<MAP NAME='sde_map'><AREA SHAPE='rect' ALT='School of Distance Education' COORDS='9,1,109,81' HREF='" + sPath + "sde/default.asp'></MAP>";
str+="<MAP NAME='departments_map'><AREA SHAPE='rect' ALT='Department of the University' COORDS='9,1,109,91' HREF='" + sPath + "departments/index.html'></MAP>";
str+="<MAP NAME='asc'><AREA SHAPE='rect' ALT='Academic Staff College' COORDS='9,1,109,91' HREF='http://www.academicstaffcollege.com'></MAP>";
str+="<MAP NAME='faq_map'><AREA SHAPE='rect' ALT='FAQ' COORDS='9,1,109,65' HREF='" + sPath + "faq.asp'></MAP>";
str+="<MAP NAME='alumni_map'><AREA SHAPE='rect' ALT='Alumni' COORDS='9,1,109,65' HREF='" + sPath + "alumni/index.html'></MAP>";
str+="<MAP NAME='placement_map'><AREA SHAPE='rect' ALT='Placement' COORDS='9,1,109,65' HREF='" + sPath + "Placement/index.html'></MAP>";
document.write(str);
}

function SetMidouter(srcPath)
{
var str="";
if (srcPath==0)sPath="";
if (srcPath==1)sPath="../";
if (srcPath==2)sPath="../../";

str+="<TABLE WIDTH=119 BORDER=0 CELLPADDING=0 CELLSPACING=0  onmouseover='hideall()'>";
str+="<TR><TD><IMG SRC='" + sPath + "innerimg/buright-top.gif' WIDTH=119 HEIGHT=21 border=0 usemap='#home'></TD></TR>";
str+="<TR><TD height=112 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/departments.gif' WIDTH=119 HEIGHT=92 usemap='#departments_map' border=0></TD></TR>";
str+="<TR><TD height=112 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/as_college.gif' WIDTH=119 HEIGHT=92 usemap='#asc' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/alumni.gif' WIDTH=119 HEIGHT=65  usemap='#alumni_map' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/placement.gif' WIDTH=119 HEIGHT=65  usemap='#placement_map' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/faq.gif' WIDTH=119 HEIGHT=65  usemap='#faq_map' border=0></TD></TR>";
str+="<TR><TD height=102 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/sde.gif' WIDTH=119 HEIGHT=82 usemap='#sde_map' border=0></TD></TR>";
str+="<TR><TD height=102 onmouseover='hideall()' background='" + sPath + "innerimg/searchbg.gif' WIDTH=119 HEIGHT=102 valign=top>";
str+="<form name='frmIndex' method ='post' action='searchresults.asp' onSubmit='return fnSubmit();'>";
str+="<IMG SRC='" + sPath + "innerimg/spacer.gif' border=0 width=1 height=42>";
str+="	<table cellpadding=1 cellspacing=0 border=0 width=90 align=center>";
str+="	<tr><td>Enter keyword</td></tr>";
str+="	<tr><td><input type='text' name=txtSearch style='width:90px;height:18px;'></td></tr>";
str+="	<tr><td align=right><input type='image' src='" + sPath + "innerimg/go.gif'></td></tr>";
str+="	</table>";
str+="</form>";
str+="</TD></TR>";
str+="</TABLE><br>";
str+="<map name='home'><area shape=rect alt='Home page' coords='47,3,102,21' href='" + sPath + "index.asp'></map>";
str+="<MAP NAME='sde_map'><AREA SHAPE='rect' ALT='School of Distance Education' COORDS='9,1,109,81' HREF='" + sPath + "sde/default.asp'></MAP>";
str+="<MAP NAME='departments_map'><AREA SHAPE='rect' ALT='Department of the University' COORDS='9,1,109,91' HREF='" + sPath + "departments/index.html'></MAP>";
str+="<MAP NAME='asc'><AREA SHAPE='rect' ALT='Academic Staff College' COORDS='9,1,109,91' HREF='http://www.ugcascbu.org'></MAP>";
str+="<MAP NAME='faq_map'><AREA SHAPE='rect' ALT='FAQ' COORDS='9,1,109,65' HREF='" + sPath + "faq.asp'></MAP>";
str+="<MAP NAME='alumni_map'><AREA SHAPE='rect' ALT='Alumni' COORDS='9,1,109,65' HREF='" + sPath + "alumni/index.html'></MAP>";
str+="<MAP NAME='placement_map'><AREA SHAPE='rect' ALT='Placement' COORDS='9,1,109,65' HREF='" + sPath + "Placement/index.html'></MAP>";
document.write(str);
}


function SetMidouter1(srcPath)
{
var str="";
if (srcPath==0)sPath="";
if (srcPath==1)sPath="../";
if (srcPath==2)sPath="../../";

str+="<TABLE WIDTH=119 BORDER=0 CELLPADDING=0 CELLSPACING=0  onmouseover='hideall()'>";
str+="<TR><TD><IMG SRC='" + sPath + "innerimg/buright-top.gif' WIDTH=119 HEIGHT=21 border=0 usemap='#home'></TD></TR>";
str+="<TR><TD height=112 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/departments.gif' WIDTH=119 HEIGHT=92 usemap='#departments_map' border=0></TD></TR>";
str+="<TR><TD height=112 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/as_college.gif' WIDTH=119 HEIGHT=92 usemap='#asc' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/alumni.gif' WIDTH=119 HEIGHT=65  usemap='#alumni_map' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/placement.gif' WIDTH=119 HEIGHT=65  usemap='#placement_map' border=0></TD></TR>";
str+="<TR><TD height=85 valign=bottom  onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/faq.gif' WIDTH=119 HEIGHT=65  usemap='#faq_map' border=0></TD></TR>";
str+="<TR><TD height=102 valign=bottom onmouseover='hideall()'><IMG SRC='" + sPath + "innerimg/sde.gif' WIDTH=119 HEIGHT=82 usemap='#sde_map' border=0></TD></TR>";
str+="<TR><TD height=102 onmouseover='hideall()' background='" + sPath + "innerimg/searchbg.gif' WIDTH=119 HEIGHT=102 valign=top>";
str+="<form name='frmIndex' method ='post' action='../../searchresults.asp' onSubmit='return fnSubmit();'>";
str+="<IMG SRC='" + sPath + "innerimg/spacer.gif' border=0 width=1 height=42>";
str+="	<table cellpadding=1 cellspacing=0 border=0 width=90 align=center>";
str+="	<tr><td>Enter keyword</td></tr>";
str+="	<tr><td><input type='text' name=txtSearch style='width:90px;height:18px;'></td></tr>";
str+="	<tr><td align=right><input type='image' src='" + sPath + "innerimg/go.gif'></td></tr>";
str+="	</table>";
str+="</form>";
str+="</TD></TR>";
str+="</TABLE><br>";
str+="<map name='home'><area shape=rect alt='Home page' coords='47,3,102,21' href='" + sPath + "index.asp'></map>";
str+="<MAP NAME='sde_map'><AREA SHAPE='rect' ALT='School of Distance Education' COORDS='9,1,109,81' HREF='" + sPath + "sde/default.asp'></MAP>";
str+="<MAP NAME='departments_map'><AREA SHAPE='rect' ALT='Department of the University' COORDS='9,1,109,91' HREF='" + sPath + "departments/index.html'></MAP>";
str+="<MAP NAME='asc'><AREA SHAPE='rect' ALT='Academic Staff College' COORDS='9,1,109,91' HREF='http://www.ugcascbu.org'></MAP>";
str+="<MAP NAME='faq_map'><AREA SHAPE='rect' ALT='FAQ' COORDS='9,1,109,65' HREF='" + sPath + "faq.asp'></MAP>";
str+="<MAP NAME='alumni_map'><AREA SHAPE='rect' ALT='Alumni' COORDS='9,1,109,65' HREF='" + sPath + "alumni/index.html'></MAP>";
str+="<MAP NAME='placement_map'><AREA SHAPE='rect' ALT='Placement' COORDS='9,1,109,65' HREF='" + sPath + "Placement/index.html'></MAP>";
document.write(str);
}



function SetBot(srcPath)
{
var str="";
if (srcPath==0)sPath="";
if (srcPath==1)sPath="../";
if (srcPath==2)sPath="../../";
str+="<TR><TD colspan='2' valign='top'>";
str+="<TABLE WIDTH=100% align=center BORDER=0 CELLPADDING=0 CELLSPACING=0>";
str+="<TR><TD WIDTH=100% HEIGHT=118 background='" + sPath + "innerimg/lgray.gif' valign=top>";
str+="<table cellpadding=0 cellspacing=0 border=0 width=100%>";
str+="<tr><td height=31 class='stxt'>&nbsp; &nbsp;<a class='txt' href='" + sPath + "news.asp'>News</a>&nbsp; &nbsp; |&nbsp; &nbsp; <a class='txt' href='" + sPath + "press.html'>Press Releases</a>&nbsp; &nbsp; |&nbsp; &nbsp;<a class='txt' href='" + sPath + "contact.html'>Contact Us</a>&nbsp; &nbsp; |&nbsp; &nbsp; <a class='txt' href='" + sPath + "webmaster.html'>Webmaster</a>&nbsp; &nbsp; |&nbsp; &nbsp; <a class='txt' href='" + sPath + "sitemap.html'>Sitemap</a></td></tr>";
str+="<tr><td background='" + sPath + "innerimg/gray.gif'><img src='" + sPath + "innerimg/gray.gif' width=698 height=1></td></tr>";
str+="</table>";
str+="<table width=100% cellpadding=0 cellspacing=0 border=0>";
str+="<tr><td width=2%>&nbsp;</td><td><img src='" + sPath + "innerimg/bu-small.gif' width=108 height=51></td></tr>";
str+="<tr><td width=2%>&nbsp;</td><td class='bubot'>Coimbatore-641 046. India.<br>Phone: (91) 422-2428100, 2428108, 2428126, 2422335. Fax: (91) 422-2422387.&nbsp; Email: <a href='mailto:regr@buc.edu.in' class='email'>regr@buc.edu.in</a></td></tr>";
str+="</table></TD>";
str+="<TD><IMG SRC='" + sPath + "innerimg/bottom-right.gif' WIDTH=82 HEIGHT=118></TD></TR>";
str+="<TR><TD Colspan=2 align=right background='" + sPath + "innerimg/bottom_bg.gif'>";
str+="<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td class='copy'> &nbsp;&nbsp;&nbsp; Copyright © 2003 Bharathiar University</tD><td align=right><IMG SRC='" + sPath + "innerimg/copyright.gif' WIDTH=475 HEIGHT=29 border=0 usemap='#aes'></td></tr></table></TD></TR>";
str+="</TABLE>";
str+="<map name='aes'><area shape=rect alt='Advance ecom solutions' coords='187,9,310,24' href='http://www.advanceecomsolutions.com' target=aes></map>";
str+="</TD></TR><TR><TD><img src='" + sPath + "innerimg/spacer.gif' width='"+swidth+"' height='1'></TD><TD><img src='" + sPath + "innerimg/spacer.gif' width='119' height='1'></TD></TR>";
document.write(str);
}

function SetBotnew(srcPath)
{
var str="";
if (srcPath==0)sPath="";
if (srcPath==1)sPath="../";
if (srcPath==2)sPath="../../";
str+="<TABLE wIDTH=100% align=center BORDER=0 CELLPADDING=0 CELLSPACING=0>";
str+="<tr><td height=31 class='stxt'>&nbsp; &nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?iType=E'>Education Colleges</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?iType=A'>Arts & Science Colleges</a>&nbsp; &nbsp;| &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?iType=M'>Management Institutions</a></td></tr>";
str+="<tr><td height=31 class='stxt'>&nbsp;&nbsp; <a class='lnk' href='" + sPath + "colleges/affiliated.asp?iType=F'>Air Force Administrative Staff College</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?iType=P'>Physical Education Colleges</a>&nbsp;&nbsp; | &nbsp;&nbsp; <a class='lnk' href='" + sPath + "colleges/affiliated.asp?aType=A'>Autonomous Colleges</a></td></tr>"
str+="<tr><td height=31 class='stxt'>&nbsp; &nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?cType=C'>Co-education Colleges</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?cType=M'>Men's Colleges</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?cType=W'>Women's Colleges</a>&nbsp;&nbsp; | &nbsp; &nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?gType=G'>Government Colleges</a></td></tr>";
str+="<tr><td height=31 class='stxt'>&nbsp; &nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?gType=A'>Aided Colleges</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?gType=S'>Self Finance Colleges</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a class='lnk' href='" + sPath + "colleges/affiliated.asp?iType=R'>Research Institutions</a></td></tr>";
str+="</table>";
document.write(str);
}




function winfaculty(aesbu){
	window.open(aesbu,'_blank','width=420,height=240,status=no,scrollbars=yes,top=260,left=368');
}

function wincalendar(aesbu){
	window.open(aesbu,'_blank','width=510,height=645,status=no,scrollbars=yes,top=20,left=158');
}

