﻿// JScript File
function valid(){
var firstname=document.frmfeedback("txt_firstname").value;
var lastname=document.frmfeedback("txt_lastname").value;
var title=document.frmfeedback("txt_title").value;
var location=document.frmfeedback("txt_location").value;
var subject=document.frmfeedback("txt_subject").value;
var message=document.frmfeedback("txt_message").value;
var email=document.frmfeedback("txt_email").value;
var contact=document.frmfeedback("txt_contact").value;
var wishcontact=document.frmfeedback("listchurch").value;

if (firstname == "" )
{
alert("Enter First name");
return false;
}
if (lastname == "" )
{
alert("Enter Last name");
return false;
}
if ( title == "" )
{
alert("Enter Title");
return false;
}
if ( email == "" )
{
alert("Enter Email id ");
return false;
}
if ( contact == "" )
{
alert("Enter Contact number");
return false;
}

if ( location == "" )
{
alert("Enter Location");
return false;
}

if ( wishcontact == "" )
{
alert("Select 'I wish to contact' combo box");
return false;
}

if ( subject == "" )
{
alert("Enter Subject");
return false;
}

if ( message == "" )
{
alert("Enter Message");
return false;
}

return true;

}


function valid_prayreq(){
var firstname=document.frmprayerreq("txt_firstname").value;
var lastname=document.frmprayerreq("txt_lastname").value;
var location=document.frmprayerreq("txt_location").value;
var message=document.frmprayerreq("txt_message").value;
var email=document.frmprayerreq("txt_email").value;
var contactoption=document.frmprayerreq("rd_contactoption").value;

if (firstname == "" )
{
alert("Please enter your First name");
return false;
}
if (lastname == "" )
{
alert("Please enter your Last name");
return false;
}
if ( email == "" )
{
alert("Please enter your Email id ");
return false;
}
if ( message == "" )
{
alert("Please enter your Request in the Message field");
return false;
}

return true;
}
