

function funcFormValidate(objForm)
{
    var bCorrect = true;
    if (bCorrect && objForm.cboTitle.value=="")
    {
        bCorrect = false;
        alert ("Please select the title");
        objForm.cboTitle.focus();
    }

    if (bCorrect && objForm.txtName.value=="")
    {
        bCorrect = false;
        alert ("Please enter your Name");
        objForm.txtName.focus();
    }
    if (bCorrect && objForm.txtEmail.value=="")
    {
        bCorrect = false;
        alert ("Please enter your Email Id");
        objForm.txtEmail.focus();
    }
    if (bCorrect && !func_isEmail(objForm.txtEmail.value))
    {
        bCorrect = false;
        alert ("Please enter a valid Email Id");
        objForm.txtEmail.focus();
    }
    if (bCorrect && objForm.cboCountry.value=="")
    {
        bCorrect = false;
        alert ("Please select your country");
        objForm.cboCountry.focus();
    }

    if (bCorrect && objForm.txtCtryCode.value=="")
    {
        bCorrect = false;
        alert ("Please enter your country code");
        objForm.txtCtryCode.focus();
    }

    if (bCorrect && objForm.txtAreaCode.value=="")
    {
        bCorrect = false;
        alert ("Please enter your area code");
        objForm.txtAreaCode.focus();
    }  

    if (bCorrect && objForm.txtPhoneNumber.value=="")
    {
        bCorrect = false;
        alert ("Please enter your phone number");
        objForm.txtPhoneNumber.focus();
    }	

    if( bCorrect && objForm.txtDate.value!="" ) {

        var date=objForm.txtDate.value;
        var dateArray=date.split("/");
        var length=dateArray.length;
        for(var i=0;i<length;i++)
        {
            if(bCorrect && isNaN(dateArray[i]))
            {
                alert("Please enter a valid date");
                objForm.txtDate.select();
                objForm.txtDate.focus();
                bCorrect=false;
            }
        }
        if(bCorrect && dateArray[0]>31)
        {
            alert("Please enter a valid date");
            objForm.txtDate.select();
            objForm.txtDate.focus();
            bCorrect=false;
        }
        if(bCorrect && dateArray[1]>12)
        {
            alert("Please enter a valid date");
            objForm.txtDate.select();
            objForm.txtDate.focus();
            bCorrect=false;
        }
        if(bCorrect && (dateArray[2]>9999||dateArray[2]<1000))
        {
            alert("Please enter the date in the specified format (dd/mm/yyyy)");
            objForm.txtDate.select();
            objForm.txtDate.focus();
            bCorrect=false;
        }
        if (bCorrect && ((dateArray[1]>12||dateArray[1]<1) || (dateArray[0]>31||dateArray[0]<1))) {
            alert("Please enter a valid date");
            objForm.txtDate.select();
            objForm.txtDate.focus();
            bCorrect=false;
        }
        if(bCorrect && (dateArray[2]<=9999||dateArray[2]>2005)) {
            var ndate = dateArray[2];
            var date  = new Date();
            var year = date.getYear();
            if (ndate<year) {
                alert("Please enter a valid date");
                objForm.txtDate.select();
                objForm.txtDate.focus();
                bCorrect=false;
            }
        }
    }
    if (bCorrect && objForm.txtDays.value) 
    {
        var val = objForm.txtDays.value;
        if(isNaN(val)) {
           bCorrect = false;
           alert("Days in hand should be an integer")
           objForm.txtDays.focus()
        }
    }

    if (bCorrect && objForm.txtAdultNo.value) 
    {
        var val = objForm.txtAdultNo.value;
        if(isNaN(val)) {
           bCorrect = false;
           alert("No. of adults should be an integer")
           objForm.txtAdultNo.focus()
        }                
    }

    if (bCorrect && objForm.txtChildNo.value) 
    {
        var val = objForm.txtChildNo.value;
        if(isNaN(val)) {
           bCorrect = false;
           alert("No. of children should be an integer")
           objForm.txtChildNo.focus()
        }
    }

    return bCorrect;
}
//-->
function func_SelectAll(Type){
//birdsanct=document.forms[0].chkBeache
//alert(birdsanct.length);
    if(Type=='All')
    {
    for(var loop=0;loop<document.frmtailormade.chkBirdSanct.length;loop++){
            document.frmtailormade.chkBirdSanct[loop].checked=true;				
        }
        for(var loop=0;loop<document.frmtailormade.chkHill.length;loop++){
            document.frmtailormade.chkHill[loop].checked=true;
        }
        for(var loop=0;loop<document.frmtailormade.chkWaterFall.length;loop++){
            document.frmtailormade.chkWaterFall[loop].checked=true;
        }
        for(var loop=0;loop<document.frmtailormade.chkWildLife.length;loop++){
            document.frmtailormade.chkWildLife[loop].checked=true;
        }
        for(var loop=0;loop<document.frmtailormade.chkBackwater.length;loop++){
            document.frmtailormade.chkBackwater[loop].checked=true;
        }
        for(var loop=0;loop<document.frmtailormade.chkBeache.length;loop++){
            document.frmtailormade.chkBeache[loop].checked=true;
        }
		
    }
    if(Type=='Bird'){		
        if(document.frmtailormade.chkBirdSanct[0].checked==true){
            for(var loop=1;loop<document.frmtailormade.chkBirdSanct.length;loop++){
                document.frmtailormade.chkBirdSanct[loop].checked=true;
            }
        }
    }
    if(Type=='Hills'){		
        if(document.frmtailormade.chkHill[0].checked==true){
            for(var loop=1;loop<document.frmtailormade.chkHill.length;loop++){
                document.frmtailormade.chkHill[loop].checked=true;				
            }			
        }
    }
    if(Type=='WaterFall'){		
        if(document.frmtailormade.chkWaterFall[0].checked==true){
            for(var loop=1;loop<document.frmtailormade.chkWaterFall.length;loop++){
                document.frmtailormade.chkWaterFall[loop].checked=true;				
            }			
        }
    }
    if(Type=='Wild'){		
        if(document.frmtailormade.chkWildLife[0].checked==true){
            for(var loop=1;loop<document.frmtailormade.chkWildLife.length;loop++){
                document.frmtailormade.chkWildLife[loop].checked=true;				
            }
        }
    }
    if(Type=='BackWater'){		
        if(document.frmtailormade.chkBackwater[0].checked==true){
            for(var loop=1;loop<document.frmtailormade.chkBackwater.length;loop++){
                document.frmtailormade.chkBackwater[loop].checked=true;
            }
        }
    }
    if(Type=='Beache'){		
            if(document.frmtailormade.chkBeache[0].checked==true){
                    for(var loop=1;loop<document.frmtailormade.chkBeache.length;loop++){
                            document.frmtailormade.chkBeache[loop].checked=true;				
                    }			
            }
    }

}
function func_Deselect(Type)
{
    if(Type=='Hill')
    {
            for(var loop=1;loop<document.frmtailormade.chkHill.length;loop++){
                            if(document.frmtailormade.chkHill[loop].checked==false){
                                    document.frmtailormade.chkHill[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
    if(Type=='WaterFall')
    {
            for(var loop=1;loop<document.frmtailormade.chkWaterFall.length;loop++){
                            if(document.frmtailormade.chkWaterFall[loop].checked==false){
                                    document.frmtailormade.chkWaterFall[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
            if(Type=='Bird')
    {
            for(var loop=1;loop<document.frmtailormade.chkBirdSanct.length;loop++){
                            if(document.frmtailormade.chkBirdSanct[loop].checked==false){
                                    document.frmtailormade.chkBirdSanct[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
            if(Type=='WildLife')
    {
            for(var loop=1;loop<document.frmtailormade.chkWildLife.length;loop++){
                            if(document.frmtailormade.chkWildLife[loop].checked==false){
                                    document.frmtailormade.chkWildLife[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
            if(Type=='BackWater')
    {
            for(var loop=1;loop<document.frmtailormade.chkBackwater.length;loop++){
                            if(document.frmtailormade.chkBackwater[loop].checked==false){
                                    document.frmtailormade.chkBackwater[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
    if(Type=='WildLife')
    {
            for(var loop=1;loop<document.frmtailormade.chkWildLife.length;loop++){
                            if(document.frmtailormade.chkWildLife[loop].checked==false){
                                    document.frmtailormade.chkWildLife[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
    if(Type=='Beache')
    {
            for(var loop=1;loop<document.frmtailormade.chkBeache.length;loop++){
                            if(document.frmtailormade.chkBeache[loop].checked==false){
                                    document.frmtailormade.chkBeache[0].checked=false;
                                    document.frmtailormade.chkSelect.checked=false;
                            }				
                    }
    }
}	