Current File : /home/inlingua/public_html/sensoriumpsychologists.com/diagnostics/screening/new_admission_old.php
<?php 
require_once("../franchise_between/check_franchise.php");?>
<?php require_once("../franchise_between/user_details_msg_setup.php");?>
<?php require_once("../franchise_between/accounts_banks_funcs.php");?>
<?php require_once("../franchise_between/student_funcs.php");?>
<?php require_once("../franchise_between/validate_functions.php");?>
<?php


$accounts_obj=new accounts_funcs();
$admission_fees=$accounts_obj->get_admission_fees();
$student_obj=new student_funcs();
?>
<?php
/*$balance=0;
$e_wallet_obj=new e_wallet();
$e_wallet_obj->set_value("franchise_id",$session_id);
$balance=$e_wallet_obj->e_wallet_balance();
?>
<?php
if($balance<$admission_fees)
{
	echo("Error : Insufficient funds...Please add more funds...!!!");
	exit();
}*/
?>
<?php
if(!empty($_POST)){
	//echo "<pre>";
	//print_r($_REQUEST);
	//die;
	
	$child_name=$_POST['child_name'];
	$email=$_POST['email'];
	$age=$_POST['age'];
	$gender=$_POST['gender'];
	$dob_day=$_POST['dob_day'];
	$dob_month=$_POST['dob_month'];
	$dob_year=$_POST['dob_year'];
	$education=$_POST['education'];
	$school_name=$_POST['school_name'];
	$contact_no=$_POST['contact_no'];
	$informant=$_POST['informant'];
	$c_local=$_POST['c_local'];
	$c_city=$_POST['c_city'];
	$c_district=$_POST['c_district'];
	$c_state=$_POST['c_state'];
	$c_pincode=$_POST['c_pincode'];
	$p_local=$_POST['p_local'];
	$p_city=$_POST['p_city'];
	$p_district=$_POST['p_district'];
	$p_state=$_POST['p_state'];
	$p_pincode=$_POST['p_pincode'];
	$problem=$_POST['problem'];
	$walking=$_POST['walking'];
	$first_sentence=$_POST['first_sentence'];
	$toilet_behaviour=$_POST['toilet_behaviour'];
	$self_help=$_POST['self_help'];
	$sleeping_pattern=$_POST['sleeping_pattern'];
	$play=$_POST['play'];
	$play_group=$_POST['play_group'];
	$type_of_play=$_POST['type_of_play'];
	$behav_with_family=$_POST['behav_with_family'];
	$reln_with_siblings=$_POST['reln_with_siblings'];
	
	$validate_obj=new validate_functions();
	$validate_obj->check_is_num($dob_day,"Day in D.O.B Date");
	$validate_obj->check_is_num($dob_month,"Month in D.O.B Date");
	$validate_obj->check_is_num($dob_year,"Year in D.O.B Date");
	$dob_date=$dob_year."-".$dob_month."-".$dob_day;
	
	$p_city=trim($p_city);
	$total_chars=strlen($p_city);
	
	if($total_chars<3){
		echo("Error : Permanent City must be atleast 3 characters long...");
		exit();
	}
	
	$student_obj->set_value("franchise_id",$session_id);
	$student_obj->set_value("child_name",$child_name);
	$student_obj->set_value("email",$email);
	$student_obj->set_value("age",$age);
	$student_obj->set_value("gender",$gender);
	$student_obj->set_value("dob_date",$dob_date);
	$student_obj->set_value("education",$education);
	$student_obj->set_value("school_name",$school_name);
	$student_obj->set_value("contact_no",$contact_no);
	$student_obj->set_value("informant",$informant);
	$student_obj->set_value("c_local",$c_local);
	$student_obj->set_value("c_city",$c_city);
	$student_obj->set_value("c_district",$c_district);
	$student_obj->set_value("c_state",$c_state);
	$student_obj->set_value("c_pincode",$c_pincode);
	$student_obj->set_value("p_local",$p_local);
	$student_obj->set_value("p_city",$p_city);
	$student_obj->set_value("p_district",$p_district);
	$student_obj->set_value("p_state",$p_state);
	$student_obj->set_value("p_pincode",$p_pincode);
	$student_obj->set_value("problem",$problem);
	$student_obj->set_value("walking",$walking);
	$student_obj->set_value("first_sentence",$first_sentence);
	$student_obj->set_value("toilet_behaviour",$toilet_behaviour);
	$student_obj->set_value("self_help",$self_help);
	$student_obj->set_value("sleeping_pattern",$sleeping_pattern);
	$student_obj->set_value("play",$play);
	$student_obj->set_value("play_group",$play_group);
	$student_obj->set_value("type_of_play",$type_of_play);
	$student_obj->set_value("behav_with_family",$behav_with_family);
	$student_obj->set_value("reln_with_siblings",$reln_with_siblings);
	$student_obj->set_value("admission_fees",$admission_fees);
	
	$payment_no=$student_obj->new_admission();
	
	$msg="Saved successfully...";
	$temp_filename="student_initial_fees_payment.php?payment_no=".$payment_no;
	header("Location: /franchise/redirect_back.php?q=".$temp_filename."&msg=".$msg);
}
?>
<!doctype html>
<html>
<?php include("common/page_head.php");?>
<script src="javascript/numberkey.js"></script>
<body>
<?php include("common/header_var.php");?>
<?php
$top_enrollment=$top_val;
?>
<?php include("common/header.php");?>
<div id="main_container">
<div id="main">
<br />
<br />
<div class="top_heading_page">NEW ADMISSION</div>
<br>
<br>
<fieldset>
<legend>PERSONAL DETAILS</legend>
 <form method="post" name="myform" onSubmit="return submit_form()">
<!--<form method="post" name="myform" enctype="multipart/form-data">-->
<table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Child's Name</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><input type="text" name="child_name" id="child_name" style="width:300px;" /></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Email</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><input type="text" name="email" id="email" style="width:300px;" /></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Age</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><select name="age" id="age">
              <option value="">---</option>
              <option>5</option>
              <option>6</option>
              <option>7</option>
              <option>8</option>
              <option>9</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
              <option>13</option>
              <option>14</option>
              <option>15</option>
            </select>
            &nbsp;&nbsp;years </td>
        </tr>
      </table></td>
    <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Gender</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><select name="gender" id="gender">
              <option value="">---</option>
              <option>Male</option>
              <option>Female</option>
            </select></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Date of Birth</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><select name="dob_day" id="dob_day">
              <option value="">---</option>
              <?php
				  for($i=1;$i<=31;$i++)
				  {
					  echo("<option>".$i."</option>");
				  }
				  ?>
            </select>
            &nbsp;
            <select name="dob_month" id="dob_month">
              <option value="">---</option>
              <option value="01">Jan</option>
              <option value="02">Feb</option>
              <option value="03">Mar</option>
              <option value="04">Apr</option>
              <option value="05">May</option>
              <option value="06">Jun</option>
              <option value="07">Jul</option>
              <option value="08">Aug</option>
              <option value="09">Sep</option>
              <option value="10">Oct</option>
              <option value="11">Nov</option>
              <option value="12">Dec</option>
            </select>
            &nbsp;
            <select name="dob_year" id="dob_year">
              <option value="">---</option>
              <?php
$year=date("Y");
$i=$year-15;
				  for(;$i<=$year;$i++)
				  {
					  echo("<option>".$i."</option>");
				  }
				  ?>
            </select></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Education</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><select name="education" id="education">
              <option value="">---</option>
              <option value="1">1st</option>
              <option value="2">2nd</option>
              <option value="3">3rd</option>
              <option value="4">4th</option>
              <option value="5">5th</option>
              <option value="6">6th</option>
              <option value="7">7th</option>
              <option value="8">8th</option>
              <option value="9">9th</option>
              <option value="10">10th</option>
            </select>
            &nbsp;&nbsp;std </td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">School Name</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><input type="text" name="school_name" id="school_name" style="width:700px;" /></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Contact No</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><input type="text" name="contact_no" id="contact_no" style="width:200px;" /></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2"><table cellpadding="5px" cellspacing="0">
        <tr>
          <td style="font-weight:bold;width:120px;">Informant</td>
          <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
          <td><input type="text" name="informant" id="informant" style="width:500px;" /></td>
        </tr>
      </table></td>
  </tr>
</table>
</fieldset>
<br>
<br>
<fieldset>
  <legend>ADDRESS</legend>
  <table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
    <tr>
      <td style="width:50%;"><table cellpadding="0" cellspacing="0" style="width:400px;">
          <tr style="height:30px;">
            <td>CORRESPONDANCE ADDRESS&nbsp;&nbsp;<span style="color:#F00;font-weight:bold;font-size:1.4em;">*</span></td>
          </tr>
          <tr>
            <td><textarea placeholder="Local Address" name="c_local" id="c_local" style="resize:none;width:99%;" rows="3" class="textboxes"></textarea></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><input type="text" placeholder=" City" name="c_city" id="c_city" style="width:100%;" class="textboxes" /></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><input type="text" placeholder=" District" name="c_district" id="c_district" style="width:100%;" class="textboxes" /></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><select class="textboxes" style="width:100%;" name="c_state" id="c_state">
                <option value="">--- Select ---</option>
                <?php
                      $student_obj->view_all_states();
					  ?>
              </select></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><input type="text" placeholder=" Pincode" name="c_pincode" id="c_pincode" onkeypress="return isNumberKey(event)" maxlength="6" style="width:50%;" class="textboxes" /></td>
          </tr>
        </table></td>
      <td><table cellpadding="0" cellspacing="0" style="width:400px;">
          <tr style="height:30px;">
            <td>PERMANENT ADDRESS&nbsp;&nbsp;<span style="color:#F00;font-weight:bold;font-size:1.4em;">*</span>
              <input type="button" value="Copy Correspondance Address" onClick="copy_addr()" /></td>
          </tr>
          <tr>
            <td><textarea placeholder="Local Address" name="p_local" id="p_local" style="resize:none;width:99%;" rows="3" class="textboxes"></textarea></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><input type="text" placeholder=" City" name="p_city" id="p_city" style="width:100%;" class="textboxes" /></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><input type="text" placeholder=" District" name="p_district" id="p_district" style="width:100%;" class="textboxes" /></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><select class="textboxes" style="width:100%;" name="p_state" id="p_state">
                <option value="">--- Select ---</option>
                <?php
                      $student_obj->view_all_states();
					  ?>
              </select></td>
          </tr>
          <tr style="height:10px;">
            <td></td>
          </tr>
          <tr>
            <td><input type="text" placeholder=" Pincode" name="p_pincode" id="p_pincode" onkeypress="return isNumberKey(event)" maxlength="6" style="width:50%;" class="textboxes" /></td>
          </tr>
        </table></td>
    </tr>
  </table>
</fieldset>
<br>
<br>
<fieldset>
  <legend>PROBLEMS & BEHAVIOURS</legend>
  <table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="2"><table cellpadding="0" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;font-size:14px;">PRESENTING PROBLEMS OF THE CHILD <span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:<br>
              <textarea name="problem" id="problem" style="width:98%;resize:none;" rows="4"></textarea></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2" style="font-size:14px;"><br>
        <br>
        POSTNATAL DEVELOPMENT : </td>
    </tr>
    <tr>
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:120px;">Walking</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><select name="walking" id="walking">
                <option value="">---</option>
                <option>10-11 months</option>
                <option>12-13 months</option>
                <option>14-16 months</option>
                <option>17-20 months</option>
              </select></td>
          </tr>
        </table></td>
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:120px;">First Sentence</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><select name="first_sentence" id="first_sentence">
                <option value="">---</option>
                <option>10-12 months</option>
                <option>12-13 months</option>
                <option>13-15 months</option>
                <option>16-24 months</option>
                <option>not yet</option>
              </select></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2" style="font-size:14px;"><br>
        <br>
        CHILD'S BEHAVIOUR : </td>
    </tr>
    <tr valign="top">
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:150px;">Toilet Behaviour</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><select name="toilet_behaviour" id="toilet_behaviour">
                <option value="">---</option>
                <option>Dependent</option>
                <option>Independent</option>
              </select></td>
          </tr>
        </table></td>
      <td style="width:50%;"><table cellpadding="5px" cellspacing="0">
          <tr valign="top">
            <td style="font-weight:bold;width:150px;">Self help skills (bathing, eating, dressing, communication skills)</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><select name="self_help" id="self_help">
                <option value="">---</option>
                <option>Dependent</option>
                <option>Independent</option>
              </select></td>
          </tr>
        </table></td>
    </tr>
    <tr valign="top">
      <td colspan="2"><table cellpadding="5px" cellspacing="0">
          <tr>
            <td style="font-weight:bold;width:150px;">Sleeping Pattern</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><select name="sleeping_pattern" id="sleeping_pattern">
                <option value="">---</option>
                <option>Normal</option>
                <option>Disturbed</option>
              </select></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:150px;">Play (during free time)</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><input type="text" name="play" id="play" style="width:98%;" /></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:150px;">Play group</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><input type="text" name="play_group" id="play_group" style="width:98%;" /></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:150px;">Type of play</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><input type="text" name="type_of_play" id="type_of_play" style="width:98%;" /></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:150px;">Behaviour with family</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><input type="text" name="behav_with_family" id="behav_with_family" style="width:98%;" /></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
          <tr>
            <td style="font-weight:bold;width:150px;">Relationship with siblings</td>
            <td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
            <td><input type="text" name="reln_with_siblings" id="reln_with_siblings" style="width:98%;" /></td>
          </tr>
        </table></td>
    </tr>
  </table>
</fieldset>
<br>
<table>
  <tr>
    <td><input type="button" value="Save Now" onClick="submit_form()" />
      <!--<input type="submit" name="sumnit" value="Save Now"  />--></td>
  </tr>
</table>
</div>
<br>
<br>
</div>
<script>
function submit_form()
{
	if($("#child_name").val()=="")
	{
		alert("Error : Please enter child's name...");
		$("#child_name").focus();
		return false;
	}
	if($("#email").val()=="")
	{
		alert("Error : Please enter Email...");
		$("#email").focus();
		return false;
	}
	if($("#age").val()=="")
	{
		alert("Error : Please select child's age...");
		$("#age").focus();
		return false;
	}
	if($("#gender").val()=="")
	{
		alert("Error : Please select gender");
		$("#gender").focus();
		return false;
	}
	if($("#dob_day").val()=="")
	{
		alert("Error : Please select Day in D.O.B");
		$("#dob_day").focus();
		return false;
	}
	if($("#dob_month").val()=="")
	{
		alert("Error : Please select Month in D.O.B");
		$("#dob_month").focus();
		return false;
	}
	if($("#dob_year").val()=="")
	{
		alert("Error : Please select Year in D.O.B");
		$("#dob_year").focus();
		return false;
	}
	if($("#education").val()=="")
	{
		alert("Error : Please select Education");
		$("#education").focus();
		return false;
	}
	if($("#school_name").val()=="")
	{
		alert("Error : Please enter school name");
		$("#school_name").focus();
		return false;
	}
	if($("#contact_no").val()=="")
	{
		alert("Error : Please select contact no");
		$("#contact_no").focus();
		return false;
	}
	if($("#informant").val()=="")
	{
		alert("Error : Please select informant");
		$("#informant").focus();
		return false;
	}
	if($("#c_local").val()=="")
	{
		alert("Error : Please enter local address in 'Correspondance Address'");
		$("#c_local").focus();
		return false;
	}
	if($("#c_city").val()=="")
	{
		alert("Error : Please enter city in 'Correspondance Address'");
		$("#c_city").focus();
		return false;
	}
	if($("#c_district").val()=="")
	{
		alert("Error : Please enter district in 'Correspondance Address'");
		$("#c_district").focus();
		return false;
	}
	if($("#c_state").val()=="")
	{
		alert("Error : Please select state in 'Correspondance Address'");
		$("#c_state").focus();
		return false;
	}
	if($("#c_pincode").val()=="")
	{
		alert("Error : Please enter pincode in 'Correspondance Address'");
		$("#c_pincode").focus();
		return false;
	}
	if($("#p_local").val()=="")
	{
		alert("Error : Please enter local address in 'Permanent Address'");
		$("#p_local").focus();
		return false;
	}
	if($("#p_city").val()=="")
	{
		alert("Error : Please enter city in 'Permanent Address'");
		$("#p_city").focus();
		return false;
	}
	var p_city=$("#p_city").val();
	if(p_city.length<3)
	{
		alert("Error : City in 'Permanent Address' must be 3 characters long");
		$("#p_city").focus();
		return false;
	}
	if($("#p_district").val()=="")
	{
		alert("Error : Please enter district in 'Permanent Address'");
		$("#p_district").focus();
		return false;
	}
	if($("#p_state").val()=="")
	{
		alert("Error : Please select state in 'Permanent Address'");
		$("#p_state").focus();
		return false;
	}
	if($("#p_pincode").val()=="")
	{
		alert("Error : Please enter pincode in 'Permanent Address'");
		$("#p_pincode").focus();
		return false;
	}
	if($("#problem").val()=="")
	{
		alert("Error : Please enter 'PRESENTING PROBLEM OF THE CHILD'");
		$("#problem").focus();
		return false;
	}
	if($("#walking").val()=="")
	{
		alert("Error : Please select walking");
		$("#walking").focus();
		return false;
	}
	if($("#first_sentence").val()=="")
	{
		alert("Error : Please select first sentence");
		$("#first_sentence").focus();
		return false;
	}
	if($("#toilet_behaviour").val()=="")
	{
		alert("Error : Please select 'Toilet Behaviour'");
		$("#toilet_behaviour").focus();
		return false;
	}
	if($("#self_help").val()=="")
	{
		alert("Error : Please select 'Self help skills'");
		$("#self_help").focus();
		return false;
	}
	if($("#sleeping_pattern").val()=="")
	{
		alert("Error : Please select 'Sleeping Pattern'");
		$("#sleeping_pattern").focus();
		return false;
	}
	if($("#play").val()=="")
	{
		alert("Error : Please enter 'Play (during free time)'");
		$("#play").focus();
		return false;
	}
	if($("#play_group").val()=="")
	{
		alert("Error : Please enter 'Play Group'");
		$("#play_group").focus();
		return false;
	}
	if($("#type_of_play").val()=="")
	{
		alert("Error : Please enter 'Type of Play'");
		$("#type_of_play").focus();
		return false;
	}
	if($("#behav_with_family").val()=="")
	{
		alert("Error : Please enter 'Behaviour with Family'");
		$("#behav_with_family").focus();
		return false;
	}
	if($("#reln_with_siblings").val()=="")
	{
		alert("Error : Please enter 'Relationaship with Siblings'");
		$("#reln_with_siblings").focus();
		return false;
	}
	var ans=confirm("Are you sure you want to continue?");
	if(ans==true)
	{
		document.myform.submit();
	}
	else
	{
		return false;
	}
}
function copy_addr()
{
	$("#p_local").val($("#c_local").val());
	$("#p_city").val($("#c_city").val());
	$("#p_district").val($("#c_district").val());
	$("#p_state").val($("#c_state").val());
	$("#p_pincode").val($("#c_pincode").val());
}
</script>
</body>
</html>