// JavaScript file for chaturvedico.com

defaultStatus="Chaturvedi & Company Chartered Accountants"

//function for right click
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("                      COPYRIGHT \n\( Chaturvedi & Co. Chartered Accountants )");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;


//date function
RightNow=new Date();
var themonth;
var month=RightNow.getMonth()+1;
if (month==1) themonth = "January";
if (month==2) themonth = "February";
if (month==3) themonth = "March";
if (month==4) themonth = "April";
if (month==5) themonth = "May";
if (month==6) themonth = "June";
if (month==7) themonth = "July";
if (month==8) themonth = "August";
if (month==9) themonth = "September";
if (month==10) themonth = "October";
if (month==11) themonth = "November";
if (month==12) themonth = "December";

var date=RightNow.getDate();
var year=RightNow.getYear();
var day=RightNow.getDay();
if (year==100){year="2000";}
if (year==101){year="2001";}
if (year==102){year="2002";}
if (year==103){year="2003";}
if (year==104){year="2004";}
if (year==105){year="2005";}

// popup windows
function PP_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

// contact us validation
function chkform()
{
		if(document.form1.CompanyName.value=="")
		{
			alert("Please enter Company Name");
			document.form1.CompanyName.focus();
			return false;
		}
		var spc;
		spc=" ";
		if(document.form1.CompanyName.value.indexOf(spc) == 0)
		{
			alert("No Spaces please for Company Name");
			document.form1.CompanyName.focus();
			document.form1.CompanyName.select();
			return false;
		}
		if(document.form1.email.value=="")
		{
			alert("Please enter an email address");
			document.form1.email.focus();
			return false;
		}
		if(document.form1.email.value!="")
		{
			if((document.form1.email.value.indexOf('@',0) == -1) || (document.form1.email.value.indexOf('.',0) == -1))
			{
				alert("Please enter an appropriate email address,which should contain '@' and '.' characters");
				document.form1.email.focus();
				document.form1.email.select();
				return false;
			}
		}
}
function chkreset()
{
	document.form1.reset();
	return false;
}
