﻿/// <reference path="jquery-1.2.6.js" />
if (typeof (Sys) !== 'undefined')
    Sys.Application.notifyScriptLoaded();

/*****************Script Generales a Todas las Paginas**********/
/*****************Pagina Registro*****************/

function formatNumber(num,prefix){
prefix = prefix || '';
num += '';
var splitStr = num.split('.');
var splitLeft = splitStr[0];
var splitRight = splitStr.length > 1 ? '.' + splitStr[1] : '';
var regx = /(\d+)(\d{3})/;
while (regx.test(splitLeft)) {
splitLeft = splitLeft.replace(regx, '$1' + ',' + '$2');
}
return prefix + splitLeft + splitRight;
}



function ActualizaPagos(numUsers) {
    /*$('#label1PagoAntes').html('$ ' + formatNumber((parseFloat(750 * numUsers)).toFixed(2),'') + ' + ' + formatNumber(((parseFloat(750 * numUsers)* 1.15).toFixed(2) - (parseFloat(750 * numUsers)).toFixed(2)).toFixed(2),'') + ' IVA = ' + formatNumber((parseFloat(750 * numUsers)* 1.15).toFixed(2),''));    */
    $('#label1PagoDespues').html('$ ' + formatNumber((parseFloat(850 * numUsers)).toFixed(2),'') + ' + ' + formatNumber(((parseFloat(850 * numUsers)* 1.15).toFixed(2) - (parseFloat(850 * numUsers)).toFixed(2)).toFixed(2),'') + ' IVA = ' + formatNumber((parseFloat(850 * numUsers)* 1.15).toFixed(2),''));        
}

function CambiaUniversidad(combo, text) {
    var list = $("#" + combo)[0];
    for (var i = 0; i < list.options.length; i++) {
        if (list.options[i].selected)
            if (list.options[i].value == "-1")
            $('#' + text)[0].style.display = 'block';
        else {
            $('#' + text)[0].style.display = 'none';
            $('#' + text).val('Ingresa tu Empresa/Universidad Aquí');
        }
    }
}

function CambiaEstado(combo, text) {
    var list = $("#" + combo)[0];
    for (var i = 0; i < list.options.length; i++) {
        if (list.options[i].selected)
            if (list.options[i].value == "-1")
            $('#' + text)[0].style.display = 'block';
        else {
            $('#' + text)[0].style.display = 'none';
            $('#' + text).val('Ingresa tu Estado Aquí');
        }
    }
}

/*************************************************/
