/* Minification failed. Returning unminified contents.
(44,22): run-time error CSS1031: Expected selector, found '='
(44,22): run-time error CSS1025: Expected comma or open brace, found '='
(45,8): run-time error CSS1030: Expected identifier, found 'extend('
(45,8): run-time error CSS1031: Expected selector, found 'extend('
(45,8): run-time error CSS1025: Expected comma or open brace, found 'extend('
(215,7): run-time error CSS1019: Unexpected token, found ')'
(222,1): run-time error CSS1019: Unexpected token, found '('
(222,2): run-time error CSS1019: Unexpected token, found 'function('
(222,12): run-time error CSS1031: Expected selector, found ')'
(222,12): run-time error CSS1025: Expected comma or open brace, found ')'
(451,2): run-time error CSS1019: Unexpected token, found ')'
(451,3): run-time error CSS1019: Unexpected token, found '('
(451,10): run-time error CSS1031: Expected selector, found ')'
(451,10): run-time error CSS1025: Expected comma or open brace, found ')'
(478,1): run-time error CSS1019: Unexpected token, found '('
(478,2): run-time error CSS1019: Unexpected token, found 'function('
(478,11): run-time error CSS1019: Unexpected token, found ')'
(478,13): run-time error CSS1019: Unexpected token, found '{'
(479,6): run-time error CSS1031: Expected selector, found '$'
(479,6): run-time error CSS1025: Expected comma or open brace, found '$'
(485,11): run-time error CSS1031: Expected selector, found 'now('
(485,11): run-time error CSS1025: Expected comma or open brace, found 'now('
(487,2): run-time error CSS1019: Unexpected token, found '$'
(487,15): run-time error CSS1031: Expected selector, found '='
(487,15): run-time error CSS1025: Expected comma or open brace, found '='
(508,2): run-time error CSS1019: Unexpected token, found '$'
(508,13): run-time error CSS1031: Expected selector, found '='
(508,13): run-time error CSS1025: Expected comma or open brace, found '='
(529,2): run-time error CSS1019: Unexpected token, found '$'
(529,14): run-time error CSS1031: Expected selector, found '='
(529,14): run-time error CSS1025: Expected comma or open brace, found '='
(546,1): run-time error CSS1019: Unexpected token, found '}'
(546,2): run-time error CSS1019: Unexpected token, found ')'
(546,3): run-time error CSS1019: Unexpected token, found '('
(546,4): run-time error CSS1019: Unexpected token, found ')'
(547,10): run-time error CSS1031: Expected selector, found '='
(547,10): run-time error CSS1025: Expected comma or open brace, found '='
(550,10): run-time error CSS1031: Expected selector, found 'showTerms('
(550,10): run-time error CSS1025: Expected comma or open brace, found 'showTerms('
(555,1): run-time error CSS1019: Unexpected token, found '$'
(555,2): run-time error CSS1019: Unexpected token, found '('
(555,11): run-time error CSS1031: Expected selector, found ')'
(555,11): run-time error CSS1025: Expected comma or open brace, found ')'
(633,2): run-time error CSS1019: Unexpected token, found ')'
(655,1): run-time error CSS1019: Unexpected token, found '$'
(655,2): run-time error CSS1019: Unexpected token, found '('
(655,12): run-time error CSS1031: Expected selector, found '('
(655,12): run-time error CSS1025: Expected comma or open brace, found '('
(844,2): run-time error CSS1019: Unexpected token, found ')'
(846,10): run-time error CSS1031: Expected selector, found 'replaceAll('
(846,10): run-time error CSS1025: Expected comma or open brace, found 'replaceAll('
(852,12): run-time error CSS1031: Expected selector, found '='
(852,12): run-time error CSS1025: Expected comma or open brace, found '='
(914,11): run-time error CSS1031: Expected selector, found '='
(914,11): run-time error CSS1025: Expected comma or open brace, found '='
(926,1): run-time error CSS1019: Unexpected token, found '$'
(926,2): run-time error CSS1019: Unexpected token, found '('
(926,9): run-time error CSS1031: Expected selector, found ')'
(926,9): run-time error CSS1025: Expected comma or open brace, found ')'
(930,2): run-time error CSS1019: Unexpected token, found ')'
(932,10): run-time error CSS1031: Expected selector, found 'page_reshape('
(932,10): run-time error CSS1025: Expected comma or open brace, found 'page_reshape('
(979,10): run-time error CSS1031: Expected selector, found 'hslideresp('
(979,10): run-time error CSS1025: Expected comma or open brace, found 'hslideresp('
(993,10): run-time error CSS1031: Expected selector, found 'respmenu('
(993,10): run-time error CSS1025: Expected comma or open brace, found 'respmenu('
(1003,12): run-time error CSS1031: Expected selector, found '='
(1003,12): run-time error CSS1025: Expected comma or open brace, found '='
(1050,10): run-time error CSS1031: Expected selector, found 'validateupdatesubcribe('
(1050,10): run-time error CSS1025: Expected comma or open brace, found 'validateupdatesubcribe('
(1129,1): run-time error CSS1019: Unexpected token, found '$'
(1129,2): run-time error CSS1019: Unexpected token, found '('
(1129,11): run-time error CSS1031: Expected selector, found ')'
(1129,11): run-time error CSS1025: Expected comma or open brace, found ')'
(1134,2): run-time error CSS1019: Unexpected token, found ')'
(1139,1): run-time error CSS1019: Unexpected token, found '!'
(1139,11): run-time error CSS1031: Expected selector, found '('
(1139,11): run-time error CSS1025: Expected comma or open brace, found '('
(1139,168): run-time error CSS1019: Unexpected token, found '('
(1139,178): run-time error CSS1031: Expected selector, found '('
(1139,178): run-time error CSS1025: Expected comma or open brace, found '('
(1139,23202): run-time error CSS1019: Unexpected token, found ')'
(1141,10): run-time error CSS1031: Expected selector, found 'onForgotSubmit('
(1141,10): run-time error CSS1025: Expected comma or open brace, found 'onForgotSubmit('
(1147,9): run-time error CSS1031: Expected selector, found '='
(1147,9): run-time error CSS1025: Expected comma or open brace, found '='
(1149,10): run-time error CSS1031: Expected selector, found 'chkInteger('
(1149,10): run-time error CSS1025: Expected comma or open brace, found 'chkInteger('
(1162,10): run-time error CSS1031: Expected selector, found ';'
(1162,10): run-time error CSS1025: Expected comma or open brace, found ';'
(1163,10): run-time error CSS1031: Expected selector, found 'DisabledControls('
(1163,10): run-time error CSS1025: Expected comma or open brace, found 'DisabledControls('
(1180,10): run-time error CSS1031: Expected selector, found 'ControlBlur('
(1180,10): run-time error CSS1025: Expected comma or open brace, found 'ControlBlur('
(1187,10): run-time error CSS1031: Expected selector, found 'Enable_DisableDiv('
(1187,10): run-time error CSS1025: Expected comma or open brace, found 'Enable_DisableDiv('
(1196,10): run-time error CSS1031: Expected selector, found 'errorMessage('
(1196,10): run-time error CSS1025: Expected comma or open brace, found 'errorMessage('
(1205,1): run-time error CSS1019: Unexpected token, found 'Enable_DisableDiv('
(1205,19): run-time error CSS1019: Unexpected token, found ''hide''
(1205,25): run-time error CSS1019: Unexpected token, found ','
(1205,27): run-time error CSS1019: Unexpected token, found '"#tblResult"'
(1205,39): run-time error CSS1019: Unexpected token, found ')'
(1206,10): run-time error CSS1031: Expected selector, found 'EMIControls('
(1206,10): run-time error CSS1025: Expected comma or open brace, found 'EMIControls('
(1212,10): run-time error CSS1031: Expected selector, found 'EMI_Click('
(1212,10): run-time error CSS1025: Expected comma or open brace, found 'EMI_Click('
(1221,10): run-time error CSS1031: Expected selector, found 'Emicalculation('
(1221,10): run-time error CSS1025: Expected comma or open brace, found 'Emicalculation('
(1237,10): run-time error CSS1031: Expected selector, found 'ValidateControl('
(1237,10): run-time error CSS1025: Expected comma or open brace, found 'ValidateControl('
(1266,10): run-time error CSS1031: Expected selector, found 'ClearControls('
(1266,10): run-time error CSS1025: Expected comma or open brace, found 'ClearControls('
(1281,1): run-time error CSS1019: Unexpected token, found 'Enable_DisableDiv('
(1281,19): run-time error CSS1019: Unexpected token, found ''hide''
(1281,25): run-time error CSS1019: Unexpected token, found ','
(1281,27): run-time error CSS1019: Unexpected token, found '"#tblResult"'
(1281,39): run-time error CSS1019: Unexpected token, found ')'
(1282,11): run-time error CSS1031: Expected selector, found ';'
(1282,11): run-time error CSS1025: Expected comma or open brace, found ';'
(1283,10): run-time error CSS1031: Expected selector, found 'AmortizationControls('
(1283,10): run-time error CSS1025: Expected comma or open brace, found 'AmortizationControls('
(1304,10): run-time error CSS1031: Expected selector, found 'AmortizationValidAll('
(1304,10): run-time error CSS1025: Expected comma or open brace, found 'AmortizationValidAll('
(1340,10): run-time error CSS1031: Expected selector, found 'AmortizationSetAll('
(1340,10): run-time error CSS1025: Expected comma or open brace, found 'AmortizationSetAll('
(1352,10): run-time error CSS1031: Expected selector, found 'SetValues('
(1352,10): run-time error CSS1025: Expected comma or open brace, found 'SetValues('
(1357,13): run-time error CSS1031: Expected selector, found ';'
(1357,13): run-time error CSS1025: Expected comma or open brace, found ';'
(1358,15): run-time error CSS1031: Expected selector, found ';'
(1358,15): run-time error CSS1025: Expected comma or open brace, found ';'
(1359,10): run-time error CSS1031: Expected selector, found ';'
(1359,10): run-time error CSS1025: Expected comma or open brace, found ';'
(1360,10): run-time error CSS1031: Expected selector, found 'GenerateSchedule('
(1360,10): run-time error CSS1025: Expected comma or open brace, found 'GenerateSchedule('
(1416,10): run-time error CSS1031: Expected selector, found 'Calculate_Amortization('
(1416,10): run-time error CSS1025: Expected comma or open brace, found 'Calculate_Amortization('
(1454,10): run-time error CSS1031: Expected selector, found 'btnCalculate_Click('
(1454,10): run-time error CSS1025: Expected comma or open brace, found 'btnCalculate_Click('
(1462,10): run-time error CSS1031: Expected selector, found 'ClearAll('
(1462,10): run-time error CSS1025: Expected comma or open brace, found 'ClearAll('
(1483,10): run-time error CSS1031: Expected selector, found 'StampControls('
(1483,10): run-time error CSS1025: Expected comma or open brace, found 'StampControls('
(1490,10): run-time error CSS1031: Expected selector, found 'Stamp_calculation('
(1490,10): run-time error CSS1025: Expected comma or open brace, found 'Stamp_calculation('
(1500,10): run-time error CSS1031: Expected selector, found 'ClearStampControls('
(1500,10): run-time error CSS1025: Expected comma or open brace, found 'ClearStampControls('
(1508,10): run-time error CSS1031: Expected selector, found 'Validation('
(1508,10): run-time error CSS1025: Expected comma or open brace, found 'Validation('
(1529,10): run-time error CSS1031: Expected selector, found 'AreaConvCalculation('
(1529,10): run-time error CSS1025: Expected comma or open brace, found 'AreaConvCalculation('
(1532,10): run-time error CSS1031: Expected selector, found 'ClearArearControls('
(1532,10): run-time error CSS1025: Expected comma or open brace, found 'ClearArearControls('
(1559,10): run-time error CSS1031: Expected selector, found 'AreaConvControls('
(1559,10): run-time error CSS1025: Expected comma or open brace, found 'AreaConvControls('
(1584,10): run-time error CSS1031: Expected selector, found 'Calculate('
(1584,10): run-time error CSS1025: Expected comma or open brace, found 'Calculate('
(1679,10): run-time error CSS1031: Expected selector, found 'Aankadamconversion('
(1679,10): run-time error CSS1025: Expected comma or open brace, found 'Aankadamconversion('
(1703,10): run-time error CSS1031: Expected selector, found 'Acresconversion('
(1703,10): run-time error CSS1025: Expected comma or open brace, found 'Acresconversion('
(1726,10): run-time error CSS1031: Expected selector, found 'Areasconversion('
(1726,10): run-time error CSS1025: Expected comma or open brace, found 'Areasconversion('
(1749,10): run-time error CSS1031: Expected selector, found 'Bigha1conversion('
(1749,10): run-time error CSS1025: Expected comma or open brace, found 'Bigha1conversion('
(1774,10): run-time error CSS1031: Expected selector, found 'Bigha2conversion('
(1774,10): run-time error CSS1025: Expected comma or open brace, found 'Bigha2conversion('
(1799,10): run-time error CSS1031: Expected selector, found 'Biswa1conversion('
(1799,10): run-time error CSS1025: Expected comma or open brace, found 'Biswa1conversion('
(1824,10): run-time error CSS1031: Expected selector, found 'Biswa2conversion('
(1824,10): run-time error CSS1025: Expected comma or open brace, found 'Biswa2conversion('
(1849,10): run-time error CSS1031: Expected selector, found 'Centsconversion('
(1849,10): run-time error CSS1025: Expected comma or open brace, found 'Centsconversion('
(1874,10): run-time error CSS1031: Expected selector, found 'Chataksconversion('
(1874,10): run-time error CSS1025: Expected comma or open brace, found 'Chataksconversion('
(1899,10): run-time error CSS1031: Expected selector, found 'Groundsconversion('
(1899,10): run-time error CSS1025: Expected comma or open brace, found 'Groundsconversion('
(1924,10): run-time error CSS1031: Expected selector, found 'Gunthaconversion('
(1924,10): run-time error CSS1025: Expected comma or open brace, found 'Gunthaconversion('
(1949,10): run-time error CSS1031: Expected selector, found 'Hectaresconversion('
(1949,10): run-time error CSS1025: Expected comma or open brace, found 'Hectaresconversion('
(1974,10): run-time error CSS1031: Expected selector, found 'Kanalconversion('
(1974,10): run-time error CSS1025: Expected comma or open brace, found 'Kanalconversion('
(1999,10): run-time error CSS1031: Expected selector, found 'Marlaconversion('
(1999,10): run-time error CSS1025: Expected comma or open brace, found 'Marlaconversion('
(2024,10): run-time error CSS1031: Expected selector, found 'Perchconversion('
(2024,10): run-time error CSS1025: Expected comma or open brace, found 'Perchconversion('
(2049,10): run-time error CSS1031: Expected selector, found 'Roodconversion('
(2049,10): run-time error CSS1025: Expected comma or open brace, found 'Roodconversion('
(2074,10): run-time error CSS1031: Expected selector, found 'Kottahconversion('
(2074,10): run-time error CSS1025: Expected comma or open brace, found 'Kottahconversion('
(2099,10): run-time error CSS1031: Expected selector, found 'sqfeetconversion('
(2099,10): run-time error CSS1025: Expected comma or open brace, found 'sqfeetconversion('
(2124,10): run-time error CSS1031: Expected selector, found 'Sqmetersconversion('
(2124,10): run-time error CSS1025: Expected comma or open brace, found 'Sqmetersconversion('
(2148,10): run-time error CSS1031: Expected selector, found 'Sqyardsconversion('
(2148,10): run-time error CSS1025: Expected comma or open brace, found 'Sqyardsconversion('
(2178,20): run-time error CSS1031: Expected selector, found ';'
(2178,20): run-time error CSS1025: Expected comma or open brace, found ';'
(2179,19): run-time error CSS1031: Expected selector, found ';'
(2179,19): run-time error CSS1025: Expected comma or open brace, found ';'
(2180,21): run-time error CSS1031: Expected selector, found ';'
(2180,21): run-time error CSS1025: Expected comma or open brace, found ';'
(2181,19): run-time error CSS1031: Expected selector, found ';'
(2181,19): run-time error CSS1025: Expected comma or open brace, found ';'
(2182,21): run-time error CSS1031: Expected selector, found ';'
(2182,21): run-time error CSS1025: Expected comma or open brace, found ';'
(2183,14): run-time error CSS1031: Expected selector, found ';'
(2183,14): run-time error CSS1025: Expected comma or open brace, found ';'
(2184,17): run-time error CSS1031: Expected selector, found ';'
(2184,17): run-time error CSS1025: Expected comma or open brace, found ';'
(2185,10): run-time error CSS1031: Expected selector, found ';'
(2185,10): run-time error CSS1025: Expected comma or open brace, found ';'
(2187,10): run-time error CSS1031: Expected selector, found 'RentValidation('
(2187,10): run-time error CSS1025: Expected comma or open brace, found 'RentValidation('
(2209,10): run-time error CSS1031: Expected selector, found 'CalCulateAmount('
(2209,10): run-time error CSS1025: Expected comma or open brace, found 'CalCulateAmount('
(2218,10): run-time error CSS1031: Expected selector, found 'RentBuyCalculation('
(2218,10): run-time error CSS1025: Expected comma or open brace, found 'RentBuyCalculation('
(2236,10): run-time error CSS1031: Expected selector, found 'CalCulateAmount('
(2236,10): run-time error CSS1025: Expected comma or open brace, found 'CalCulateAmount('
(2245,10): run-time error CSS1031: Expected selector, found 'RentControls('
(2245,10): run-time error CSS1025: Expected comma or open brace, found 'RentControls('
(2262,10): run-time error CSS1031: Expected selector, found 'ClearRentControls('
(2262,10): run-time error CSS1025: Expected comma or open brace, found 'ClearRentControls('
(2280,10): run-time error CSS1031: Expected selector, found 'RentFeesCalc('
(2280,10): run-time error CSS1025: Expected comma or open brace, found 'RentFeesCalc('
(2290,10): run-time error CSS1031: Expected selector, found 'TotalRentFees('
(2290,10): run-time error CSS1025: Expected comma or open brace, found 'TotalRentFees('
(2295,15): run-time error CSS1031: Expected selector, found ';'
(2295,15): run-time error CSS1025: Expected comma or open brace, found ';'
(2296,10): run-time error CSS1031: Expected selector, found 'RFCalc('
(2296,10): run-time error CSS1025: Expected comma or open brace, found 'RFCalc('
(2311,10): run-time error CSS1031: Expected selector, found 'ITMClaculation('
(2311,10): run-time error CSS1025: Expected comma or open brace, found 'ITMClaculation('
(2321,10): run-time error CSS1031: Expected selector, found 'ITMTotal('
(2321,10): run-time error CSS1025: Expected comma or open brace, found 'ITMTotal('
(2326,16): run-time error CSS1031: Expected selector, found ';'
(2326,16): run-time error CSS1025: Expected comma or open brace, found ';'
(2327,10): run-time error CSS1031: Expected selector, found 'ITMCalc('
(2327,10): run-time error CSS1025: Expected comma or open brace, found 'ITMCalc('
(2342,10): run-time error CSS1031: Expected selector, found 'MortgageCalc('
(2342,10): run-time error CSS1025: Expected comma or open brace, found 'MortgageCalc('
(2351,10): run-time error CSS1031: Expected selector, found 'MPCalc('
(2351,10): run-time error CSS1025: Expected comma or open brace, found 'MPCalc('
(2366,16): run-time error CSS1031: Expected selector, found ';'
(2366,16): run-time error CSS1025: Expected comma or open brace, found ';'
(2367,10): run-time error CSS1031: Expected selector, found 'SetRentFees('
(2367,10): run-time error CSS1025: Expected comma or open brace, found 'SetRentFees('
(2375,10): run-time error CSS1031: Expected selector, found 'SetITM('
(2375,10): run-time error CSS1025: Expected comma or open brace, found 'SetITM('
(2383,10): run-time error CSS1031: Expected selector, found 'GetAppreciation('
(2383,10): run-time error CSS1025: Expected comma or open brace, found 'GetAppreciation('
(2393,10): run-time error CSS1031: Expected selector, found 'AppreciationCalc('
(2393,10): run-time error CSS1025: Expected comma or open brace, found 'AppreciationCalc('
(2402,18): run-time error CSS1031: Expected selector, found ';'
(2402,18): run-time error CSS1025: Expected comma or open brace, found ';'
(2403,10): run-time error CSS1031: Expected selector, found 'AnnualAppCalc('
(2403,10): run-time error CSS1025: Expected comma or open brace, found 'AnnualAppCalc('
(2419,10): run-time error CSS1031: Expected selector, found 'DifferentCalc('
(2419,10): run-time error CSS1025: Expected comma or open brace, found 'DifferentCalc('
(2424,10): run-time error CSS1031: Expected selector, found 'Form_CostComparision_Table('
(2424,10): run-time error CSS1025: Expected comma or open brace, found 'Form_CostComparision_Table('
(2521,10): run-time error CSS1031: Expected selector, found 'Form_DetailView_Table('
(2521,10): run-time error CSS1025: Expected comma or open brace, found 'Form_DetailView_Table('
 */
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2001 Robert Penner
 * All rights reserved.
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2008 George McGinley Smith
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */
jQuery.easing.jswing = jQuery.easing.swing;
jQuery.extend(jQuery.easing, {def: "easeOutQuad", swing: function(e, f, a, h, g) {
        return jQuery.easing[jQuery.easing.def](e, f, a, h, g)
    }, easeInQuad: function(e, f, a, h, g) {
        return h * (f /= g) * f + a
    }, easeOutQuad: function(e, f, a, h, g) {
        return -h * (f /= g) * (f - 2) + a
    }, easeInOutQuad: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f + a
        }
        return -h / 2 * ((--f) * (f - 2) - 1) + a
    }, easeInCubic: function(e, f, a, h, g) {
        return h * (f /= g) * f * f + a
    }, easeOutCubic: function(e, f, a, h, g) {
        return h * ((f = f / g - 1) * f * f + 1) + a
    }, easeInOutCubic: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f + a
        }
        return h / 2 * ((f -= 2) * f * f + 2) + a
    }, easeInQuart: function(e, f, a, h, g) {
        return h * (f /= g) * f * f * f + a
    }, easeOutQuart: function(e, f, a, h, g) {
        return -h * ((f = f / g - 1) * f * f * f - 1) + a
    }, easeInOutQuart: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f * f + a
        }
        return -h / 2 * ((f -= 2) * f * f * f - 2) + a
    }, easeInQuint: function(e, f, a, h, g) {
        return h * (f /= g) * f * f * f * f + a
    }, easeOutQuint: function(e, f, a, h, g) {
        return h * ((f = f / g - 1) * f * f * f * f + 1) + a
    }, easeInOutQuint: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f * f * f + a
        }
        return h / 2 * ((f -= 2) * f * f * f * f + 2) + a
    }, easeInSine: function(e, f, a, h, g) {
        return -h * Math.cos(f / g * (Math.PI / 2)) + h + a
    }, easeOutSine: function(e, f, a, h, g) {
        return h * Math.sin(f / g * (Math.PI / 2)) + a
    }, easeInOutSine: function(e, f, a, h, g) {
        return -h / 2 * (Math.cos(Math.PI * f / g) - 1) + a
    }, easeInExpo: function(e, f, a, h, g) {
        return(f == 0) ? a : h * Math.pow(2, 10 * (f / g - 1)) + a
    }, easeOutExpo: function(e, f, a, h, g) {
        return(f == g) ? a + h : h * (-Math.pow(2, -10 * f / g) + 1) + a
    }, easeInOutExpo: function(e, f, a, h, g) {
        if (f == 0) {
            return a
        }
        if (f == g) {
            return a + h
        }
        if ((f /= g / 2) < 1) {
            return h / 2 * Math.pow(2, 10 * (f - 1)) + a
        }
        return h / 2 * (-Math.pow(2, -10 * --f) + 2) + a
    }, easeInCirc: function(e, f, a, h, g) {
        return -h * (Math.sqrt(1 - (f /= g) * f) - 1) + a
    }, easeOutCirc: function(e, f, a, h, g) {
        return h * Math.sqrt(1 - (f = f / g - 1) * f) + a
    }, easeInOutCirc: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return -h / 2 * (Math.sqrt(1 - f * f) - 1) + a
        }
        return h / 2 * (Math.sqrt(1 - (f -= 2) * f) + 1) + a
    }, easeInElastic: function(f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k) == 1) {
            return e + l
        }
        if (!j) {
            j = k * 0.3
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        return -(g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j)) + e
    }, easeOutElastic: function(f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k) == 1) {
            return e + l
        }
        if (!j) {
            j = k * 0.3
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        return g * Math.pow(2, -10 * h) * Math.sin((h * k - i) * (2 * Math.PI) / j) + l + e
    }, easeInOutElastic: function(f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k / 2) == 2) {
            return e + l
        }
        if (!j) {
            j = k * (0.3 * 1.5)
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        if (h < 1) {
            return -0.5 * (g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j)) + e
        }
        return g * Math.pow(2, -10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j) * 0.5 + l + e
    }, easeInBack: function(e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        return i * (f /= h) * f * ((g + 1) * f - g) + a
    }, easeOutBack: function(e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        return i * ((f = f / h - 1) * f * ((g + 1) * f + g) + 1) + a
    }, easeInOutBack: function(e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        if ((f /= h / 2) < 1) {
            return i / 2 * (f * f * (((g *= (1.525)) + 1) * f - g)) + a
        }
        return i / 2 * ((f -= 2) * f * (((g *= (1.525)) + 1) * f + g) + 2) + a
    }, easeInBounce: function(e, f, a, h, g) {
        return h - jQuery.easing.easeOutBounce(e, g - f, 0, h, g) + a
    }, easeOutBounce: function(e, f, a, h, g) {
        if ((f /= g) < (1 / 2.75)) {
            return h * (7.5625 * f * f) + a
        } else {
            if (f < (2 / 2.75)) {
                return h * (7.5625 * (f -= (1.5 / 2.75)) * f + 0.75) + a
            } else {
                if (f < (2.5 / 2.75)) {
                    return h * (7.5625 * (f -= (2.25 / 2.75)) * f + 0.9375) + a
                } else {
                    return h * (7.5625 * (f -= (2.625 / 2.75)) * f + 0.984375) + a
                }
            }
        }
    }, easeInOutBounce: function(e, f, a, h, g) {
        if (f < g / 2) {
            return jQuery.easing.easeInBounce(e, f * 2, 0, h, g) * 0.5 + a
        }
        return jQuery.easing.easeOutBounce(e, f * 2 - g, 0, h, g) * 0.5 + h * 0.5 + a
    }});

/**
 * jQuery.marquee - scrolling text like old marquee element
 * @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
 */
;
(function(e) {
    e.fn.marquee = function(t) {
        return this.each(function() {
            var n = e.extend({}, e.fn.marquee.defaults, t), r = e(this), i, s, o, u, a, f = 3, l = "animation-play-state", c = false, h = function(e, t, n) {
                var r = ["webkit", "moz", "MS", "o", ""];
                for (var i = 0; i < r.length; i++) {
                    if (!r[i])
                        t = t.toLowerCase();
                    e.addEventListener(r[i] + t, n, false)
                }
            }, p = function(e) {
                var t = [];
                for (var n in e) {
                    if (e.hasOwnProperty(n)) {
                        t.push(n + ":" + e[n])
                    }
                }
                t.push();
                return"{" + t.join(",") + "}"
            }, d = function() {
                r.timer = setTimeout(M, n.delayBeforeStart)
            }, v = {pause: function() {
                    if (c && n.allowCss3Support) {
                        i.css(l, "paused")
                    } else {
                        if (e.fn.pause) {
                            i.pause()
                        }
                    }
                    r.data("runningStatus", "paused");
                    r.trigger("paused")
                }, resume: function() {
                    if (c && n.allowCss3Support) {
                        i.css(l, "running")
                    } else {
                        if (e.fn.resume) {
                            i.resume()
                        }
                    }
                    r.data("runningStatus", "resumed");
                    r.trigger("resumed")
                }, toggle: function() {
                    v[r.data("runningStatus") == "resumed" ? "pause" : "resume"]()
                }, destroy: function() {
                    clearTimeout(r.timer);
                    r.find("*").andSelf().unbind();
                    r.html(r.find(".js-marquee:first").html())
                }};
            if (typeof t === "string") {
                if (e.isFunction(v[t])) {
                    if (!i) {
                        i = r.find(".js-marquee-wrapper")
                    }
                    if (r.data("css3AnimationIsSupported") === true) {
                        c = true
                    }
                    v[t]()
                }
                return
            }
            var m = {}, g;
            e.each(n, function(e, t) {
                g = r.attr("data-" + e);
                if (typeof g !== "undefined") {
                    switch (g) {
                        case"true":
                            g = true;
                            break;
                        case"false":
                            g = false;
                            break
                    }
                    n[e] = g
                }
            });
            n.duration = n.speed || n.duration;
            u = n.direction == "up" || n.direction == "down";
            n.gap = n.duplicated ? n.gap : 0;
            r.wrapInner('<div class="js-marquee"></div>');
            var y = r.find(".js-marquee").css({"margin-right": n.gap, "float": "left"});
            if (n.duplicated) {
                y.clone(true).appendTo(r)
            }
            r.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');
            i = r.find(".js-marquee-wrapper");
            if (u) {
                var b = r.height();
                i.removeAttr("style");
                r.height(b);
                r.find(".js-marquee").css({"float": "none", "margin-bottom": n.gap, "margin-right": 0});
                if (n.duplicated)
                    r.find(".js-marquee:last").css({"margin-bottom": 0});
                var w = r.find(".js-marquee:first").height() + n.gap;
                n.duration = (parseInt(w, 10) + parseInt(b, 10)) / parseInt(b, 10) * n.duration
            } else {
                a = r.find(".js-marquee:first").width() + n.gap;
                s = r.width();
                n.duration = (parseInt(a, 10) + parseInt(s, 10)) / parseInt(s, 10) * n.duration
            }
            if (n.duplicated) {
                n.duration = n.duration / 2
            }
            if (n.allowCss3Support) {
                var E = document.body || document.createElement("div"), S = "marqueeAnimation-" + Math.floor(Math.random() * 1e7), x = "Webkit Moz O ms Khtml".split(" "), T = "animation", N = "", C = "";
                if (E.style.animation) {
                    C = "@keyframes " + S + " ";
                    c = true
                }
                if (c === false) {
                    for (var k = 0; k < x.length; k++) {
                        if (E.style[x[k] + "AnimationName"] !== undefined) {
                            var L = "-" + x[k].toLowerCase() + "-";
                            T = L + T;
                            l = L + l;
                            C = "@" + L + "keyframes " + S + " ";
                            c = true;
                            break
                        }
                    }
                }
                if (c) {
                    N = S + " " + n.duration / 1e3 + "s " + n.delayBeforeStart / 1e3 + "s infinite " + n.css3easing;
                    r.data("css3AnimationIsSupported", true)
                }
            }
            var A = function() {
                i.css("margin-top", n.direction == "up" ? b + "px" : "-" + w + "px")
            }, O = function() {
                i.css("margin-left", n.direction == "left" ? s + "px" : "-" + a + "px")
            };
            if (n.duplicated) {
                if (u) {
                    i.css("margin-top", n.direction == "up" ? b : "-" + (w * 2 - n.gap) + "px")
                } else {
                    i.css("margin-left", n.direction == "left" ? s + "px" : "-" + (a * 2 - n.gap) + "px")
                }
                f = 1
            } else {
                if (u) {
                    A()
                } else {
                    O()
                }
            }
            var M = function() {
                if (n.duplicated) {
                    if (f === 1) {
                        n._originalDuration = n.duration;
                        if (u) {
                            n.duration = n.direction == "up" ? n.duration + b / (w / n.duration) : n.duration * 2
                        } else {
                            n.duration = n.direction == "left" ? n.duration + s / (a / n.duration) : n.duration * 2
                        }
                        if (N) {
                            N = S + " " + n.duration / 1e3 + "s " + n.delayBeforeStart / 1e3 + "s " + n.css3easing
                        }
                        f++
                    } else if (f === 2) {
                        n.duration = n._originalDuration;
                        if (N) {
                            S = S + "0";
                            C = e.trim(C) + "0 ";
                            N = S + " " + n.duration / 1e3 + "s 0s infinite " + n.css3easing
                        }
                        f++
                    }
                }
                if (u) {
                    if (n.duplicated) {
                        if (f > 2) {
                            i.css("margin-top", n.direction == "up" ? 0 : "-" + w + "px")
                        }
                        o = {"margin-top": n.direction == "up" ? "-" + w + "px" : 0}
                    } else {
                        A();
                        o = {"margin-top": n.direction == "up" ? "-" + i.height() + "px" : b + "px"}
                    }
                } else {
                    if (n.duplicated) {
                        if (f > 2) {
                            i.css("margin-left", n.direction == "left" ? 0 : "-" + a + "px")
                        }
                        o = {"margin-left": n.direction == "left" ? "-" + a + "px" : 0}
                    } else {
                        O();
                        o = {"margin-left": n.direction == "left" ? "-" + a + "px" : s + "px"}
                    }
                }
                r.trigger("beforeStarting");
                if (c) {
                    i.css(T, N);
                    var t = C + " { 100%  " + p(o) + "}", l = e("style");
                    if (l.length !== 0) {
                        l.filter(":last").append(t)
                    } else {
                        e("head").append("<style>" + t + "</style>")
                    }
                    h(i[0], "AnimationIteration", function() {
                        r.trigger("finished")
                    });
                    h(i[0], "AnimationEnd", function() {
                        M();
                        r.trigger("finished")
                    })
                } else {
                    i.animate(o, n.duration, n.easing, function() {
                        r.trigger("finished");
                        if (n.pauseOnCycle) {
                            d()
                        } else {
                            M()
                        }
                    })
                }
                r.data("runningStatus", "resumed")
            };
            r.bind("pause", v.pause);
            r.bind("resume", v.resume);
            if (n.pauseOnHover) {
                r.bind("mouseenter mouseleave", v.toggle)
            }
            if (c && n.allowCss3Support) {
                M()
            } else {
                d()
            }
        })
    };
    e.fn.marquee.defaults = {allowCss3Support: true, css3easing: "linear", easing: "linear", delayBeforeStart: 1e3, direction: "left", duplicated: false, duration: 5e3, gap: 20, pauseOnCycle: false, pauseOnHover: false}
})(jQuery);

/*!
 * Pause jQuery plugin v0.1
 *
 * Copyright 2010 by Tobia Conforto <tobia.conforto@gmail.com>
 *
 * Based on Pause-resume-animation jQuery plugin by Joe Weitzel
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or(at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 51
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
/* Changelog:
 *
 * 0.1    2010-06-13  Initial release
 */
(function() {
	var $ = jQuery,
		pauseId = 'jQuery.pause',
		uuid = 1,
		oldAnimate = $.fn.animate,
		anims = {};

	function now() { return new Date().getTime(); }

	$.fn.animate = function(prop, speed, easing, callback) {
		var optall = $.speed(speed, easing, callback);
		optall.complete = optall.old; // unwrap callback
		return this.each(function() {
			// check pauseId
			if (! this[pauseId])
				this[pauseId] = uuid++;
			// start animation
			var opt = $.extend({}, optall);
			oldAnimate.apply($(this), [prop, $.extend({}, opt)]);
			// store data
			anims[this[pauseId]] = {
				run: true,
				prop: prop,
				opt: opt,
				start: now(),
				done: 0
			};
		});
	};

	$.fn.pause = function() {
		return this.each(function() {
			// check pauseId
			if (! this[pauseId])
				this[pauseId] = uuid++;
			// fetch data
			var data = anims[this[pauseId]];
			if (data && data.run) {
				data.done += now() - data.start;
				if (data.done > data.opt.duration) {
					// remove stale entry
					delete anims[this[pauseId]];
				} else {
					// pause animation
					$(this).stop();
					data.run = false;
				}
			}
		});
	};

	$.fn.resume = function() {
		return this.each(function() {
			// check pauseId
			if (! this[pauseId])
				this[pauseId] = uuid++;
			// fetch data
			var data = anims[this[pauseId]];
			if (data && ! data.run) {
				// resume animation
				data.opt.duration -= data.done;
				data.done = 0;
				data.run = true;
				data.start = now();
				oldAnimate.apply($(this), [data.prop, $.extend({}, data.opt)]);
			}
		});
	};
})();
var w, h = 0;

//Popup window for Term & Condition
function showTerms(page) {
    var myWindow = window.open(page, "", "width=800, height=700,scrollbars=yes");
}

//disable post buton on load
$(document).ready(function () {
    //document.body.style.zoom = "90%"
    //$(function () {
    //    $("#Title").focus();
    //});    

    //captchastyle();

    function captchastyle() {
        setTimeout(function () {
            alert('Test');
            $("#captcha_fled").contents().find(".rc-anchor-pt").css("right", "60px");
        }, 3000);
    }

    $("#clr-btn").click(function () {

        window.location.href = window.location.pathname;


    });

    $("#submit_btn").click(function () {

        frm = $(this).parents('form:first');

        if ($(frm).valid() && $('#chkAgree').is(":checked")) {
            $(".loader_img").show();
        }

    });


    $(".contact_txt").keydown(function (e) {

        if (e.which > 64 && e.which < 91) {
            e.preventDefault();
        }
    });




    //var postbtn = $("#post");
    //postbtn.prop('disabled', true);


    //Enable Post button when agress
    //$('#agree').change(function () {


    //    if ($(this).is(':checked')) {

    //            postbtn.prop('disabled', false);
    //        } else {
    //            postbtn.prop('disabled', true);
    //        }
    //});



    $("form.property_reg").submit(function (e) {

        if (!$('#chkAgree').is(':checked')) {
            e.preventDefault();
            $('#spn_Agree').removeClass('field-validation-valid');
            $('#spn_Agree').addClass('field-validation-error');

        } else {
            $('#spn_Agree').removeClass('field-validation-error');
            $('#spn_Agree').addClass('field-validation-valid');
        }

    });




});


//function pr() {
//    debugger
//    $(".loader_img").show();
//}

//document ready function close


//$('#agree').change(function () {
//    alert("clicked");


//    if ($(this).is(':checked')) {
//        postbtn.prop('disabled', true);
//    } else {
//        postbtn.prop('disabled', false);
//    }
//});

$(function () {
    //page_reshape();


    $('.mode-slct ul li label').click(function () {
        $('.mode-slct ul li').removeClass('mode-slctd');
        $(this).parent().addClass('mode-slctd');

    });

    var price1 = ['0', '25000', '50000', '75000', '100000', '200000', '300000', '400000', '500000', '700000', '900000', '1000000', '2000000', '3000000', '4000000', '5000000', '6000000', '7000000', '8000000', '9000000', '10000000', '11000000', '12000000', '13000000', '14000000', '15000000', '16000000', '17000000', '18000000', '19000000', '200000000'];

    var price2 = ['0', '25000', '50000', '75000', '100000', '200000', '300000', '400000', '500000', '600000', '700000', '800000', '900000', '1500000', '2500000', '3500000', '4500000', '5500000', '6500000', '7500000', '8500000', '9500000', '11000000', '12000000', '13000000', '14000000', '15000000', '16000000', '17000000', '18000000', '19000000', '>200000000'];

    var minValue = ($("#rangefrom").val() === "") ? price1[0] : $("#rangefrom").val();
    var maxValue = ($("#rangeto").val() === "") ? price1[30] : $("#rangeto").val();
    $("#slider-range").slider({

        range: true,
        min: 0,
        max: 30,
        values: [price1.indexOf(minValue), price1.indexOf(maxValue)],
        slide: function (event, ui) {

            $('#price_r1').text(price1[ui.values[0]]);
            $('#price_r2').text(price1[ui.values[1]]);
            $('input:hidden[name="rangefrom"]').val(price1[ui.values[0]]);
            $('input:hidden[name="rangeto"]').val(price1[ui.values[1]]);

        }
    });

    if ($('input:hidden[name="rangefrom"]').val() === null || $('input:hidden[name="rangefrom"]').val() === "") {
        $('#price_r1').text(price1[0]);
        $('#price_r2').text(price1[30]);
        $('input:hidden[name="rangefrom"]').val(price1[0]);
        $('input:hidden[name="rangeto"]').val(price1[30]);

    }

    slider.init();

    adsld.count();


    var $txtmq = $('.marquee-slider');

    $('.marquee-slider').marquee({
        speed: 20000,
        gap: 50,
        delayBeforeStart: 0,
        direction: 'left',
        duplicated: true,
        pauseOnHover: true
    });

    var $btmmq = $('.marquee-btm-ad');

    $('.marquee-btm-ad').marquee({
        speed: 20000,
        gap: 50,
        delayBeforeStart: 0,
        direction: 'up',
        duplicated: false,
        pauseOnHover: true
    });



    hslide.init(3);


    var playpause_flag = true;

    $('#playpause-btn').click(function () {
        if (playpause_flag) {
            clearInterval(hslide.timer);
            playpause_flag = false;
            $(this).attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo9JREFUeNqUVU1oGlEQntUqLhgCBTHiIRRbbApC8YccclNyDfQa6EEriFLooVYKRaSHUgn0oAfPgR7iqUIuxqsKEvCgDYgHLz1ExaBYrPUH9XVGXNmN7pIOfDu7b2e+NzM7b5ZjjIGccBynRvUSoUVMESO0r4GCPJIheoHqE+KVw+HgtVotTKdTGI1G9K6H698RcSRvbzhThAJQKKIzxCyRSLDBYMBms5kEnU6HxWIxMh4g3or9lxz3yH4Eg0HW7XbZZDJRRKVSYYFAgBy/yhF+IzJM68Fot9vs9PSUnF8LPNzywnFU+PLd3Z2a5/l1OahuVD8lub6+Bo/HQ3V9hlw91Wr9M9ZMTc7z+XyNcrkMJycnUK1WJetiOJ1OCIfDj5HjnbAJhfS32WyyXq8nwdXVFdPpdEt4vV5Wr9c3bAjFYpHS/knZUoSOw8NDXqPRbOy+WCzWqV1cXMDR0REkk0kYj8cSO6vVCripDUvHE+GewWCQTUksw+EQ4vE4uN1uKBQKEjuTyUQmZmrs+TZnEnGEglAm+BHAZrNJfIQTR4S3rVbrQYTHx8cQiURgf39/+Sz2wRYidUuEN9ikv/v9/u7Ozo6EQHCwWCyApwNcLtcGEQl1A9a1iFGOVHTBtUuUjfphoSEajUImkwG73S5b52w2S7yZ5RwQN3Y+n1cbjUb4H6GP4/f7b/H2OXL9Ua0KWkEVS6VSslFsQ6PRIDLKP0RkkvGFC18w0ieo3/h8PjCbzYqRlUolSKfTdPsefS7Xo+/+gEXSD3QUQ6EQT8du1V9rqdVqkMvl4Pz8nM6vH/0zsvNQNHn2aPogfun1enZwcLAE9iC9LCM+IvTbfDmlX8Aq4l1UT1ePN2g/VbL/J8AAmWdyFs0a8TMAAAAASUVORK5CYII=');
            hslide.state = false;
        }
        else {

            $(this).attr('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAltJREFUeNqkVb+LGkEUnvUXLigHQfHEKpBgDASCCv4BkkoRrxBEOBAjiBJIEQOBFJIiJASusLEThDRWObhGbDUgwhbCiZVNClEUD4OB1UWdvLdxZVd3Nzny4Ns3O/Pet9+Mb54MpZRoGcMwRnDPARaAAOAhfkB0zKRB9BTce8BFIBBgLRYLEQSB8DyPa3cw/xXwGcgnJ8moUAIYKvoC2JTLZbpcLulms1FgOp3SUqmEwUvAK3m+yHFE9i2fz9P5fE7X67Uuer0ezeVymPhJi/AKyWBb/4zJZEJTqRQmX0o8jPhgGDx4bjabGVmWJfexbrdLwuEwnutj4Loz7Oc/wJkZ8fC32+0BkUiEOBwOUq1WSb/fF8cIeUwwGCTFYvEBcLxGIgOoQ0kvEomEIhAhldRutxPfJTuOi8fjOH0hlU0gFAqxZrNZkSRVgOSRVE4oN6/XS6xW6zMUh1s+dzqdJ1+VJ/1NIcLtduOSx/RnfXvyVblCJNRTKI9FwtF4PP5vQighdCMkvIUi/blYLM7sdrtqaahtWW4cx5HVavUdBPAmfMBh3oBdJpNJRWA6nSbRaJT4/X6xXODKqRI2Gg1012IfkBd2q9UyulyuexV2u90m2Wx2BMMnwPXLsD+rHrhSpVJR/QW1MBwOkQzlFpBM0b5g4iMofQj+ZSaTIR6PR1dZp9Mh9Xodh28g5+bQ+o4bLJC+xatYKBTYWCwm1dfBBoMBaTabpFar4f3NQv61Zj+UdZ5z7D6AHzabjfp8PhFwm3CRA7wD2NRyGb2/gL3iM3CP9q+3EC/oxf8WYABYNzFRtlnzcAAAAABJRU5ErkJggg==');

            if (hslide.direction == "fwd") {
                hslide.fwd();
                hslide.timer = setInterval(function () {
                    hslide.fwd();
                }, 6000);
            }
            else if (hslide.direction == "bkw") {
                hslide.bkw();

                hslide.timer = setInterval(function () {
                    hslide.bkw();
                }, 6000);
            }
            playpause_flag = true;
            hslide.state = true;

        }

    });

    $('#forward-btn').click(function () {
        hslide.direction = "fwd";
        clearInterval(hslide.timer);
        hslide.fwd();

        if (hslide.state) {
            //console.log('test');
            hslide.timer = setInterval(function () {
                hslide.fwd();
            }, 6000);
        }
    });
    $('#backward-btn').click(function () {
        hslide.direction = "bkw";
        clearInterval(hslide.timer);
        hslide.bkw();
        if (hslide.state) {
            //console.log('test');
            hslide.timer = setInterval(function () {
                hslide.bkw();
            }, 6000);
        }
    });

    $('.responsive-btn').click(function () {
        $menu = $('nav.menu');

        if ($menu.is(':visible')) {
            $menu.slideUp(350);
        }
        else {
            $menu.slideDown(350);
        }
    });
    hslideresp();
    respmenu();

    $('#property_image').change(function () {
        var file = this.files[0];
        var fileName = file.name;
        var fd = new FormData();
        fd.append("fileData", file);
        fd.append("key", '@Model.Id');

        var xhr = new XMLHttpRequest();
        xhr.upload.addEventListener("progress", function (evt) { UploadProgress(evt); }, false);
        xhr.addEventListener("load", function (evt) { UploadComplete(evt); }, false);
        xhr.addEventListener("error", function (evt) { UploadFailed(evt); }, false);
        xhr.addEventListener("abort", function (evt) { UploadCanceled(evt); }, false);
        xhr.open("POST", "Upload", true);
        xhr.send(fd);
    });


    function UploadProgress(evt) {
        if (evt.lengthComputable) {
            var percentComplete = Math.round(evt.loaded * 100 / evt.total);
            $("#progressbar div").css("width", percentComplete + "% ");
        }
    }

    function UploadComplete(evt) {
        if (evt.target.status == 200) {

            $(".image-cont img").fadeOut(function () {
                $(".image-cont img").attr("src", replaceAll("\"", "", evt.target.responseText));
                $(".image-cont img").fadeIn(1000);
                var url = replaceAll("\"", "", evt.target.responseText);
                $("#PropertyImageUrl").val(url);
            });
        }
        else {
            alert("Error Uploading File");
        }
    }

    function UploadFailed(evt) {
        // alert("There was an error attempting to upload the file.");
    }

    function UploadCanceled(evt) {
        //alert("The upload has been canceled by the user or the browser dropped the connection.");
    }

});

function replaceAll(find, replace, str) {
    return str.replace(new RegExp(find, 'g'), replace);
}



var slider =
{
    i: 0,
    j: 1,
    timer: '',
    len: 0,
    delay: 4000,
    init: function () {
        slider.len = $('#slider-ad').children().length;

        $('nav.slide-nav ul').css('width', 14 * slider.len);

        for (var i = 0; i < slider.len; i++) {
            $('nav.slide-nav ul').append('<li onclick="slider.nav(' + i + ');"></li>');

            if (i == 0)
                $('nav.slide-nav ul li').addClass('current-slide');
        }


        $('#slider-ad').children().eq(0).show();
        if (slider.len > 1)
            slider.trigger();
    },
    trigger: function () {
        slider.timer = setInterval(function () {
            $('#slider-ad').children().eq(slider.i).fadeOut(1000);
            $('#slider-ad').children().eq(slider.j).fadeIn(1000);
            $('nav.slide-nav ul li').removeClass('current-slide');
            $('nav.slide-nav ul').children().eq(slider.j).addClass('current-slide');
            slider.i++;
            slider.j++;

            slider.i = (slider.i == slider.len) ? 0 : slider.i;
            slider.j = (slider.j == slider.len) ? 0 : slider.j;

            //console.log(slider.i,slider.j);

        }, slider.delay);
    },
    stop: function () {
        clearInterval(slider.timer);
    },
    start: function () {
        slider.trigger();
    },
    nav: function (n) {
        clearInterval(slider.timer);
        $('#slider-ad').children().eq(slider.i).fadeOut(1000);
        $('#slider-ad').children().eq(n).fadeIn(1000);
        $('nav.slide-nav ul li').removeClass('current-slide');
        $('nav.slide-nav ul').children().eq(n).addClass('current-slide');
        slider.i = n;
        slider.j = slider.i + 1;
        slider.j = (slider.j == slider.len) ? 0 : slider.j;
        slider.trigger();
    }



}

var adsld =
{
    i: 0,
    //j:0,
    count: function () {
        adsld.i = $('#ad-wrapper').children().length;
        //adsld.j = $('.content-wrapper').children().length;

        //$('#ad-wrapper').css('width', adsld.i * 210 + 'px');
    }
}

$(window).resize(function () {
    //page_reshape();
    hslideresp();
    respmenu();
});

function page_reshape() {
    var w = $(window).width();

    if (w > 1440 && w <= 1600) {
        $('body').css('zoom', 1.1);
    }
    else if (w > 1366 && w <= 1440) {
        $('body').css('zoom', 1.05);
    }
    else if (w > 1600) {
        $('body').css('zoom', 1.2);
    }
    else {
        $('body').css('zoom', 1);
    }

    /*if (w > 1440 && w <= 1600) {
        $('body').css('zoom', 1.1);
        $('body').css('-moz-transform', 'scale(1.1, 1.1)');
        $('body').css('-moz-transform-origin', 'left center');
    }
    else if (w > 1366 && w <= 1440) {
        $('body').css('zoom', 1.05);
        $('body').css('-moz-transform', 'scale(1.05, 1.05)');
        $('body').css('-moz-transform-origin', 'left center');
    }
    else if (w > 1600) {
        $('body').css('transform', 'scale(1.2, 1.2)');
        $('body').css('-webkit-transform-origin', '0 0 0 0');
        $('body').css('-webkit-animation-fill-mode', 'forwards');
        $('body').css('-webkit-transform-style', 'preserve-3d');
        $('body').css('-webkit-transform', 'translate3d(1,1,0)');
        $('body').css('-moz-transform', 'scale(1.1, 1.1)');
        $('body').css('-moz-transform-origin', 'top center');
        $('body').css('-moz-animation-fill-mode', 'forwards');
        $('body').css('-moz-transform-style', 'preserve-3d');
        $('body').css('-moz-transform', 'translate3d(1,1,0)');
    }
    else {
        $('body').css('zoom', 1);
        $('body').css('-moz-transform', 'scale(1, 1)');
        $('body').css('-moz-transform-origin', 'left center');
    }*/
}



function hslideresp() {
    var w = $(window).width();

    if (w >= 360 && w < 720) {
        hslide.count(2);
    }
    else if (w < 360) {
        hslide.count(1);
    }
    else {
        hslide.count(3);
    }
}

function respmenu() {
    var w = $(window).width();

    if (w > 782) {
        $('nav.menu').show();
    }
    else {
        $('nav.menu').hide();
    }
}
var hslide =
{
    cn: $('#content-wrap'),
    cm: $('.content-wrapper'),
    width: 0,
    num: 0,
    visible: 0,
    timer: '',
    direction: 'fwd',
    state: true,
    count: function (n) {
        var w = $('#content-wrap').width();
        //console.log(w);
        hslide.width = w / n;
        $('.content-wrapper').children().css('width', w / n + 'px');
        var i = $('.content-wrapper').children().length;
        $('.content-wrapper').css('width', i * (w / n) + 'px');

        return i;
    },
    init: function (n) {
        hslide.visible = n;
        hslide.num = hslide.count(n);
        if (n < hslide.num) {
            hslide.timer = setInterval(function () {
                hslide.fwd();
            }, 6000);
        }
    },
    fwd: function () {
        //console.log('fwd' + -hslide.width);
        $('.content-wrapper').animate({ 'margin-left': -hslide.width + 'px' }, 650, "easeOutExpo", function () {
            $('.content-wrapper').css('margin-left', '0px');
            var m = $('.content-wrapper').children().eq(0).detach();
            $('.content-wrapper').append(m);
        });
    },
    bkw: function () {
        //console.log('bkw');
        $('.content-wrapper').css('margin-left', -hslide.width + 'px');
        var m = $('.content-wrapper').children().eq(hslide.num - 1).detach();
        $('.content-wrapper').prepend(m);
        $('.content-wrapper').animate({ 'margin-left': '0px' }, 650, "easeOutExpo");
    }
}


function validateupdatesubcribe() {

    var sEmail = $("#subscribeupdatemail").val();



    var scell = $("#subscribeupdatphone").val();




    if (sEmail === "") {
        alert("Email  shouldn't empty");
        // $("#emailerror").append("Should n't be empty");
        // $("#phoneerror").append("Should n't be empty");
        // $(".errormessage").css("display","block");
        return false;

    }




}













// Doubt =======> Muthukumar  <===============


//$(document).ready(function () {    
//    $('#frmFreelisting').submit(function (evt) {
//        evt.preventDefault();
//        var btnValue = $('input[type="submit"]').get(0).name;
//        if (btnValue == "Post") {
//            if ($('#frmFreelisting').valid()) {
//                $("#spn_Agree").css('display', 'block');                
//                $('#chkAgree').css('outline-color', 'red');
//                $('#chkAgree').css('outline-style', 'solid');
//                $('#chkAgree').css('outline-width', 'thin');
//            }
//        }
//        var $form = $(this);
//    });

//    $(".prop_lisiting").css('z-index', '999');
//    $("#btn_loan").click(function () {
//        $("#loan").slideToggle("slow");
//        $("#doc").css('display', 'none');
//        $("#btn_loan").toggleClass('tble_active');
//        $("#btn_doc").removeClass('tble_active');
//        //$("#btn_loan").css({'background-color':'#333','color':'#fff'});
//    });
//    $("#btn_doc").click(function () {
//        $("#doc").slideToggle("slow");
//        $("#loan").css('display', 'none');
//        $("#btn_doc").toggleClass('tble_active');
//        $("#btn_loan").removeClass('tble_active');
//        //$("#btn_doc").css({ 'background-color': '#333', 'color': '#fff' });
//    });
//    $("#free_lstng").hover(function () {
//        $('#fre_lst').css('display', 'block');
//    });

//});

/* Doubt =======> Muthukumar  <===============*/

/**/
$(document).ready(function () {
    $(".para .plan_head").click(function () {
        $(this).siblings().slideToggle('para');
        $(this).parent().siblings().find('.para').css('display', 'none');
    });
});

/*! Magnific Popup - v1.1.0 - 2016-02-20
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2016 Dmitry Semenov; */
!function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto) }(function (a) { var b, c, d, e, f, g, h = "Close", i = "BeforeClose", j = "AfterClose", k = "BeforeAppend", l = "MarkupParse", m = "Open", n = "Change", o = "mfp", p = "." + o, q = "mfp-ready", r = "mfp-removing", s = "mfp-prevent-close", t = function () { }, u = !!window.jQuery, v = a(window), w = function (a, c) { b.ev.on(o + a + p, c) }, x = function (b, c, d, e) { var f = document.createElement("div"); return f.className = "mfp-" + b, d && (f.innerHTML = d), e ? c && c.appendChild(f) : (f = a(f), c && f.appendTo(c)), f }, y = function (c, d) { b.ev.triggerHandler(o + c, d), b.st.callbacks && (c = c.charAt(0).toLowerCase() + c.slice(1), b.st.callbacks[c] && b.st.callbacks[c].apply(b, a.isArray(d) ? d : [d])) }, z = function (c) { return c === g && b.currTemplate.closeBtn || (b.currTemplate.closeBtn = a(b.st.closeMarkup.replace("%title%", b.st.tClose)), g = c), b.currTemplate.closeBtn }, A = function () { a.magnificPopup.instance || (b = new t, b.init(), a.magnificPopup.instance = b) }, B = function () { var a = document.createElement("p").style, b = ["ms", "O", "Moz", "Webkit"]; if (void 0 !== a.transition) return !0; for (; b.length;)if (b.pop() + "Transition" in a) return !0; return !1 }; t.prototype = { constructor: t, init: function () { var c = navigator.appVersion; b.isLowIE = b.isIE8 = document.all && !document.addEventListener, b.isAndroid = /android/gi.test(c), b.isIOS = /iphone|ipad|ipod/gi.test(c), b.supportsTransition = B(), b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), d = a(document), b.popupsCache = {} }, open: function (c) { var e; if (c.isObj === !1) { b.items = c.items.toArray(), b.index = 0; var g, h = c.items; for (e = 0; e < h.length; e++)if (g = h[e], g.parsed && (g = g.el[0]), g === c.el[0]) { b.index = e; break } } else b.items = a.isArray(c.items) ? c.items : [c.items], b.index = c.index || 0; if (b.isOpen) return void b.updateItemHTML(); b.types = [], f = "", c.mainEl && c.mainEl.length ? b.ev = c.mainEl.eq(0) : b.ev = d, c.key ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), b.currTemplate = b.popupsCache[c.key]) : b.currTemplate = {}, b.st = a.extend(!0, {}, a.magnificPopup.defaults, c), b.fixedContentPos = "auto" === b.st.fixedContentPos ? !b.probablyMobile : b.st.fixedContentPos, b.st.modal && (b.st.closeOnContentClick = !1, b.st.closeOnBgClick = !1, b.st.showCloseBtn = !1, b.st.enableEscapeKey = !1), b.bgOverlay || (b.bgOverlay = x("bg").on("click" + p, function () { b.close() }), b.wrap = x("wrap").attr("tabindex", -1).on("click" + p, function (a) { b._checkIfClose(a.target) && b.close() }), b.container = x("container", b.wrap)), b.contentContainer = x("content"), b.st.preloader && (b.preloader = x("preloader", b.container, b.st.tLoading)); var i = a.magnificPopup.modules; for (e = 0; e < i.length; e++) { var j = i[e]; j = j.charAt(0).toUpperCase() + j.slice(1), b["init" + j].call(b) } y("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (w(l, function (a, b, c, d) { c.close_replaceWith = z(d.type) }), f += " mfp-close-btn-in") : b.wrap.append(z())), b.st.alignTop && (f += " mfp-align-top"), b.fixedContentPos ? b.wrap.css({ overflow: b.st.overflowY, overflowX: "hidden", overflowY: b.st.overflowY }) : b.wrap.css({ top: v.scrollTop(), position: "absolute" }), (b.st.fixedBgPos === !1 || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({ height: d.height(), position: "absolute" }), b.st.enableEscapeKey && d.on("keyup" + p, function (a) { 27 === a.keyCode && b.close() }), v.on("resize" + p, function () { b.updateSize() }), b.st.closeOnContentClick || (f += " mfp-auto-cursor"), f && b.wrap.addClass(f); var k = b.wH = v.height(), n = {}; if (b.fixedContentPos && b._hasScrollBar(k)) { var o = b._getScrollbarSize(); o && (n.marginRight = o) } b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : n.overflow = "hidden"); var r = b.st.mainClass; return b.isIE7 && (r += " mfp-ie7"), r && b._addClassToMFP(r), b.updateItemHTML(), y("BuildControls"), a("html").css(n), b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo || a(document.body)), b._lastFocusedEl = document.activeElement, setTimeout(function () { b.content ? (b._addClassToMFP(q), b._setFocus()) : b.bgOverlay.addClass(q), d.on("focusin" + p, b._onFocusIn) }, 16), b.isOpen = !0, b.updateSize(k), y(m), c }, close: function () { b.isOpen && (y(i), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(r), setTimeout(function () { b._close() }, b.st.removalDelay)) : b._close()) }, _close: function () { y(h); var c = r + " " + q + " "; if (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) { var e = { marginRight: "" }; b.isIE7 ? a("body, html").css("overflow", "") : e.overflow = "", a("html").css(e) } d.off("keyup" + p + " focusin" + p), b.ev.off(p), b.wrap.attr("class", "mfp-wrap").removeAttr("style"), b.bgOverlay.attr("class", "mfp-bg"), b.container.attr("class", "mfp-container"), !b.st.showCloseBtn || b.st.closeBtnInside && b.currTemplate[b.currItem.type] !== !0 || b.currTemplate.closeBtn && b.currTemplate.closeBtn.detach(), b.st.autoFocusLast && b._lastFocusedEl && a(b._lastFocusedEl).focus(), b.currItem = null, b.content = null, b.currTemplate = null, b.prevHeight = 0, y(j) }, updateSize: function (a) { if (b.isIOS) { var c = document.documentElement.clientWidth / window.innerWidth, d = window.innerHeight * c; b.wrap.css("height", d), b.wH = d } else b.wH = a || v.height(); b.fixedContentPos || b.wrap.css("height", b.wH), y("Resize") }, updateItemHTML: function () { var c = b.items[b.index]; b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index)); var d = c.type; if (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) { var f = b.st[d] ? b.st[d].markup : !1; y("FirstMarkupParse", f), f ? b.currTemplate[d] = a(f) : b.currTemplate[d] = !0 } e && e !== c.type && b.container.removeClass("mfp-" + e + "-holder"); var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]); b.appendContent(g, d), c.preloaded = !0, y(n, c), e = c.type, b.container.prepend(b.contentContainer), y("AfterChange") }, appendContent: function (a, c) { b.content = a, a ? b.st.showCloseBtn && b.st.closeBtnInside && b.currTemplate[c] === !0 ? b.content.find(".mfp-close").length || b.content.append(z()) : b.content = a : b.content = "", y(k), b.container.addClass("mfp-" + c + "-holder"), b.contentContainer.append(b.content) }, parseEl: function (c) { var d, e = b.items[c]; if (e.tagName ? e = { el: a(e) } : (d = e.type, e = { data: e, src: e.src }), e.el) { for (var f = b.types, g = 0; g < f.length; g++)if (e.el.hasClass("mfp-" + f[g])) { d = f[g]; break } e.src = e.el.attr("data-mfp-src"), e.src || (e.src = e.el.attr("href")) } return e.type = d || b.st.type || "inline", e.index = c, e.parsed = !0, b.items[c] = e, y("ElementParse", e), b.items[c] }, addGroup: function (a, c) { var d = function (d) { d.mfpEl = this, b._openClick(d, a, c) }; c || (c = {}); var e = "click.magnificPopup"; c.mainEl = a, c.items ? (c.isObj = !0, a.off(e).on(e, d)) : (c.isObj = !1, c.delegate ? a.off(e).on(e, c.delegate, d) : (c.items = a, a.off(e).on(e, d))) }, _openClick: function (c, d, e) { var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick; if (f || !(2 === c.which || c.ctrlKey || c.metaKey || c.altKey || c.shiftKey)) { var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn; if (g) if (a.isFunction(g)) { if (!g.call(b)) return !0 } else if (v.width() < g) return !0; c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), e.el = a(c.mfpEl), e.delegate && (e.items = d.find(e.delegate)), b.open(e) } }, updateStatus: function (a, d) { if (b.preloader) { c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading); var e = { status: a, text: d }; y("UpdateStatus", e), a = e.status, d = e.text, b.preloader.html(d), b.preloader.find("a").on("click", function (a) { a.stopImmediatePropagation() }), b.container.addClass("mfp-s-" + a), c = a } }, _checkIfClose: function (c) { if (!a(c).hasClass(s)) { var d = b.st.closeOnContentClick, e = b.st.closeOnBgClick; if (d && e) return !0; if (!b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0]) return !0; if (c === b.content[0] || a.contains(b.content[0], c)) { if (d) return !0 } else if (e && a.contains(document, c)) return !0; return !1 } }, _addClassToMFP: function (a) { b.bgOverlay.addClass(a), b.wrap.addClass(a) }, _removeClassFromMFP: function (a) { this.bgOverlay.removeClass(a), b.wrap.removeClass(a) }, _hasScrollBar: function (a) { return (b.isIE7 ? d.height() : document.body.scrollHeight) > (a || v.height()) }, _setFocus: function () { (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus() }, _onFocusIn: function (c) { return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1) }, _parseMarkup: function (b, c, d) { var e; d.data && (c = a.extend(d.data, c)), y(l, [b, c, d]), a.each(c, function (c, d) { if (void 0 === d || d === !1) return !0; if (e = c.split("_"), e.length > 1) { var f = b.find(p + "-" + e[0]); if (f.length > 0) { var g = e[1]; "replaceWith" === g ? f[0] !== d[0] && f.replaceWith(d) : "img" === g ? f.is("img") ? f.attr("src", d) : f.replaceWith(a("<img>").attr("src", d).attr("class", f.attr("class"))) : f.attr(e[1], d) } } else b.find(p + "-" + c).html(d) }) }, _getScrollbarSize: function () { if (void 0 === b.scrollbarSize) { var a = document.createElement("div"); a.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(a), b.scrollbarSize = a.offsetWidth - a.clientWidth, document.body.removeChild(a) } return b.scrollbarSize } }, a.magnificPopup = { instance: null, proto: t.prototype, modules: [], open: function (b, c) { return A(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b) }, close: function () { return a.magnificPopup.instance && a.magnificPopup.instance.close() }, registerModule: function (b, c) { c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b) }, defaults: { disableOn: 0, key: null, midClick: !1, mainClass: "", preloader: !0, focus: "", closeOnContentClick: !1, closeOnBgClick: !0, closeBtnInside: !0, showCloseBtn: !0, enableEscapeKey: !0, modal: !1, alignTop: !1, removalDelay: 0, prependTo: null, fixedContentPos: "auto", fixedBgPos: "auto", overflowY: "auto", closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>', tClose: "Close (Esc)", tLoading: "Loading...", autoFocusLast: !0 } }, a.fn.magnificPopup = function (c) { A(); var d = a(this); if ("string" == typeof c) if ("open" === c) { var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup, g = parseInt(arguments[1], 10) || 0; f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({ mfpEl: e }, d, f) } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); else c = a.extend(!0, {}, c), u ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c); return d }; var C, D, E, F = "inline", G = function () { E && (D.after(E.addClass(C)).detach(), E = null) }; a.magnificPopup.registerModule(F, { options: { hiddenClass: "hide", markup: "", tNotFound: "Content not found" }, proto: { initInline: function () { b.types.push(F), w(h + "." + F, function () { G() }) }, getInline: function (c, d) { if (G(), c.src) { var e = b.st.inline, f = a(c.src); if (f.length) { var g = f[0].parentNode; g && g.tagName && (D || (C = e.hiddenClass, D = x(C), C = "mfp-" + C), E = f.after(D).detach().removeClass(C)), b.updateStatus("ready") } else b.updateStatus("error", e.tNotFound), f = a("<div>"); return c.inlineElement = f, f } return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d } } }); var H, I = "ajax", J = function () { H && a(document.body).removeClass(H) }, K = function () { J(), b.req && b.req.abort() }; a.magnificPopup.registerModule(I, { options: { settings: null, cursor: "mfp-ajax-cur", tError: '<a href="%url%">The content</a> could not be loaded.' }, proto: { initAjax: function () { b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) }, getAjax: function (c) { H && a(document.body).addClass(H), b.updateStatus("loading"); var d = a.extend({ url: c.src, success: function (d, e, f) { var g = { data: d, xhr: f }; y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function () { b.wrap.addClass(q) }, 16), b.updateStatus("ready"), y("AjaxContentAdded") }, error: function () { J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) } }, b.st.ajax.settings); return b.req = a.ajax(d), "" } } }); var L, M = function (c) { if (c.data && void 0 !== c.data.title) return c.data.title; var d = b.st.image.titleSrc; if (d) { if (a.isFunction(d)) return d.call(b, c); if (c.el) return c.el.attr(d) || "" } return "" }; a.magnificPopup.registerModule("image", { options: { markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>', cursor: "mfp-zoom-out-cur", titleSrc: "title", verticalFit: !0, tError: '<a href="%url%">The image</a> could not be loaded.' }, proto: { initImage: function () { var c = b.st.image, d = ".image"; b.types.push("image"), w(m + d, function () { "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor) }), w(h + d, function () { c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p) }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage) }, resizeImage: function () { var a = b.currItem; if (a && a.img && b.st.image.verticalFit) { var c = 0; b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c) } }, _onImageHasSize: function (a) { a.img && (a.hasSize = !0, L && clearInterval(L), a.isCheckingImgSize = !1, y("ImageHasSize", a), a.imgHidden && (b.content && b.content.removeClass("mfp-loading"), a.imgHidden = !1)) }, findImageSize: function (a) { var c = 0, d = a.img[0], e = function (f) { L && clearInterval(L), L = setInterval(function () { return d.naturalWidth > 0 ? void b._onImageHasSize(a) : (c > 200 && clearInterval(L), c++, void (3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500))) }, f) }; e(1) }, getImage: function (c, d) { var e = 0, f = function () { c && (c.img[0].complete ? (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, y("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : g())) }, g = function () { c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0) }, h = b.st.image, i = d.find(".mfp-img"); if (i.length) { var j = document.createElement("img"); j.className = "mfp-img", c.el && c.el.find("img").length && (j.alt = c.el.find("img").attr("alt")), c.img = a(j).on("load.mfploader", f).on("error.mfploader", g), j.src = c.src, i.is("img") && (c.img = c.img.clone()), j = c.img[0], j.naturalWidth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1) } return b._parseMarkup(d, { title: M(c), img_replaceWith: c.img }, c), b.resizeImage(), c.hasSize ? (L && clearInterval(L), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"), b.updateStatus("ready")), d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d) } } }); var N, O = function () { return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N }; a.magnificPopup.registerModule("zoom", { options: { enabled: !1, easing: "ease-in-out", duration: 300, opener: function (a) { return a.is("img") ? a : a.find("img") } }, proto: { initZoom: function () { var a, c = b.st.zoom, d = ".zoom"; if (c.enabled && b.supportsTransition) { var e, f, g = c.duration, j = function (a) { var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), d = "all " + c.duration / 1e3 + "s " + c.easing, e = { position: "fixed", zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden" }, f = "transition"; return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b }, k = function () { b.content.css("visibility", "visible") }; w("BuildControls" + d, function () { if (b._allowZoom()) { if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k(); f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function () { f.css(b._getOffset(!0)), e = setTimeout(function () { k(), setTimeout(function () { f.remove(), a = f = null, y("ZoomAnimationEnded") }, 16) }, g) }, 16) } }), w(i + d, function () { if (b._allowZoom()) { if (clearTimeout(e), b.st.removalDelay = g, !a) { if (a = b._getItemToZoom(), !a) return; f = j(a) } f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function () { f.css(b._getOffset()) }, 16) } }), w(h + d, function () { b._allowZoom() && (k(), f && f.remove(), a = null) }) } }, _allowZoom: function () { return "image" === b.currItem.type }, _getItemToZoom: function () { return b.currItem.hasSize ? b.currItem.img : !1 }, _getOffset: function (c) { var d; d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem); var e = d.offset(), f = parseInt(d.css("padding-top"), 10), g = parseInt(d.css("padding-bottom"), 10); e.top -= a(window).scrollTop() - f; var h = { width: d.width(), height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f }; return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h } } }); var P = "iframe", Q = "//about:blank", R = function (a) { if (b.currTemplate[P]) { var c = b.currTemplate[P].find("iframe"); c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none")) } }; a.magnificPopup.registerModule(P, { options: { markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', srcAction: "iframe_src", patterns: { youtube: { index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1" }, vimeo: { index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1" }, gmaps: { index: "//maps.google.", src: "%id%&output=embed" } } }, proto: { initIframe: function () { b.types.push(P), w("BeforeChange", function (a, b, c) { b !== c && (b === P ? R() : c === P && R(!0)) }), w(h + "." + P, function () { R() }) }, getIframe: function (c, d) { var e = c.src, f = b.st.iframe; a.each(f.patterns, function () { return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0 }); var g = {}; return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d } } }); var S = function (a) { var c = b.items.length; return a > c - 1 ? a - c : 0 > a ? c + a : a }, T = function (a, b, c) { return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) }; a.magnificPopup.registerModule("gallery", { options: { enabled: !1, arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', preload: [0, 2], navigateByImgClick: !0, arrows: !0, tPrev: "Previous (Left arrow key)", tNext: "Next (Right arrow key)", tCounter: "%curr% of %total%" }, proto: { initGallery: function () { var c = b.st.gallery, e = ".mfp-gallery"; return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function () { c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function () { return b.items.length > 1 ? (b.next(), !1) : void 0 }), d.on("keydown" + e, function (a) { 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next() }) }), w("UpdateStatus" + e, function (a, c) { c.text && (c.text = T(c.text, b.currItem.index, b.items.length)) }), w(l + e, function (a, d, e, f) { var g = b.items.length; e.counter = g > 1 ? T(c.tCounter, f.index, g) : "" }), w("BuildControls" + e, function () { if (b.items.length > 1 && c.arrows && !b.arrowLeft) { var d = c.arrowMarkup, e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s); e.click(function () { b.prev() }), f.click(function () { b.next() }), b.container.append(e.add(f)) } }), w(n + e, function () { b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function () { b.preloadNearbyImages(), b._preloadTimeout = null }, 16) }), void w(h + e, function () { d.off(e), b.wrap.off("click" + e), b.arrowRight = b.arrowLeft = null })) : !1 }, next: function () { b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML() }, prev: function () { b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML() }, goTo: function (a) { b.direction = a >= b.index, b.index = a, b.updateItemHTML() }, preloadNearbyImages: function () { var a, c = b.st.gallery.preload, d = Math.min(c[0], b.items.length), e = Math.min(c[1], b.items.length); for (a = 1; a <= (b.direction ? e : d); a++)b._preloadItem(b.index + a); for (a = 1; a <= (b.direction ? d : e); a++)b._preloadItem(b.index - a) }, _preloadItem: function (c) { if (c = S(c), !b.items[c].preloaded) { var d = b.items[c]; d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.type && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function () { d.hasSize = !0 }).on("error.mfploader", function () { d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) }).attr("src", d.src)), d.preloaded = !0 } } } }); var U = "retina"; a.magnificPopup.registerModule(U, { options: { replaceSrc: function (a) { return a.src.replace(/\.\w+$/, function (a) { return "@2x" + a }) }, ratio: 1 }, proto: { initRetina: function () { if (window.devicePixelRatio > 1) { var a = b.st.retina, c = a.ratio; c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function (a, b) { b.img.css({ "max-width": b.img[0].naturalWidth / c, width: "100%" }) }), w("ElementParse." + U, function (b, d) { d.src = a.replaceSrc(d, c) })) } } } }), A() });

function onForgotSubmit(token) {
    //debugger
    $('#GCaptcha').val(token);
    $('.captchaSubmit').submit();
}

var reg = new RegExp('^[0-9]$');
/*-------------------------------------- Common Functions for Calculators--------------------------------------*/
function chkInteger() {
    if (window.event.keyCode < 48 || window.event.keyCode > 57) {
        if (event.keyCode == 46) {
            event.returnValue = true;
        }
        else if (event.keyCode == 13) {
            document.getElementById('btnCalculate').click();
            event.returnValue = true;
        }
        else
            event.returnValue = false;
    }
}
var texts;
function DisabledControls() {
    texts = "";
    $("input.form-control").each(function () {
        if ($(this).val().length > 0)
            texts = "true";
    });
    if (texts == "true") {
        $("input.form-control").each(function () {
            if ($(this).val().length == 0) {
                $(this).attr("disabled", "disabled");
            } else {
                $(this).removeAttr("disabled");
            }
        });
    }
}

function ControlBlur(txtids) {
    $("input.form-control").each(function () {
        if ($(this).attr('id') != $(txtids).attr('id'))
            $(this).val("");
    });
}

function Enable_DisableDiv(action, txtid) {
    if (action == "hide") {
        $(txtid).hide();
    }
    else {
        $(txtid).show();
    }
}

function errorMessage(msg, txtid) {
    $("#lblmsg").html(msg);
    $("#lblmsg").css("color", "#BA0000");
    txtid.focus();
}

/*-------------------------------------- End of funcation ----------------------------------*/

/* ------------------------------------- EMI Calculators by --------------------------------*/
Enable_DisableDiv('hide', "#tblResult");
function EMIControls() {
    nInteresRate = document.getElementById('txtInterestrate');
    nLoanamount = document.getElementById('txtLoanamount');
    nDurationyear = document.getElementById('txtDuration');
    txtResult = document.getElementById('txtResult');
}
function EMI_Click() {
    EMIControls();
    if (ValidateControl()) {
        var fTotalAmount = Emicalculation(parseFloat(nInteresRate.value), parseInt(nLoanamount.value), parseInt(nDurationyear.value));
        Enable_DisableDiv('show', "#tblResult");
        txtResult.value = Math.round(fTotalAmount);
        $("#lblmsg").html("");
    }
}
function Emicalculation(m_dInterestrate, m_nLoanamount, m_nDuration, m_strDiminishingbalancemethod) {
    /* EMI FORMULA
    E= P x r x (1 + r)n / ((1+r)n -1)
    Here p=principal amount
    r = interesr rate per month(ex: if interest rate per annum is 10% then 10/(12*100))
    n= tenure in months */

    var nEMI = 0;
    var nTemp = 0;
    var nTempinterestRate = 0
    var nPeriods = m_nDuration * 12;
    nTempinterestRate = m_dInterestrate / 12 / 100;
    nTemp = m_nLoanamount * nTempinterestRate * Math.pow((1 + nTempinterestRate), nPeriods) / (Math.pow((1 + nTempinterestRate), nPeriods) - 1);
    return nTemp;
}

function ValidateControl() {
    EMIControls();
   
    if (nLoanamount.value == "") {
        errorMessage("Loan Amount Cannot be Empty!", nLoanamount);
        return false;
    }
    if ($.isNumeric(nLoanamount.value) == false) {
        errorMessage("Loan Amount rate should be numeric!", nLoanamount);
        return false;
    }
    if (nInteresRate.value == "") {
        errorMessage("Interest rate cannot be Empty!", nInteresRate);
        return false;
    }
    if ($.isNumeric(nInteresRate.value) == false) {
        errorMessage("Interest rate should be numeric!", nInteresRate);
        return false;
    }
    if (nDurationyear.value == "") {
        errorMessage("Duration year cannot be empty!", nDurationyear);
        return false;
    }
    if ($.isNumeric(nDurationyear.value) == false) {
        errorMessage("Duration year should be numeric!", nDurationyear);
        return false;
    }
    return true;
}
function ClearControls() {
    EMIControls();
    nInteresRate.value = "";
    nLoanamount.value = "";
    nDurationyear.value = "";
    txtResult.value = "";
    $("#lblmsg").html("");
    Enable_DisableDiv('hide', "#tblResult");
}

/* -------------------------------------End of EMI Calculators ---------------------------------*/

/* -------------------------------------Start of Area Amortization Calculators ---------------------------------*/


Enable_DisableDiv('hide', "#tblResult");
var gvGird;
function AmortizationControls() {

    txtInterestRate = document.getElementById('txtInterestrate');
    txtLoanAmount = document.getElementById('txtLoanamount');
    txtTenure = document.getElementById('txtTenure');
    lblyearlypayment = document.getElementById('yearlypayment');
    lblloanamount = document.getElementById('loanamount');
    lblperiod = document.getElementById('period');
    lblinterest = document.getElementById('interest');
    cmbDiminishing = document.getElementById('cmbdiminishing');
    btnCalculate = document.getElementById('btnCalculate');
    btnClear = document.getElementById('btnClear');
    tabResult = document.getElementById('tabResult');
    gvGird = document.getElementById('ascheduleTable');
    var divLoanAmt = document.getElementById('divLoanAmt');
    divPeriods = document.getElementById('divPeriod');
    var divInterest = document.getElementById('divInterest');
    divYearlyPayment = document.getElementById('divYlyPayment');
    var divEMI = document.getElementById('divEMI');
}

function AmortizationValidAll() {
    AmortizationControls();
    if (txtInterestRate.value == "" || parseInt(txtInterestRate.value > 100)) {
        errorMessage("Interest rate cannot be empty!", txtInterestRate);
        return false;
    }
    if ($.isNumeric(txtInterestRate.value) == false) {
        errorMessage("Interest Rate Should be Numeric!", txtInterestRate);
        return false;
    }

    if (txtLoanAmount.value == "") {
        errorMessage("Load amount cannot be empty!", txtLoanAmount);
        return false;
    }
    if ($.isNumeric(txtLoanAmount.value) == false) {
        errorMessage("Interest Rate should be numeric!", txtLoanAmount);
        return false;
    }

    if (txtTenure.value == "") {
        errorMessage("Tenure cannot be empty!", txtTenure);
        return false;
    }
    if ($.isNumeric(txtTenure.value) == false) {
        errorMessage("Tenure should be numeric!", txtTenure);
        return false;
    }

    if (cmbDiminishing.value == "--Select--") {
        errorMessage("Select atleast one diminishing value!", cmbDiminishing);
        return false;
    }

    return true;
}
function AmortizationSetAll() {
    AmortizationControls();
    if (AmortizationValidAll()) {
        m_nInterestRate = parseInt(txtInterestRate.value);
        m_dLoanamount = parseFloat(txtLoanAmount.value);
        m_nDuration = parseFloat(txtTenure.value);
        Diminishingbalancemethod = cmbDiminishing.value;
        return true;
    }
    return false;

}
function SetValues() {
    dInterestrate = parseFloat(txtInterestRate.value) / 100;
    nDuration = parseInt(txtTenure.value);
    dLoanamount = parseFloat(txtLoanAmount.value);
}
var sNewHtml;
var strNewHtml;
var sHtml;
function GenerateSchedule() {
    sHtml = "";
    sNewHtml = "";
    strNewHtml = "";
    AmortizationControls();
    Enable_DisableDiv('show', "#tblResult");
    gvGird.innerHTML = "";
    var nAmortizationAmt = 0;
    var nRate = 0;
    var nNumberofPeriods = 0;
    var PrincipalComp = 0;
    var nBalance = 0;
    var nLoanAmt = 0;
    var nPeriods = 0;
    var nInterestRate = 0;
    if (Diminishingbalancemethod == "Monthly") {
        nNumberofPeriods = nDuration * 12;
        nPeriods = nNumberofPeriods;
    }
    else {
        nNumberofPeriods = nDuration;
        nPeriods = 1;
        nDuration = nPeriods;
    }
    nRate = dInterestrate / nPeriods;
    nAmortizationAmt = Math.round(nRate * dLoanamount * Math.pow((1 + nRate), nNumberofPeriods) / (Math.pow((1 + nRate), nNumberofPeriods) - 1));

    nInterestRate = dLoanamount * nDuration * nRate;
    nInterestRate = Math.floor(nInterestRate);
    sHtml = "<table border='1' style='font-family:Verdana;font-size:11px' cellpadding='0' cellspacing='0' width='100%'>";
    sHtml += "<tr class='tablemenu'>";
    sHtml += "<td class='Amlablecontent' width='60px'style='text-align:center'>Year</td>";
    sHtml += "<td class='Amlablecontent' style='text-align:center'>Loan Amount Outstanding</td>";
    sHtml += "<td class='Amlablecontent' style='text-align:center'>Interest</td>";
    sHtml += "<td class='Amlablecontent' style='text-align:center'>Principal Component</td>";
    sHtml += "<td class='Amlablecontent' style='text-align:center'>Total Payment in one Month</td>";
    sHtml += "<td class='Amlablecontent' style='text-align:center'>Principal Balance at Month end</td>";
    sHtml += "</tr>";

    nLoanAmt = dLoanamount;
    PrincipalComp = Math.round(nAmortizationAmt - nInterestRate);
    nBalance = dLoanamount - PrincipalComp;
    strNewHtml = Calculate_Amortization(nLoanAmt, nInterestRate, PrincipalComp, nAmortizationAmt, nBalance, nRate, nNumberofPeriods, nAmortizationAmt, 1);
    sHtml = sHtml + strNewHtml + "</table>";
    // gvGird.innerHTML = sHtml;
    $("#ascheduleTable").append(sHtml);
    divLoanAmt.innerHTML = "<span class='Amor_calc' style='width:300px'>Loan Amount: </span> " + "Rs. " + dLoanamount;
    divPeriods.innerHTML = "<span class='Amor_calc'>Loan Periods: </span>" + " " + txtTenure.value;
    divInterest.innerHTML = "<span class='Amor_calc'>Interest Rates for " + " " + cmbDiminishing.value + " </span>" + ":" + " " + txtInterestRate.value + "%";
    divEMI.innerHTML = "<span class='Amor_calc'>EMI: </span>" + nAmortizationAmt;
    divYearlyPayment.innerHTML = "<span class='Amor_calc'>Yearly Payment:</span> Rs." + "  " + nAmortizationAmt * txtTenure.value;
    sHtml = "";
    sNewHtml = "";


}
function Calculate_Amortization(nTempLoanAmount, nTempInterestRate, nTempPrincipalComp, nTempAmortizationAmt, nTempBalance, nRate, nNumberofPeriods, nAmortizationAmt, nVal) {
    if (nVal <= nNumberofPeriods) {
        sNewHtml += "<tr>";
        sNewHtml += "<td class='AmortCalc_lablecontent'>";
        sNewHtml += nVal;
        sNewHtml += "</td>";

        sNewHtml += "<td class='AmortCalc_lablecontent'>";
        sNewHtml += nTempLoanAmount;
        sNewHtml += "</td>";

        sNewHtml += "<td class='AmortCalc_lablecontent'>";
        sNewHtml += Math.floor(nTempInterestRate);
        sNewHtml += "</td>";

        sNewHtml += "<td class='AmortCalc_lablecontent'>";
        sNewHtml += nTempPrincipalComp;
        sNewHtml += "</td>";

        sNewHtml += "<td class='AmortCalc_lablecontent'>";
        sNewHtml += nTempAmortizationAmt;
        sNewHtml += "</td>";

        sNewHtml += "<td class='AmortCalc_lablecontent'>";
        sNewHtml += nTempBalance;
        sNewHtml += "</td>";
        sNewHtml += "</tr>";

        var nTempInterestRate = nTempBalance * nDuration * nRate;
        nTempPrincipalComp = nAmortizationAmt - Math.round(nTempInterestRate);
        nBalance = nTempBalance - nTempPrincipalComp;
        if (nBalance < 0 || nVal == eval(nNumberofPeriods) - 1)
            nBalance = 0;
        nVal = nVal + 1;
        Calculate_Amortization(nTempBalance, nTempInterestRate, nTempPrincipalComp, nTempAmortizationAmt, nBalance, nRate, nNumberofPeriods, nAmortizationAmt, nVal);
    }
    return sNewHtml;
}
function btnCalculate_Click() {
    if (AmortizationSetAll()) {
        SetValues();
        GenerateSchedule();
        sHtml = "";
        $("#lblmsg").html("");
    }
}
function ClearAll() {
    AmortizationControls();
    txtInterestRate.value = "";
    txtLoanAmount.value = "";
    txtTenure.value = "";
    cmbDiminishing.value = "--Select--";
    sHtml = "";
    gvGird.innerHTML = sHtml;
    $("#lblmsg").html("");
    sNewHtml = "";
    Enable_DisableDiv('hide', "#tblResult");
    divLoanAmt.innerHTML = "";
    divPeriods.innerHTML = "";
    divInterest.innerHTML = "";
    divEMI.innerHTML = "";
    divYearlyPayment.innerHTML = "";
}

/* -------------------------------------End of Area Amortization Calculators ---------------------------------*/

/* ------------------------------------- Stamp Duty Calculators ---------------------------------*/
function StampControls() {
    txtPropertyValue = document.getElementById('txtPropertyValue');
    cmbStates = document.getElementById('cmbStates');
    tblResult = document.getElementById('tblresult');
    txtResult = document.getElementById('txtResult');
    lblStampValue = document.getElementById('lblStampValue');
}
function Stamp_calculation() {
    StampControls();
    if (Validation()) {
        nValue = cmbStates.options[cmbStates.selectedIndex].value;
        txtResult.value = "Stamp Duty (Rs.) of " + cmbStates.options[cmbStates.selectedIndex].text + " is " + parseFloat(txtPropertyValue.value * nValue);
        lblStampValue.value = "Stamp Duty value of " + cmbStates.options[cmbStates.selectedIndex].text + " is " + nValue + "%";
       // tblResult.style.display = "inline";
        Enable_DisableDiv('show', "#tblresult");
    }
}
function ClearStampControls() {
    StampControls();
    txtPropertyValue.value = "";
    cmbStates.value = "Select";
    txtResult.value = "";
    Enable_DisableDiv('hide', "#tblresult");
    $("#lblmsg").html("");
}
function Validation() {

    StampControls();
    if (cmbStates.value == "Select") {
        errorMessage("Select atleast one state!!!", cmbStates);
        return false;
    }
    if (txtPropertyValue.value == "") {
        errorMessage("Enter Property value!", txtPropertyValue);
        return false;
    }
    if ($.isNumeric(txtPropertyValue.value) == false) {
        errorMessage("Property value should be numeric!", txtPropertyValue);
        return false;
    }
    $("#lblmsg").html("");
    return true;
}
/* ------------------------------------- End of Stamp Duty Calculators ---------------------------------*/

/* ------------------------------------- Area Conversion Calculators -----------------------------------------*/
function AreaConvCalculation() {
    Calculate();
}
function ClearArearControls() {
    AreaConvControls()
    txtAankadam.value = "";
    txtAcres.value = "";
    txtAres.value = "";
    txtBigha1.value = "";
    txtBigha2.value = "";
    txtBiswa1.value = "";
    txtBiswa2.value = "";
    txtBigha1.value = "";
    txtCents.value = "";
    txtChataks.value = "";
    txtGrounds.value = "";
    txtGuntha.value = "";
    txtHect.value = "";
    txtKanal.value = "";
    txtKottah.value = "";
    txtMarla.value = "";
    txtPerch.value = "";
    txtRood.value = "";
    txtSquareMetres.value = "";
    txtSquareFeet.value = "";
    txtSquareYard.value = "";
    $(".form-control").removeAttr("disabled");
    $("#lblmsg").html("");
    return true;
}
function AreaConvControls() {
    txtAankadam = document.getElementById('txtAankadam');
    txtAcres = document.getElementById('txtAcres');
    txtAres = document.getElementById('txtAres');
    txtBigha1 = document.getElementById('txtBigha1');
    txtBigha2 = document.getElementById('txtBigha2');
    txtBiswa1 = document.getElementById('txtBiswa1');
    txtBiswa2 = document.getElementById('txtBiswa2');
    txtBigha1 = document.getElementById('txtBigha1');
    txtCents = document.getElementById('txtCents');
    txtChataks = document.getElementById('txtChataks');
    txtGrounds = document.getElementById('txtGrounds');
    txtGuntha = document.getElementById('txtGuntha');

    txtHect = document.getElementById('txtHect');
    txtKanal = document.getElementById('txtKanal');
    txtKottah = document.getElementById('txtKottah');
    txtMarla = document.getElementById('txtMarla');
    txtPerch = document.getElementById('txtPerch');
    txtRood = document.getElementById('txtRood');
    txtSquareMetres = document.getElementById('txtSquareMetres');
    txtSquareFeet = document.getElementById('txtSquareFeet');
    txtSquareYard = document.getElementById('txtSquareYard');
}

function Calculate() {
    AreaConvControls();
    DisabledControls();
    if (txtAankadam.value != "") {
        fvalue = txtAankadam.value;
        Aankadamconversion(fvalue);
    }
    else if (txtAcres.value != "") {
        fvalue = txtAcres.value;
        Acresconversion(fvalue);
    }
    else if (txtAres.value != "") {
        fvalue = txtAres.value;
        Areasconversion(fvalue);
    }
    else if (txtBigha1.value != "") {
        fvalue = txtBigha1.value;
        Bigha1conversion(fvalue);
    }
    else if (txtBigha2.value != "") {
        fvalue = txtBigha2.value;
        Bigha2conversion(fvalue);
    }
    else if (txtBiswa1.value != "") {
        fvalue = txtBiswa1.value;
        Biswa1conversion(fvalue);
    }
    else if (txtBiswa2.value != "") {
        fvalue = txtBiswa2.value;
        Biswa2conversion(fvalue);
    }
    else if (txtCents.value != "") {
        fvalue = txtCents.value;
        Centsconversion(fvalue);
    }
    else if (txtChataks.value != "") {
        fvalue = txtChataks.value;
        Chataksconversion(fvalue);
    }
    else if (txtGrounds.value != "") {
        fvalue = txtGrounds.value;
        Groundsconversion(fvalue);
    }
    else if (txtGuntha.value != "") {
        fvalue = txtGuntha.value;
        Gunthaconversion(fvalue);
    }
    else if (txtHect.value != "") {
        fvalue = txtHect.value;
        Hectaresconversion(fvalue);
    }
    else if (txtKanal.value != "") {
        fvalue = txtKanal.value;
        Kanalconversion(fvalue);
    }
    else if (txtKottah.value != "") {
        fvalue = txtKottah.value;
        Kottahconversion(fvalue);
    }
    else if (txtMarla.value != "") {
        fvalue = txtMarla.value;
        Marlaconversion(fvalue);

    }
    else if (txtPerch.value != "") {
        fvalue = txtPerch.value;
        Perchconversion(fvalue);
    }
    else if (txtRood.value != "") {
        fvalue = txtRood.value;
        Roodconversion(fvalue);

    }
    else if (txtSquareMetres.value != "") {
        fvalue = txtSquareMetres.value;
        Sqmetersconversion(fvalue);

    }
    else if (txtSquareFeet.value != "") {
        fvalue = txtSquareFeet.value;
        sqfeetconversion(fvalue);
    }
    else if (txtSquareYard.value != "") {
        fvalue = txtSquareYard.value;
        Sqyardsconversion(fvalue);
    }
    else {
        errorMessage("Enter atleast one value!", txtAankadam);
        return false;
    }

    return true;
}


function Aankadamconversion(Aankadam) {
    AreaConvControls();
    txtAankadam.value = Aankadam;
    txtAcres.value = Aankadam * 0.0016526393667100787;
    txtAres.value = Aankadam * 0.06690486330500517;
    txtBigha1.value = Aankadam * 0.004131636427301377;
    txtBigha2.value = Aankadam * 0.0026442473192320515;
    txtBiswa1.value = Aankadam * 0.00020658181776558721;
    txtBiswa2.value = Aankadam * 0.0001322123659616026;
    txtCents.value = Aankadam * 0.16528819717730087;
    txtChataks.value = Aankadam * 0.15997696203765094;
    txtGrounds.value = Aankadam * 0.02999568062202498;
    txtGuntha.value = Aankadam * 0.06610618266018828;
    txtHect.value = Aankadam * 0.0006688136806794727;
    txtKanal.value = Aankadam * 0.0006666669714227792;
    txtKottah.value = Aankadam * 0.09998560207341661;
    txtMarla.value = Aankadam * 0.013333339572434852;
    txtPerch.value = Aankadam * 0.26437617491580273;
    txtRood.value = Aankadam * 0.006609404408889885;
    txtSquareFeet.value = Aankadam * 71.9896329169429;
    txtSquareMetres.value = Aankadam * 6.695035861275689;
    txtSquareYard.value = Aankadam * 7.9988481018817445;
}

function Acresconversion(Acres) {
    txtAres.value = Acres * 0.9999999999999999;
    txtAankadam.value = Acres * 605.0926899984885;
    txtAcres.value = Acres//Acres * 40.48364371120674;
    txtBigha1.value = Acres * 2.5000229998915344;
    txtBigha2.value = Acres * 1.600014723415414;
    txtBiswa1.value = Acres * 0.1250011478165567;
    txtBiswa2.value = Acres * 0.0800007361707707;
    txtCents.value = Acres * 100.01467985501355;
    txtChataks.value = Acres * 96.80089029714828;
    txtGrounds.value = Acres * 18.15016707591663;
    txtGuntha.value = Acres * 40.000367891384755;
    txtHect.value = Acres * 0.40469426915013223;
    txtKanal.value = Acres * 0.40339531107135495;
    txtKottah.value = Acres * 1.600014723415414;
    txtMarla.value = Acres * 8.0679063085479;
    txtPerch.value = Acres * 159.972090851314;
    txtRood.value = Acres * 3.9993022930630495;
    txtSquareFeet.value = Acres * 43560.40063371671;
    txtSquareMetres.value = Acres * 4051.117258935654;
    txtSquareYard.value = Acres * 4840.044514856928;
}

function Areasconversion(Ares) {
    txtAres.value = Ares;
    txtAankadam.value = Ares * 14.94659656415724;
    txtAcres.value = Ares * 0.024701333880259857;
    txtBigha1.value = Ares * 0.06175390282864965;
    txtBigha2.value = Ares * 0.03952249789641577;
    txtBiswa1.value = Ares * 0.0030876950876324825;
    txtBiswa2.value = Ares * 0.0019761248948207887;
    txtCents.value = Ares * 2.4704960000259897;
    txtChataks.value = Ares * 2.391111111136267;
    txtGrounds.value = Ares * 0.44833333692471644;
    txtGuntha.value = Ares * 0.9880624426183209;
    txtHect.value = Ares * 0.009996488261705164;
    txtKanal.value = Ares * 0.009964402264504825;
    txtKottah.value = Ares * 1.4944444564157217;
    txtMarla.value = Ares * 0.19928804744209652;
    txtPerch.value = Ares * 3.9515240276415704;
    txtRood.value = Ares * 0.09878810122903925;
    txtSquareFeet.value = Ares * 1076.0000000113195;
    txtSquareMetres.value = Ares * 100.06800000105272;
    txtSquareYard.value = Ares * 119.55555555680134;
}

function Bigha1conversion(Bigha1) {
    txtAres.value = Bigha1 * 0.3999963200512098;
    txtAankadam.value = Bigha1 * 242.03484928928287;
    txtAcres.value = Bigha1 * 16.193308506746998;
    txtBigha1.value = Bigha1 * 0.9999999999999999;
    txtBigha2.value = Bigha1 * 0.6400000013939199;
    txtBiswa1.value = Bigha1 * 0.0499999991288;
    txtBiswa2.value = Bigha1 * 0.032000000069696;
    txtCents.value = Bigha1 * 40.00550389310529;
    txtChataks.value = Bigha1 * 38.71999989654017;
    txtGrounds.value = Bigha1 * 7.260000038681279;
    txtGuntha.value = Bigha1 * 15.999999957248473;
    txtHect.value = Bigha1 * 0.16187621840586674;
    txtKanal.value = Bigha1 * 0.16135663995445504;
    txtKottah.value = Bigha1 * 24.2000001289376;
    txtMarla.value = Bigha1 * 3.227132833937101;
    txtPerch.value = Bigha1 * 63.9882476514234;
    txtRood.value = Bigha1 * 1.599706199997585;
    txtSquareFeet.value = Bigha1 * 17423.99995344307;
    txtSquareMetres.value = Bigha1 * 1620.4319956702056;
    txtSquareYard.value = Bigha1 * 1935.9999948268143;
}



function Bigha2conversion(Bigha2) {
    txtAres.value = Bigha2 * 0.6249942487187778;
    txtAankadam.value = Bigha2 * 378.1794511908297;
    txtAcres.value = Bigha2 * 25.302044486684334;
    txtBigha1.value = Bigha2 * 1.5624999965968748;
    txtBigha2.value = Bigha2;
    txtBiswa1.value = Bigha2 * 0.07812499846859376;
    txtBiswa2.value = Bigha2 * 0.05;
    txtCents.value = Bigha2 * 62.508599696833286;
    txtChataks.value = Bigha2 * 60.499999706575025;
    txtGrounds.value = Bigha2 * 11.343750035732812;
    txtGuntha.value = Bigha2 * 24.999999878750742;
    txtHect.value = Bigha2 * 0.2529315907082818;
    txtKanal.value = Bigha2 * 0.2521197493797192;
    txtKottah.value = Bigha2 * 37.81250011910938;
    txtMarla.value = Bigha2 * 5.042395042044384;
    txtPerch.value = Bigha2 * 99.98163673758907;
    txtRood.value = Bigha2 * 2.4995409320522266;
    txtSquareFeet.value = Bigha2 * 27224.99986795875;
    txtSquareMetres.value = Bigha2 * 2531.9249877201637;
    txtSquareYard.value = Bigha2 * 3024.9999853284475;
}



function Biswa1conversion(Biswa1) {
    txtAres.value = Biswa1 * 7.999926540414916;
    txtAankadam.value = Biswa1 * 4840.697070129963;
    txtAcres.value = Biswa1 * 323.8661757779842;
    txtBigha1.value = Biswa1 * 20.000000348480004;
    txtBigha2.value = Biswa1 * 12.800000250905602;
    txtBiswa1.value = Biswa1;
    txtBiswa2.value = Biswa1 * 0.6400000125452802;
    txtCents.value = Biswa1 * 800.110091803224;
    txtChataks.value = Biswa1 * 774.4000114239493;
    txtGrounds.value = Biswa1 * 145.20000330359045;
    txtGuntha.value = Biswa1 * 320.00000472064954;
    txtHect.value = Biswa1 * 3.2375244245279604;
    txtKanal.value = Biswa1 * 3.2271328553186635;
    txtKottah.value = Biswa1 * 484.0000110119682;
    txtMarla.value = Biswa1 * 64.54265780333328;
    txtPerch.value = Biswa1 * 1279.764975327093;
    txtRood.value = Biswa1 * 31.994124557417326;
    txtSquareFeet.value = Biswa1 * 348480.00514077703;
    txtSquareMetres.value = Biswa1 * 32408.640478092264;
    txtSquareYard.value = Biswa1 * 38720.00057119358;
}



function Biswa2conversion(biswa2) {
    txtAres.value = biswa2 * 12.499884974375556;
    txtAankadam.value = biswa2 * 7563.589023816593;
    txtAcres.value = biswa2 * 506.0408897336867;
    txtBigha1.value = biswa2 * 31.2499999319375;
    txtBigha2.value = biswa2 * 19.999999999999996;
    txtBiswa1.value = biswa2 * 1.562499969371875;
    txtBiswa2.value = biswa2;
    txtCents.value = biswa2 * 1250.1719939366657;
    txtChataks.value = biswa2 * 1209.9999941315004;
    txtGrounds.value = biswa2 * 226.87500071465624;
    txtGuntha.value = biswa2 * 499.9999975750148;
    txtHect.value = biswa2 * 5.0586318141656354;
    txtKanal.value = biswa2 * 5.042394987594384;
    txtKottah.value = biswa2 * 756.2500023821875;
    txtMarla.value = biswa2 * 100.84790084088767;
    txtPerch.value = biswa2 * 1999.6327347517813;
    txtRood.value = biswa2 * 49.99081864104453;
    txtSquareFeet.value = biswa2 * 544499.997359175;
    txtSquareMetres.value = biswa2 * 50638.499754403274;
    txtSquareYard.value = biswa2 * 60499.99970656895;
}



function Centsconversion(Cents) {
    txtAres.value = Cents * 0.009998532229965157;
    txtAankadam.value = Cents * 6.050038763066203;
    txtAcres.value = Cents * 0.40477701643292685;
    txtBigha1.value = Cents * 0.024996560540069688;
    txtBigha2.value = Cents * 0.015997798780487803;
    txtBiswa1.value = Cents * 0.0012498280052264808;
    txtBiswa2.value = Cents * 0.0007998899390243903;
    txtCents.value = Cents;
    txtChataks.value = Cents * 0.9678668215253585;
    txtGrounds.value = Cents * 0.1814750304878049;
    txtGuntha.value = Cents * 0.3999449675724739;
    txtHect.value = Cents * 0.004046348693379791;
    txtKanal.value = Cents * 0.004033361019163763;
    txtKottah.value = Cents * 0.604916768292683;
    txtMarla.value = Cents * 0.08066722125435541;
    txtPerch.value = Cents * 1.5994861062717771;
    txtRood.value = Cents * 0.03998715287456446;
    txtSquareFeet.value = Cents * 435.5400696864112;
    txtSquareMetres.value = Cents * 40.50522648083624;
    txtSquareYard.value = Cents * 48.39334107626307;
}



function Chataksconversion(Chataks) {
    txtAres.value = Chataks * 0.010330483499999996;
    txtAankadam.value = Chataks * 6.250900049999998;
    txtAcres.value = Chataks * 0.41821561337849983;
    txtBigha1.value = Chataks * 0.02582644634999999;
    txtBigha2.value = Chataks * 0.016528925699999992;
    txtBiswa1.value = Chataks * 0.0012913222949999993;
    txtBiswa2.value = Chataks * 0.0008264462849999997;
    txtCents.value = Chataks * 1.0331999999999994;
    txtChataks.value = Chataks;
    txtGrounds.value = Chataks * 0.18750000149999993;
    txtGuntha.value = Chataks * 0.4132231404958798;
    txtHect.value = Chataks * 0.004180687469999999;
    txtKanal.value = Chataks * 0.004167268604999998;
    txtKottah.value = Chataks * 0.6250000049999999;
    txtMarla.value = Chataks * 0.08334537299999997;
    txtPerch.value = Chataks * 1.6525890449999993;
    txtRood.value = Chataks * 0.04131472634999998;
    txtSquareFeet.value = Chataks * 449.99999999999983;
    txtSquareMetres.value = Chataks * 41.84999999999999;
    txtSquareYard.value = Chataks * 49.999999999994984;
}



function Groundsconversion(Grounds) {
    txtAres.value = Grounds * 0.055095911559232706;
    txtAankadam.value = Grounds * 33.338133333294934;
    txtAcres.value = Grounds * 2.230483253508134;
    txtBigha1.value = Grounds * 0.13774104609807164;
    txtBigha2.value = Grounds * 0.08815426969476583;
    txtBiswa1.value = Grounds * 0.006887052184903582;
    txtBiswa2.value = Grounds * 0.004407713484738292;
    txtCents.value = Grounds * 5.5103999559168;
    txtChataks.value = Grounds * 5.333333290666669;
    txtGrounds.value = Grounds;
    txtGuntha.value = Grounds * 2.2038567316805064;
    txtHect.value = Grounds * 0.022296999661624003;
    txtKanal.value = Grounds * 0.022225432382196538;
    txtKottah.value = Grounds * 3.3333333333333335;
    txtMarla.value = Grounds * 0.4445086524439308;
    txtPerch.value = Grounds * 8.813808169489535;
    txtRood.value = Grounds * 0.22034520543723837;
    txtSquareFeet.value = Grounds * 2399.9999808000002;
    txtSquareMetres.value = Grounds * 223.1999982144;
    txtSquareYard.value = Grounds * 266.6666645333067;
}



function Gunthaconversion(Guntha) {
    txtAres.value = Guntha * 0.024999770069999257;
    txtAankadam.value = Guntha * 15.127178120999552;
    txtAcres.value = Guntha * 1.01208178437594;
    txtBigha1.value = Guntha * 0.06250000016699814;
    txtBigha2.value = Guntha * 0.04000000019399881;
    txtBiswa1.value = Guntha * 0.0031249999538999072;
    txtBiswa2.value = Guntha * 0.0020000000096999405;
    txtCents.value = Guntha * 2.5003439999999255;
    txtChataks.value = Guntha * 2.4199999999999293;
    txtGrounds.value = Guntha * 0.4537500036299865;
    txtGuntha.value = Guntha;
    txtHect.value = Guntha * 0.0101172636773997;
    txtKanal.value = Guntha * 0.0100847900240997;
    txtKottah.value = Guntha * 1.5125000120999552;
    txtMarla.value = Guntha * 0.201695802659994;
    txtPerch.value = Guntha * 3.9992654888998813;
    txtRood.value = Guntha * 0.09998163776699703;
    txtSquareFeet.value = Guntha * 1088.9999999999677;
    txtSquareMetres.value = Guntha * 101.276999999997;
    txtSquareYard.value = Guntha * 120.99999999998431;
}



function Hectaresconversion(Hectares) {
    txtAres.value = Hectares * 2.4710011389586124;
    txtAankadam.value = Hectares * 1495.1847261617956;
    txtAcres.value = Hectares * 100.03512971958652;
    txtBigha1.value = Hectares * 6.177559680154709;
    txtBigha2.value = Hectares * 3.9536382039100375;
    txtBiswa1.value = Hectares * 0.3088779786258455;
    txtBiswa2.value = Hectares * 0.19768191019550188;
    txtCents.value = Hectares * 247.1363878343195;
    txtChataks.value = Hectares * 239.1951101764611;
    txtGrounds.value = Hectares * 44.8490835168791;
    txtGuntha.value = Hectares * 98.84095461837525;
    txtHect.value = Hectares;
    txtKanal.value = Hectares * 0.9967902731078819;
    txtKottah.value = Hectares * 149.49694505626368;
    txtMarla.value = Hectares * 19.935805677433237;
    txtPerch.value = Hectares * 395.29121869518746;
    txtRood.value = Hectares * 9.882280521198586;
    txtSquareFeet.value = Hectares * 107637.79957940745;
    txtSquareMetres.value = Hectares * 10010.315360884893;
    txtSquareYard.value = Hectares * 11959.755508821854;
}



function Kanalconversion(kanal) {
    txtAres.value = kanal * 2.478957916848751;
    txtAankadam.value = kanal * 1499.99931429906;
    txtAcres.value = kanal * 100.3572490807801;
    txtBigha1.value = kanal * 6.197451807885083;
    txtBigha2.value = kanal * 3.9663691656852053;
    txtBiswa1.value = kanal * 0.3098725849950342;
    txtBiswa2.value = kanal * 0.19831845828426028;
    txtCents.value = kanal * 247.93218242767915;
    txtChataks.value = kanal * 239.96533336012317;
    txtGrounds.value = kanal * 44.99350036497108;
    txtGuntha.value = kanal * 99.15922866121082;
    txtHect.value = kanal * 1.0032200624130396;
    txtKanal.value = kanal;
    txtKottah.value = kanal * 149.9783345499036;
    txtMarla.value = kanal * 20.0000002159688;
    txtPerch.value = kanal * 396.5640810907124;
    txtRood.value = kanal * 9.91410208126001;
    txtSquareFeet.value = kanal * 107984.40001205538;
    txtSquareMetres.value = kanal * 10042.54920112115;
    txtSquareYard.value = kanal * 11998.266668004953;
}



function Marlaconversion(Marla) {
    txtAres.value = Marla * 0.12394789450399363;
    txtAankadam.value = Marla * 74.99996490507037;
    txtAcres.value = Marla * 5.017862399853919;
    txtBigha1.value = Marla * 0.3098725870481136;
    txtBigha2.value = Marla * 0.1983184561427303;
    txtBiswa1.value = Marla * 0.015493629082444684;
    txtBiswa2.value = Marla * 0.009915922807136516;
    txtCents.value = Marla * 12.396608987519918;
    txtChataks.value = Marla * 11.998266538443596;
    txtGrounds.value = Marla * 2.249674993955573;
    txtGuntha.value = Marla * 4.957961379522292;
    txtHect.value = Marla * 0.0501610025789914;
    txtKanal.value = Marla * 0.049999999460078;
    txtKottah.value = Marla * 7.498916646518579;
    txtMarla.value = Marla;
    txtPerch.value = Marla * 19.828203840421952;
    txtRood.value = Marla * 0.4957050987101588;
    txtSquareFeet.value = Marla * 5399.219942299616;
    txtSquareMetres.value = Marla * 502.1274546338643;
    txtSquareYard.value = Marla * 599.9133269221196;
}



function Perchconversion(Perch) {
    txtAres.value = Perch * 0.006251090391319882;
    txtAankadam.value = Perch * 3.7824891003074512;
    txtAcres.value = Perch * 0.25306691620874205;
    txtBigha1.value = Perch * 0.01562786975270068;
    txtBigha2.value = Perch * 0.010001836663512434;
    txtBiswa1.value = Perch * 0.0007813934740200339;
    txtBiswa2.value = Perch * 0.0005000918331756217;
    txtCents.value = Perch * 0.6252008042326095;
    txtChataks.value = Perch * 0.6051111152077137;
    txtGrounds.value = Perch * 0.11345833500911292;
    txtGuntha.value = Perch * 0.2500459153750956;
    txtHect.value = Perch * 0.0025297804573066137;
    txtKanal.value = Perch * 0.002521660552941642;
    txtKottah.value = Perch * 0.3781944500303765;
    txtMarla.value = Perch * 0.050433211603432844;
    txtPerch.value = Perch;
    txtRood.value = Perch * 0.025000000136150002;
    txtSquareFeet.value = Perch * 272.300001843471;
    txtSquareMetres.value = Perch * 25.323900171442805;
    txtSquareYard.value = Perch * 30.255555760382645;
}



function Roodconversion(Rood) {
    txtAres.value = Rood * 0.2500436142910577;
    txtAankadam.value = Rood * 151.29956318832063;
    txtAcres.value = Rood * 10.001836560533821;
    txtBigha1.value = Rood * 0.625114786703652;
    txtBigha2.value = Rood * 0.4000734643616972;
    txtBiswa1.value = Rood * 0.0312557387905826;
    txtBiswa2.value = Rood * 0.020003673218084862;
    txtCents.value = Rood * 25.008032033110634;
    txtChataks.value = Rood * 24.204444476491137;
    txtGrounds.value = Rood * 4.538333375648753;
    txtGuntha.value = Rood * 10.001836560533821;
    txtHect.value = Rood * 0.10119121774117717;
    txtKanal.value = Rood * 0.10086642156834713;
    txtKottah.value = Rood * 15.12777791882918;
    txtMarla.value = Rood * 2.017328453150943;
    txtPerch.value = Rood * 39.99999978216;
    txtRood.value = Rood;
    txtSquareFeet.value = Rood * 10892.000014421008;
    txtSquareMetres.value = Rood * 1012.9560013411537;
    txtSquareYard.value = Rood * 1210.2222238244355;
}



function Kottahconversion(kottah) {
    txtAres.value = kottah * 0.01652877346776981;
    txtAankadam.value = kottah * 10.001439999988479;
    txtAcres.value = kottah * 0.6691449760524402;
    txtBigha1.value = kottah * 0.04132231382942148;
    txtBigha2.value = kottah * 0.026446280908429747;
    txtBiswa1.value = kottah * 0.0020661156554710744;
    txtBiswa2.value = kottah * 0.0013223140454214875;
    txtCents.value = kottah * 1.65311998677504;
    txtChataks.value = kottah * 1.5999999872000005;
    txtGrounds.value = kottah * 0.29999999999999993;
    txtGuntha.value = kottah * 0.6611570195041518;
    txtHect.value = kottah * 0.0066890998984872;
    txtKanal.value = kottah * 0.006667629714658961;
    txtKottah.value = kottah;
    txtMarla.value = kottah * 0.13335259573317923;
    txtPerch.value = kottah * 2.6441424508468603;
    txtRood.value = kottah * 0.0661035616311715;
    txtSquareFeet.value = kottah * 719.99999424;
    txtSquareMetres.value = kottah * 66.95999946431999;
    txtSquareYard.value = kottah * 79.999999359992;
}



function sqfeetconversion(sqfeet) {
    txtAres.value = sqfeet * 0.00002295663;
    txtAankadam.value = sqfeet * 0.013890889;
    txtAcres.value = sqfeet * 0.00092936802973;
    txtBigha1.value = sqfeet * 0.000057392103;
    txtBigha2.value = sqfeet * 0.000036730946;
    txtBiswa1.value = sqfeet * 0.0000028696051;
    txtBiswa2.value = sqfeet * 0.0000018365473;
    txtCents.value = sqfeet * 0.002296;
    txtChataks.value = sqfeet * 0.002222222222222223;
    txtGrounds.value = sqfeet * 0.00041666667;
    txtGuntha.value = sqfeet * 0.0009182736455464;
    txtHect.value = sqfeet * 0.0000092904166;
    txtKanal.value = sqfeet * 0.0000092605969;
    txtKottah.value = sqfeet * 0.0013888889;
    txtMarla.value = sqfeet * 0.00018521194;
    txtPerch.value = sqfeet * 0.0036724201;
    txtRood.value = sqfeet * 0.000091810503;
    txtSquareFeet.value = sqfeet;
    txtSquareMetres.value = sqfeet * 0.093;
    txtSquareYard.value = sqfeet * 0.1111111111111;
}



function Sqmetersconversion(Sqmeters) {
    txtAres.value = Sqmeters * 0.0002468454838709677;
    txtAankadam.value = Sqmeters * 0.14936439784946234;
    txtAcres.value = Sqmeters * 0.009993204620752687;
    txtBigha1.value = Sqmeters * 0.0006171193870967741;
    txtBigha2.value = Sqmeters * 0.0003949564086021505;
    txtBiswa1.value = Sqmeters * 0.0000308559688172043;
    txtBiswa2.value = Sqmeters * 0.000019747820430107524;
    txtCents.value = Sqmeters * 0.02468817204301075;
    txtChataks.value = Sqmeters * 0.023894862604540032;
    txtGrounds.value = Sqmeters * 0.004480286774193548;
    txtGuntha.value = Sqmeters * 0.009873910167165591;
    txtHect.value = Sqmeters * 0.00009989695268817204;
    txtKanal.value = Sqmeters * 0.00009957631075268816;
    txtKottah.value = Sqmeters * 0.014934289247311829;
    txtMarla.value = Sqmeters * 0.0019915262365591394;
    txtPerch.value = Sqmeters * 0.03948838817204301;
    txtRood.value = Sqmeters * 0.0009872097096774192;
    txtSquareFeet.value = Sqmeters * 10.75268817204301;
    txtSquareMetres.value = Sqmeters * 0.9999999999999999;
    txtSquareYard.value = Sqmeters * 1.1947431302268816;
}


function Sqyardsconversion(Sqyards) {
    txtAres.value = Sqyards * 0.00020660967000002067;
    txtAankadam.value = Sqyards * 0.1250180010000125;
    txtAcres.value = Sqyards * 0.008364312267570837;
    txtBigha1.value = Sqyards * 0.0005165289270000516;
    txtBigha2.value = Sqyards * 0.00033057851400003306;
    txtBiswa1.value = Sqyards * 0.000025826445900002583;
    txtBiswa2.value = Sqyards * 0.000016528925700001653;
    txtCents.value = Sqyards * 0.020664000000002066;
    txtChataks.value = Sqyards * 0.02000000000000201;
    txtGrounds.value = Sqyards * 0.003750000030000375;
    txtGuntha.value = Sqyards * 0.008264462809918427;
    txtHect.value = Sqyards * 0.00008361374940000837;
    txtKanal.value = Sqyards * 0.00008334537210000834;
    txtKottah.value = Sqyards * 0.012500000100001251;
    txtMarla.value = Sqyards * 0.0016669074600001666;
    txtPerch.value = Sqyards * 0.03305178090000331;
    txtRood.value = Sqyards * 0.0008262945270000827;
    txtSquareFeet.value = Sqyards * 9.0000000000009;
    txtSquareMetres.value = Sqyards * 0.8370000000000838;
    txtSquareYard.value = Sqyards;
}
/* -------------------------------------End of Area Conversion Calculators ---------------------------------*/


/*--------------------------------------Error Message---------------------------------------------------------*/

/*--------------------------------------End of funcation---------------------------------------------------------*/

/* ------------------------------------- Rent vs Buy Calculators ---------------------------------*/
var nGrandRentTotal;
var nMortgageTotal;
var nTotAppreciation;
var nGrandITMTotal;
var lDifferentAmount;
var nTotalBuy;
var nReturnTotal;
var nCost;

function RentValidation() {
    var bValid = "";
    RentControls();
    $("input.form-control").each(function () {
        var getid = $(this).attr('id');
        if (getid != "txLoanAmount") {
            if ($(this).val().length == 0) {
                errorMessage('Enter all Fields!!!!!!!!!!', this);
                bValid = "false";
                return false;
            } else {
                bValid = "true";
            }
        }
    });
    if (bValid == "true")
        return true
    else
        return false;
}


function CalCulateAmount() {
    RentControls();
    if (txtPropPrice.value != "" && !isNaN(txtPropPrice.value)) {
        if (txtDownPayment.value != "" && !isNaN(txtDownPayment.value)) {
            var LoanAmount = parseFloat(txtPropPrice.value * (txtDownPayment.value / 100));
            txLoanAmount.value = parseInt(txtPropPrice.value - LoanAmount);
        }
    }
}
function RentBuyCalculation() {
    if (RentValidation()) {
        if (txtYearComparision.value <= 30) {
            RentFeesCalc();
            ITMClaculation();
            MortgageCalc();
            SetRentFees();
            SetITM();
            GetAppreciation();
            DifferentCalc();
            Form_CostComparision_Table();
            $("#lblmsg").html("");
        }
        else {
            errorMessage("Year should be between 1 to 30!", txtYearComparision);
        }
    }
}
function CalCulateAmount() {
    RentControls();
    if (txtPropPrice.value != "" && !isNaN(txtPropPrice.value)) {
        if (txtDownPayment.value != "" && !isNaN(txtDownPayment.value)) {
            var LoanAmount = parseFloat(txtPropPrice.value * (txtDownPayment.value / 100));
            txLoanAmount.value = parseInt(txtPropPrice.value - LoanAmount);
        }
    }
}
function RentControls() {
    txtRentPayment = document.getElementById('txtRentPayment');
    txtAddMonthFees = document.getElementById('txtAddMonthFees');
    txtAnnualApprect = document.getElementById('txtAnnualApprect');
    txtDownPayment = document.getElementById('txtDownPayment');
    txtInsurancePremium = document.getElementById('txtInsurancePremium');
    txtInterestRate = document.getElementById('txtInterestRate');
    txLoanAmount = document.getElementById('txLoanAmount');
    txtLoanTerm = document.getElementById('txtLoanTerm');
    txtMaintenanceCost = document.getElementById('txtMaintenanceCost');
    txtPropertyTax = document.getElementById('txtPropertyTax');
    txtPropPrice = document.getElementById('txtPropPrice');
    txtAnnualRateInc = document.getElementById('txtAnnualRateInc');
    txtYearComparision = document.getElementById('txtYearComparision');
    divCostComp = document.getElementById('divCostComp');
}

function ClearRentControls() {
    RentControls();
    txtRentPayment.value = "";
    txtAddMonthFees.value = "";
    txtAnnualApprect.value = "";
    txtDownPayment.value = "";
    txtInsurancePremium.value = "";
    txtInterestRate.value = "";
    txLoanAmount.value = "";
    txtLoanTerm.value = "";
    txtMaintenanceCost.value = "";
    txtPropertyTax.value = "";
    txtPropPrice.value = "";
    txtAnnualRateInc.value = "";
    txtYearComparision.value = "";
    $("#divCostComp").html("");
    $("#lblmsg").html("");
}
function RentFeesCalc() {
    RentControls();
    var nTotal = 0;
    nyear = txtYearComparision.value;
    nAnnualRateInc = txtAnnualRateInc.value;
    nTotal = TotalRentFees();
    nGrandRentTotal = RFCalc(nTotal, nyear, nAnnualRateInc);
    nGrandRentTotal = nGrandRentTotal + nTotal;
}

function TotalRentFees() {
    var nTotal = new Number(txtRentPayment.value) + new Number(txtAddMonthFees.value);
    nTotal = nTotal * 12;
    return nTotal;
}
var arrRFArray;
function RFCalc(nRentTotal, nNumYear, nRateIncrease) {
    arrRFArray = new Array(100);
    var nTotal = 0;
    var nPercentage = 0;
    nTotalRentFees = 0;
    nTotal = nRentTotal;
    for (nyear = 1; nyear < nNumYear; nyear++) {
        nPercentage = parseInt(nTotal) * (nRateIncrease / 100);
        nTotal = parseInt(nTotal) + parseInt(nPercentage);
        arrRFArray[nyear] = parseInt(nTotal);
        nTotalRentFees = parseInt(nTotalRentFees) + parseInt(nTotal);
    }
    return parseInt(nTotalRentFees);
}

function ITMClaculation() {
    RentControls();
    nGrandITMTotal = 0;
    nTotalBuy = 0;
    nITMTotal = ITMTotal();
    nGrandITMTotal = ITMCalc(nITMTotal, txtYearComparision.value);
    nGrandITMTotal = nGrandITMTotal + nITMTotal;
    nTotalBuy = parseInt(nTotalBuy + nGrandITMTotal);
}

function ITMTotal() {
    RentControls();
    nITMTotal = new Number(txtInsurancePremium.value) + new Number(txtPropertyTax.value) + new Number(txtMaintenanceCost.value);
    return parseInt(nITMTotal);
}
var arrITMArray;
function ITMCalc(lITMTotal, nNumYear) {
    arrITMArray = new Array(100);
    lTotal = 0;
    lPercentage = 0;
    nTotalITM = lITMTotal;
    lPercentage = lITMTotal;
    for (nYear = 1; nYear < nNumYear; nYear++) {
        lPercentage = parseInt(lPercentage * 103.3 / 100);
        arrITMArray[nYear] = parseInt(lPercentage);
        nTotalITM = parseInt(nTotalITM + lPercentage);
    }
    return nTotalITM;

}

function MortgageCalc() {
    RentControls();
    dRateOfInterest = txtInterestRate.value;
    nTerm = new Number(txtLoanTerm.value);
    lMortageAmount = new Number(txLoanAmount.value);
    nMortgageTotal = MPCalc(dRateOfInterest, nTerm, lMortageAmount);
    nTotalBuy = parseInt(nTotalBuy + nMortgageTotal)
}

function MPCalc(dRateOfInterest, nLoanTerm, lLoanAmount) {
    var dTempIncRate, dTempRate, dIncVal, dTotalMortgage;
    var dTempValue;
    var nFinalMortgageAmt;
    var pow = 1;
    if (dRateOfInterest > 1.0) {
        dRateOfInterest = dRateOfInterest / 100.0;
        dRateOfInterest = dRateOfInterest / 12;
    }
    var pow_Two = 1;
    for (var m = 0; m < nLoanTerm * 12; m++)
        pow_Two = pow_Two * (1 + dRateOfInterest);
    m_dEmivalue = Math.round((lLoanAmount * pow_Two * dRateOfInterest) / (pow_Two - 1));
    return Math.round(m_dEmivalue);
}
var arrRentFees;
function SetRentFees() {
    arrRentFees = new Array(100);
    RentControls();
    for (var nYear = 1; nYear < txtYearComparision.value; nYear++) {
        arrRentFees[nYear] = parseInt(arrRFArray[nYear]);
    }
}
var larrITMarray
function SetITM() {
    larrITMarray = new Array(100);
    RentControls();
    for (nYear = 1; nYear < txtYearComparision.value; nYear++) {
        larrITMarray[nYear] = parseInt(arrITMArray[nYear]);
    }
}
var arrAppreciation
function GetAppreciation() {
    arrAppreciation = new Array(100);
    RentControls();
    AppreciationCalc();
    for (var nYear = 0; nYear < txtLoanTerm.value; nYear++) {
        arrAppreciation[nYear] = parseInt(arrAppreArray[nYear]);
    }

}

function AppreciationCalc() {
    RentControls();
    nTotAppreciation = 0;
    nPropertyPrice = txtPropPrice.value;
    nAppreciationRate = txtAnnualApprect.value;
    nAppLoanYear = txtLoanTerm.value;
    nTotAppreciation = AnnualAppCalc(nAppreciationRate, nPropertyPrice, nAppLoanYear);
    nTotalBuy = nTotalBuy - nTotAppreciation;
}
var arrAppreArray;
function AnnualAppCalc(nAppRate, nProPrice, nNumYear) {
    arrAppreArray = new Array(100);
    var nTotal = 0;
    nPercentage = 0;
    nTotal = (nProPrice * nAppRate) / 100;
    arrAppreArray[0] = nTotal;
    nTotHomeAppre = 0;
    for (var nYear = 0; nYear < nNumYear; nYear++) {
        nPercentage = parseInt((nTotal * nAppRate) / 100);
        nTotal = nTotal + parseInt(nPercentage);
        arrAppreArray[nYear] = nTotal;
        nTotHomeAppre = nTotHomeAppre + nTotal;
    }
    return nTotHomeAppre;
}

function DifferentCalc() {
    lDifferentAmount = 0;
    lDifferentAmount = parseInt(nGrandRentTotal - nTotalBuy);
}

function Form_CostComparision_Table() {
    var sHtml = "";
    sHtml = "<table border='0' width='560px' cellpadding='0' cellspacing='3' style='border:1px solid gray'>";
    //sHtml = sHtml + "<tr>";
    //sHtml = sHtml +     "<td align='center' colspan='4' class='search_heading'>";
    //sHtml = sHtml +         "Detail View";
    //sHtml = sHtml +     "</td>";
    //sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='search_heading' align='left' style='width:262px'>";
    sHtml = sHtml +         "Cost comparision";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='search_heading'  style='width:130px'>"
    sHtml = sHtml +         "Rent";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='search_heading'>"
    sHtml = sHtml +         "Buy";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Rent and Fees";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nGrandRentTotal).toFixed(2);//lblRentandfees
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td>"
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Mortgage payments";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nMortgageTotal).toFixed(2); //lblmortageamount
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td>"
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Property insurance, taxes, Maintenance";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left'  class='content_calc'>"
    sHtml = sHtml +         "+";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nGrandITMTotal).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Home appreciation";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "-";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nTotAppreciation).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Total cost";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nGrandRentTotal).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nTotalBuy).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Present value at inflation";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(nGrandRentTotal).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>"
    sHtml = sHtml +         "Rs. " + new Number(nTotalBuy).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml +     "<td class='content_calc' align='left'>";
    sHtml = sHtml +         "Difference";
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td align='left' class='content_calc'>"
    sHtml = sHtml +         "Rs. " + new Number(lDifferentAmount).toFixed(2);
    sHtml = sHtml +     "</td>";
    sHtml = sHtml +     "<td>"
    sHtml = sHtml +     "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "</table>";
    document.getElementById('divCostComp').innerHTML = sHtml;
}

function Form_DetailView_Table() {
    RentControls();
    var sHtml = "";
    sHtml = sHtml + "<table border='1' cellpadding='0' cellspacing='0' width='850px'>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml + " <td align='center' class='search_heading'>";
    sHtml = sHtml + "Year";
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td align='center' class='search_heading'>"
    sHtml = sHtml + "Rent & Fees";
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td align='center' class='search_heading'>"
    sHtml = sHtml + "Insurance, taxes & maintenance";
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td align='center' class='search_heading'>"
    sHtml = sHtml + "Appreciation";
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td align='center' class='search_heading'>"
    sHtml = sHtml + "Cost of buying";
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "</tr>";
    sHtml = sHtml + "<tr>";
    sHtml = sHtml + "<td class='content' align='center'>";
    sHtml = sHtml + "1";
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td class='content' align='center'>";
    sHtml = sHtml + "Rs. " + new Number(nReturnTotal).toFixed(2);
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td class='content' align='center'>";
    var nResult = ITMTotal();
    sHtml = sHtml + "Rs. " + new Number(nResult).toFixed(2);
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td class='content' align='center'>";
    sHtml = sHtml + "Rs. " + new Number(arrAppreciation[0]).toFixed(2);
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "<td class='content' align='center'>";
    sHtml = sHtml + "Rs. " + new Number(arrAppreciation[0] + nResult + parseInt(txtPropPrice.value)).toFixed(2);
    sHtml = sHtml + "</td>";
    sHtml = sHtml + "</tr>";

    for (var nYear = 1; nYear < txtYearComparision.value; nYear++) {
        var nYearval = nYear;

        sHtml = sHtml + "<tr>";

        sHtml = sHtml + "<td align='center' class='content'>";
        sHtml = sHtml + new Number(nYearval + 1);
        sHtml = sHtml + "</td>";

        sHtml = sHtml + "<td align='center' class='content'>";
        if (arrRentFees[nYear] != undefined)
            nRent = arrRentFees[nYear];
        else
            nRent = 0;
        sHtml = sHtml + "Rs. " + new Number(nRent).toFixed(2);
        sHtml = sHtml + "</td>";

        sHtml = sHtml + "<td align='center' class='content'>";
        if (larrITMarray[nYear] != undefined)
            nITM = larrITMarray[nYear];
        else
            nITM = 0;
        sHtml = sHtml + "Rs. " + new Number(nITM).toFixed(2);
        sHtml = sHtml + "</td>";

        sHtml = sHtml + "<td align='center' class='content'>";
        if (arrAppreciation[nYear] != undefined)
            nApprec = arrAppreciation[nYear];
        else
            nApprec = 0;
        sHtml = sHtml + "Rs. " + new Number(nApprec).toFixed(2);
        sHtml = sHtml + "</td>";

        sHtml = sHtml + "<td align='center' class='content'>";
        if (arrAppreciation[nYear] != undefined)
            nCost = arrAppreciation[nYear] + parseInt(txtPropPrice.value) + nApprec;
        else
            nApprec = 0;
        sHtml = sHtml + "Rs. " + new Number(nCost).toFixed(2);
        sHtml = sHtml + "</td>";

        sHtml = sHtml + "</tr>";
    }
    sHtml = sHtml + "</table>";
    document.getElementById('divDetailView').innerHTML = sHtml;
}
/* -------------------------------------End of Rent vs Buy Calculators ---------------------------------*/
