// JavaScript Document
function Trim(nStr){return nStr.replace(/(^\s*)|(\s*$)/g,"");}

function fnTophome()
{
	var str="";
	str+="<tr>";
	str+="<td width='370'>";
	str+="<div style='padding-top:15px; padding-left:20px; padding-bottom:5px;'><img src='images/logo_jsb1.jpg' width='83' height='69' border='0' alt='Jansons School of Business'></div>";	
	str+="</td>";
	str+="<td width='626' align='right' valign='middle' colspan='2'><img src='images/logo_jsb2.gif' width='387' height='16' border='0' alt='Jansons School of Business'> &nbsp;</td>";
	str+="</tr>";
	str+="<tr>";
	str+="<td align='right'><img src='images/topmenu_left.gif' width='7' height='32' border='0'></td>";
	str+="<td width='619' bgcolor='#82206C'>&nbsp; &nbsp; &nbsp;<a href='index.asp' class='topmenu'>Home</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='aboutus.html' class='topmenu'>About Us</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='infrastructure.html' class='topmenu'>Infrastructure</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='academic.html' class='topmenu'>Academic</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='facultyall.asp' class='topmenu'>Faculty</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='centres_of_excellence.html' class='topmenu'>Centres of Excellence</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='contactus.html' class='topmenu'>Contact Us</a></td>";
	str+="<td width='7'><img src='images/topmenu_right.gif' width='7' height='32' border='0'></td>";
	str+="</tr>";
	document.write(str);
	}


function fnTop(usr)
{
	var str="";
	str+="<tr>";
	str+="<td width='370'>";
	str+="<div style='padding-top:15px; padding-left:20px; padding-bottom:5px;'><img src='images/logo_jsb1.jpg' width='83' height='69' border='0' alt='Jansons School of Business'></div>";	
	str+="</td>";
	str+="<td width='626' align='right' valign='middle'><img src='images/logo_jsb2.gif' width='387' height='16' border='0' alt='Jansons School of Business'> &nbsp;</td>";
	str+="</tr>";
	str+="<tr>";
	str+="<td colspan='2' align='right'><table cellpadding='0' cellspacing='0' border='0'><tr><td><img src='images/topmenu_left.gif' width='7' height='32' border='0'></td>";
	if (usr=="")
	{
		str+="<td width='830' bgcolor='#82206C' align='left'>&nbsp; &nbsp; &nbsp;<a href='../index.asp' class='topmenu'>Home</a> &nbsp; &nbsp; &nbsp;<a href='alumni_index.asp' class='topmenu'>Alumni Home</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='alumni_directory.asp' class='topmenu'>Alumni Directory</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='view_profile.asp' class='topmenu'>Profile</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='careerservices.asp' class='topmenu'>Career Services</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='msgboard.asp' class='topmenu'>Message Board</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='gallery.asp' class='topmenu'>Gallery</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='events.asp' class='topmenu'>Events</a>&nbsp; &nbsp; &nbsp; &nbsp;<a href='contactus.asp' class='topmenu'>Contact Us</a>&nbsp; &nbsp; &nbsp; &nbsp;<a href='register.asp' class='topmenu'>Register</a></td>";
	}
	else
	{
		str+="<td width='760' bgcolor='#82206C' align='left'>&nbsp; &nbsp; &nbsp;<a href='../index.asp' class='topmenu'>Home</a>  &nbsp; &nbsp; &nbsp;<a href='alumni_index.asp' class='topmenu'>Alumni Home</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='alumni_directory.asp' class='topmenu'>Alumni Directory</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='view_profile.asp' class='topmenu'>Profile</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='careerservices.asp' class='topmenu'>Career Services</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='msgboard.asp' class='topmenu'>Message Board</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='gallery.asp' class='topmenu'>Gallery</a> &nbsp; &nbsp; &nbsp; &nbsp;<a href='events.asp' class='topmenu'>Events</a>&nbsp; &nbsp; &nbsp; &nbsp;<a href='contactus.asp' class='topmenu'>Contact Us</a>";	
	}
	str+="<td><img src='images/topmenu_right.gif' width='7' height='32' border='0'></td>";
	str+="</tr></table></td></tr>";
	document.write(str);

	}
	
	

	
function fnadmission_right()
{
	var str="";
	str+="&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href='academic_mba_selection.html' class='topmenu'>Admission</a>&nbsp; &nbsp; | &nbsp; &nbsp;<a href='convocation.html' class='topmenu'>Convocation</a>";
	document.write(str);
	}
	
function fnaboutus()
{
	var str="";
	str+="<ul>";	
	str+="<li><u class='tdpink'><a href='aboutus.html' class='innerright'>About JSB</a></u></li>";
	str+="<li><u class='tdpink'><a href='aboutus_foundation.html' class='innerright'>Jansons Foundation</a></u></li>";
	str+="<li><u class='tdpink'><a href='aboutus_vision.html' class='innerright'>Vision & Mission</a></u></li>";
	str+="<li><u class='tdpink'><a href='aboutus_chairman.html' class='innerright'>Chairman's Message</a></u></li>";
	str+="<li><u class='tdpink'><a href='aboutus_director.html' class='innerright'>Director's Message</a></u></li>";
	str+="<li><u class='tdpink'><a href='aboutus_advisory.html' class='innerright'>Advisory Board - JSB Governing Council</a></u></li>";
	str+="</ul>";
	document.write(str);

	}
	
function fninfra()
{
	var str="";
	str+="<ul>";	
	str+="<li><u class='tdpink'><a href='infrastructure.html' class='innerright'>Birds eye View</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_academic_lecture.html' class='innerright'>Academic Block</a></u>";
	str+="<div id='sub'><ul>";
	str+="<li><u class='tdpink'><a href='infrastructure_academic_lecture.html' class='innerright'>Lecture Halls</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_academic_elective.html' class='innerright'>Elective Class Rooms</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_academic_syndicate.html' class='innerright'>Syndicate & Board Rooms</a></u></li>";
	//str+="<li><u class='tdpink'><a href='infrastructure_academic_seminar.html' class='innerright'>Seminar Halls</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_academic_computer.html' class='innerright'>Computer Centre</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_academic_library.html' class='innerright'>Library & Information Centre</a></u></li>";
	str+="</ul></div></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_housing_food.html' class='innerright'>Housing Facilities</a></u>";
	str+="<div id='sub'><ul>";
	str+="<li><u class='tdpink'><a href='infrastructure_housing_food.html' class='innerright'>Food Court</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_housing_hostel.html' class='innerright'>Hostel</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_housing_fitness.html' class='innerright'>Fitness Centre - Yoga, Gym</a></u></li>";
	str+="<li><u class='tdpink'><a href='infrastructure_housing_sports.html' class='innerright'>Sports & Games - Table Tennis, Tennis Court, Shuttle Court</a></u></li>";
	str+="</ul></div></li>";
	str+="</ul>";
	document.write(str);

	}

function fnacademic()
{
	var str="";
	str+="<ul>";	
	str+="<li><u class='tdpink'><a href='academic.html' class='innerright'>Programme</a></u>";
	str+="<ul><li><u class='tdpink'><a href='academic_curriculum.html' class='innerright'>Master of Business Administration</a></u>";
	str+="<div id='sub'><ul>";
	str+="<li><u class='tdpink'><a href='academic_curriculum.html' class='innerright'>Curriculum Structure</a></u></li>";
	str+="<li><u class='tdpink'><a href='academic_admin.html' class='innerright'>Curriculum Administration</a></u></li>";
	str+="<li><u class='tdpink'><a href='academic_mba_eligibility.html' class='innerright'>Eligibility</a></u></li>";
	str+="<li><u class='tdpink'><a href='academic_mba_selection.html' class='innerright'>Selection Process</a></u></li>";
	//str+="<li><u class='tdpink'><a href='academic_scholarships.html' class='innerright'>Scholarships</a></u></li>";
	str+="</ul></div></li>";
	str+="<li><u class='tdpink'><a href='academic_phd_eligibility.html' class='innerright'>Ph.D in Management</a></u>";
	str+="<div id='sub'><ul>";
	str+="<li><u class='tdpink'><a href='academic_phd_eligibility.html' class='innerright'>Eligibility</a></u></li>";
	str+="<li><u class='tdpink'><a href='academic_phd_selection.html' class='innerright'>Selection Process</a></u></li>";
	str+="</ul></div></li></ul></li>";
	str+="<li><u class='tdpink'><a href='academic_online_mba1.asp' class='innerright'>Online Time Table</a></u>";
	str+="<ul><li><u class='tdpink'><a href='academic_online_mba1.asp' class='innerright'>2008 Time Table</a></u></li><li><u class='tdpink'><a href='academic_online_mba2.asp' class='innerright'>2009 Time Table</a></u></li></ul>";
	str+="</li>";
	str+="</ul>";
	document.write(str);

	}


function fnfaculty()
{
	var str="";
	str+="<ul>";
	str+="<li><u class='tdpink'><a href='facultyall.asp' class='innerright'>Core Faculty</a></u></li>";
	str+="<li><u class='tdpink'><a href='faculty_visiting.asp' class='innerright'>Visiting Faculty</a></u></li>";
	str+="<li><u class='tdpink'><a href='onlinenotes.asp' class='innerright'>Online Notes</a></u></li>";
	str+="</ul>";
	document.write(str);

	}
	
	
function fncontact()
{
	var str="";
	str+="<ul>";	
	str+="<li><u class='tdpink'><a href='contactus.html' class='innerright'>Our Location</a></u></li>";
	str+="<li><u class='tdpink'><a href='contactus_coimbatore.html' class='innerright'>About Coimbatore</a></u></li>";
	str+="<li><u class='tdpink'><a href='contactus_enquiry.asp' class='innerright'>Enquiry / Comments</a></u></li>";
	str+="</ul>";
	document.write(str);

	}


function fnBottomhome(no)
{
	var str="";
	str+="<div style='float:left;'>&nbsp; <a href='aboutus.html' class='blinks'>About Us</a> &nbsp;|&nbsp;  <a href='infrastructure.html' class='blinks'>Infrastructure</a>  &nbsp;|&nbsp;  <a href='academic.html' class='blinks'>Academic</a>  &nbsp;|&nbsp;  <a href='faculty.html' class='blinks'>Faculty</a>   &nbsp;|&nbsp;  <a href='centres_of_excellence.html' class='blinks'>Centres of Excellence</a>  &nbsp;|&nbsp;  <a href='contactus.html' class='blinks'>Contact Us</a><br>&nbsp; <b class='copyright2'>No of Viewers : "+no+"</b></div>";
	str+="<div style='float:left; padding-left:160px;'><font class='copyright'>Copyright © 2007 Jansons School of Business &nbsp; | &nbsp; Powered by <a href='http://www.dezignwhizgroups.com' class='dwg' target='_blank'>Dezign Whiz Groups</a></font></div>";
	document.write(str);
	}
function fnBottom()
{
	var str="";
	str+="<div style='float:left;'>&nbsp; <a href='aboutus.html' class='blinks'>About Us</a> &nbsp;|&nbsp;  <a href='infrastructure.html' class='blinks'>Infrastructure</a>  &nbsp;|&nbsp;  <a href='academic.html' class='blinks'>Academic</a>  &nbsp;|&nbsp;  <a href='faculty.html' class='blinks'>Faculty</a>   &nbsp;|&nbsp;  <a href='centres_of_excellence.html' class='blinks'>Centres of Excellence</a>  &nbsp;|&nbsp;  <a href='contactus.html' class='blinks'>Contact Us</a></div>";
	str+="<div style='float:left; padding-left:160px;'><font class='copyright'>Copyright © 2008 Jansons School of Business &nbsp; | &nbsp; Powered by <a href='http://www.dezignwhizgroups.com' class='dwg' target='_blank'>Dezign Whiz Groups</a></font></div>";
	document.write(str);
	}

function fnValidNews()
{
		if(Trim(document.thisFormNewsLetter.txtNewsEmail.value)=='')
				{
				alert("Please enter the Email Address");
				document.thisFormNewsLetter.txtNewsEmail.focus();
				return false;
				}
				
		var exp=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
		if (!exp.test(document.thisFormNewsLetter.txtNewsEmail.value))
			{
				alert("Plese enter valid Email Address");
				document.thisFormNewsLetter.txtNewsEmail.focus();
				return false;
			}
		window.open("subscribers.asp?mode=save&txtEmail="+document.thisFormNewsLetter.txtNewsEmail.value,"","width=300px, height=200px, top=200,left=200, resizable=no, toolbar=no, menubar=no, location=no, scrollbar=no");

	}	

	function fnValidNews1()
	{
			if(Trim(document.thisFormNewsLetter.txtNewsEmail.value)=='')
					{
					alert("Plese enter Email Address");
					document.thisFormNewsLetter.txtNewsEmail.focus();
					return false;
					}
					
		var exp=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;			
		//var exp=/^(.)+@{1,1}((.)+\.(.)+)+$/;
		if (!exp.test(document.thisFormNewsLetter.txtNewsEmail.value))
					{
					alert("Plese enter valid Email Address");
					document.thisFormNewsLetter.txtNewsEmail.focus();
					return false;
				}
				window.open("subscribers.asp?mode=Del&txtEmail="+document.thisFormNewsLetter.txtNewsEmail.value,"","width=300px, height=200px, top=200,left=200, resizable=no, toolbar=no, menubar=no, location=no, scrollbar=no");
		}	
	

function fnFindFrnd()
	{
	if((document.thisFormSrc.txtSearchName1.value=='' || document.thisFormSrc.txtSearchName1.value=='Enter the name') && document.thisFormSrc.cboyear.selectedIndex==0 && document.thisFormSrc.cboblood.selectedIndex=="")
		{
		alert('Select atleast One Criteria to Search');
		return false;
		}
	document.thisFormSrc.action=linkPath+'search_result.asp';
	document.thisFormSrc.submit();	
	}
	
function fnFindFrndIndex()
	{
	if((document.thisFormSrcIndex.txtSearchName1.value=='' || document.thisFormSrcIndex.txtSearchName1.value=='Enter the name') && document.thisFormSrcIndex.cboYear.selectedIndex==0)
		{
		alert('Select atleast One Criteria to Search');
		return false;
		}
	document.thisFormSrcIndex.action=linkPath+'search_result.asp';
	document.thisFormSrcIndex.submit();	
	}	
	
function fnRemoveTxtIndex()
	{
		if(Trim(document.thisFormSrcIndex.txtSearchName1.value)=='' || Trim(document.thisFormSrcIndex.txtSearchName1.value)=='Enter the name')
		{
			document.thisFormSrcIndex.txtSearchName1.value=''
		}
	}
function fnRemoveTxt()
{
	if(Trim(document.thisFormSrc.txtSearchName1.value)=='' || Trim(document.thisFormSrc.txtSearchName1.value)=='Enter the name')
	{
		document.thisFormSrc.txtSearchName1.value='';
	}
}

function fnSearchIndex()
{
	var str="";
	str+="<form name='thisFormSrcIndex' method='get' >";
	str+="	<table cellpadding='0' cellspacing='0' border='0' width='180' align='center'>";
	str+="		<tr><td><input type='text' name='txtSearchName1' class='txtbox' maxlength='255' value='Enter the name' onfocus='fnRemoveTxtIndex()'></td></tr>";
	str+="		<tr><td height='10'></td></tr>";
	str+="		<tr><td><select name='cboYear' class='cmbbox'><option value=''>Select the Year</option>";
	
	d = new Date();
	year = d.getYear()+1;
  	for(i=year;i>=1968;i--)
		{
			str+="<option value='"+i+"'>"+i+"</option>";		
		}	
	str+="			</select></td></tr>";
	
	str+="		<tr><td height='10'></td></tr>";
	str+="		<tr><td><select name='cboblood1' class='cmbbox1'><option value=''>Select Blood Group</option>";
	str+="		<option value='A+'>A+</option>";	
	str+="		<option value='A-'>A-</option>";
	str+="		<option value='A1+'>A1+</option>";	
	str+="		<option value='A1-'>A1-</option>";	
	str+="		<option value='B+'>B+</option>";	
	str+="		<option value='B-'>B-</option>";	
	str+="		<option value='AB+'>AB+</option>";	
	str+="		<option value='AB-'>AB-</option>";	
	str+="		<option value='O+'>O+</option>";	
	str+="		<option value='O-'>O-</option>";	
	str+="			</select><BR></td></tr>";
	str+="			<tr>";
	str+="				<td align=center><BR><input type='button' name='Search' value='Submit' onclick='return fnFindFrndIndex();' class='button2'></td>";
	str+="			</tr>";
	str+="	</table>";
	str+="</form>";
	document.write(str);
}

function fnSide()
	{
 	var str="";
	str+="<form name='thisFormSrc' method='get'>"
	str+="	<br><div style='padding-left:40px;'><table cellpadding='0' lign='center' cellspacing='0' border='0'  width='70%'>";

	str+="	<tr>";
	str+="		<td background='" + linkPath + "images/find_bg_inner.gif' align='center'>";
	str+="		<table cellpadding='5' cellspacing='0' border='0'>";
	str+="			<tr>";
	str+="				<td><input type='text' name='txtSearchName1' class='txtbox4' maxlength='255' value='Enter the name' onfocus='fnRemoveTxt()'></td>";
	str+="			</tr>";
	str+="			<tr>";
	str+="				<td><select name='cboyear' style='WIDTH: 160px;' class='cmbbox'><option value=''>Select Year</option>";
	
						d = new Date();
						year = d.getFullYear();											
						for(i=year;i>=1968;i--)
						{
							str+="<option value='"+i+"'>"+i+"</option>";		

						}
	str+="</select></td>";	
	str+="			</tr>";
	str+="		<tr><td><select name='cboblood' class='cmbbox' style='WIDTH: 160px;'><option value=''>Select Blood Group</option>";
	str+="		<option value='A+'>A+</option>";	
	str+="		<option value='A-'>A-</option>";
	str+="		<option value='A1+'>A1+</option>";	
	str+="		<option value='A1-'>A1-</option>";	
	str+="		<option value='B+'>B+</option>";	
	str+="		<option value='B-'>B-</option>";	
	str+="		<option value='AB+'>AB+</option>";	
	str+="		<option value='AB-'>AB-</option>";	
	str+="		<option value='O+'>O+</option>";	
	str+="		<option value='O-'>O-</option>";	
	str+="			</select></td></tr>";
	str+="			<tr>";
	str+="				<td lign=center><input type='submit' name='Search' value='Submit' onclick='return fnFindFrnd();' class='button2'></td>";
	str+="			</tr>";
	str+="			</table><br><br>";
	str+="		</td>";
	str+="	</tr>";
	str+="</form>"
	str+="</table></div>";
	document.write(str);
	}
	
function fnSide2()
	{
 	var str="";
	str+="	<br><table cellpadding='0' align='center' cellspacing='0' border='0'  >";

	str+="	<tr>";
	str+="		<td>";
	str+="<form name='thisFormNewsLetter' method='post' onSubmit='return fnValidNews()'>"
	str+="		<table cellpadding='0'  cellspacing='0' border='0'>";
	str+="			<tr>";
	str+="		<td align='center' >";
	str+="				<input type='text' name='txtNewsEmail' maxlength='255' class='txtbox4'>";
	str+="				</td>";
	str+="			</tr>";
	str+="	<tr>";
	str+="		<td align='left' height='8'>";
	str+="				</td>";
	str+="			</tr>";
	str+="			</table>";
	str+="				</td>";
	str+="			</tr>";
	str+="	<tr>";
	str+="		<td align='left'>";
	str+="				<input type='button' class='button3' value='Subscribe' onclick='return fnValidNews();' >";
	str+="  			<input type='button' class='button3' value='UnSubscribe' onclick='return fnValidNews1();'>";
	str+="				</td>";
	str+="			</tr>";
	str+="</form>"
	str+="</table>";
	document.write(str);
	}
