function isLogin()
{
 with (document.loginForm) 
{
	if (!emailLogin.value) {alert("Please Enter Login Name.."); !emailLogin.focus();  return false } 
	if (!pass.value) {alert("Enter password..."); !pass.focus();  return false } 

}
return true;
}




function Location()
{


window.open ("http://maps.google.co.in/maps?q=14801+Murdock+St,+Chantilly,+VA+20151-1017&hl=en&sll=38.911706,-77.459772&sspn=0.007547,0.021136&vpsrc=0&hnear=14801+Murdock+St,+Chantilly,+Virginia+20151,+United+States&t=h&z=16","mywindow","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=yes,resizable=yes,width=800,height=450,left=5,top=50");

/*window.open ("http://www.mapquest.com/maps?1c=Chantilly&1s=VA&1a=14801+Murdock+St&1z=20151-1017&1y=US&1l=38.913123&1g=-77.464136&1v=ADDRESS&2c=Reston&2s=VA&2a=1434+Northgate+Sq+Apt+1&2z=20190-3750&2y=US&2l=38.97147&2g=-77.335427&2v=ADDRESS","mywindow","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=yes,resizable=yes,width=800,height=450,left=5,top=50");
*/
}
function Footer1()
{
document.writeln('<hr size=1 noshade color=003366><a class=fot href="#" onClick="Javascript:Location();" title="Click here to Get Direction"></a><table  width="75%" border="0" cellspacing="5" cellpadding="5" align=center class=title style="border: #888888 solid 1px;"> <tr valign="top">    <td width="80%"><b><font size=2>Hari Gadi, EA (IRS Enrolled Agent),</font></b><br>     Cell: 571-235-4705<br>     Phone: 703-496-7483<br> Fax: 1-703-997-8857<br>    Email: <a href=mailto:hr@omsai.com><b>hr@omsai.com</b></a> <br>   </td>   <td width="10%"></td> </tr><tr valign="top">    <td colspan="2">    <div align="left"><b><font class=subtitle> <font size=3><br><br>USA Office:<br>Omsai LLC<br>14801 Murdock Street , Suite 155<br>Chantilly, VA 20151<br>USA<br><br>We have offices in India also. Please see our Privacy Policy</font></font> </div>    </td>  </tr></table>'); 
}
function footer()
{
document.writeln('<b>:.</b> <A class=fot1 href=default.asp>Home</A></b> |  <b><A class=fot1 href=contactus.asp>Contact Us</A></b> | <b><A class=fot1 href=Sitemap.asp>Site Map</A></b> | <b><A class=fot1 href=Feedback.asp>Feedback</A></b> | <b><A class=fot1 href=Privacy.asp>Privacy Policy</A></b> | <b><A class=fot1 href=Disclaimer.asp>Disclaimer</A></b>  <b>.:</b>'); 
}
function RightPage()
{

document.writeln('<table width="100" border="0" cellspacing="5" cellpadding="2"><tr> <td valign="middle" align="left" class=subtitle><a href="calListT.asp"><img src=images/1appointment.gif  border=0  vspace=0></a> </td></tr><tr><td valign="middle" align="center"><a href="http://www.omsai.com/payroll" target="_blank"><img src="images/pr.gif" width="160" height="75" border="1" alt="Omsai.com Payroll"></a></td></tr><tr><td valign="middle" align="center"><a href="http://www.ongcc.com/faq/index.php?action=artikel&cat=13&id=4&artlang=en"  target="_blank"><img src="images/drc1.gif" width="160" height="25" border=0></a></td></tr><tr><td valign="middle" align="center"><a class=fot href="Javascript:Location();" title="Click here to Get Direction"><img src="images/ddrn.jpg" width="160" height="25" border=0></a></td></tr><tr><td valign="middle" align="center"><a href="contactus.asp" target="_blank"><img src="images/openfr.gif" border=0></a></td></tr><tr><td valign="middle" align="center"><a href="http://www.ongcc.com/faq/" target="_blank"><img src="images/faqct.gif" width="140" height="74" border="1" alt="FAQ"></a></td></tr></table><br>'); 

document.writeln('<table width="170" border="0" cellspacing="0" cellpadding="9" align="center" bgcolor="99CC99" class="fot"><tr> <td> <p align=justify>Please <a href=contactus.asp>Click here</a> to discuss your specific immigration needs directly. One of our Omsai.com affiliated Lawyer will get in touch with you directly. </p></td></tr></table><br>'); 

}

function addresslist()
{
document.writeln('Please contact us for more information:<strong><br><br><font size="2"><br><br>USA Office:<br>Omsai LLC<br>14801 Murdock Street , Suite 155<br>Chantilly, VA 20151<br>USA<br>Phone: +1-571-235-4705<br>Phone: +1-703-496-7483<br>Fax: +1-703-997-8857<br>Email: hr@omsai.com<br> We have Offices in India also, please see our Privacy Policy</font></strong>');

}

function copy1()
{
document.writeln('<center><span class="fot">Copyright © 2002-2006 OmSai.com. All rights reserved</span>');
}
function sign()
{
var x=document.astro.stars.options[document.astro.stars.selectedIndex];
if (x.value!="")
{
surl="starweek.asp?sign=" + x.value;
window.open(surl, "mywindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=280,left=200,top=10")
}
}

function viewFlash(flno)
{
surl="flashfile.asp?p=" + flno;
window.open(surl, "mywindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=790,height=480,left=5,top=10")
}

function openTerms()
{
window.open ("terms.htm","mywindow","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,width=400,height=440,left=200,top=10");
}


function passwordHelp()
	{
		
		h = 130; 
		w = 350;
		tw = window.screen.height;
		lw = window.screen.width;
	 	tv = tw - h ;
	 	lv = lw - w ; 
	 	t = tv / 2 ;
	 	l = lv / 2 ;

		prop = "scrollbars = no , menubar=no, statusbar=no, width=350, height=120, Top = " + t + "Left = " + l ;

		url = "passwordHelp.asp";
		msgWindow = window.open(url,'Demo',prop);
	}



function op()
	{
		h = 150; 
		w = 500;
		tw = window.screen.height;
		lw = window.screen.width;
	 	tv = tw - h ;
	 	lv = lw - w ; 
	 	t = tv / 2 ;
	 	l = lv / 2 ;
		
	prop = "scrollbars=no, Height= "+h+" ,Width = "+w+ " ,Top = "+t+" ,Left ="+l;
		url = "forgotpwd.asp";
		msgWindow = window.open(url,'Demo',prop);
	}


function changeCase(frmObj) {
	var index;
	var tmpStr;
	var tmpChar;
	var preString;
	var postString;
	var strlen;
	tmpStr = frmObj.value.toLowerCase();
	strLen = tmpStr.length;
	if (strLen > 0)  {
	for (index = 0; index < strLen; index++)  {
	if (index == 0)  {
	tmpChar = tmpStr.substring(0,1).toUpperCase();
	postString = tmpStr.substring(1,strLen);
	tmpStr = tmpChar + postString;
	}
	else {
	tmpChar = tmpStr.substring(index, index+1);
	if (tmpChar == " " && index < (strLen-1))  {
	tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
	preString = tmpStr.substring(0, index+1);
	postString = tmpStr.substring(index+2,strLen);
	tmpStr = preString + tmpChar + postString;
	         }
	      }
	   }
	}
	frmObj.value = tmpStr;
	}

function Validate() 
{
 with (document.OmSaiForm) 
{

if (TopicMsg.value=='0')  {alert("Select the topic for your messages..."); !TopicMsg.focus();  return false } 	
if (!PName.value) {alert("Enter Your Name.."); !PName.focus();  return false } 
if (PName.value.match(/^\d/)) {alert("Contact Name must start with a letter"); !PName.focus(); return false } 
if (PName.value.length<5) {alert("Contact Name must be at least 5 characters"); !PName.focus(); return false } 

if (!CName.value) {alert("Enter Company Name..."); !CName.focus();  return false } 
if (!Addr1.value) {alert("Enter Address...... "); !Addr1.focus();  return false } 
if (!City.value) {alert("Enter City name...."); !City.focus();  return false } 
if (!State.value) {alert("Enter State/Province name"); !State.focus();  return false } 
if (!Country.value) {alert("Enter Country name"); !Country.focus();  return false } 

if (!Zip.value) {alert("Enter zip code"); !Zip.focus();  return false } 
if (!Zip.value.match(/^\d/)) {alert("Zip code must start with number"); !Zip.focus(); return false } 

if (!Phone.value) {alert("Enter Phone No"); !Phone.focus();  return false } 
if (!Phone.value.match(/^\d/)) {alert("Phone No. must start with a number "); !Phone.focus(); return false } 

if (!CEmail.value) {alert("Enter email id"); !CEmail.focus();  return false } 
if (!CEmail.value.match(/^\w+((-\w+)|(\.\w+|-))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
		alert("Invalid E-mail Address! Please re-enter."); !CEmail.focus();  return false } 

if (comments.value.length<5) {alert("Form cannot be submit without your Comments/Notes "); !comments.focus(); return false } 

}
	return true;
}




function TraValidate() 
{
 with (document.OmSaiForm) 
{
	
var dt=txtDate.value
if (!PName.value) {alert("Please provide Contact Name"); !PName.focus();  return false } 
if (PName.value.match(/^\d/)) {alert("Contact Name must start with a letter"); !PName.focus(); return false } 
if (PName.value.length<5) {alert("Contact Name must be at least 5 characters"); !PName.focus(); return false } 


if (!Addr1.value) {alert("Please provide Address "); !Addr1.focus();  return false } 
if (!City.value) {alert("Please provide City name"); !City.focus();  return false } 
if (!State.value) {alert("Please provide State/Province name"); !State.focus();  return false } 
if (!Country.value) {alert("Please provide Country name"); !Country.focus();  return false } 

if (!Zip.value) {alert("Please provide zip code"); !Zip.focus();  return false } 
if (!Zip.value.match(/^\d/)) {alert("Zip code must start with number"); !Zip.focus(); return false } 

if (isDate(txtDate.value)==false){
		txtDate.focus()
		return false
	}

if (!From.value) {alert("Please provide City From Which You Want To Travel"); !From.focus();  return false } 
if (From.value.match(/^\d/)) {alert("City Name must start with a letter"); !From.focus(); return false } 
if (!To.value) {alert("Please provide City To Which You Want To Travel"); !To.focus();  return false } 
if (To.value.match(/^\d/)) {alert("City Name must start with a letter"); !To.focus(); return false }

if (!Seats.value) {alert("Please provide No.of Seats Required"); !Seats.focus();  return false }
if (!Seats.value.match(/^\d/)) {alert("Seats must be a number "); !Seats.focus(); return false } 


if (!Phone.value) {alert("Please provide Phone No"); !Phone.focus();  return false } 
if (!Phone.value.match(/^\d/)) {alert("Phone No. must start with a number "); !Phone.focus(); return false } 

if (!CEmail.value) {alert("Please Enter email id"); !CEmail.focus();  return false } 
if (!CEmail.value.match(/^\w+((-\w+)|(\.\w+|-))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
		alert("Invalid E-mail Address! Please re-enter."); !CEmail.focus();  return false } 

if (comments.value.length<5) {alert("Form cannot be submit without your Comments/Notes "); !comments.focus(); return false } 

}
	return true;
}

function homenumbersOnly()
{
	if (event.keyCode == 13) return ValidateHome();
	if ((event.keyCode < 40 || event.keyCode > 57) && (event.keyCode != 32)) 
	{
		alert("Enter Number Only..."); 
		return false;
	}
}

function pronumbersOnly()
{
	if (event.keyCode == 13) return validateProfile();
	if ((event.keyCode < 40 || event.keyCode > 57) && (event.keyCode != 32)) 
	{
		alert("Enter Number Only..."); 
		return false;
	}

}


function ValidateHome() 
{
 with (document.HomeLoanForm) 
{

if (!newLoanAmount.value) {alert("Enter Estimated Loan Amount..."); !newLoanAmount.focus();  return false } 
if (!FirstName.value) {alert("Enter First Name..."); !FirstName.focus();  return false } 
if (!LastName.value) {alert("Enter Last Name..."); !LastName.focus();  return false } 
if (!Address.value) {alert("Enter Address..."); !Address.focus();  return false } 
if (!City.value) {alert("Enter City..."); !City.focus();  return false } 
if (!State.value) {alert("Enter State name..."); !State.focus();  return false } 
if (!Zip.value) {alert("Enter zip code..."); !Zip.focus();  return false } 

if (!Email.value) {alert("Please Enter email id"); !Email.focus();  return false } 
if (!Email.value.match(/^\w+((-\w+)|(\.\w+|-))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
		alert("Invalid E-mail Address! Please re-enter."); !Email.focus();  return false } 

if (!HPhone1.value) {alert("Enter Home Phone Number..."); !HPhone1.focus();  return false } 
if (!WPhone1.value) {alert("Enter Work Phone Number..."); !WPhone1.focus();  return false } 

}
	return true;
}

function carnumbersOnly()
{
	if (event.keyCode == 13) return ValidateCar();
	if ((event.keyCode < 40 || event.keyCode > 57) && (event.keyCode != 32)) 
	{
		alert("Enter Number Only..."); 
		return false;
	}
}

function ValidateCar() 
{
	with (document.CarLoanForm) 
{
if (!FirstName.value) {alert("Enter First Name..."); !FirstName.focus();  return false } 
if (!LastName.value) {alert("Enter Last Name..."); !LastName.focus();  return false } 
if (!Address.value) {alert("Enter Address..."); !Address.focus();  return false } 
if (!City.value) {alert("Enter City..."); !City.focus();  return false } 
if (!State.value) {alert("Enter State name..."); !State.focus();  return false } 
if (!Zip.value) {alert("Enter zip code..."); !Zip.focus();  return false } 
if (!Email.value) {alert("Please Enter email id"); !Email.focus();  return false } 
if (!Email.value.match(/^\w+((-\w+)|(\.\w+|-))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
		alert("Invalid E-mail Address! Please re-enter."); !Email.focus();  return false } 
if (!HPhone1.value) {alert("Enter Home Phone Number..."); !HPhone1.focus();  return false } 
if (!WPhone1.value) {alert("Enter Work Phone Number..."); !WPhone1.focus();  return false } 
if (CreditCheck.value=='0')  {alert("Select Credit Check..."); !CreditCheck.focus();  return false } 
}
	return true;
}
function Valchk()
{
 with (document.login) 
{
	if (!UserName.value) {alert("Enter User Name..."); !UserName.focus();  return false } 
	if (!Pwd.value) {alert("Enter Password..."); !Pwd.focus();  return false } 
}
return true;
}
function ValchkReg()
{
 with (document.join) 
{
	if (Title.value=='0')  {alert("Select Title..."); !Title.focus();  return false } 
	if (!FirstName.value) {alert("Enter User Name..."); !FirstName.focus();  return false } 
	if (!LastName.value) {alert("Enter Last Name..."); !LastName.focus();  return false } 
	if (!Email.value) {alert("Please Enter email id"); !Email.focus();  return false } 
	if (!Email.value.match(/^\w+((-\w+)|(\.\w+|-))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
		alert("Invalid E-mail Address! Please re-enter."); !Email.focus();  return false } 
	if (!Country.value) {alert("Enter Couuntry..."); !Country.focus();  return false } 
	if (!UserName.value) {alert("Enter User Name..."); !UserName.focus();  return false } 
	if (UserName.value.length<4) {alert("User Name must be at least 4 characters"); !UserName.focus(); return false } 
	if (!Pwd.value) {alert("Enter Password..."); !Pwd.focus();  return false } 
	if (Pwd.value.length<4) {alert("Passwork must be at least 4 characters"); !Pwd.focus(); return false } 
	if(chkTerms.checked==false)	{alert("You have Agree to Discalimer");	return false;}
}
return true;
}

function validateProfile()
{

	if ( !frm.cat[0].checked && !frm.cat[1].checked)
	{
		alert( "Please select the Gender." );
		frm.cat[0].focus( );
		return false;
	}

	if(document.frm.name.value.length==0)
	{
		alert("Enter Name ...");
		document.frm.name.focus();
		return false;
	}

	if(document.frm.fname.value.length==0)
	{
		alert("Enter Father Name...");
		document.frm.fname.focus();
		return false;
	}

	if(document.frm.mname.value.length==0)
	{
		alert("Enter Mother Name...");
		document.frm.mname.focus();
		return false;
	}

	if(document.frm.cast.value.length==0)
	{
		alert("Enter your Caste ...");
		document.frm.cast.focus();
		return false;
	}

	if(document.frm.age.value.length==0)
	{
		alert("Enter Age");
		document.frm.age.focus();
		return false;
	}


	if(document.frm.pob.value.length==0)
	{
		alert("Enter Place of Birth");
		document.frm.pob.focus();
		return false;
	}
	if(document.frm.address.value.length==0)
	{
		alert("Enter Address...");
		document.frm.address.focus();
		return false;
	}
	if(document.frm.city.value.length==0)
	{
		alert("Enter City / State / Country...");
		document.frm.city.focus();
		return false;
	}

	if(document.frm.zip.value.length==0)
	{
		alert("Enter Zip/Pin Code...");
		document.frm.zip.focus();
		return false;
	}	
	if(document.frm.phone.value.length==0)
	{
		alert("Enter Phone No...");
		document.frm.phone.focus();
		return false;
	}	

	if ( frm.reg.selectedIndex == 0 )
	{
		alert( "Registered by'." );	
		frm.reg.focus( );
		return false;
	}

	if(document.frm.bedu.value.length==0)
	{
		alert("Enter Education...");
		document.frm.bedu.focus();
		return false;
	}	

	if(document.frm.income.value.length==0)
	{
		alert("Enter Income (p.a)");
		document.frm.income.focus();
		return false;
	}	

}

var dtCh= "/";
var dateNow = new Date();
var minYear=dateNow.getFullYear();
var maxYear=dateNow.getFullYear()+1;
function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : mm/dd/yyyy")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year ("+minYear+")")
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
return true
}

function FbValid() 
{
 with (document.ETPForm) 
{

if (TopicMsg.value=='0')  {alert("Select the topic for your messages..."); !TopicMsg.focus();  return false } 	
if (!PName.value) {alert("Enter Your Name.."); !PName.focus();  return false } 
if (PName.value.match(/^\d/)) {alert("Contact Name must start with a letter"); !PName.focus(); return false } 
if (PName.value.length<5) {alert("Contact Name must be at least 5 characters"); !PName.focus(); return false } 

if (!CName.value) {alert("Enter Company Name..."); !CName.focus();  return false } 
if (!Addr1.value) {alert("Enter Address...... "); !Addr1.focus();  return false } 
if (!City.value) {alert("Enter City name...."); !City.focus();  return false } 
if (!State.value) {alert("Enter State/Province name"); !State.focus();  return false } 
if (!Country.value) {alert("Enter Country name"); !Country.focus();  return false } 

if (!Zip.value) {alert("Enter zip code"); !Zip.focus();  return false } 
if (!Zip.value.match(/^\d/)) {alert("Zip code must start with number"); !Zip.focus(); return false } 

if (!Phone.value) {alert("Enter Phone No"); !Phone.focus();  return false } 
if (!Phone.value.match(/^\d/)) {alert("Phone No. must start with a number "); !Phone.focus(); return false } 

if (!CEmail.value) {alert("Enter email id"); !CEmail.focus();  return false } 
if (!CEmail.value.match(/^\w+((-\w+)|(\.\w+|-))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
		alert("Invalid E-mail Address! Please re-enter."); !CEmail.focus();  return false } 

if (comments.value.length<5) {alert("Form cannot be submit without your Comments/Notes "); !comments.focus(); return false } 

}
	return true;
}



