// JavaScript Document

var message="Contents & Graphics Copyright (c)."; // Message for the alert box



if (navigator.appName == 'Microsoft Internet Explorer,Mozilla/firefox'){

function NOclickIE(e) {

if (event.button == 2 || event.button == 3) {

alert(message);

return false;

}

return true;

}

document.onmousedown=NOclickIE;

document.onmouseup=NOclickIE;

window.onmousedown=NOclickIE;

window.onmouseup=NOclickIE;

}

else {

function NOclickNN(e){

if (document.layers||document.getElementById&&!document.all){

if (e.which==2||e.which==3){

alert(message);

return false;

}}}

if (document.layers){

document.captureEvents(Event.MOUSEDOWN);

document.onmousedown=NOclickNN; }

document.oncontextmenu=new Function("alert(message);return false")

}



//

//popup



function popUp(page,PWidth,PHeight,id) {

 eval("visha"+id+"=window.open('"+page+"','visha','toolbar=0,scrollbars=yes,location=no,status=no,menubars=no,resizable=0,width="+PWidth+",height="+PHeight+",left=100,top=50')")

}

//



function validemail()

{

	//alert("dsads");

if(document.getElementById('email').value=="")

{

alert("Enter Your Email Id");

document.getElementById('email').focus()

return false;

}

else

{

var str1=document.getElementById('email').value

var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

		if (!filter.test(str1))

		{

		alert("Please Input a Valid Email Id!");

		document.getElementById('email').focus()

return false;

		} 		



}

}



function blank()

{

	document.getElementById('email').value="";

	}

	

	

function validcontact()

{

//alert("sbnkjfhdklfksdj;lfjksd;l");

	//*********blank field******************************************

	// check to see if the field is blank

	var frm=document.frm1;

	if((frm.name.value=="")||(frm.name.value.indexOf('@',0) !=-1))		

		{

			alert("Please Enter Your Name!");

			frm.name.focus();

			return(false);

			}

				

	//****************email validation**************

	// check if email field is blank

		if (frm.email.value == "")

			{

			alert("Please Enter Your Email Id !");

			frm.email.focus();

			return(false);

			}



// test if valid email address, must have @ and .

	

	var checkEmail = "@.";

	var checkStr = frm.email.value;

	var EmailValid = false;0000000000

	var EmailAt = false;

	var EmailPeriod = false;

		for (i = 0;  i < checkStr.length;  i++)

		{

			ch = checkStr.charAt(i);

				for (j = 0;  j < checkEmail.length;  j++)

				{

					if (ch == checkEmail.charAt(j) && ch == "@")

						EmailAt = true;

					if (ch == checkEmail.charAt(j) && ch == ".")

						EmailPeriod = true;

		  			if (EmailAt && EmailPeriod)

				break;

      	  		if (j == checkEmail.length)

				break;

			}



				// if both the @ and . were in the string

				if (EmailAt && EmailPeriod)

				{

					EmailValid = true

					break;

				}

		}

			

			if (!EmailValid)

				{

					alert("Invalid Email Id ! Please Enter Your Valid Email Id!");

					frm.email.focus();

					return(false);

				}  

				// check to see if the field is blank

	

	if((frm.message.value=="")||(frm.message.value.indexOf('@',0) !=-1))		

		{

			alert("Please Write Your Message!");

			frm.message.focus();

			return(false);

			}

		if((frm.code2.value==""))		

		{

			alert("Please Enter Security Code!");

			frm.code2.focus();

			return(false);

			}	

	

	}

	

