function ResetValues( )
	{
		var form = this.document.MatriForm;

		form.Gender.value = "";
		form.Community.value = "";
		form.Language.value = "";
		return true;
	}
	

		function validate()
		{
	  
			 if (MatriForm.gen.selectedIndex == 0) 
		  {
		  alert("Please Select Your Gender.");
				MatriForm.gen.focus( );
				return false;
		  }
				
				
			
			 if (MatriForm.fa.value == "" )
			 {
				alert( "Please enter Your min age." );
				MatriForm.fa.focus( );
				return false;
			}
			
			 if (MatriForm.ta.value == "" )
			 {
				alert( "Please enter max age." );
				MatriForm.ta.focus( );
				return false;
			}
			
			
			
			 if (MatriForm.Category.selectedIndex == 0) 
		  {
		  alert("Please Select Your Religion.");
				MatriForm.Category.focus( );
				return false;
		  }
				
				
				
		   if (MatriForm.SubCategory.selectedIndex == 0) 
		  {
		  alert("Please Select Your Caste.");
				MatriForm.SubCategory.focus( );
				return false;
		  }
	 }

function caste_disable(obj){
	if(obj.options[obj.selectedIndex].text != 'Hindu' &&
		obj.options[obj.selectedIndex].text != 'Muslim' &&
		obj.options[obj.selectedIndex].text != 'Christian' &&
		obj.options[obj.selectedIndex].text != 'Jain' &&
		obj.options[obj.selectedIndex].text != 'Sikh'){
		document.MatriForm.caste.disabled = true;
	}
	else {
		document.MatriForm.caste.disabled = false;
		get_caste(obj.MatriForm.religion,0);
	}
}

function memloginvalidate()
{
   if(document.form1.txtusername.value == "")
     {
        alert("Please enter your ID/Email.");
        document.form1.txtusername.focus();
        return false;
     }
   if(document.form1.txtPassword.value == "")
     {
        alert("Please enter your Password.");
        document.form1.txtPassword.focus();
        return false;
     }
   }

<!-- Start
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.



theImages[0] = 'Images/nwmod1.jpg'
theImages[1] = 'Images/nwmod2.jpg'
/*theImages[2] = 'Images/pic3.jpg'
theImages[3] = 'Images/picture4.jpg' */


// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img alt="'+'Tamil Bride and Groom'+'" src="'+theImages[whichImage]+'">');
}

//  End -->


function loadcastelist()
{
	//alert(form.Category.selectedIndex);		
		var i=0;
		var ii=0;


		document.forms[0].SubCategory.options.length = 0;
				
		document.forms[0].SubCategory.options[0]=new Option("--Select Caste--","")
		
		
		var cast1="Adaviyar,Adi Dravidar (SC),Ambalakarar,Arunthathiyar,Bania-Gujarathi,Bhavasar Kshatriya,Boyer,Brahmin-Punjabi,Brahmin-Varma,Brahmin-Gujarathi,Brahmin-Marathi,Brahmin-Gurukkal,Brahmin-Hindi,Brahmin-Iyengar,Brahmin-Iyer,Brahmin-Madhwa-Kannada,Brahmin-Palghat,Brahmin-Telugu,Nandavarik,Chettiar,Desigar,Devandra Kula Vellalar,Ezhuthachan,Gounder,Gowda,Jalunder Jangam,Jangam,Kallar,Kannadiya Naicker,Keralites,Konkani,Kshatriya/Raja,Kulalar,Kuravan,Lohana,Maharastrian,Malayalalee,Maratha - Non Brahmin,Maruthuvar,Moopanar,Mudaliar,Mutharaiyar,Maravar/Mukkulathor/Thevar,Muthuraja,Muthuraja Ambalakarar,Nadar,Naicker,Naidu,Nair,Namakkar Naidu (SC),Namdev,Nepali,Nesavallar,Oriya&#8211;Brahmin,Ottar(MBC),Pandaram,Pannaiyar,Parkavakulamr,Parvatha Rajakulam,Pattariyar,Pillai,Rajakula Agamudayar,Rajput,Rao,Reddiar,Sathatha SriVaishnava,Schedule Tribes,Senai Thalaivar,Sindhi,Sindhi-Brahmin,Singh,Sourashtra,Udayar,Uppara,Vallambar,Valluvan,Valluvan(S.C),Valluvar,Vannan,Vannar,Vannia Kula Kshatriya,Vanniar,Veera Saiva Lingayath,Vellalar,Viswakarma-Achari,Yadav (U.P)Hindi,Yadava,Ezhavar/IlluthuPillai,Bharathar,Fernando,Mukkuvar,Meenavar,Paravar,Caste No Bar,Other Castes";
		var cast2="Dhakni,Urudu,Pattani,Sheik,Rowther,Lebbai,Sunni,Tamil";

		
		var castlist1=new Array();
		castlist1=cast1.split(",");
		var castlist2=new Array();
		castlist2=cast2.split(",");



		
		if(document.forms[0].Category.options[document.forms[0].Category.selectedIndex].value!='Muslim')
		{
			for (ii=0; ii < castlist1.length; ii++)
			{
				document.forms[0].SubCategory.options[document.forms[0].SubCategory.length]=new Option(castlist1[ii],castlist1[ii]);
			}
		}
		else
		{
			for (ii=0; ii < castlist2.length; ii++)
			{
				document.forms[0].SubCategory.options[document.forms[0].SubCategory.length]=new Option(castlist2[ii],castlist2[ii]);
			} 
		}
}


var clickmessage='Copyright 2010 - Chennai Matrimony.com!';

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
