function wszmini() {
/*
if (msg=="_fr") {
	ms="La zone d\'affichage de votre navigateur ("+document.body.clientHeight+" pixel) est trop réduite\net ne vous permet pas une navigation convenable dans CaillouBaton.";
	ms +="\nSVP, ajustez les affichages des menus, barres des tâches,";
	ms +="\net affichage écran en 1152x864 mini.";
	}
if (msg!=="_fr") {
	ms="SORRY ! The available height of your screen is really too small ("+document.body.clientHeight+" pixel)";
	ms +="\nand does not allow a correct circulation in CaillouBaton.";
	ms +="\nPlease, adjust menubars and screen display properties (1152x864 mini).";
	}
*/
var msg_task
window.resizeTo(830,screen.availHeight);	
if (document.body.clientHeight<730) document.getElementById("szalert").style.visibility="visible";
document.getElementById("sh").value=screen.height;
document.getElementById("sw").value=screen.width;
document.getElementById("ecran").style.height=Math.floor(screen.height/5);
w_ecran=Math.floor(screen.width/5)
document.getElementById("ecran").style.width=w_ecran;
document.getElementById("sah").value=screen.availHeight;

document.getElementById("fenetre").style.height=Math.floor((screen.availHeight/5)-2);
document.getElementById("fenetre").style.width=Math.floor(w_ecran/4*3);
//document.getElementById("wh").value=window.outerHeight;
document.getElementById("wch").value=document.body.clientHeight;
document.getElementById("fenetre_u").style.marginTop=Math.floor(-(document.body.clientHeight/5));
document.getElementById("fenetre_u").style.height=Math.floor((document.body.clientHeight/5)-2);
if (screen.availHeight<screen.height) {
h_task=screen.height-screen.availHeight
document.getElementById("task").style.visibility="inherit";
document.getElementById("task").style.marginTop=Math.floor(-(h_task/5)+1);
document.getElementById("task").style.height=Math.floor(h_task/5);
document.getElementById("htask").value=h_task;
document.getElementById("msgtask").style.visibility="inherit";
}
}

function cover(name) {
document.getElementById(name).style.visibility="hidden";
}
function see(name) {
document.getElementById(name).style.visibility="visible";
}
function seetable(name,visi) {
document.getElementById(name).style.display=visi;
}

function prcs(){
	document.getElementById("titre").value="0";
	document.getElementById("desc").value="0";
	document.getElementById("chstr").value="";
	document.getElementById("titre").checked=false;
	document.getElementById("desc").checked=false;
}

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 fheight(elem){
document.getElementById("sch").value=window.document.body.offsetHeight;
if (elem) {
document.getElementById(elem).value=window.document.body.offsetHeight;
}
}

/*
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+80);\n");
w.document.write( "else if(NN6) self.sizeToContent();\n");
w.document.write( "else window.resizeTo(document.images[0].width+30,document.images[0].height+30);\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( "<div style='position: absolute; width: 200px; left: 2px; top: 2px; height: 20px; z-index: 3; visibility: visible;'>" );
w.document.write( "<table><tr><td><font color='white' face='verdana' size='1'>"+minfo+"</font></td></tr></table></div>" );
w.document.write( "<div style='position: absolute; width: 200px; left: 3px; top: 3px; height: 20px; z-index: 2; visibility: visible;'>" );
w.document.write( "<table><tr><td><font face='verdana' size='1'>"+minfo+"</font></td></tr></table></div>" );
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();
}
function ferme()
{
if (ww) ww.close();
ww = null;
}

function supprime(isup,page,parpage,typ_prod,sfamille,tri,filtre) 
{
if (confirm('Souhaitez vous supprimer ce produit?')) {
document.location="suppr_prod.asp?id="+ isup +"&pg="+ page +"&parpage="+ parpage +"&typ_prod="+ typ_prod +"&sfamille="+ sfamille +"&tri=" +tri +"&filtre=" +filtre
} 
}

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 seelaycountry(val1,val2,val3) {
/*alert("la valeur saisie est : " + val1 +" \n la couche est : "+ val2);*/
if (val1=="d_diff")
	{
	see(val2);cover(val3);
	}
else	{
	see(val3);cover(val2);
	}
}

function cleancountry(nform,nfield) {
document.nform.nfield.value= '';
}

function checkl(val,orig,dest) {
strl=document.getElementById(orig).value.length
if (parseInt(strl) > parseInt(val)) 
{
document.getElementById(dest).value = "chaine trop longue";
document.getElementById(dest).style.color="#FF661C";
document.getElementById(dest).style.fontWeight="bold";
}
else
{
document.getElementById(dest).value = parseInt(val-strl) +" car. restant";
document.getElementById(dest).style.color="#9BBD24";
}
}

function bgcol(col,nc,el){
if (col==null){col="#FFAA5E";}
document.bgColor=col;
for (i=1; i<=nc; i++) 
	{
	(document.getElementById("col"+i).name==el) ? document.getElementById("col"+i).style.borderColor="black" : document.getElementById("col"+i).style.borderColor=col
	}
}
