var costos = [ ] function costo() { valor_costo_inscripcion = 0; valor_costo_otros = 0; var tipo = $('tipo_participante').selectedIndex; valor_costo_inscripcion = leer_costo(tipo); objTest = $('lista_otros'); if (objTest) { a=objTest.childNodes.length; for (i=0;i"; resaltar("contenido_titulo"); } } function es_residente(combo) { var i = combo.selectedIndex; var obj = document.getElementById("lugar_trabajo_residente"); if (obj) {obj.style.display = ( i==4 ) ? "block" : "none";} } function requiere_factura(checkbox) { var obj = document.getElementById("datos_facturacion"); if (obj) {obj.style.display = ( checkbox.checked ) ? "block" : "none";} } function agregar() { var obj = document.getElementById("lista_otros"); if ( obj.childNodes.length==4 ) { $('agregar').enabled = false; return; } var i = Math.uuid(15) var contenido = ""; var combo = ""; contenido += "
"; contenido += "  Nombre completo  "; contenido += "  " + combo; contenido += " Eliminar"; contenido += "
"; var obj_item = document.createElement("DIV"); obj_item.setAttribute("id", "otro_" + i); obj_item.className = "otro"; obj_item.innerHTML = contenido; if (obj.childNodes.length==0) { obj.appendChild(obj_item); } else { brother = obj.childNodes[0]; obj.insertBefore(obj_item,brother); } resaltar("otro_" + i); costo(); } function set_type(obj) { id = obj.getAttribute('id'); id = id.replace("tipo_otro_", ""); value = obj.selectedIndex; $('otro_' + id).setAttribute("tipo",value); } function eliminar(pv__Data) { var obj = document.getElementById("otro_" + pv__Data); if (obj) { obj.r = null; resaltar("otro_" + pv__Data); setTimeout( function() { obj.parentNode.removeChild(obj); costo(); }, 400 ); } } function resaltar(id) { obj = $('theform'); if(obj.currentStyle) { fade_to = $('theform').currentStyle.backgroundColor; fade_to = fade_to.replace(/#/g, ""); } else { fade_to = document.defaultView.getComputedStyle($('theform'), '').getPropertyValue("background-color"); fade_to = fade_to.replace("rgb(", ""); fade_to = fade_to.replace(")", ""); fade_to = fade_to.replace(" ", ""); fade_to = toRGBHex(fade_to); } colorFade(id,'background','ffffff',fade_to,15,20); } function toRGBHex(num) { var decToHex=""; var arr = new Array(); var numStr = new String(); numStr = num; arr = numStr.split(","); for(var i=0;i<3;i++) { var hexArray = new Array( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" ); var code1 = Math.floor(arr[i] / 16); var code2 = arr[i] - code1 * 16; decToHex += hexArray[code1]; decToHex += hexArray[code2]; } return (decToHex); } function inicio() { obj = document.getElementById('agregar'); if (obj) { with ( obj ) { className = 'agregar'; href = "javascript:;"; onclick = new Function("agregar();"); title = 'agregar acompañante'; } } obj = document.getElementById('titulo'); if (obj) { with ( obj ) { className = 'campo_obligatorio'; onchange = new Function("leyenda_titulo(this);"); } } obj = document.getElementById('tipo_participante'); if (obj) { with ( obj ) { className = 'campo_obligatorio'; onchange = new Function("es_residente(this);costo(this);"); } } obj = document.getElementById('frmRegistro'); if (obj) { with ( obj ) { onsubmit = new Function("validar_datos(this); return false;"); action = "registro.php"; } } } function validar_datos(frm) { var s = ''; var datos_personales = [ 'titulo' ,'nombre' ,'domicilio' ,'ciudad' ,'estado' ,'pais' ,'lada' ,'telefono' ,'movil' ,'correo' ,'tipo_participante' ]; var datos_facturacion = [ 'razon_social' ,'rfc' ,'tel_fact' ,'ext_fact' ,'calle_fact' ,'colonia_fact' ,'estado_fact' ,'pais_fact' ,'cp_fact' ]; var datos_residente = [ 'residente_de' ,'anio' ]; // Datos Personales campos = datos_personales; for (i=0;i 2) && (str.indexOf("@") > 0); } addLoadEvent(inicio);