function sh(parentId) {
	myParent = document.getElementById(parentId)
	if (myParent.style.display=="none" || myParent.style.display=="") {
		myParent.style.display="block"
		if(parentId == 'search'){
			document.getElementById('searching').focus();
		}else if(parentId == 'ajout'){
			document.getElementById('link').focus();
		}else{
			this.focus();
		}
	} else {
		myParent.style.display="none"
	}
}

function bla(id){
	afficher(id);
}

function afficher(id) {
    popup('./kopikol/blabla.php?id='+id);
}

function help(){
	popup('/kopikol/help.php', 500, 560);
}

function popup(lien, large, haut) {
    largeur_fenetre = (large) ? large : 400;
    hauteur_fenetre = (haut) ? haut : 500;

    var li_largeur_ecran=screen.width
    var li_hauteur_ecran=screen.height

    var li_pos_left=Math.round((li_largeur_ecran/2)-(largeur_fenetre/2))
    var li_pos_top=Math.round((li_hauteur_ecran/2)-(hauteur_fenetre/2))

    popupBla = window.open(lien,"Commentaire","status=1,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0, left=" + li_pos_left + ",top=" + li_pos_top + ",width=" + largeur_fenetre + ",height=" + hauteur_fenetre);

}

function release(kc){
	if (kc==17) {
		ctrl = false;
	}
}

function push(kc, fname) {
	if( kc==13 && ctrl ){
		ctrl=false;
		document.getElementById(fname).submit();
	}else if (kc==17 || kc==224) {
		ctrl = true;
	}else {
		ctrl=false;
	}
}

function single(elt){
	if( elt.comment.value != '' ){
		elt.Submit.disabled = true;
		return true;
	} else {
		return false;
	}
}