//function for on submit validation
function onYearlyPooja( f )
  {
  if(f.tmid0.value == "0")
    {
    alert( "Choose the Package by Clicking 'Add to Pooja Cart'" ) ;
    window.location.href = "#pone" ;
    return false ;
    }


  if( !validEmail( f.cod_email, 'E-Mail Your Address as a User Name' ) ) return false ;
  if( !checkTextData( f.cod_firstname, 'Enter name under billing detail section' ) ) return false ;
  if( !checkTextData( f.cod_address1, 'Enter Address under billing detail section' ) ) return false ;
  if( !checkTextData( f.cod_city, 'Enter City under billing detail section' ) ) return false ;
  if( !checkTextData( f.cod_state, 'Enter State Name under billing detail section' ) ) return false ;
  if( !checkTextData( f.cod_zip, 'Enter City ZIP Code under billing detail section' ) ) return false ;
 
  if( !f.cod_country[f.cod_country.selectedIndex].value ) 
    {
    alert("Select Country Name under billing section");
    f.cod_country.focus();
    return false ;
    }

  if( !checkTextData( f.cod_phone, 'Enter Phone Number under billing detail section' ) ) return false ;

	if( !checkTextData( f.com_firstname, 'Enter Name under delivery detail section' ) ) return false ;
    if( !checkTextData( f.com_address1, 'Enter Address under delivery detail section' ) ) return false ;
    if( !checkTextData( f.com_city, 'Enter City Name under delivery detail section' ) ) return false ;
    if( !checkTextData( f.com_state, 'Enter State Name under delivery detail section' ) ) return false ;
    if( !checkTextData( f.com_zip, 'Enter City ZIP code under delivery detail section' ) ) return false ;
    if( !f.com_country[f.com_country.selectedIndex].value ) 
      {
      alert("Select Country Name under delivery detail section");
      f.com_country.focus();
      return false ;	  
      }
    if( !checkTextData( f.com_phone, 'Enter Phone no. under delivery detail section' ) ) return false ;
    if(f.com_message.value.length > 250)
      {
      alert("Maximum of 250 characters only");
      f.com_message.focus();
      return false ;
      }/*
if(f.chk1.checked == true)
    {
    if( !checkTextData( f.chm_name1, 'Enter Additional Archana Name' ) )
    return false ;
       
    }
    if(f.chk2.checked == true)
    {
    if( !checkTextData( f.chm_name2, 'Enter Additional Archana Name' ) )
    return false ;
       
    }
    if(f.chk3.checked == true)
    {
    if( !checkTextData( f.chm_name3, 'Enter Additional Archana Name' ) )
		{
			f.chm_name3.focus();
			return false ;
		}      
    }
    if(f.chk4.checked == true)
    {
    if( !checkTextData( f.chm_name4, 'Enter Additional Archana Name' ) )
		{
			f.chm_name4.focus();
		    return false ;
		}
       
    }*/
  var aletmess = "You have ordered pooja(s) at\n\n" ;
    aletmess = aletmess + "- Meenakshi Amman Temple, Madurai \n" ;
    aletmess = aletmess + "- Dandayudhapani  Temple, Palani \n" ;
    aletmess = aletmess + "- Kamakshi Amman Temple, Kancheepuram \n" ;
    aletmess = aletmess + "- Bala Subramanya Swamy Temple, Tiruchendur \n" ;
    aletmess = aletmess + "- Mariamman Temple, Samayapuram \n" ;
    aletmess = aletmess + "- Vaidhyanathar Temple, Vaitheeswaran Koil \n" ;
    aletmess = aletmess + "- Ramaswamy Temple, Rameswaram \n" ;
    aletmess = aletmess + "- Narashimar Temple, Sholingar \n" ;
    aletmess = aletmess + "- Ayyappan Temple, Chennai \n" ;
    aletmess = aletmess + "- Guru Temple, Alangudi \n" ;
    aletmess = aletmess + "- Karumari Amman Temple,  Thiruverkadu \n" ;
    aletmess = aletmess + "- Arunchaleswarar Temple, Thiruvannamalai \n" ;

  alert(aletmess) ;
  return true ;

 }

//function for adding temple to pooja cart
function addPooja(pjnum)
  {

document.festivaloffer.tmid0.value=1;
/*	document.festivaloffer.tmid1.value = pjnum ;
	document.festivaloffer.tmid2.value = "2" ;
	document.festivaloffer.tmid3.value = "3" ;
	document.festivaloffer.tmid4.value = "4" ;
	document.festivaloffer.tmid5.value = "5" ;
	document.festivaloffer.tmid6.value = "6" ;
	document.festivaloffer.tmid7.value = "7" ;
	document.festivaloffer.tmid8.value = "8" ;
	document.festivaloffer.tmid9.value = "9" ;
	document.festivaloffer.tmid10.value = "10" ;
	document.festivaloffer.tmid11.value = "11" ;
	document.festivaloffer.tmid12.value = "12" ;*/
	alert("Yearly Subcription Pooja Package-II was successfully added in the Cart") ;	
  window.location.href = "#payment" ;
  }

function diff_deli()
  {
  if(document.festivaloffer.this_gift.checked == false)
    {
    document.festivaloffer.cod_firstname.disabled = true ;
    document.festivaloffer.cod_lastname.disabled = true ;
    document.festivaloffer.cod_address1.disabled = true ;
    document.festivaloffer.cod_address2.disabled = true ;
    document.festivaloffer.cod_city.disabled = true ;
    document.festivaloffer.cod_zip.disabled = true ;
    document.festivaloffer.cod_state.disabled = true ;
    document.festivaloffer.cod_country.disabled = true ;
    document.festivaloffer.cod_phone.disabled = true ;
    document.festivaloffer.com_message.disabled = true ;
    }
  else
    {
    document.festivaloffer.cod_firstname.disabled = false ;
    document.festivaloffer.cod_lastname.disabled = false ;
    document.festivaloffer.cod_address1.disabled = false ;
    document.festivaloffer.cod_address2.disabled = false ;
    document.festivaloffer.cod_city.disabled = false ;
    document.festivaloffer.cod_zip.disabled = false ;
    document.festivaloffer.cod_state.disabled = false ;
    document.festivaloffer.cod_country.disabled = false ;
    document.festivaloffer.cod_phone.disabled = false ;
    document.festivaloffer.com_message.disabled = false ;
    }
  }

