/*===============================================================================
* File : "ptax.js"
*
* Date Created : 22nd Jan, 2014
*
* Author(s) : 1. Soibal Chanda, Software Developer, NIC
* 2. Debopam Pal, Software Developer, NIC
* 3. Paramita Basu, Software Developer, NIC
* 4. Sudeshna Maity, Software Developer, NIC
* 5. Sampurna Sinha, Software Developer, NIC
* 6. Srija Ghosh, Software Developer, NIC
* 7. Sohom, Software Developer, NIC
* 8. Prabir Sing, Software Developer, NIC
* 9. Subhasis Chatterjee, Software Developer, NIC
*
* Copyright 2014, NIC.
*==============================================================================*/
/*---------------------------------------------------------------
* View Order for configuration of different pages:
* 1. Sidebar
* 2. General
* 3. First Page
* 4. Second Page
* 5. Apply As
* 6. Principal Info
* 7. Individual
* 8. Firm
* 9. Company
* 10. Corporation
* 11. Society
* 12. Club
* 13. Association
*----------------------------------------------------------------*/
/* JQuery Starts Here */
$(document).ready(function () {
/*-------------------------------------------------------------------------
* Sidebar Configuration
*-------------------------------------------------------------------------*/
/**********************************************
* Author: Debopam Pal, Software Developer, NIC
* *********************************************/
/*corner change*/
var bl_ft_nw=document.getElementById('sup_new');
//var bl_ft1=document.getElementById('bl_ft1');
//var f2=document.getElementById('title_blink');
if(bl_ft_nw!=null)
{
setInterval(function() {
bl_ft_nw.style.color=(bl_ft_nw.style.color == 'red' ? 'white' : 'red');
// bl_ft1.style.color=(bl_ft1.style.color == 'red' ? 'white' : 'red');
//f2.innerHTML=(f2.innerHTML == 'Home' ? 'Ptax' : 'Home');
}, 300);
}
$('#RCSA').hide();
$('#RRA1').hide();
$('#EGDC').hide();
$('#update').hide();
$('#regAmnesty').hide();
$('#first_button').hide();
$('input:radio[name="registrationApplyType"]').click(
function () {
$('#txtEGDCMobileNo').val('');
$('#txtEGDCMobileNo').attr('disabled', false);
$('#btnEFirstContinue').attr('disabled', false).css("visibility","visible").show();
$('#first_button').show();
if ($(this).is(':checked') && $(this).val() == 'RCSA') {
//$('#RCSA').show(1000);
$('#EGDCSendSMS').hide();
$('#EGDC').hide(1000);
$('#RRA1').hide(1000);
$("#mask").attr("align","right").append($("#mask_close").html());
launchWindow('#dialog1');
$('#dialog1').empty();
$('#dialog1').append($('#RCSA').html());
$('#update').hide(1000);
$('#btnEFirstContinue').attr('disabled', true).hide();
$('#regAmnesty').hide(1000);
}
else
if ($(this).is(':checked') && $(this).val() == 'VPTP') {
//$('#RCSA').show(1000);
$('#RCSA').hide(1000);
$('#RRA1').hide(1000);
$('#EGDC').hide(1000);
$('#update').hide(1000);
$('#regAmnesty').show(1000);
}
else if ($(this).is(':checked') && $(this).val() == 'RRA1') {
$('#RCSA').hide(1000);
$('#EGDC').hide(1000);
$("#mask").attr("align","right").append($("#mask_close").html());
launchWindow('#dialog1');
$('#dialog1').empty();
$('#dialog1').append($("#RRA1").html());
$('#EGDCSendSMS').hide();
$('#update').hide(1000);
$('#btnEFirstContinue').attr('disabled', true).hide();
$('#regAmnesty').hide(1000);
}
else if ($(this).is(':checked') && $(this).val() == 'EGDC') {
$('#RCSA').hide(1000);
$('#RRA1').hide(1000);
$('#update').hide(1000);
$("#mask").attr("align","right").append($("#mask_close").html());
launchWindow('#dialog1');
$('#dialog1').empty();
$('#dialog1').append($("#EGDC").html());
$('#btnEFirstContinue').attr('disabled', true).hide();
$('#regAmnesty').hide(1000);
//$('#EGDC').show(1000);
}
else if ($(this).is(':checked') && $(this).val() == 'ERL') {
$('#RCSA').hide(1000);
$('#RRA1').hide(1000);
$('#update').hide(1000);
$("#mask").attr("align","right").append($("#mask_close").html());
launchWindow('#dialog1');
$('#dialog1').empty();
$('#dialog1').append($("#demat_div").html());
$('#btnEFirstContinue').attr('disabled', true).hide();
$('#regAmnesty').hide(1000);
//$('#EGDC').show(1000);
}
else if ($(this).is(':checked') && $(this).val() == 'RRUOE') {
$('#RCSA').hide(1000);
$('#RRA1').hide(1000);
$('#EGDC').hide(1000);
$('#update').show(1000);
$('#btnEFirstContinue').attr('disabled', true).hide();
$('#regAmnesty').hide(1000);
}
else {
$('#RCSA').hide(1000);
$('#RRA1').hide(1000);
$('#EGDC').hide(1000);
$('#update').hide(1000);
$('#regAmnesty').show(1000);
}
});
/* Hiding all tabs for the first time */
$('#login').cluetip({
// cluetipClass: 'jtip',
cluetipClass: 'rounded',
width: 275,
height: 'auto',
cluezIndex: 97,
local: false,
attribute: 'rel',
titleAttribute: 'title',
splitTitle: '',
showTitle: true,
hoverClass: '',
waitImage: true,
cursor: 'help',
dropShadowSteps: 6,
arrows: true,
dropShadow: true,
hoverIntent: false,
sticky: true,
delayedClose: 50,
// activation: 'hover',
// clickThrough: true,
tracking: false,
mouseOutClose: true,
closePosition: 'title',
positionBy: 'auto',
truncate: 0,
ajaxCache: false,
fx: {
open: 'show', // can be 'show' or 'slideDown' or 'fadeIn'
openSpeed: '10000'
},
closeText: ''
});
/******************************************************
* Cofiguration : Signup
* Author : Debopam Pal
* ***************************************************/
$('#amnestyScheme').cluetip({
// cluetipClass: 'jtip',
cluetipClass: 'rounded',
width: 300,
height: 'auto',
cluezIndex: 97,
local: false,
attribute: 'rel',
titleAttribute: 'title',
splitTitle: '',
showTitle: true,
hoverClass: '',
waitImage: true,
cursor: 'help',
dropShadowSteps: 6,
arrows: true,
dropShadow: true,
hoverIntent: false,
sticky: true,
delayedClose: 50,
// activation: 'hover',
// clickThrough: true,
tracking: false,
mouseOutClose: true,
closePosition: 'title',
positionBy: 'auto',
truncate: 0,
fx: {
open: 'show', // can be 'show' or 'slideDown' or 'fadeIn'
openSpeed: '10000'
},
closeText: ''
});
$('#regAmnestyFEnrol').cluetip({
// cluetipClass: 'jtip',
cluetipClass: 'rounded',
width: 300,
height: 'auto',
cluezIndex: 97,
local: false,
attribute: 'rel',
titleAttribute: 'title',
splitTitle: '',
showTitle: true,
hoverClass: '',
waitImage: true,
cursor: 'help',
dropShadowSteps: 6,
arrows: true,
dropShadow: true,
hoverIntent: false,
sticky: true,
delayedClose: 50,
// activation: 'hover',
// clickThrough: true,
tracking: false,
mouseOutClose: true,
closePosition: 'title',
positionBy: 'auto',
truncate: 0,
fx: {
open: 'show', // can be 'show' or 'slideDown' or 'fadeIn'
openSpeed: '10000'
},
closeText: ''
});
});
function btnRadioEHaveEnrollmentNo_CLick(value) {
if(value == 'Yes')
{
$('#eEnrollmentNo').show(1000);
if($("#lblERangeOrUnit").html()=="" || $("#lblERangeOrUnit").html()=="please try after sometime")
{
$('#btnESecondContinue').attr('disabled', true);
}
$('#drpdwnEDistrict').attr('disabled', true);
$('#drpdwnESubDivision').attr('disabled', true);
$('#drpdwnEPS').attr('disabled', true);
$(".info_liable").hide();
$("#msg_status").empty();
}
if(value == 'No')
{
//var retVal = confirm("Are you liable for enrollment?");
//if( retVal == true ){
//alert("BACK IN ENROLL");
//$("#msg_status").empty();
$('#eEnrollmentNo').hide(1000);
//$("#dialog1").append('');
launchWindow('#dialog1');
$("#dialog1 #info_reg_alert").hide();
//}else{
// alert("you does not want to continue!");
$("#msg_status").empty();
$("#dialog1 .info_liable").show(500).css("visibility","visible");
$("#dialog1 .info_liable").corner("20px");
if($("#lblERangeOrUnit").html()=="" || $("#lblERangeOrUnit").html()=="please try after sometime")
{
$('#btnESecondContinue').attr('disabled', true);
}
$('#drpdwnEDistrict').attr('disabled', true);
$('#drpdwnESubDivision').attr('disabled', true);
$('#drpdwnEPS').attr('disabled', true);
}
}
function btnRadioEHaveOldRegNo_CLick(value) {
if(value=='Yes')
{
$('#eEnrollmentNo').show(1000);
$("#msg_status").empty();
}
else
{
$('#eEnrollmentNo').hide(1000);
launchWindow('#dialog1');
$("#dialog1").empty();
//$("#dialog1 #info_reg_alert").hide();
$("#msg_status").empty();
load_existing_form_After_enrol();
//$("#dialog1").append($("#append_info").html());
//$("#dialog1 .info_liable").show(1000).css("visibility","visible");
//$("#dialog1 .info_liable").corner("20px");
//
//$("#amnestyScheme1").attr("rel","amnestySchemeDescAction.do");
//var i=$('#dialog1 .info_liable #regAmnesty1 #amnestyScheme1').cluetip({
// // cluetipClass: 'jtip',
// cluetipClass: 'rounded',
// width: 400,
// height: 'auto',
// cluezIndex: 97,
// local: false,
// attribute: 'rel',
// titleAttribute: 'title',
// splitTitle: '',
// showTitle: true,
// hoverClass: '',
// waitImage: true,
// cursor: 'help',
// dropShadowSteps: -150,
// arrows: true,
// dropShadow: true,
// hoverIntent: false,
// sticky: true,
// delayedClose: 50,
// // activation: 'hover',
// // clickThrough: true,
// tracking: false,
// mouseOutClose: true,
// closePosition: 'title',
// positionBy: 'auto',
// truncate: 0,
//
//
// fx: {
// open: 'slideDown', // can be 'show' or 'slideDown' or 'fadeIn'
// openSpeed: '10000'
// },
// closeText: ''
//
//
// });
//
//$("#dialog1").append();
}
}
function mask_dialog_After_enrol_not_hide()
{
//$("#dialog1 #close_bttn").empty();
//$("#dialog1 #ElblERangeOrUnit1").remove();
// $("#dialog1").hide(1000);
// $("#mask").hide(1000);
// $('#dialog1 #info_reg_alert').hide();
// $('#dialog1 .info_liable').hide();
$("#dialog1").empty();
$("#dialog1").hide(1000);
$("#mask").hide(1000);
}
function mask_dialog_not_hide()
{
//$("#dialog1 #close_bttn").empty();
$("#dialog1 #ElblERangeOrUnit1").remove();
$("#dialog1").hide(1000);
$("#mask").hide(1000);
$('#dialog1 .info_liable #msg_enroll').empty();
}
function btnRadioliableEnrollmentNo_CLick(value)
{
if(value == 'Yes')
{
//$(".info_liable").hide(1000);
$("#msg_status").empty();
$('#dialog1 .info_liable #msg_enroll').empty();
//$('#dialog1 .info_liable').empty();
$('#dialog1 .info_liable #msg_enroll').append('
Please Take An Enrollment Number
Click Here For Enrollment