var sUrlServidor = 'http://www.unica.edu/'; $(document).ready(function(){ $(".prova_admissio").click(function() { window.open(this.href,'prova_admissio','top=10,left=100,width=750,height=550,resizable,scrollbars,menubar,status,toolbar,location').focus(); return false } ) $(".inscripcio_online").click(function() { window.open(this.href,'inscripcio_online','top=10,left=10,width=770,height=550,resizable,scrollbars,menubar,status,toolbar,location').focus(); return false } ) $(".print").click(function() { window.open(this.href,'print','top=10,left=10,width=770,height=550,resizable,scrollbars,menubar,status,toolbar,location').focus(); return false } ) $(".llibre").click(function() { window.open(this.href,'llibre','top=10,left=10,width=950,height=700,resizable,scrollbars,menubar,status,toolbar,location').focus(); return false } ) $(".temari").click(function() { window.open(this.href,'temari','top=10,left=10,width=950,height=700,resizable,scrollbars,menubar,status,toolbar,location').focus(); return false } ) $(".popup").click(function() { window.open(this.href,'popup','top=10,left=10,width=950,height=700,resizable,scrollbars,menubar,status,toolbar,location').focus(); return false } ) $("#combo1").change( function() { var id_tipologia = this.options[this.selectedIndex].value; var html = $.ajax({ type: "GET", url: sUrlServidor+"progs/chunk.uic?id_tipologia="+id_tipologia, async: false }).responseText; // Add the HTML into the page $("#combo2").html( html ); $("#combo3").html( '' ); document.cercador_recursos.combo2.options[document.cercador_recursos.combo2.selectedIndex].selected = false; } ) $("#combo2").change( function() { var id_categoriarecurs = this.options[this.selectedIndex].value; var html = $.ajax({ type: "GET", url: sUrlServidor+"progs/chunk.uic?id_categoriarecurs="+id_categoriarecurs, async: false }).responseText; // Add the HTML into the page $("#combo3").html( html ); document.cercador_recursos.combo3.options[document.cercador_recursos.combo3.selectedIndex].selected = false; } ) if ($('.banner').size()>0) { idInterval = setInterval(function () { if ($('.banner').size()>0) { var id = $('.banner').attr("id"); var aParams = id.split('-'); var idi = aParams[0]; var id_pagina = aParams[1]; $.ajax({ type: 'GET', url: sUrlServidor+"progs/noubanner.uic?id_pagina="+id_pagina+"&idi="+idi, success: function(sData) { if ($('.banner').size()>0) { $('.banner').html(sData); } } }); } else { clearInterval(idInterval); } },3000); } });