// JavaScript Document
function popup(id,p) {
window.open("/pop.php?id="+id+"&type="+p+"", "dp"+id+"", "height=780,width=980,top=10,left=20,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,titlebar=no");	
}

function validsend(txt, url) {
	validadp = confirm(txt);
	if (validadp==true)
	{
		window.location.href=url;
	}
}
function switchdiv(div) 
{
status=document.getElementById(div).style.visibility;
	if (status == "hidden")
	{ 
	
		document.getElementById(div).style.visibility="visible";
		document.getElementById(div).style.height="100%";
		document.getElementById(div).height="100%";
	}
	if (status == "visible")
	{ 
		document.getElementById(div).style.visibility="hidden";
		document.getElementById(div).style.height="0";
		document.getElementById(div).height="0px";
	}
	
}



function closediv(div) 
{
	document.getElementById(div).style.visibility="hidden";
	document.getElementById(div).style.height="0";
	document.getElementById(div).height="0px";
}
function divtxt(pdt, txt) {
document.getElementById(''+pdt+'').innerHTML=''+txt+'';
}
function supprverif(div, id)
{
	var muche="<img src=\"/str/dp_sup.gif\" alt=\"supprimer ?\" title=\"supprimer ?\" border=\"0\"><br><br>";
	var truc="<a href=\"?quid=book&action=delete&id="+id+"\"><img src=\"/str/dp_ok.gif\" alt=\"certes, oui\" title=\"certes, oui\" border=\"0\"></a><br><a onclick=divtxt('"+div+"','"+muche+"');><img src=\"/str/dp_ko.gif\" alt=\"certainement pas\" title=\"certainement pas\" border=\"0\"></a>";
	if (document.getElementById(''+div+'').innerHTML == truc)
	{
		divtxt(div, muche);
	}
	if (document.getElementById(''+div+'').innerHTML == muche)
	{
		divtxt(div, truc);
	}
}
function copydiv(div, div2, vid, vid2)
{
	var truc=""+document.getElementById(div).innerHTML+"";
	var muche=""+document.getElementById(div2).innerHTML+"";
	document.getElementById(div).innerHTML=''+muche+'';
	document.getElementById(div2).innerHTML=''+truc+'';
	var truc2=""+document.getElementById(vid).innerHTML+"";
	var muche2=""+document.getElementById(vid2).innerHTML+"";
	document.getElementById(vid).innerHTML=''+muche2+'';
	document.getElementById(vid2).innerHTML=''+truc2+'';
}