var GBwin;

function OpenCursos(){ window.open ('http://cursos.cenhomologados.com');}

/*
//function campus_online(){
	//GBwin = GB_showCenter("", "/esp/campus.aspx", 376, 426, null)
//}

function abrir_plano(){
	GBwin = GB_showCenter("", "/esp/plano.aspx", 332, 384, null)
}
function abrirTemario(id){
    GBwin = GB_showCenter("", "/esp/info_oposiciones_temario.aspx?id="+id, 500, 600, null)
}
function abrirArchivo(html){
    GBwin = GB_showCenter("", "/esp/"+html, 500, 600, null)
}
function abrir_reserva(idc,tipo,provinciaID,dominio){
    var prefijo = "ctl00_Reserva_franja1_";
    if(document.getElementById(prefijo+"listaCuerpos").value==0 || document.getElementById(prefijo+"listaAsignaturas").value==0 ||
       document.getElementById(prefijo+"nombre").value=="" || document.getElementById(prefijo+"apellidos").value=="" ||
       document.getElementById(prefijo+"email").value=="" || document.getElementById(prefijo+"telefono").value==""){
        alert("Debes rellenar todos los datos del formulario.");
    } else  {
        var url;
        var parametros = "?";
        if(document.getElementById(prefijo+"listaCuerpos").value == "Maestros") parametros += "webop=1";
        if(document.getElementById(prefijo+"listaCuerpos").value == "Secundaria") parametros += "webop=2";
        parametros += "&webidasig="+document.getElementById(prefijo+"listaAsignaturas").value;
        parametros += "&webnombre="+document.getElementById(prefijo+"nombre").value;
        parametros += "&webapellidos="+document.getElementById(prefijo+"apellidos").value;
        parametros += "&webemail="+document.getElementById(prefijo+"email").value;
        parametros += "&webtelefono="+document.getElementById(prefijo+"telefono").value;
        parametros += "&webidprov="+provinciaID;
        parametros += "&webdominio="+dominio;
        parametros += "&webidc="+idc;
        if(tipo=="presencia") url = "http://80.38.105.208/cenweb/presencial.asp";
        if(tipo=="distancia") url = "http://80.38.105.208/cenweb/distancia1.asp";
	    //GBwin = GB_showCenter("", "../../reserva/distancia1.htm", 500, 520, null)
	    GBwin = GB_showCenter("", url+parametros, 500, 520, null)
    }
}
function abrir_reserva_justicia(tipo,provinciaID,dominio){
    var prefijo = "ctl00_reserva_franja_justicia_";
    if(
    //document.getElementById(prefijo+"listaCuerpos").value==0 || document.getElementById(prefijo+"listaAsignaturas").value==0 ||
       document.getElementById(prefijo+"nombre").value=="" || document.getElementById(prefijo+"apellidos").value=="" ||
       document.getElementById(prefijo+"email").value=="" || document.getElementById(prefijo+"telefono").value==""){
        alert("Debes rellenar todos los datos del formulario.");
    } else  {
        var url;
        var parametros = "?";
        //if(document.getElementById(prefijo+"listaCuerpos").value == "Maestros") parametros += "webop=1";
        //if(document.getElementById(prefijo+"listaCuerpos").value == "Secundaria") parametros += "webop=2";
        //parametros += "&webidasig="+document.getElementById(prefijo+"listaAsignaturas").value;
        parametros += "webnombre="+document.getElementById(prefijo+"nombre").value;
        parametros += "&webapellidos="+document.getElementById(prefijo+"apellidos").value;
        parametros += "&webemail="+document.getElementById(prefijo+"email").value;
        parametros += "&webtelefono="+document.getElementById(prefijo+"telefono").value;
        parametros += "&webidprov="+provinciaID;
        parametros += "&webdominio="+dominio;
        //parametros += "&webidc="+idc;
        if(tipo=="presencia") url = "http://80.38.105.208/cenweb/justicia/presencial.asp";
        if(tipo=="distancia") url = "http://80.38.105.208/cenweb/justicia/distancia1.asp";
	    //GBwin = GB_showCenter("", "../../reserva/distancia1.htm", 500, 520, null)
	    GBwin = GB_showCenter("", url+parametros, 500, 520, null)
    }
}
function abrir_infocen(){
	url= "http://80.38.105.208/cenweb/solicitud_infocen.asp?webdominio=www.cenoposiciones.com";
    GBwin = GB_showCenter("", url, 500, 520, null)

}
function abrir_infocen1(){
	url= "http://80.38.105.208/cenweb/solicitud_infocen.asp?webdominio=www.cenoposiciones.com&or=dw";
    GBwin = GB_showCenter("", url, 500, 520, null)

}
function abrir_infocen_justicia(){
	url= "http://80.38.105.208/cenweb/solicitud_infocen_justicia.asp?webdominio=www.cenoposiciones.com";
    GBwin = GB_showCenter("", url, 500, 520, null)

}*/
/*
function contacto(){
    var parametros = "?";
    var dominio = "www.cenoposiciones.com";
    parametros += "webdominio="+dominio;
    var  url = "http://80.38.105.208/cenweb/solicitud_info1.asp";
    GBwin = GB_showCenter("", url+parametros, 500, 520, null)
}

function contacto_justicia(){
    var parametros = "?";
    var dominio = "www.cenoposiciones.com";
    parametros += "webdominio="+dominio;
    var  url = "http://80.38.105.208/cenweb/solicitud_info_justicia.asp";
    GBwin = GB_showCenter("", url+parametros, 500, 520, null)
}

function mapa_web(ruta){
    GBwin = GB_showCenter("", ruta+"/mapa_web.aspx", 550, 640, null)
}
function aviso_legal(){
    GBwin = GB_showCenter("", "/esp/aviso_legal.aspx", 550, 500, null)
}
function GB_hide() {
  GB_CURRENT.hide(GBwin)
}

function checkEmail (emailStr) {
    var emailPat=/^(.+)@(.+)$/
    var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
    var validChars="\[^\\s" + specialChars + "\]" 
    var quotedUser="(\"[^\"]*\")" 
    var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
    var atom=validChars + '+'
    var word="(" + atom + "|" + quotedUser + ")"
    var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
    var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
    var matchArray=emailStr.match(emailPat)
    if (matchArray==null) {return false;}
    var user=matchArray[1]
    var domain=matchArray[2]
    if (user.match(userPat)==null) {return false}
    var IPArray=domain.match(ipDomainPat)
    if (IPArray!=null) {for (var i=1;i<=4;i++) {if (IPArray[i]>255) {	return false}}return true}
    var domainArray=domain.match(domainPat)
    if (domainArray==null) {return false}
    var atomPat=new RegExp(atom,"g")
    var domArr=domain.match(atomPat)
    var len=domArr.length
    if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>3) {return false}
    if (len<2) {return false}return true;
}
*/