var transgoogle=0
var strurl=""
function detrefer()
{
/*document.getElementById("strrefer").value=document.referrer;
document.getElementById("strurl").value=document.location.href;
strurl=document.location.href;
newstrurl=strurl+"&djt=1"
wis=strurl.indexOf("translate");
dejatraduit=strurl.indexOf("djt=1")
document.getElementById("wis").value=wis;
document.getElementById("dejatraduit").value=dejatraduit;

document.getElementById("strurl").value=newstrurl;

if ((wis>0)&&(dejatraduit<0))  window.open(newstrurl,"_top","");

*/}


var atn=0;
var hwn=0;
var wwn=0;
var nomnav="";

function detnav() {
if (navigator.appName == "Microsoft Internet Explorer") {
	hwn=window.document.body.offsetHeight;
	wwn=window.document.body.offsetWidth;
}
else	{
	hwn=window.innerHeight;
	wwn=window.innerWidth;
}
}

function caractnav() {
//document.getElementById("val_nav").value=navigator.appName;
//document.getElementById("val_sys").value=navigator.platform;
//document.getElementById("val_wsc").value=screen.availWidth
//document.getElementById("val_hsc").value=screen.availHeight;
//document.getElementById("val_wwn").value=wwn
document.getElementById("val_hwn").value=hwn;
//window.resizeTo(1024,screen.availHeight);
//window.moveTo(0,0);
}

function lrsz(nom,arg,val) {
document.getElementById(nom).style.arg=val;
//document.getElementById("val"+nom).value=val;
}

function lhrsz(nom,val) {
document.getElementById(nom).style.height=hwn-val;
}

function lwrsz(nom,vright,vleft) {
if (wwn>1024)
	{
	document.getElementById(nom).style.left=wwn-vright;
	}
else	{
	document.getElementById(nom).style.left=wwn-vleft;
	}
}

function fheight(elem,marg)
{
if (navigator.appName == "Microsoft Internet Explorer")
	{
	nomnav="ffox";
	hwn=window.document.body.offsetHeight;
	wwn=window.document.body.offsetWidth;
	}
else	{
	nomnav="iexp";
	hwn=window.innerHeight;
	wwn=window.innerWidth;
	}

helem=hwn-marg;
if (helem<580) helem=580;

if (elem)
	{
	document.getElementById(elem).style.height=helem;
	}

//	if (document.getElementById("laybottom"))
//	{
//	document.getElementById("laybottom").style.top=helem;
//	document.getElementById("val_helem").value=helem;
//	}
}

function ltop()
{
document.getElementById("laybottom").style.top=hwn+document.body.scrollTop;
}

function wcookie() {
document.cookie="wwind"+"="+escape(wwn)
document.cookie="hwind"+"="+escape(hwn)
document.cookie="wscr"+"="+escape(screen.availWidth)
document.cookie="hscr"+"="+escape(screen.availHeight)
}

function cover(name) {
document.getElementById(name).style.visibility="hidden";
}

function see(name) {
document.getElementById(name).style.visibility="visible";
}

function dislay(name,visi) {
document.getElementById(name).style.display=visi;
}

function seetable(name,visi) {
document.getElementById(name).style.display=visi;
}

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
}

function rockcol(cid,col1,col2) {
document.getElementById(cid).style.backgroundColor = col1;
document.getElementById(cid).style.color = col2;
}

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;
}


function addfav(ptit,purl) {
document.getElementById("nomnavigateur").value=navigator.userAgent;
if (navigator.userAgent.search("Gecko")>0) {
window.sidebar.addPanel(ptit,purl,"");
}
else {
window.external.AddFavorite(purl,ptit);
}
}

var oo=null
var x= null
var y= null

function pageopen(nom,id,tgt,tit,rub){
window.open(nom+"?pid="+id+"&tit="+tit+"&idr="+rub,tgt,"");
oo=1
}

function movelay(nlay,arg,npx){
if (arg=="top") document.getElementById(nlay).style.top=npx;
if (arg=="zIndex") document.getElementById(nlay).style.zIndex=npx;
}

function videoopen(id){
window.open("flashvideo.asp?p_img="+id,"video","");
}

function seecatalogue() {
if ((y>500) && (oo=1)) {
document.getElementById("lay_catalogue").style.zIndex="1000";
}
else {
document.getElementById("lay_catalogue").style.zIndex="1";
}
document.getElementById("var_x").value=x;
document.getElementById("var_y").value=y;
document.getElementById("var_oo").value=oo;
}

function seeobj(obja,vala,objb,val1,val2) {
if (document.getElementById(obja).value==vala)
	{
	document.getElementById(objb).style.display=val1;
	}
else
	{
	document.getElementById(objb).style.display=val2;
	}
}

//****************************************************************************SEEFEL


function popimg(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();' onContextMenu='return false;'> \n");
w.document.write( "<a href='javascript:window.close();'><img src='"+mpict+"' border=0 alt='cliquer ici pour fermer' \n");
w.document.write( " onselectstart='return false' oncontextmenu='return false' ondragstart='return false'></a> \n");
w.document.write( " <span style='font-size:10px;font-family:verdana;color:gray;'><i>cliquez sur l''image pour fermer le popup</i> \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();
}

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(idw)
{
if (ww) ww.close(idw);
ww = null;
}

function supprime(page,isup,retour) 
{
if (confirm('Souhaitez vous supprimer cet élément ?')) {
document.location=page +"?id="+ isup +"&ret="+ retour
} 
}

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
	}
}


function redir(lien,param1,param2) {
document.location.href=lien+param1+param2;
}

function distab(targ,stat) {
document.getElementById(targ).style.display=stat;
}

function distaball(n,stat) {
for (i=0;i<n;i++) {
lay="detj"+i;
document.getElementById(lay).style.display=stat;
}
}

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="#60BE01";
	}
}

function ntaken(max,r) {
nom=document.getElementById("image"+r).value;

for (i=0;i<max;i++) 
{
if ((i!=r)&&(document.getElementById("image"+i).value=nom))
	{
	document.getElementById("nompris").value="nom déjà utilisé : veuillez en choisir un autre SVP";
	document.getElementById("butmaj").style.display="none";
	}
else	{
	document.getElementById("nompris").value="";
	document.getElementById("butmaj").style.display="block";
	}
}

document.getElementById("modifencours").value=nom;
}

nbp=0;
function selbut(nbh,nhead,nbp,ipage,nimg)
{
nimg="url(images/"+nimg+")"
//document.getElementById("nbhvalue").value=nbh;
//document.getElementById("nheadvalue").value=nhead;
//document.getElementById("nbpvalue").value=nbp;
//document.getElementById("ipagevalue").value=ipage;
//document.getElementById("nimgvalue").value=nimg;

for (i=0;i<=nbp;i++)
	{
	if (document.getElementById("lpage"+i).name==ipage)
		{
		document.getElementById("lpage"+i).style.backgroundImage="url(images/trans.gif)";
		}
	else
		{
		document.getElementById("lpage"+i).style.backgroundImage=nimg;
		}
	}
for (j=0;j<nbh;j++)
	{
	if (document.getElementById("h"+j).name==nhead)
		{
		document.getElementById("h"+j).style.backgroundImage="url(images/trans.gif)";
		}
	else
		{
		document.getElementById("h"+j).style.backgroundImage=nimg;
		}
	}
}



