//imagenes
<!--

function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
    var d=document; if(d.images){
        if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
            if (a[i].indexOf("#")!=0){
                d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
            }
            }
}

function MM_findObj(n, d) { //v4.01
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
    }
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
        if ((x=MM_findObj(a[i]))!=null){
            document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
        }
}
// imagenes-->


//--------------------- flash -------------------------------------//

function banner_flash(src,ancho,alto){
    document.write('<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width='+ancho+' height='+alto+'>');
    document.write('<param name=movie value='+src+'>');
    document.write('<param name=quality value=high>');
    document.write('<param name=wmode value=transparent>');
    document.write('<embed src='+src+' quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width='+ancho+' height='+alto+' wmode=transparent></embed>');
    document.write('</object>');
}


// cargar contenido //
function cargar(loadid,page)
{
    $(loadid).innerHTML = '<div><img src="img/loading.gif" /></div>';
    new Ajax.Updater(loadid, page, {
        asynchronous:true,
        evalScripts:true,
        onSuccess: function(){
            Effect.BlindDown(loadid, {
                duration: 0.2
            }); return false;
        }
    });
	
}

function error(texto,foco){


    Dialog.alert(texto, {
        className: 'greylighting',
        width:300,
        ok:true,
        closable:true,
        okLabel: 'NO',
        onClose:function(win) {
            $(foco).focus(); return true;
        },
        showEffectOptions: {
            duration:0.2
        }
    });


    return true;


}

//validar fecha de nacimiento
function esFechaValida(fecha){
    if (fecha != undefined && fecha.value != "" ){
        if (!/^\d{2}\/\d{2}\/\d{4}$/.test(fecha.value)){
            error('Ingrese una fecha v&aacute;lida','fecha_nac');
            $('fecha_nac').focus();
            return false;
        }
        var dia  =  parseInt(fecha.value.substring(0,2),10);
        var mes  =  parseInt(fecha.value.substring(3,5),10);
        var anio =  parseInt(fecha.value.substring(6),10);
 
        switch(mes){
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                numDias=31;
                break;
            case 4: case 6: case 9: case 11:
                numDias=30;
                break;
            case 2:
                if (comprobarSiBisisesto(anio)){
                    numDias=29
                }else{
                    numDias=28
                    };
                break;
            default:
                error('Ingrese una fecha v&aacute;lida','fecha_nac');
                $('fecha_nac').focus();
                return false;
        }
 
        if (dia>numDias || dia==0){
            error('Ingrese una fecha v&aacute;lida','fecha_nac');
            $('fecha_nac').focus();
            return false;
        }
        return true;
    }
}
 
function comprobarSiBisisesto(anio){
    if ( ( anio % 100 != 0) && ((anio % 4 == 0) || (anio % 400 == 0))) {
        return true;
    }
    else {
        return false;
    }
}

//Obteniendo los valores de los botones de radio
function getRadioButtonSelectedValue(ctrl)
{
    for(i=0;i<ctrl.length;i++)
        if(ctrl[i].checked) return ctrl[i].value;
}

function getRadioButtonSelectedValue1(actual)
{
    for(i=0;i<actual.length;i++)
        if(actual[i].checked) return actual[i].value;
}

function getRadioButtonSelectedValue2(actualmente)
{
    for(i=0;i<actualmente.length;i++)
        if(actualmente[i].checked) return actualmente[i].value;
}
	
function getRadioButtonSelectedValue3(actualmente1)
{
    for(i=0;i<actualmente1.length;i++)
        if(actualmente1[i].checked) return actualmente1[i].value;
}
	
function getRadioButtonSelectedValue4(actualmente3)
{
    return actualmente3.value;
}
function getRadioButtonSelectedValue8(actualmente33)
{
    return actualmente33.value;
}

function getRadioButtonSelectedValue5(actualmente)
{
    for(i=0;i<actualmente.length;i++)
        if(actualmente[i].checked) return actualmente[i].value;
}

function getRadioButtonSelectedValue6(actualmente)
{
    for(i=0;i<actualmente.length;i++)
        if(actualmente[i].checked) return actualmente[i].value;
}
function getRadioButtonSelectedValue7(actualmente2)
{
    for(i=0;i<actualmente2.length;i++)
        if(actualmente2[i].checked) return actualmente2[i].value;
}
	
function getRadioButtonSelectedValue11(actualmente7)
{
    for(i=0;i<actualmente7.length;i++)
        if(actualmente7[i].checked) return actualmente7[i].value;
}
	
//Funciones para controlar el manejo de los botones de radio respecto a sus cajas de texto del formulario menor individual
function deshabilita_estudiando()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    b.en_donde_estudiando.disabled = true;
    b.en_donde_estudiando.value = "";
    b.en_donde_otros.disabled = false;
}
function deshabilita_otros()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    b.en_donde_otros.disabled = true;
    b.en_donde_otros.value = "";
    b.en_donde_estudiando.disabled = false;
}

function deshabilita_est()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    b.lugar_trabajo.disabled = true;
    b.lugar_trabajo.value = "";
    b.otro.disabled = true;
    b.otro.value = "";
    b.lugar_estudio.disabled = false;
}	
function deshabilita_trab()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    b.lugar_estudio.disabled = true;
    b.lugar_estudio.value = "";
    b.otro.disabled = true;
    b.otro.value = "";
    b.lugar_trabajo.disabled = false;
}

function deshabilita_otr()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    b.lugar_estudio.disabled = true;
    b.lugar_estudio.value = "";
    b.lugar_trabajo.disabled = true;
    b.lugar_trabajo.value = "";
    b.otro.disabled = false;
}	

//Funciones para controlar el manejo de los botones de radio respecto a sus cajas de texto del formulario menor grupal

function deshabilitar_es()
{
    var params = Form.serialize($('form1'));
    //b=document.form1;
    $('en_donde_estudiando').disabled =true;
    $('en_donde_estudiando').value= "";
    $('en_donde_otros').disabled = false;
}

function deshabilitar_ot()
{
    var params = Form.serialize($('form1'));
    //b = document.form1;
    $('en_donde_otros').disabled = true;
    $('en_donde_otros').value = "";
    $('en_donde_estudiando').disabled = false;
}

function deshabilitar_es1()
{
    var params = Form.serialize($('form1'));
    b=document.form1;
    $('en_donde_estudiando2').disabled =true;
    $('en_donde_estudiando2').value= "";
    $('en_donde_otros2').disabled = false;
}

function deshabilitar_ot1()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('en_donde_otros2').disabled = true;
    $('en_donde_otros2').value = "";
    $('en_donde_estudiando2').disabled = false;
}

function deshabilita_est2()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_trabajo').disabled = true;
    $('lugar_trabajo').value = "";
    $('otro').disabled = true;
    $('otro').value = "";
    $('lugar_estudio').disabled = false;
}	
function deshabilita_trab2()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_estudio').disabled = true;
    $('lugar_estudio').value = "";
    $('otro').disabled = true;
    $('otro').value = "";
    $('lugar_trabajo').disabled = false;
}

function deshabilita_otr2()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_estudio').disabled = true;
    $('lugar_estudio').value = "";
    $('lugar_trabajo').disabled = true;
    $('lugar_trabajo').value = "";
    $('otro').disabled = false;
}	


function deshabilita_est3()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_trabajo2').disabled = true;
    $('lugar_trabajo2').value = "";
    $('otro2').disabled = true;
    $('otro2').value = "";
    $('lugar_estudio2').disabled = false;
}	
function deshabilita_trab3()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_estudio2').disabled = true;
    $('lugar_estudio2').value = "";
    $('otro2').disabled = true;
    $('otro2').value = "";
    $('lugar_trabajo2').disabled = false;
}

function deshabilita_otr3()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_estudio2').disabled = true;
    $('lugar_estudio2').value = "";
    $('lugar_trabajo2').disabled = true;
    $('lugar_trabajo2').value = "";
    $('otro2').disabled = false;
}





function deshabilita_est123()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_trabajo3').disabled = true;
    $('lugar_trabajo3').value = "";
    $('otro3').disabled = true;
    $('otro3').value = "";
    $('lugar_estudio3').disabled = false;
}	
function deshabilita_trab123()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_estudio3').disabled = true;
    $('lugar_estudio3').value = "";
    $('otro3').disabled = true;
    $('otro3').value = "";
    $('lugar_trabajo3').disabled = false;
}

function deshabilita_otr123()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('lugar_estudio3').disabled = true;
    $('lugar_estudio3').value = "";
    $('lugar_trabajo3').disabled = true;
    $('lugar_trabajo3').value = "";
    $('otro3').disabled = false;
}

function deshabilita_3()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('en_donde_estudiando3').disabled = true;
    $('en_donde_estudiando3').value = "";
    $('en_donde_estudiando3').disabled = true;
    $('en_donde_estudiando3').value = "";
    $('en_donde_otros3').disabled = false;
}	

function deshabilita_33()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('en_donde_otros3').disabled = true;
    $('en_donde_otros3').value = "";
    $('en_donde_otros3').disabled = true;
    $('en_donde_otros3').value = "";
    $('en_donde_estudiando3').disabled = false;
}

function hab_tercero()
{

    $('nombre3').disabled=false;
    $('apellidos3').disabled=false;
    $('tel_contacto3').disabled=false;
    $('correo3').disabled=false;
    $('departamento3').disabled=false;
    $('actualmente3').disabled=false;
    $('en_donde_estudiando3').disabled=false;
    $('actualmente33').disabled=false;
    $('en_donde_otros3').disabled=false;
}
function des_tercero()
{

    $('nombre3').disabled=true;
    $('apellidos3').disabled=true;
    $('tel_contacto3').disabled=true;
    $('correo3').disabled=true;
    $('departamento3').disabled=true;
    $('actualmente3').disabled=true;
    $('en_donde_estudiando3').disabled=true;
    $('actualmente33').disabled=true;
    $('en_donde_otros3').disabled=true;
    $('nombre3').value="";
    $('apellidos3').value="";
    $('tel_contacto3').value="";
    $('correo3').value="";
    $('departamento3').value="";
    $('actualmente3').checked=false;
    $('en_donde_estudiando3').value="";
    $('actualmente33').checked=false;
    $('en_donde_otros3').value="";
}

function hab_cuarto()
{
	
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('dui3').disabled=false;
    $('nombre3').disabled=false;
    $('apellidos3').disabled=false;
    $('tel_contacto3').disabled=false;
    $('correo3').disabled=false;
    $('departamento3').disabled=false;
    $('actualmente7').disabled=false;
    b.actualmente7[0].disabled=false;
    b.actualmente7[1].disabled=false;
    b.actualmente7[2].disabled=false;
    $('lugar_estudio3').disabled=false;
    $('lugar_trabajo3').disabled=false;
    $('otro3').disabled=false;
    $('inst_educativa3').disabled=false;
}
function des_cuarto()
{
    var params = Form.serialize($('form1'));
    b = document.form1;
    $('dui3').disabled=true;
    $('nombre3').disabled=true;
    $('apellidos3').disabled=true;
    $('tel_contacto3').disabled=true;
    $('correo3').disabled=true;
    $('departamento3').disabled=true;
    $('actualmente7').disabled=true;
    b.actualmente7[0].disabled=true;
    b.actualmente7[1].disabled=true;
    b.actualmente7[2].disabled=true;
    $('lugar_estudio3').disabled=true;
    $('lugar_trabajo3').disabled=true;
    $('otro3').disabled=true;
    $('inst_educativa3').disabled=true;
    $('nombre3').value="";
    $('apellidos3').value="";
    $('tel_contacto3').value="";
    $('correo3').value="";
    $('departamento3').value="";
    $('actualmente7').checked=false;
    b.actualmente7[0].checked=false;
    b.actualmente7[1].checked=false;
    b.actualmente7[2].checked=false;
    $('lugar_estudio3').value="";
    $('lugar_trabajo3').checked=false;
    $('otro3').value="";
    $('inst_educativa3').value="";
}

//Funcion de control de datos desde el formulario de inscripcion
function parte_1()
{
    var params = Form.serialize($('form1'));
    b=document.form1;
    var integrantes_count = 0;

    for (i=0;i<b.integrantes.length;i++)
    {
        if ( (b.integrantes[i].type == "radio") && (b.integrantes[i].checked == true) )
	
        {
            integrantes_count++;
        }
    }
    //Comprobamos la fecha de nacimiento no este vacia
    if( $('fecha_nac').value == "" )
    {
        error('<strong>Ingrese su fecha de nacimiento</strong>','fecha_nac');
        $('fecha_nac').focus();
        return false;
    }
	
    //Comprobamos que se haya seleccionado un boton de radio
    if(integrantes_count <= 0 )
    {
        error('<strong>Debe especificar si su trabajo sera individual o en grupo</strong>','integrantes');
        return false;
    }
	
    //Obtenemos el valor del boton de radio para ocuparlo en las comparaciones para seleccionar el formulario a mostrar
    tipo_grupo = getRadioButtonSelectedValue(b.integrantes);
    fecha_nac = $('fecha_nac').value;
    var anio_nac = $('fecha_nac').value;
    var anio_actual = new Date().getFullYear();
    var anio = (anio_actual.toString()) - (anio_nac.substring(6,10));
	
    if( (anio < 18) && ( tipo_grupo =="individual" ) )
    {
        cargar('contenido_m','menor_individual.php?fecha_nac='+fecha_nac+'&integrantes='+tipo_grupo);
    }
    if( (anio < 18) && ( tipo_grupo =="grupal" ) )
    {
        cargar('contenido_m','menor_grupal.php?fecha_nac='+fecha_nac+'&integrantes='+tipo_grupo);
    }
    if( (anio >= 18) && ( tipo_grupo =="individual" ) )
    {
        cargar('contenido_m','mayor_individual.php?fecha_nac='+fecha_nac+'&integrantes='+tipo_grupo);
    }
    if( (anio >= 18) && ( tipo_grupo =="grupal" ) )
    {
        cargar('contenido_m','mayor_grupal.php?fecha_nac='+fecha_nac+'&integrantes='+tipo_grupo);
    }
	

}


//Funcion que valida el formulario Menor individual
function menor_individual()
{

    var params = Form.serialize($('form1')); //obtener los datos para enviarlos
    var er_email = /^(.+\@.+\..+)$/
    b=document.form1;
    //Contadores para estructuras de control
    var actual_count = 0;
    var categoria1_count = 0;
    var num;
    var x;
    //Obtenemos el valor de los botones de radio
    tipo = getRadioButtonSelectedValue1(b.actual);
    //Comenzamos a validar uno a uno los campos
    if( $('nombre').value == "" )
    {
        error('<strong>Ingrese su nombre</strong>','nombre');
        $('nombre').focus();
        return false;
    }
	
    if( $('apellidos').value == "" )
    {
        error('<strong>Ingrese su apellido</strong>','apellidos');
        $('apellidos').focus();
        return false;
    }
	
    if( $('tel_contacto').value == "" )
    {
        error('<strong>Ingrese su n&uacute;mero de tel&eacute;fono</strong>','tel_contacto');
        $('tel_contacto').focus();
        return false;
    }
	
    if( $('correo').value == "" )
    {
        error('<strong>Ingrese su correo electr&oacute;nico</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( !er_email.test($('correo').value) )
    {
        error('<strong>Ingrese un correo v&aacute;lido</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( $('departamento').value == "" )
    {
        error('<strong>Seleccione el departemento en el que recide</strong>','departamento');
        $('departamento').focus();
        return false;
    }
	
	
    //Funcion para validacion del tipo de ocupacion
    for (i=0;i<b.actual.length;i++)
    {
        if ( ((b.actual[i].type == "radio") && (b.actual[i].checked == true)) )
        {
            actual_count++;
        }
    }
	
    if(actual_count <=0)
    {
        error('<strong>Actualmente que hace? estudia o hace otra cosa, seleccione una opci&oacute;n</strong>',  			'actual');
        $('actual').focus();
        return false;
    }
    //Se ocupa esta estructura de desicion para ocupar una variable bandera ya que switch no se pueden compara string
    if(tipo=="1")
    {
        x=1;
    }
    if(tipo=="3")
    {
        x=2;
    }
    //Comparamos nuesta bandera
    switch (x)
    {
        case 1 :
            if($('en_donde_estudiando').value=="")
            {
                error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','en_donde_estudiando');
                $('en_donde_estudiando').focus();
                return false;
            }
            break;
        case 2 :
            if($('en_donde_otros').value=="")
            {
                error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','en_donde_otros');
                $('en_donde_otros').focus();
                return false;
            }
            break;
    }
    //Se procede a comprar los siguientes campos
    if( $('motivacion').value == "" )
    {
        error('<strong>Describa la motivaci&oacute;n de su participaci&oacute;n</strong>','motivacion');
        $('motivacion').focus();
        return false;
    }
		
    //Script para revisar que este seleccionada por lo menos una categoria
    if(($('categoria1').checked==false)&& ($('categoria2').checked==false)&& ($('categoria3').checked==false)&& ($(	'categoria4').checked==false)&& ($('categoria5').checked==false))
    {
        error('<strong>Ingrese por lo menos una Categoria </strong>','categoria1');
        $('categoria1').focus();
        return false;
    }

    //Script para revisar que no este seleccionada mas de tres categorias
    num=4;
    while((num>3))
    {
        num=0;
        if($('categoria1').checked==true)
        {
            num++;
        }
        if($('categoria2').checked==true)
        {
            num++;
        }
						
        if($('categoria3').checked==true)
        {
            num++;
        }
        if($('categoria4').checked==true)
        {
            num++;
        }
        if($('categoria5').checked==true)
        {
            num++;
        }
									


        if(num>3)
        {
            error('<strong>Ingrese como maximo 3 categorias </strong>','categoria1');
            return false;
        }
	
    }
    //En este caso el participante es menor de edad por lo que es necesario validar los campos del representante
    if( $('nombre_representante').value == "" )
    {
        error('<strong>Ingrese el nombre del representante</strong>','nombre_representante');
        $('nombre_representante').focus();
        return false;
    }

    if( $('apellidos_representante').value == "" )
    {
        error('<strong>Ingrese el apellido del representante</strong>','apellidos_representante');
        $('apellidos_representante').focus();
        return false;
    }
	
    if( $('acepto').checked == false )
    {
        error('<strong>Para inscribirse debe aceptar los t&eacute;rminos del concurso</strong>','acepto');
        $('acepto').focus();
        return false;
    }
	
    $('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
    new Ajax.Updater('contenido_m', 'save_men_indi.php', {
        asynchronous:true,
        evalScripts:true,
        parameters:params,
        onSuccess: function(){
            Effect.BlindDown(loadid, {
                duration: 0.2
            }); return false;
        }
    });

}

//Funcion menor grupal


function menor_grupal()
{

    var params = Form.serialize($('form1')); //obtener los datos para enviarlos
    var er_email = /^(.+\@.+\..+)$/
    b=document.form1;
    var actual_count = 0;
    var categoria1_count = 0;
    var num;
    //Se obtienen los valores de los botones de radio
    tipo = getRadioButtonSelectedValue2(b.actualmente);
    tipo2 = getRadioButtonSelectedValue3(b.actualmente1);
    tipo3 = getRadioButtonSelectedValue4(b.actualmente3);
    tipo4 = getRadioButtonSelectedValue8(b.actualmente33);
   

    //Se comienza a revisar cada uno de los campos del formulario
    if( $('nombre').value == "" )
    {
        error('<strong>Ingrese su nombre</strong>','nombre');
        $('nombre').focus();
        return false;
    }
	
    if( $('apellidos').value == "" )
    {
        error('<strong>Ingrese su apellido</strong>','apellidos');
        $('apellidos').focus();
        return false;
    }
	
    if( $('tel_contacto').value == "" )
    {
        error('<strong>Ingrese su n&uacute;mero de tel&eacute;fono</strong>','tel_contacto');
        $('tel_contacto').focus();
        return false;
    }
	
    if( $('correo').value == "" )
    {
        error('<strong>Ingrese su correo electr&oacute;nico</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( !er_email.test($('correo').value) )
    {
        error('<strong>Ingrese un correo v&aacute;lido</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( $('departamento').value == "" )
    {
        error('<strong>Seleccione el departemento en el que recide</strong>','departamento');
        $('departamento').focus();
        return false;
    }

    //Comprobacion de la seleccion de una alternativa
    for (i=0;i<b.actualmente.length;i++)
    {
        if ( (b.actualmente[i].type == "radio") && (b.actualmente[i].checked == true) )
        {
            actual_count++;
        }
    }
	
    if(actual_count <=0)
    {
        error('<strong>Actualmente que hace? estudia o hace otra cosa, seleccione una opci&oacute;n</strong>','actualmente');
        $('actualmente').focus();
        return false;
    }
	


    if((tipo=="1"))
    {
        x=1;
    }
    if((tipo=="3"))
    {
        x=2;
    }
	
		
    switch (x)
    {
        case 1 :
            if($('en_donde_estudiando').value=="")
            {
                error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','en_donde_estudiando');
                $('en_donde_estudiando').focus();
                return false;
            }
            break;
        case 3 :
            if($('en_donde_otros').value=="")
            {
                error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','en_donde_otros');
                $('en_donde_otros').focus();
                return false;
            }



            break;
 	
    }
	
	
    if( $('nombre2').value == "" )
    {
        error('<strong>Ingrese el nombre del segundo participante</strong>','nombre2');
        $('nombre2').focus();
        return false;
    }
	
    if( $('apellidos2').value == "" )
    {
        error('<strong>Ingrese el apellido del segundo participante</strong>','apellidos2');
        $('apellidos2').focus();
        return false;
    }
	
    if( $('tel_contacto2').value == "" )
    {
        error('<strong>Ingrese el n&uacute;mero de tel&eacute;fono del del segundo participante</strong>','tel_contacto2');
        $('tel_contacto2').focus();
        return false;
    }
	
    if( $('correo2').value == "" )
    {
        error('<strong>Ingrese el correo electr&oacute;nico del del segundo participante</strong>','correo2');
        $('correo2').focus();
        return false;
    }
	
    if( !er_email.test($('correo2').value) )
    {
        error('<strong>Ingrese un correo v&aacute;lido</strong>','correo2');
        $('correo2').focus();
        return false;
    }
	
    if( $('departamento2').value == "" )
    {
        error('<strong>Seleccione el departemento en el que recide el segundo participante</strong>','departamento2');
        $('departamento2').focus();
        return false;
    }
	
    actual_count =0;
    for (i=0;i<b.actualmente1.length;i++)
    {
        if ( (b.actualmente1[i].type == "radio") && (b.actualmente1[i].checked == true) )
        {
            actual_count++;
        }
    }
	
    if(actual_count <=0)
    {
        error('<strong>Actualmente que hace? estudia o hace otra cosa, seleccione una opci&oacute;n</strong>','actualmente1');
        $('actualmente1').focus();
        return false;
    }
	
	
	
    if((tipo2=="1"))
    {
        x=1;
    }
    if((tipo2=="3"))
    {
        x=2;
    }
	
		
    switch (x)
    {
        case 1 :
            if($('en_donde_estudiando2').value=="")
            {
                error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','en_donde_estudiando2');
                $('en_donde_estudiando2').focus();
                return false;
            }
            break;
        case 2 :
            if($('en_donde_otros2').value=="")
            {
                error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','en_donde_otros2');
                $('en_donde_otros2').focus();
                return false;
            }



            break;
 	
    }
	
    if($('habilitar').checked==true)
    {
        if( $('nombre3').value == "" )
        {
            error('<strong>Ingrese el nombre del tercer integrante</strong>','nombre3');
            $('nombre3').focus();
            return false;
        }
	
        if( $('apellidos3').value == "" )
        {
            error('<strong>Ingrese el apellido del tercer integrante</strong>','apellidos3');
            $('apellidos3').focus();
            return false;
        }
	
        if( $('tel_contacto3').value == "" )
        {
            error('<strong>Ingrese el n&uacute;mero de tel&eacute;fono del tercer integrante</strong>','tel_contacto3');
            $('tel_contacto3').focus();
            return false;
        }
	
        if( $('correo3').value == "" )
        {
            error('<strong>Ingrese el correo electr&oacute;nico del tercer integrante</strong>','correo3');
            $('correo3').focus();
            return false;
        }
	
        if( !er_email.test($('correo3').value) )
        {
            error('<strong>Ingrese un correo v&aacute;lido</strong>','correo3');
            $('correo3').focus();
            return false;
        }
	
        if( $('departamento3').value == "" )
        {
            error('<strong>Seleccione el departemento en el que recide el tercer integrante</strong>','departamento3');
            $('departamento3').focus();
            return false;
        }
	

        if((b.actualmente3.checked == false)&&(b.actualmente33.checked == false))
		
        {
            error('<strong>Actualmente que hace? estudia o hace otra cosa, seleccione una opci&oacute;n dos</strong>','actualmente33');
            $('actualmente3').focus();
            return false;
        }

   
        while(((b.actualmente3.checked == true && $('en_donde_estudiando3').value=="")|| (b.actualmente33.checked == true && $('en_donde_otros3').value=="")))
        {
            if(b.actualmente3.checked == true)
            {


                if((tipo3=="1"))
                {
               
           
                    x=1;
                }
                if((tipo3=="3"))
                {
            
                    x=2;
                }
	
		
                switch (x)
                {
                    case 1 :
                        if($('en_donde_estudiando3').value=="")
                        {
                            error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','en_donde_estudiando3');
                            $('en_donde_estudiando3').focus();
                            return false;
                        }
                        break;
                    case 2 :
                        if($('en_donde_otros3').value=="")
                        {
                            error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','en_donde_otros3');
                            $('en_donde_otros3').focus();
                            return false;
                        }
                        break;
                }
                    
            }

            else
            {
                if((tipo4=="1"))
                {
                    x=1;
                }
                if((tipo4=="3"))
                {
                    x=2;
                }
                switch (x)
                {
                    case 1 :
                        if($('en_donde_estudiando3').value=="")
                        {
                            error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','en_donde_estudiando3');
                            $('en_donde_estudiando3').focus();
                            return false;
                        }
                        break;
                    case 2 :
                        if($('en_donde_otros3').value=="")
                        {
                            error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','en_donde_otros3');
                            $('en_donde_otros3').focus();
                            return false;
                        }
                        break;

                }
                  
            }
	
	
        }
   
    }
    if( $('motivacion').value == "" ){
        error('<strong>Describa la motivaci&oacute;n del grupo para participaci&oacute;n</strong>','motivacion');
        $('motivacion').focus();
        return false;
    }
					
    //Script para revisar que no este seleccionada mas de tres categorias
	

	

    if(($('categoria1').checked==false)&& ($('categoria2').checked==false)&& ($('categoria3').checked==false)&& ($(						'categoria4').checked==false)&& ($('categoria5').checked==false))
    {
        error('<strong>Ingrese por lo menos una Categoria </strong>','categoria1');
        $('categoria1').focus();
        return false;
    }
    num=4;
    while((num>3))
    {
        num=0;
        if($('categoria1').checked==true)
        {
            num++;
        }
        if($('categoria2').checked==true)
        {
            num++;
        }
						
        if($('categoria3').checked==true)
        {
            num++;
        }
        if($('categoria4').checked==true)
        {
            num++;
        }
        if($('categoria5').checked==true)
        {
            num++;
        }
									


        if(num>3)
        {
            error('<strong>Ingrese como maximo 3 categorias </strong>','categoria1');
            return false;
        }
	
    }
	
	
    if( $('acepto').checked==false ){
        error('<strong>Para poder inscribirse debe aceptar los t&eacute;rminos del concurso</strong>','acepto');
        $('acepto').focus();
        return false;

    }
	
    $('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
    new Ajax.Updater('contenido_m', 'save_men_grup.php', {
        asynchronous:true,
        evalScripts:true,
        parameters:params,
        onSuccess: function(){
            Effect.BlindDown(loadid, {
                duration: 0.2
            }); return false;
        }
    });


}



function mayor_individual()
{

    var params = Form.serialize($('form1')); //obtener los datos para enviarlos
    var er_email = /^(.+\@.+\..+)$/
    b=document.form1;
    //Contadores para estructuras de control
    var actual_count = 0;
    var categoria1_count = 0;
    var num;
    var x;
    //Obtenemos el valor de los botones de radio
    tipo = getRadioButtonSelectedValue5(b.actualmente);
    //Comenzamos a validar uno a uno los campos
	
    if( $('dui').value == "" )
    {
        error('<strong>Ingrese su DUI</strong>','dui');
        $('dui').focus();
        return false;
    }
    if( $('nombre').value == "" )
    {
        error('<strong>Ingrese su nombre</strong>','nombre');
        $('nombre').focus();
        return false;
    }
	
    if( $('apellidos').value == "" )
    {
        error('<strong>Ingrese su apellido</strong>','apellidos');
        $('apellidos').focus();
        return false;
    }
	
    if( $('tel_contacto').value == "" )
    {
        error('<strong>Ingrese su n&uacute;mero de tel&eacute;fono</strong>','tel_contacto');
        $('tel_contacto').focus();
        return false;
    }
	
    if( $('correo').value == "" )
    {
        error('<strong>Ingrese su correo electr&oacute;nico</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( !er_email.test($('correo').value) )
    {
        error('<strong>Ingrese un correo v&aacute;lido</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( $('departamento').value == "" )
    {
        error('<strong>Seleccione el departemento en el que recide</strong>','departamento');
        $('departamento').focus();
        return false;
    }
	
	
    //Funcion para validacion del tipo de ocupacion
    for (i=0;i<b.actualmente.length;i++)
    {
        if ( ((b.actualmente[i].type == "radio") && (b.actualmente[i].checked == true)) )
        {
            actual_count++;
        }
    }
	
    if(actual_count <=0)
    {
        error('<strong>Actualmente que hace? estudia, trabaja o hace otra cosa, seleccione una opci&oacute;n</strong>',  			'actual');
        $('actualmente').focus();
        return false;
    }
    //Se ocupa esta estructura de desicion para ocupar una variable bandera ya que switch no se pueden compara string
    if(tipo=="1")
    {
        x=1;
    }
    if(tipo=="2")
    {
        x=2;
    }
    if(tipo=="3")
    {
        x=3;
    }
    //Comparamos nuesta bandera
    switch (x)
    {
        case 1 :
            if($('lugar_estudio').value=="")
            {
                error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','lugar_estudio');
                $('lugar_estudio').focus();
                return false;
            }
            break;
        case 2 :
            if($('lugar_trabajo').value=="")
            {
                error('<strong>Ingrese su lugar de trabajo</strong>','lugar_trabajo');
                $('lugar_trabajo').focus();
                return false;
            }
            break;
        case 3 :
            if($('otro').value=="")
            {
                error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','otro');
                $('otro').focus();
                return false;
            }
            break;
    }
    //Se procede a comprar los siguientes campos

    if( $('inst_educativa').value == "" )
    {
        error('<strong>Escriba cual fue su ultima institucion educativa </strong>','inst_educativa');
        $('inst_educativa').focus();
        return false;
    }
    if( $('motivacion').value == "" )
    {
        error('<strong>Describa la motivaci&oacute;n de su participaci&oacute;n</strong>','motivacion');
        $('motivacion').focus();
        return false;
    }
		
    //Script para revisar que este seleccionada por lo menos una categoria
    if(($('categoria1').checked==false)&& ($('categoria2').checked==false)&& ($('categoria3').checked==false)&& ($(	'categoria4').checked==false)&& ($('categoria5').checked==false))
    {
        error('<strong>Ingrese por lo menos una Categoria </strong>','categoria1');
        $('categoria1').focus();
        return false;
    }

    //Script para revisar que no este seleccionada mas de tres categorias
    num=4;
    while((num>3))
    {
        num=0;
        if($('categoria1').checked==true)
        {
            num++;
        }
        if($('categoria2').checked==true)
        {
            num++;
        }
						
        if($('categoria3').checked==true)
        {
            num++;
        }
        if($('categoria4').checked==true)
        {
            num++;
        }
        if($('categoria5').checked==true)
        {
            num++;
        }
									


        if(num>3)
        {
            error('<strong>Ingrese como maximo 3 categorias </strong>','categoria1');
            return false;
        }
	
    }
	
    if( $('acepto').checked == false )
    {
        error('<strong>Para inscribirse debe aceptar los t&eacute;rminos del concurso</strong>','acepto');
        $('acepto').focus();
        return false;
    }
	

    $('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
    new Ajax.Updater('contenido_m', 'save_may_indi.php', {
        asynchronous:true,
        evalScripts:true,
        parameters:params,
        onSuccess: function(){
            Effect.BlindDown(loadid, {
                duration: 0.2
            }); return false;
        }
    });



}

function mayor_grupal()
{

    var params = Form.serialize($('form1')); //obtener los datos para enviarlos
    var er_email = /^(.+\@.+\..+)$/
    b=document.form1;
    //Contadores para estructuras de control
    var actual_count = 0;
    var categoria1_count = 0;
    var num;
    var x;
    //Obtenemos el valor de los botones de radio
    tipo = getRadioButtonSelectedValue6(b.actualmente);
    tipo2 = getRadioButtonSelectedValue7(b.actualmente2);
    tipo3= getRadioButtonSelectedValue11(b.actualmente7);
    //Comenzamos a validar uno a uno los campos
	
    if( $('dui').value == "" )
    {
        error('<strong>Ingrese su DUI</strong>','dui');
        $('dui').focus();
        return false;
    }
    if( $('nombre').value == "" )
    {
        error('<strong>Ingrese su nombre</strong>','nombre');
        $('nombre').focus();
        return false;
    }
	
    if( $('apellidos').value == "" )
    {
        error('<strong>Ingrese su apellido</strong>','apellidos');
        $('apellidos').focus();
        return false;
    }
	
    if( $('tel_contacto').value == "" )
    {
        error('<strong>Ingrese su n&uacute;mero de tel&eacute;fono</strong>','tel_contacto');
        $('tel_contacto').focus();
        return false;
    }
	
    if( $('correo').value == "" )
    {
        error('<strong>Ingrese su correo electr&oacute;nico</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( !er_email.test($('correo').value) )
    {
        error('<strong>Ingrese un correo v&aacute;lido</strong>','correo');
        $('correo').focus();
        return false;
    }
	
    if( $('departamento').value == "" )
    {
        error('<strong>Seleccione el departemento en el que recide</strong>','departamento');
        $('departamento').focus();
        return false;
    }
	
	
    //Funcion para validacion del tipo de ocupacion
    for (i=0;i<b.actualmente.length;i++)
    {
        if ( ((b.actualmente[i].type == "radio") && (b.actualmente[i].checked == true)) )
        {
            actual_count++;
        }
    }
	
    if(actual_count <=0)
    {
        error('<strong>Actualmente que hace? estudia, trabaja o hace otra cosa, seleccione una opci&oacute;n</strong>',  			'actualmente');
        $('actualmente').focus();
        return false;
    }
    //Se ocupa esta estructura de desicion para ocupar una variable bandera ya que switch no se pueden compara string
    if(tipo=="1")
    {
        x=1;
    }
    if(tipo=="2")
    {
        x=2;
    }
    if(tipo=="3")
    {
        x=3;
    }
    //Comparamos nuesta bandera
    switch (x)
    {
        case 1 :
            if($('lugar_estudio').value=="")
            {
                error('<strong>Ingrese la instituci&oacute;n de estudios</strong>','lugar_estudio');
                $('lugar_estudio').focus();
                return false;
            }
            break;
        case 2 :
            if($('lugar_trabajo').value=="")
            {
                error('<strong>Ingrese su lugar de trabajo</strong>','lugar_trabajo');
                $('lugar_trabajo').focus();
                return false;
            }
            break;
        case 3 :
            if($('otro').value=="")
            {
                error('<strong>Ingrese cual es su ocupaci&oacute;n</strong>','otro');
                $('otro').focus();
                return false;
            }
            break;
    }
    //Se procede a comprar los siguientes campos

    if( $('inst_educativa').value == "" )
    {
        error('<strong>Escriba cual fue su ultima institucion educativa </strong>','inst_educativa');
        $('inst_educativa').focus();
        return false;
    }
	
    if( $('dui2').value == "" )
    {
        error('<strong>Ingrese el dui del segundo participante</strong>','dui2');
        $('dui2').focus();
        return false;
    }
    if( $('nombre2').value == "" )
    {
        error('<strong>Ingrese el nombre del segundo participante</strong>','nombre2');
        $('nombre2').focus();
        return false;
    }
	
    if( $('apellidos2').value == "" )
    {
        error('<strong>Ingrese el apellido del segundo participante</strong>','apellidos2');
        $('apellidos2').focus();
        return false;
    }
	
    if( $('tel_contacto2').value == "" )
    {
        error('<strong>Ingrese el n&uacute;mero de tel&eacute;fono del del segundo participante</strong>','tel_contacto2');
        $('tel_contacto2').focus();
        return false;
    }
	
    if( $('correo2').value == "" )
    {
        error('<strong>Ingrese el correo electr&oacute;nico del del segundo participante</strong>','correo2');
        $('correo2').focus();
        return false;
    }
	
    if( !er_email.test($('correo2').value) )
    {
        error('<strong>Ingrese un correo v&aacute;lido</strong>','correo2');
        $('correo2').focus();
        return false;
    }
	
    if( $('departamento2').value == "" )
    {
        error('<strong>Seleccione el departemento en el que recide el segundo participante</strong>','departamento2');
        $('departamento2').focus();
        return false;
    }
	
    actual_count =0;
    for (i=0;i<b.actualmente2.length;i++)
    {
        if ( (b.actualmente2[i].type == "radio") && (b.actualmente2[i].checked == true) )
        {
            actual_count++;
        }
    }
	
    if(actual_count <=0)
    {
        error('<strong>Actualmente que hace el segundo participante? estudia, trabaja  o hace otra cosa, seleccione una opci&oacute;n</strong>','actualmente2');
        $('actualmente2').focus();
        return false;
    }
	
	
	
    if(tipo2=="1")
    {
        x=1;
    }
    if(tipo2=="2")
    {
        x=2;
    }
    if(tipo2=="3")
    {
        x=3;
    }
	
		
    switch (x)
    {
        case 1 :
            if($('lugar_estudio2').value=="")
            {
                error('<strong>Ingrese la instituci&oacute;n de estudios del segundo participante</strong>','lugar_estudio2');
                $('lugar_estudio2').focus();
                return false;
            }
            break;
        case 2 :
            if($('lugar_trabajo2').value=="")
            {
                error('<strong>Ingrese el lugar de trabajo del segundo participante</strong>','lugar_trabajo2');
                $('lugar_trabajo2').focus();
                return false;
            }
            break;
        case 3 :
            if($('otro2').value=="")
            {
                error('<strong>Ingrese cual es la ocupaci&oacute;n del segundo</strong>','otro2');
                $('otro2').focus();
                return false;
            }
            break;
 	
    }
	
	
    if( $('inst_educativa2').value == "" )
    {
        error('<strong>Escriba cual fue la ultima institucion educativa del segundo participante</strong>','inst_educativa2');
        $('inst_educativa2').focus();
        return false;
    }

    if($('habilitar').checked==true){
		
		
        if( $('dui3').value == "" )
        {
            error('<strong>Ingrese el dui del tercer participante</strong>','dui3');
            $('dui3').focus();
            return false;
        }
        if( $('nombre3').value == "" )
        {
            error('<strong>Ingrese el nombre del tercer participante</strong>','nombre3');
            $('nombre3').focus();
            return false;
        }
	
        if( $('apellidos3').value == "" )
        {
            error('<strong>Ingrese el apellido del tercer participante</strong>','apellidos3');
            $('apellidos3').focus();
            return false;
        }
	
        if( $('tel_contacto3').value == "" )
        {
            error('<strong>Ingrese el n&uacute;mero de tel&eacute;fono del tercer participante</strong>','tel_contacto3');
            $('tel_contacto3').focus();
            return false;
        }
	
        if( $('correo3').value == "" )
        {
            error('<strong>Ingrese el correo electr&oacute;nico del del tercer participante</strong>','correo3');
            $('correo3').focus();
            return false;
        }
	
        if( !er_email.test($('correo3').value) )
        {
            error('<strong>Ingrese un correo v&aacute;lido</strong>','correo3');
            $('correo3').focus();
            return false;
        }
	
        if( $('departamento3').value == "" )
        {
            error('<strong>Seleccione el departemento en el que recide el  tercer participante</strong>','departamento3');
            $('departamento3').focus();
            return false;
        }
	
	
        //Funcion para validacion del tipo de ocupacion
        for (i=0;i<b.actualmente7.length;i++)
        {
            if ( ((b.actualmente7[i].type == "radio") && (b.actualmente7[i].checked == true)) )
            {
                actual_count++;
            }
        }
	
        if(actual_count <=0)
        {
            error('<strong>Actualmente que hace el tercer participante? estudia, trabaja o hace otra cosa, seleccione una opci&oacute;n</strong>',  			'actualmente7');
            $('actualmente7').focus();
            return false;
        }
        //Se ocupa esta estructura de desicion para ocupar una variable bandera ya que switch no se pueden compara string
		
        if(tipo3=="1")
        {
            x=1;
        }
        if(tipo3=="2")
        {
            x=2;
        }
        if(tipo3=="3")
        {
            x=3;
        }
        //Comparamos nuesta bandera
        switch (x)
        {
            case 1 :
                if($('lugar_estudio3').value=="")
                {
                    error('<strong>Ingrese la instituci&oacute;n de estudios del tercer participante</strong>','lugar_estudio3');
                    $('lugar_estudio3').focus();
                    return false;
                }
                break;
            case 2 :
                if($('lugar_trabajo3').value=="")
                {
                    error('<strong>Ingrese el lugar de trabajo del tercer participante</strong>','lugar_trabajo3');
                    $('lugar_trabajo3').focus();
                    return false;
                }
                break;
            case 3 :
                if($('otro3').value=="")
                {
                    error('<strong>Ingrese cual es la ocupaci&oacute;n del tercer participante</strong>','otro3');
                    $('otro3').focus();
                    return false;
                }
                break;
        }
        //Se procede a comprar los siguientes campos

        if( $('inst_educativa3').value == "" )
        {
            error('<strong>Escriba cual fue la ultima institucion educativa del tercer participante </strong>','inst_educativa3');
            $('inst_educativa3').focus();
            return false;
        }
		
	
    }
    if( $('motivacion').value == "" )
    {
        error('<strong>Describa la motivaci&oacute;n del grupo para participaci&oacute;n</strong>','motivacion'			);
        $('motivacion').focus();
        return false;
    }
    //Script para revisar que este seleccionada por lo menos una categoria
	
    if(($('categoria1').checked==false)&& ($('categoria2').checked==false)&& ($('categoria3').checked==false)&& ($(	'categoria4').checked==false)&& ($('categoria5').checked==false))
    {
        error('<strong>Ingrese por lo menos una Categoria </strong>','categoria1');
        $('categoria1').focus();
        return false;
    }

    //Script para revisar que no este seleccionada mas de tres categorias
    num=4;
    while((num>3))
    {
        num=0;
        if($('categoria1').checked==true)
        {
            num++;
        }
        if($('categoria2').checked==true)
        {
            num++;
        }
						
        if($('categoria3').checked==true)
        {
            num++;
        }
        if($('categoria4').checked==true)
        {
            num++;
        }
        if($('categoria5').checked==true)
        {
            num++;
        }
									


        if(num>3)
        {
            error('<strong>Ingrese como maximo 3 categorias </strong>','categoria1');
            return false;
        }
	
    }

    if( $('acepto').checked == false )
    {
        error('<strong>Para inscribirse debe aceptar los t&eacute;rminos del concurso</strong>','acepto');
        $('acepto').focus();
        return false;
    }
	
    $('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
    new Ajax.Updater('contenido_m', 'save_may_grup.php', {
        asynchronous:true,
        evalScripts:true,
        parameters:params,
        onSuccess: function(){
            Effect.BlindDown(loadid, {
                duration: 0.2
            }); return false;
        }
    });

}

function voto()
{

	
    var t1, t2, contenedor;
    contenedor = document.getElementById('form');
    t1 = document.getElementById('voto1');
    t2 = document.getElementById('voto2');
    t3 = document.getElementById('voto3');
    t4 = document.getElementById('voto4');
    t5 = document.getElementById('voto5');
    t6 = document.getElementById('voto6');
    t7 = document.getElementById('voto7');
    t8 = document.getElementById('voto8');
	
	
	
    if( (t1.checked==false) && (t2.checked==false) && (t3.checked==false)&& (t4.checked==false)&& (t5.checked==false) && (t6.checked==false)&& (t7.checked==false)&& (t8.checked==false))
    {
        alert('Apoye su trabajo preferido');
       //error('<strong>Debe de votar por uno por lo menos</strong>','');
        return false;
    }
	else{
 return true;
 
 //$('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
   // new Ajax.Updater('contenido_m', 'guardar_todo.php', {
     //   asynchronous:true,
       // evalScripts:true,
        //parameters:params,
        /*onSuccess: function(){
            Effect.BlindDown(		loadid, {
                duration: 0.2
            }); return false;
        }
    });*/
	}

}





function voto2()
{

	
    var t1, t2, contenedor;
    contenedor = document.getElementById('form');
	
    t9 = document.getElementById('voto9');
    t10 = document.getElementById('voto10');
    t11 = document.getElementById('voto11');
    t12 = document.getElementById('voto12');
    t13 = document.getElementById('voto13');
    t14 = document.getElementById('voto14');
    t15 = document.getElementById('voto15');
    t16 = document.getElementById('voto16');
    t17 = document.getElementById('voto17');
    t18 = document.getElementById('voto18');
    t19 = document.getElementById('voto19');
    t20 = document.getElementById('voto20');
    t21 = document.getElementById('voto21');
    t22 = document.getElementById('voto22');
    t23 = document.getElementById('voto23');
    t24 = document.getElementById('voto24');
    t25 = document.getElementById('voto25');
    t26 = document.getElementById('voto26');
    t27 = document.getElementById('voto27');
    t28 = document.getElementById('voto28');
    t29 = document.getElementById('voto29');
    t30 = document.getElementById('voto30');
    t31 = document.getElementById('voto31');
    t32 = document.getElementById('voto32');
	
	
			
	
    if( (t9.checked==false)&& (t10.checked==false)&& (t11.checked==false)&& (t12.checked==false)&& (t13.checked==false)&& (t14.checked==false)&& (t15.checked==false)&& (t16.checked==false)&& (t17.checked==false)&& (t18.checked==false)&& (t19.checked==false)&& (t20.checked==false)&& (t21.checked==false)&& (t22.checked==false)&& (t23.checked==false)&& (t24.checked==false)&& (t25.checked==false)&& (t26.checked==false)&& (t27.checked==false)&& (t28.checked==false)&& (t29.checked==false)&& (t30.checked==false)&& (t31.checked==false)&& (t32.checked==false))
    {
        alert('Apoye su trabajo preferido');
       //error('<strong>Debe de votar por uno por lo menos</strong>','');
        return false;
    }
		else{
 return true;
 
 //$('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
   // new Ajax.Updater('contenido_m', 'guardar_todo.php', {
     //   asynchronous:true,
       // evalScripts:true,
        //parameters:params,
        /*onSuccess: function(){
            Effect.BlindDown(		loadid, {
                duration: 0.2
            }); return false;
        }
    });*/
	}

}



function voto3()
{

	
    var t1, t2, contenedor;
    contenedor = document.getElementById('form');
	
    t33 = document.getElementById('voto33');
    t34 = document.getElementById('voto34');
    t35 = document.getElementById('voto35');
    t36 = document.getElementById('voto36');
    t37 = document.getElementById('voto37');
    t38 = document.getElementById('voto38');
    t39 = document.getElementById('voto39');
    t40 = document.getElementById('voto40');
    t41 = document.getElementById('voto41');
    t42 = document.getElementById('voto42');
    t43 = document.getElementById('voto43');
    t44 = document.getElementById('voto44');
    t45 = document.getElementById('voto45');
    t46 = document.getElementById('voto46');
    t47 = document.getElementById('voto47');
	
	
			
	
    if( (t33.checked==false)&& (t34.checked==false)&& (t35.checked==false)&& (t36.checked==false)&& (t37.checked==false)&& (t38.checked==false)&& (t39.checked==false)&& (t40.checked==false)&& (t41.checked==false)&& (t42.checked==false)&& (t43.checked==false)&& (t44.checked==false)&& (t45.checked==false)&& (t46.checked==false)&& (t47.checked==false))
    {
        alert('Apoye su trabajo preferido');
        //error('<strong>Debe de votar por uno por lo menos</strong>','');-->
        return false;
    }
	else{
 return true;
 
 //$('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
   // new Ajax.Updater('contenido_m', 'guardar_todo.php', {
     //   asynchronous:true,
       // evalScripts:true,
        //parameters:params,
        /*onSuccess: function(){
            Effect.BlindDown(		loadid, {
                duration: 0.2
            }); return false;
        }
    });*/
	}

}
	

function voto4()
{

	
    var t1, t2, contenedor;
    contenedor = document.getElementById('form');
	
    t48 = document.getElementById('voto48');
    t49 = document.getElementById('voto49');
    t50 = document.getElementById('voto50');
    t51 = document.getElementById('voto51');
    t52 = document.getElementById('voto52');
	
	
	
			
	
    if( (t48.checked==false) && (t49.checked==false)&& (t50.checked==false)&& (t51.checked==false)&& (t52.checked==false))
    {
        alert('Apoye su trabajo preferido');
        //error('<strong>Debe de votar por uno por lo menos</strong>','');-->
        return false;
    }
	else{
 return true;
 
 //$('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
   // new Ajax.Updater('contenido_m', 'guardar_todo.php', {
     //   asynchronous:true,
       // evalScripts:true,
        //parameters:params,
        /*onSuccess: function(){
            Effect.BlindDown(		loadid, {
                duration: 0.2
            }); return false;
        }
    });*/
	}

}
function voto5()
{

	
    var t1, t2, contenedor;
    contenedor = document.getElementById('form');
	
    t53 = document.getElementById('voto53');
    t54 = document.getElementById('voto54');
    t55 = document.getElementById('voto55');
    t56 = document.getElementById('voto56');
	
	
			
	
    if( (t53.checked==false)&& (t54.checked==false)&& (t55.checked==false)&& (t56.checked==false))
    {
        alert('Apoye su trabajo preferido');
        //error('<strong>Debe de votar por uno por lo menos</strong>','');-->
		
        return false;
    }
		else{
 return true;
 
 //$('contenido_m').innerHTML = '<div><img src="img/loading.gif" /></div>';
   // new Ajax.Updater('contenido_m', 'guardar_todo.php', {
     //   asynchronous:true,
       // evalScripts:true,
        //parameters:params,
        /*onSuccess: function(){
            Effect.BlindDown(		loadid, {
                duration: 0.2
            }); return false;
        }
    });*/
	}

}