
function cover(name) {
document.getElementById(name).style.visibility="hidden";
}
function see(name) {
document.getElementById(name).style.visibility="visible";
}

if (!document.getElementById){
document.write("<FONT face=\"verdana, helvetica\" size=1 color=black >Votre navigateur ne supporte pas le langage DHTML officiel.")
document.write("<BR>Merci d'utiliser Internet Explorer 5 ou plus ou Netscape 6.<BR><\/FONT>");
}

/*
function clicie() {
if ((event.button==2)||(event.button==3)) {
alert("The content of this site is wholeness protected by copyright, trademark rights and database rights.");
alert("No reproduction possible without the consent of the relevant owner.");
}
}
function clicns(e){
if(e.which==3){
alert("The content of this site is wholeness protected by copyright, trademark rights and database rights.");
alert("No reproduction possible without the consent of the relevant owner.");
return false;
}
}
if (document.all) {	document.onmousedown=clicie;}
if (document.layers) {document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clicns;}
if (window.sidebar) {document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clicns;}
*/

function resizePopUp(mpict, mtit, minfo)
{
w = window.open('','chargement','width=10,height=10,top=0,left=0');
w.document.write( "<html><head><title>"+mtit+"</title>\n" );
w.document.write( "<script language='JavaScript'>\n");
w.document.write( "IE5=NN4=NN6=false;\n");
w.document.write( "if(document.all)IE5=true;\n");
w.document.write( "else if(document.getElementById)NN6=true;\n");
w.document.write( "else if(document.layers)NN4=true;\n");
w.document.write( "function autoSize() {\n");
w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31);\n");
w.document.write( "else if(NN6) self.sizeToContent();\n");
w.document.write( "else window.resizeTo(document.images[0].width+20,document.images[0].height+40);\n");
w.document.write( "self.focus();\n");
w.document.write( "}\n</scri");
w.document.write( "pt>\n");
w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'> \n");
w.document.write( "<a href='javascript:window.close();'><img src='"+mpict+"' border=0 alt='cliquer ici pour fermer'></a> \n");
w.document.write( "</body></html>" );
w.document.close();
}


function changeCouleur(cellule,couleurFond) {
cellule.style.backgroundColor = couleurFond;
}

function coverp(name,info) {
document.getElementById(name).style.visibility="hidden";
}

function seep(name,info) {
document.getElementById(name).style.visibility="visible";
document.all.infoprod.innerHTML= info
}

var ww = null;
function popps(page,fenetre,largeur,hauteur,ratt,ratl,options)
{
var top = (screen.height-hauteur-17)*ratt;
var left = (screen.width-largeur-17)*ratl;
ww = window.open(page,fenetre,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
ww.focus(fenetre);
}
function ferme()
{
if (ww) ww.close();
ww = null;
}

function supprime(isup,actif) 
{
if (confirm('Souhaitez vous supprimer ce produit?')) {
document.location="suppr_prod.asp?pid="+ isup +"&actif="+ actif
} 
}

function actualise(iact,page,parpage,typ_prod,sfamille,tri,filtre,refprod)
{
document.location="list_prod.asp?id="+ iact +"&pg="+ page +"&parpage="+ parpage +"&typ_prod="+ typ_prod +"&sfamille="+ sfamille +"&tri=" +tri +"&filtre=" +filtre+ "&refprod=" +refprod+ "#but"
} 

pv=0
pu=0
qte=0

function Calculprix(formulaire) {
pu=parseFloat(formulaire.pu.value);	
qte=parseInt(formulaire.qte.value);
pcalcul=pu*100
formulaire.pv.value=pcalcul/100;
formulaire.resultat.value=parseFloat(pcalcul*qte/100);
resultat=formulaire.resultat.value;
}


function addcaddy(choix,fam,refsfam,sfam,num,page,delai,coeff)
{
if (qte<1) 
{
document.getElementById("msgqte").style.visibility="visible";
}
else
{
document.getElementById("msgqte").style.visibility="hidden";
document.location="addcaddy.asp?reffam="+choix+"&fam="+fam+"&refsfam="+refsfam+"&sfam="+sfam+"&num="+num+"&page="+page+"&qte="+qte+"&delai="+delai+"&coeff="+coeff;
}
}

function transcompte(choix,fam,refsfam,sfam,num,page)
{
document.location="compte.asp?reffam="+choix+"&fam="+fam+"&refsfam="+refsfam+"&sfam="+sfam+"&num="+num+"&page="+page
}

var f1=null;
var f2=null;
var f3=null;
var f4=null;

function ow(urlp,xy){
var wl=parseInt(screen.availWidth/2);
var wh=parseInt(screen.availHeight/2);
var opt="menubar=no,toolbar=no, locationbar=no, scrollbars=no";
if (xy==1){
x0=0;
y0=0;
f1=window.open(urlp,xy, opt);
f1.resizeTo(wl,wh);
f1.moveTo(x0,y0);
}
if (xy==2){
x0=parseInt(screen.availWidth/2);
y0=0;
f2=window.open(urlp,xy, opt);
f2.resizeTo(wl,wh);
f2.moveTo(x0,y0);
}
if (xy==3){
x0=0;
y0=parseInt(screen.availHeight/2);
f3=window.open(urlp,xy, opt);
f3.resizeTo(wl,wh);
f3.moveTo(x0,y0);
}
if (xy==4){
x0=parseInt(screen.availWidth/2);
y0=parseInt(screen.availHeight/2);
f4=window.open(urlp,xy, opt);
f4.resizeTo(wl,wh);
f4.moveTo(x0,y0);
}
}

function wrs(){
window.resizeTo(screen.availWidth/2,screen.availHeight/2);
window.moveTo(screen.availWidth/2,screen.availHeight/2);
}

function wc(){
f1.close();
f2.close();
f3.close();
f4.close();
}

function redim_planning() {
window.moveTo(0,screen.availHeight/2);
window.resizeTo(screen.availWidth,350);
}

function bgcol(col){
if (col==null){col="#DDEBF0";}
document.bgColor=col;
}