// context = id of elements which contains checkboxes
// controller = DOMelement of ckeckbox controller
function checkall(context, controller){
$("#"+context).find("input[@type$='checkbox']").not(controller).each(function(){
// verify the state of checkbox controller and pass the state to others checkboxes
this.checked = $(controller).checked;
});
}
JavaScript Javascript Popup with Blocking detection
function popup(url,ancho,alto,id,extras){
if(navigator.userAgent.indexOf("Mac")>0){ancho=parseInt(ancho)+15;alto=parseInt(alto)+15;}
var left = (screen.availWidth-ancho)/2;
var top = (screen.availHeight-alto)/2;
if(extras!=""){extras=","+extras;};
var ventana = window.open(url,id,'width='+ancho+',height='+alto+',left='+left+',top='+top+',screenX='+left+',screenY='+top+extras);
var bloqueado = "AVISO:\n\nPara ver este contenido es necesario que desactive\nel Bloqueo de Ventanas para este Sitio."
//var bloqueado = "WARNING:\n\nIn order to use this functionality, you need\nto deactivate Popup Blocking."
if(ventana==null || typeof(ventana.document)=="undefined"){ alert(bloqueado) }else{ return ventana; };
}
function getUrlVars() {
var map = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
map[key] = value;
});
return map;
}