
function popup(url)
		{
			mywin=window.open("","goidiaplaywin","status=no,width=250,height=175,left=350,top=275");
			mywin.location.href=url;
			mywin.focus();
		}

// JScript source code

			
			function checkValidation ( addressField ) {
    if ( stringEmpty ( addressField.value ) )
        alert ( "Please enter the email address" );
    else if ( noAtSign ( addressField.value ) )
        alert ( "The E-Mail address does not contain an '@' character" );
    else if ( nothingBeforeAt ( addressField.value ) )
        alert ( "Error! An E-Mail address must contain at least one character before the '@' character" );
    else if ( noLeftBracket ( addressField.value ) )
        alert ( "Error! The E-Mail address contains a right square bracket ']',\nbut no corresponding left square bracket '['" );
    else if ( noRightBracket ( addressField.value ) )
        alert ( "Error! The E-Mail address contains a left square bracket '[',\nbut no corresponding right square bracket ']'" );
    else if ( noValidPeriod ( addressField.value ) )
        alert ( "Error! An E-Mail address must contain a period ('.') character" );
    else if ( noValidSuffix ( addressField.value ) )
        alert ( "Error! An E-Mail address must contain a two or three character suffix" );
    else
        return (true);

    return ( false );
}

function linkCheckValidation ( formField ) {
    if ( checkValidation ( formField ) == true ) {
    
       alert ( 'Your E-Mail Address was Submitted' );
        
       // javascript:popup('Popup.htm')
    }

    return ( false );
}

function stringEmpty ( address ) {
    // CHECK THAT THE STRING IS NOT EMPTY
    if ( address.length < 1 ) {
        return ( true );
    } else {
        return ( false );
    }
}

function noAtSign ( address ) {
    // CHECK THAT THERE IS AN '@' CHARACTER IN THE STRING
    if ( address.indexOf ( '@', 0 ) == -1 ) {
        return ( true )
    } else {
        return ( false );
    }
}

function nothingBeforeAt ( address ) {
    // CHECK THERE IS AT LEAST ONE CHARACTER BEFORE THE '@' CHARACTER
    if ( address.indexOf ( '@', 0 ) < 1 ) {
        return ( true )
    } else {
        return ( false );
    }
}

function noLeftBracket ( address ) {
    // IF EMAIL ADDRESS IN FORM 'user@[255,255,255,0]', THEN CHECK FOR LEFT BRACKET
    if ( address.indexOf ( '[', 0 ) == -1 && address.charAt ( address.length - 1 ) == ']' ) {
        return ( true )
    } else {
        return ( false );
    }
}

function noRightBracket ( address ) {
    // IF EMAIL ADDRESS IN FORM 'user@[255,255,255,0]', THEN CHECK FOR RIGHT BRACKET
    if ( address.indexOf ( '[', 0 ) > -1 && address.charAt ( address.length - 1 ) != ']' ) {
        return ( true );
    } else {
        return ( false );
    }
}

function noValidPeriod ( address ) {
    // IF EMAIL ADDRESS IN FORM 'user@[255,255,255,0]', THEN WE ARE NOT INTERESTED
    if ( address.indexOf ( '@', 0 ) > 1 && address.charAt ( address.length - 1 ) == ']' )
        return ( false );

    // CHECK THAT THERE IS AT LEAST ONE PERIOD IN THE STRING
    if ( address.indexOf ( '.', 0 ) == -1 )
        return ( true );

    return ( false );
}

function noValidSuffix ( address ) {
    // IF EMAIL ADDRESS IN FORM 'user@[255,255,255,0]', THEN WE ARE NOT INTERESTED
    if ( address.indexOf ( '@', 0 ) > 1 && address.charAt ( address.length - 1 ) == ']' )
        return ( false );

    // CHECK THAT THERE IS A TWO OR THREE CHARACTER SUFFIX AFTER THE LAST PERIOD
    var len = address.length;
    var pos = address.lastIndexOf ( '.', len - 1 ) + 1;
    if ( ( len - pos ) < 2 || ( len - pos ) > 3 ) {
        return ( true );
    } else {
        return ( false );
    }
}


// EmployeeCorner
		
			function empcheckValidation ( addressField1,addressField2) {
      if ((addressField1.value == "") && (addressField2.value==""))		// validating last name
{
	alert("Please enter the Employee ID & Password");
	addressField1.focus();
	return (false);
}
   
   if (addressField1.value == "")		// validating first name
{
	alert("Please enter the Employee ID");
addressField1.focus();
	return (false);
}

if (addressField2.value == "")		// validating last name
{
	alert("Please enter the Password");
	addressField2.focus();
	return (false);
}
else
return(true);

return(false);

}

function employeeCheckValidation ( formField1,formField2 ) {
    if ( empcheckValidation ( formField1,formField2 ) == true ) {
    
       alert ( 'Only Inforide Employees Can Login' );
        // javascript:popup('Employees.html')
    }

    return ( false );
}

// Client Corner

		function clicheckValidation ( addressField1,addressField2) {
    //if ( stringEmpty ( addressField1.value ) )
     //   alert ( "Enter the User Name " );
   
   // else if ( stringEmpty ( addressField2.value ) )
		//	alert ( "Enter the Password " );
	//else
	//	return (true);

   // return ( false );
   if ((addressField1.value == "") && (addressField2.value==""))		// validating last name
{
	alert("Please enter the UserName & Password");
	addressField1.focus();
	return (false);
}
   
   if (addressField1.value == "")		// validating first name
{
	alert("Please enter the User Name");
addressField1.focus();
	return (false);
}

if (addressField2.value == "")		// validating last name
{
	alert("Please enter the Password");
	addressField2.focus();
	return (false);
}
else
return(true);

return(false);

   
}

function ClientCheckValidation ( formField1,formField2 ) {
    if ( clicheckValidation ( formField1,formField2 ) == true ) {
    
       alert ( 'Only for Inforide Clients' );
       // javascript:popup('Clients.html')
      
    }

    return ( false );
}

//Contact Us




//function ContactBlankValidation(a1,a2,a3,a4,a5,a6)
//{
//if( stringEmpty ( a1.value )|| stringEmpty(a2.value) || stringEmpty(a3.value) || stringEmpty(a4.value) || stringEmpty(a5.value) || stringEmpty(a6.value))
//alert( ' Enter all the values ');
//else
//return(true)

//return(false);
//}


//function ContactUsCheckValidation(f1,f2,f3,f4,f5,f6)
//{
//if (ContactBlankValidation (f1,f2,f3,f4,f5,f6)== true)
//{
//alert( 'We will get back to you soon');
//}
//return (false);
//}
//------------------------



function ContactValidation(requiredfirst,requiredlast,requiredemail,phone,requiredtitle,requiredcompany)  
{

if (requiredfirst.value == "")		// validating first name
{
	alert("Please enter the first name");
	requiredfirst.focus();
	return (false);
}

if (requiredlast.value == "")		// validating last name
{
	alert("Please enter the last name");
	requiredlast.focus();
	return (false);
}

if (requiredemail.value == "")		// validating e-mail address
{
	alert("Please enter the e-mail address");
	requiredemail.focus();
	return (false);
}
					

var checkEmail = "@.";
var checkStr = requiredemail.value;
var EmailValid = false;
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 (EmailAt && EmailPeriod)		// if both the @ and . were in the string
{
		EmailValid = true
		break;
	}
}
if (!EmailValid)
{
	alert("Please enter a valid e-mail address");
	requiredemail.focus();
	return (false);
}

if (phone.value == "")			// validating phone number
{
	alert("Please enter a valid phone number");
	phone.focus();
	return(false);
}

var checkOK = "0123456789";
var checkStr = phone.value;
var allValid = true;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
	alert("Please enter a valid phone number");
	phone.focus();
	return (false);
}

if(requiredtitle.value == "")		// validating title
{
	alert("Please enter the title");
	requiredtitle.focus();
	return (false);
}

if(requiredcompany.value == "")		//validating company name
{
	alert("Please enter your company name");
	requiredcompany.focus();
	return(false);
}
return (true);
}


<!--Search starts here-->

function SearchClick() 
{
if(textfield.value=="")
{
window.alert("Enter the Value to Search");
}
else if((textfield.value=="Visa")|| (textfield.value=="visa") || (textfield.value=="Immigration") || (textfield.value=="immigration") || (textfield.value=="H1") || (textfield.value=="h1") || (textfield.value=="H1B") || (textfield.value=="h1b") || (textfield.value=="H1-B") || (textfield.value=="h1-b") || (textfield.value=="H1.B") || (textfield.value=="h1.b") || (textfield.value=="H1.B") || (textfield.value=="h1.b") || (textfield.value=="H1_B") || (textfield.value=="h1_b"))
{
window.location="search.html";
}
else
{
window.location="searchError.html";
}
}


			
