var name,lastname,father_name,mother_name,gender,dob,home_district,home_block,home_town,per_address,com_district;
var add_proof,email,mobile,alt_mobile,pan,pan_attch,adhar,adhar_attch,pass_photo,emp_code,doj,designation;
var level,district,com_address,block,panchyat,program,contract_date,contract_sign_with,pnrd_experience,other_experience,offer_letter,exp_one,exp_two,exp_three,exp_four; 
var bank_name,ifsc,account_no,hslc_board,hslc_pass_year,hslc_class,hslc_per,hslc_attch,hsslc_board,hsslc_pass_year;
var hsslc_class,hsslc_per,hsslc_attch,ug_course,ug_board,ug_pass_year,ug_class,ug_per,ug_attch,pg_course,pg_board;
var pg_pass_year,pg_class,pg_per,pg_attch,oth_course,oth_duration,oth_inst_name,oth_pass_year,oth_class,oth_attch;
var first_aggrement,recent_aggrement,upd_pnrd_experience,upd_other_experience,hsslc_stream,ot_course,ot_board,ot_pass_year,ot_class,ot_per,home_gp;


$("#preview").click(function(){
           name = $('#name').val();
		   lastname = $('#lastname').val();
           father_name = $("#father_name").val();
           mother_name = $("#mother_name").val();
           dob =$("#dob").val();
			
			home_gp = $("#home_gp option:selected");
			gender = $("#gender option:selected");
           home_district = $("#home_district option:selected");
           home_block =  $("#home_block option:selected");
           home_town =  $("#home_town").val();
           per_address = $("#per_address").val();
		   com_address = $("#com_address").val();
           com_district = $("#com_district").val();
           //add_proof = $("#add_proof").val();

           email = $("#email").val();
           mobile =  $("#mobile").val();
           alt_mobile = $("#alt_mobile").val();
           pan =  $("#pan").val();
           //pan_attch =$("#pan_attch").val();
           adhar = $("#adhar").val();
           //adhar_attch = $("#adhar_attch").val();
           //pass_photo  = $("#pass_photo").val();
           emp_code = $("#emp_code").val();
           doj = $("#doj").val();
           designation =$("#designation option:selected");

           //salary =$("#salary").val();
           level =$("#level option:selected");
           district =$("#district option:selected");
           block =$("#block option:selected");

           panchyat =$("#panchyat option:selected");
           program =$("#program option:selected");
           contract_date =$("#contract_date").val();
		   contract_sign_with =$("#contract_sign_with").val();
		   pnrd_experience =$("#pnrd_experience").val();
           other_experience =$("#other_experience").val();
           bank_name =$("#bank_name").val();
           ifsc  =$("#ifsc").val();
           account_no =$("#account_no").val();
           hslc_board =$("#hslc_board").val();
           hslc_pass_year =$("#hslc_pass_year").val();
           hslc_class =$("#hslc_class").val();
           hslc_per = $("#hslc_per").val();
           //hslc_attch = $("#hslc_attch").val();
           hsslc_board = $("#hsslc_board").val();
           hsslc_pass_year = $("#hsslc_pass_year").val();
           hsslc_class = $("#hsslc_class").val();
		   hsslc_stream = $("#hsslc_stream option:selected");
           hsslc_per = $("#hsslc_per").val();
           //hsslc_attch = $("#hsslc_attch").val();


           ug_course =$("#ug_course").val();
           ug_board =$("#ug_board").val();
           ug_pass_year= $("#ug_pass_year").val();
           ug_class =$("#ug_class").val();
           ug_per =$("#ug_per").val();
           //ug_attch =$("#ug_attch").val();

           ot_course =$("#ot_course").val();
           ot_board =$("#ot_board").val();
           ot_pass_year =$("#ot_pass_year").val();
           ot_class =$("#ot_class").val();
           ot_per =$("#ot_per").val();
		   
           //pg_attch =$("#pg_attch").val();

           oth_course =$("#oth_course").val();
           oth_duration =$("#oth_duration").val();
           oth_inst_name =$("#oth_inst_name").val();
           oth_pass_year =$("#oth_pass_year").val();
           oth_class =$("#oth_class").val();
           //oth_attch =$("oth_attch").val();
           
		   	  $("#display_first_aggrement").text(first_aggrement);
			  $("#display_recent_aggrement").text(recent_aggrement);
			  $("#display_upd_pnrd_experience").text(upd_pnrd_experience);
			  $("#display_upd_other_experience").text(upd_other_experience);
		   	
		   	  $("#display_name").text(name);
		   	  $("#display_lastname").text(lastname);

           	  $("#display_name").text(name);
           	  $("#display_father_name").text(father_name);
           	  $("#display_mother_name").text(mother_name);
           	  $("#display_gender").text(gender.html());
           	  $("#display_dob").text(dob);

           	  $("#display_home_district").text(home_district.html());
           	  $("#display_home_block").text(home_block.html());
           	  $("#display_home_town").text(home_town);
           	  $("#display_per_address").text(per_address);
			  $("#display_com_address").text(com_address);
           	  $("#display_com_district").text(com_district);
           	  $("#display_add_proof").text(add_proof);

           	  $("#display_email").text(email);
           	  $("#display_mobile").text(mobile);
           	  $("#display_alt_mobile").text(alt_mobile);
           	  $("#display_pan").text(pan);
           	  $("#display_pan_attch").text(pan_attch);
           	  $("#display_adhar").text(adhar);
           	  //$("#display_adhar_attch").text(adhar_attch);
           	  $("#display_pass_photo").text(pass_photo);
           	  $("#display_emp_code").text(emp_code);
           	  $("#display_doj").text(doj);
           	  $("#display_designation").text(designation.html());
           	  $("#display_level").text(level.html());
           	  $("#display_district").text(district.html());
           	  $("#display_block").text(block.html());

           	  $("#display_panchyat").text(panchyat.html());
           	  $("#display_program").text(program.html());
           	  $("#display_contract_date").text(contract_date);
           	  $("#display_offer_letter").text(offer_letter);
			  $("#display_hsslc_stream").text(hsslc_stream.html());
			  $("#display_contract_sign_with").text(contract_sign_with);
			  $("#display_pnrd_experience").text(pnrd_experience);
			  $("#display_pnrd_experience").text(pnrd_experience);
			  $("#display_other_experience").text(other_experience);
           	    
           	  $("#display_bank_name").text(bank_name);
           	  $("#display_ifsc").text(ifsc);
           	  $("#display_account_no").text(account_no);
			  
           	  $("#display_hslc_board").text(hslc_board);
           	  $("#display_hslc_pass_year").text(hslc_pass_year);
           	  $("#display_hslc_class").text(hslc_class);
           	  $("#display_hslc_per").text(hslc_per);
           	  //$("#display_hslc_attch").text(hslc_attch);
           	  $("#display_hsslc_board").text(hsslc_board);
           	  $("#display_hsslc_pass_year").text(hsslc_pass_year);
           	  $("#display_hsslc_class").text(hsslc_class);
           	  $("#display_hsslc_per").text(hsslc_per);
           	   //_("display_hsslc_attch").text(hsslc_attch);
				
				 $("#display_home_gp").text(home_gp.html());
				  $("#display_ot_course").text(ot_course);
           	  $("#display_ot_board").text(ot_board);
           	  $("#display_ot_pass_year").text(ot_pass_year);
           	  $("#display_ot_class").text(ot_class);
           	  $("#display_ot_per").text(ot_per);
			  
			  
           	  $("#display_ug_course").text(ug_course);
           	  $("#display_ug_board").text(ug_board);
           	  $("#display_ug_pass_year").text(ug_pass_year);
           	  $("#display_ug_class").text(ug_class);
           	  $("#display_ug_per").text(ug_per);
           	  //$("#display_ug_attch").text(ug_attch);

           	 // $("#display_pg_course").text(pg_course);
           	  //$("#display_pg_board").text(pg_board);
           	  //$("#display_pg_pass_year").text(pg_pass_year);
           	  //$("#display_pg_class").text(pg_class);
           	  //$("#display_pg_per").text(pg_per);
           	   //_("display_pg_attch").text(pg_attch);

           	  //$("#display_oth_course").text(oth_course);
           	  //$("#display_oth_duration").text(oth_duration);
           	  //$("#display_oth_inst_name").text(oth_inst_name);
           	  //$("#display_oth_pass_year").text(oth_pass_year);
           	  //$("#display_oth_class").text(oth_class);
           	   //_("display_oth_attch").text(oth_attch);
});
function firstAggrement(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_first_aggrement')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }
function recentAggrement(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_recent_aggrement')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }
function pnrdExperience(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_upd_pnrd_experience')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }		  
function otherExperience(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_upd_other_experience')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }	
function addProof(input) {
       if (input.files && input.files[0]) {
           var reader = new FileReader();

           reader.onload = function (e) {
               $('#display_add_proof')
                   .attr('src', e.target.result);
           };

           reader.readAsDataURL(input.files[0]);
       }
   }
 function panAttch(input) {
        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function (e) {
                $('#display_pan_attch')
                    .attr('src', e.target.result);
            };

            reader.readAsDataURL(input.files[0]);
        }
    }
 function adharAttch(input) {
           if (input.files && input.files[0]) {
               var reader = new FileReader();

               reader.onload = function (e) {
                   $('#display_adhar_attch')
                       .attr('src', e.target.result);
               };

               reader.readAsDataURL(input.files[0]);
           }
       }
       function passPhoto(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_pass_photo')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }

       function offerLetter(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_offer_letter')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }
       function expOne(input) {
              if (input.files && input.files[0]) {
                  var reader = new FileReader();

                  reader.onload = function (e) {
                      $('#display_exp_one')
                          .attr('src', e.target.result);
                  };

                  reader.readAsDataURL(input.files[0]);
              }
          }
          function expTwo(input) {
                 if (input.files && input.files[0]) {
                     var reader = new FileReader();

                     reader.onload = function (e) {
                         $('#display_exp_two')
                             .attr('src', e.target.result);
                     };

                     reader.readAsDataURL(input.files[0]);
                 }
             }
             function expThree(input) {
                    if (input.files && input.files[0]) {
                        var reader = new FileReader();

                        reader.onload = function (e) {
                            $('#display_exp_three')
                                .attr('src', e.target.result);
                        };

                        reader.readAsDataURL(input.files[0]);
                    }
                }
                function expFour(input) {
                       if (input.files && input.files[0]) {
                           var reader = new FileReader();

                           reader.onload = function (e) {
                               $('#display_exp_four')
                                   .attr('src', e.target.result);
                           };

                           reader.readAsDataURL(input.files[0]);
                       }
                   }
                   function hslcAttch(input) {
                          if (input.files && input.files[0]) {
                              var reader = new FileReader();

                              reader.onload = function (e) {
                                  $('#display_hslc_attch')
                                      .attr('src', e.target.result);
                              };

                              reader.readAsDataURL(input.files[0]);
                          }
                      }
                      function hsslcAttch(input) {
                             if (input.files && input.files[0]) {
                                 var reader = new FileReader();

                                 reader.onload = function (e) {
                                     $('#display_hsslc_attch')
                                         .attr('src', e.target.result);
                                 };

                                 reader.readAsDataURL(input.files[0]);
                             }
                         }
                         function ugAttch(input) {
                                if (input.files && input.files[0]) {
                                    var reader = new FileReader();

                                    reader.onload = function (e) {
                                        $('#display_ug_attch')
                                            .attr('src', e.target.result);
                                    };

                                    reader.readAsDataURL(input.files[0]);
                                }
                            }
                            function pgAttch(input) {
                                   if (input.files && input.files[0]) {
                                       var reader = new FileReader();

                                       reader.onload = function (e) {
                                           $('#display_pg_attch')
                                               .attr('src', e.target.result);
                                       };

                                       reader.readAsDataURL(input.files[0]);
                                   }
                               }
                               function othAttch(input) {
                                      if (input.files && input.files[0]) {
                                          var reader = new FileReader();

                                          reader.onload = function (e) {
                                              $('#display_oth_attch')
                                                  .attr('src', e.target.result);
                                          };

                                          reader.readAsDataURL(input.files[0]);
                                      }
                                  }