function Trim(nStr){return nStr.replace(/(^\s*)|(\s*$)/g,"");}
function fnValidNews()
	{
			if(Trim(document.thisFormNewsLetter.txtNewsEmail.value)=='')
					{
					alert("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("Enter Valid Email Address");
					document.thisFormNewsLetter.txtNewsEmail.focus();
					return false;
				}
	 	 	return true;
		}	
		
	function fnValidNews1()
	{
			if(Trim(document.thisFormNewsLetter.txtNewsEmail.value)=='')
					{
					alert("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("Enter Valid Email Address");
					document.thisFormNewsLetter.txtNewsEmail.focus();
					return false;
				}
				document.thisFormNewsLetter.action="subscription.asp?Mode=Del&emails="+document.thisFormNewsLetter.txtNewsEmail.value;
				document.thisFormNewsLetter.submit();	
			return true;
		}	
	


function fnFindFrnd()
	{
	if((document.thisFormSrc.txtSearchName.value=='' || document.thisFormSrc.txtSearchName.value=='Enter the name') && document.thisFormSrc.cboYear.selectedIndex==0)
		{
		alert('Select atleast One Criteria to Search');
		return false;
		}
	document.thisFormSrc.action=linkPath+'find_friend.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+'find_friend.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.txtSearchName.value)=='' || Trim(document.thisFormSrc.txtSearchName.value)=='Enter the name')
		{
			document.thisFormSrc.txtSearchName.value=''
		}
	}

function fnSearchIndex()
{
	var str="";
	str+="<form name='thisFormSrcIndex' method='get' onSubmit='return fnFindFrndIndex()'>";
	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 align='center'><br><input type='submit' name='Search' value='Submit' class='buttenred'></td></tr>";	
	str+="	</table>";
	str+="</form>";
	document.write(str);
}
 
function fnNewsLetterIndex()
{
	var str="";
	str+="<table cellpadding='0' cellspacing='0' border='0' width='773' bgcolor='E4D5A9'>";
	str+="	<tr>";
	str+="		<td align='left' bgcolor='E4D5A9'>";
	str+="			<table cellpadding='0' cellspacing='0' border='0'>";
	str+="			<tr>";
	str+="				<td background='images/newsletter_bg.jpg' width='493' class='newsletter'>";
	str+="				<input type='text' name='txtNewsEmail' maxlength='255' class='txtbox'>&nbsp;<input type='submit' class='butten' value='Subscribe'>&nbsp;<input type='button' class='butten' value='UnSubscribe' onclick='javascript:fnValidNews1()'>";
	str+="				</td>";
	str+="			</tr>";
	str+="			</table>";
	str+="		</td>";
	str+="		<td background='images/date_bg.gif' rowspan='2' width='280' valign='bottom'>&copy; 2005 CIT Alumni Association, Coimbatore</td>";
	str+="	</tr>";
	str+="	<tr>";
	str+="		<td><img src='images/newsletter_bottom.jpg' width='493' height='7' alt='' border='0'><br><br></td>";
	str+="	</tr>";
	str+="</table>";
	document.write(str);
}
 

function fnSide()
	{
 	var str="";
	str+="<form name='thisFormSrc' method='get' onSubmit='return fnFindFrnd()'>"
	str+="	<table cellpadding='0' cellspacing='0' border='0' align='center'>";
	str+="	<tr>";
	str+="		<td><br><img src='" + linkPath + "images/find_inner.gif' width='196' height='18' alt='' border='0'></td>";
	str+="	</tr>";
	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='txtSearchName' class='txtbox' maxlength='255' value='Enter the name' onfocus='fnRemoveTxt()'></td>";
	str+="			</tr>";
	str+="			<tr>";
	str+="				<td><select name='cboYear' class='cmbbox'><option value=''>Select Year</option>";
	
						d = new Date();
						year = d.getYear()+1;
						for(i=year;i>=1968;i--)
						{
							str+="<option value='"+i+"'>"+i+"</option>";		
						}
	str+="</select></td>";	
	str+="			</tr>";
	str+="			<tr>";
	str+="				<td><input type='submit' name='Search' value='Submit' nclick='fnFindFrnd();' class='buttenred'></td>";
	str+="			</tr>";
	str+="			</table>";
	str+="		</td>";
	str+="	</tr>";
	str+="	<tr>";
	str+="		<td><img src='" + linkPath + "images/find_bottom_inner.gif' width='196' height='11' alt='' border='0'></td>";
	str+="	</tr>";
	str+="	</table>";
	str+="</form>"
	document.write(str);
	}
	

function fntop()
	{
		var str1="";
		str1+="<tr>";
		str1+="<td><IMG SRC='" + linkPath + "images/logo.jpg' WIDTH=493 HEIGHT=110 alt=CIT ECE Alumni Association, Coimbatore' border='0'></td>";
		str1+=" <td background='" + linkPath + "images/date_bg.gif' WIDTH=280 valign='bottom'>";
		str1+="	<table cellpadding='0' cellspacing='0' border='0'>";
		str1+="		<tr>";
		str1+="			<td valign='top' align='right'><a href='" + linkPath + "index.asp'><img src='" + linkPath + "images/home.gif' alt='Home' border='0' width='65' height='26'></a></td>";	
		str1+="		</tr>";
		str1+="		<tr>";
		str1+="				<td><IMG SRC='" + linkPath + "images/top_menu.gif' alt='' WIDTH='280' HEIGHT='26' border='0' usemap='#Map2'></td>";
		str1+="		</tr>";
		str1+="			</table>";
		str1+="  </td>";
		str1+="	</tr>";
		str1+="	<tr>";
		str1+=" <td colspan='2'><IMG SRC='" + linkPath + "images/menu.gif' alt='' WIDTH=773 HEIGHT=32 border='0' usemap='#Map'></td>";
		str1+="</tr>";
		str1+="<map name='Map'>";
		str1+="<area shape='rect' coords='5,2,75,32' href='" + linkPath + "about_cit.html'>";
		str1+="<area shape='rect' coords='89,4,140,30' href='" + linkPath +"events.asp'>";
	//	str1+="<area shape='rect' coords='100,3,168,30' href='" + linkPath +"placements.asp'>";
		str1+="<area shape='rect' coords='156,3,268,30' href='" + linkPath +"onlineservices/alumni_directory.asp'>";
		str1+="<area shape='rect' coords='281,3,361,31' href='" + linkPath +"onlineservices/your_profile.asp'>";
		str1+=" <area shape='rect' coords='376,2,479,30' href='" + linkPath +"onlineservices/career_services.asp'>";
		str1+="<area shape='rect' coords='496,1,594,30' href='" + linkPath +"onlineservices/message_board.asp'>";
		str1+="<area shape='rect' coords='612,2,661,31' href='" + linkPath +"onlineservices/article.asp'>";
		str1+=" <area shape='rect' coords='676,2,768,31' href='" + linkPath +"onlineservices/photogallery.asp'>";
		str1+="</map>";
		str1+="<map name='Map2'>";
		str1+="<area shape='rect' coords='4,3,113,22' href='" + linkPath +"ece_department.html'>";
		str1+="<area shape='rect' coords='122,4,187,22' href='" + linkPath +"register.asp'>";
		str1+=" <area shape='rect' coords='198,4,276,23' href='" + linkPath +"contact_us.html'>";
		str1+="</map>";
	document.write(str1);
	}
	
	function fntopIndex()
	{
		var str1="";
		str1+="<tr>";
		str1+="<td><IMG SRC='" + linkPath + "images/logo.jpg' WIDTH=493 HEIGHT=110 alt=CIT ECE Alumni Association, Coimbatore' border='0'></td>";
		str1+=" <td background='" + linkPath + "images/date_bg.gif' WIDTH=280 valign='bottom'>";
		str1+="	<table cellpadding='0' cellspacing='0' border='0'>";
	  	str1+="		<tr>";
		str1+="				<td><IMG SRC='" + linkPath + "images/top_menu.gif' alt='' WIDTH='280' HEIGHT='26' border='0' usemap='#Map2'></td>";
		str1+="		</tr>";
		str1+="			</table>";
		str1+="  </td>";
		str1+="	</tr>";
		str1+="	<tr>";
		str1+=" <td colspan='2'><IMG SRC='" + linkPath + "images/menu.gif' alt='' WIDTH=773 HEIGHT=32 border='0' usemap='#Map'></td>";
		str1+="</tr>";
		str1+="<map name='Map'>";
		str1+="<area shape='rect' coords='5,2,75,32' href='" + linkPath + "about_cit.html'>";
		str1+="<area shape='rect' coords='50,3,120,30' href='" + linkPath +"events.asp'>";
	//	str1+="<area shape='rect' coords='100,3,168,30' href='" + linkPath +"placements.asp'>";
		str1+="<area shape='rect' coords='156,3,268,30' href='" + linkPath +"onlineservices/alumni_directory.asp'>";
		str1+="<area shape='rect' coords='281,3,361,31' href='" + linkPath +"onlineservices/your_profile.asp'>";
		str1+=" <area shape='rect' coords='376,2,479,30' href='" + linkPath +"onlineservices/career_services.asp'>";
		str1+="<area shape='rect' coords='496,1,594,30' href='" + linkPath +"onlineservices/message_board.asp'>";
		str1+="<area shape='rect' coords='612,2,661,31' href='" + linkPath +"onlineservices/article.asp'>";
		str1+=" <area shape='rect' coords='676,2,768,31' href='" + linkPath +"onlineservices/photogallery.asp'>";
		str1+="</map>";
		str1+="<map name='Map2'>";
		str1+="<area shape='rect' coords='4,3,113,22' href='" + linkPath +"ece_department.html'>";
		str1+="<area shape='rect' coords='122,4,187,22' href='" + linkPath +"register.asp'>";
		str1+=" <area shape='rect' coords='198,4,276,23' href='" + linkPath +"contact_us.html'>";
		str1+="</map>";
	document.write(str1);
	}
	
