function Span_Inner(wid,txt,wparent)
{
 if (wparent==1)
 {
 if (parent.document.getElementById)
    {
    parent.document.getElementById(wid).innerHTML = txt;
    }
  else if (parent.document.all)
    {
    parent.document.all[wid].innerHTML = txt;
    }
 }
 else
 {
  if (document.getElementById)
    {
    document.getElementById(wid).innerHTML = txt;
    }
  else if (document.all)
    {
    document.all[wid].innerHTML = txt;
    }
 }
}


function Refresh_PX (cpro,cgrp,cqte,cid)
{

 var vqte;
 var vpro;
 vqte=Get_Value(cqte);
 vpro=Get_Value(cpro);

 VALIDEPRO.location.replace('/cgi-bin/change_px.pl?ID='+cid+'&CPROD='+vpro+'&QTE='+vqte+'&GRP='+cgrp);
}

function ADD_CART (cpro,cqte,cid)
{

 var vqte;
 var vpro;
 vqte=Get_Value(cqte);
 vpro=Get_Value(cpro);
 VALIDEPRO.location.replace('/cgi-bin/majoutprod.pl?ID='+cid+'&CPROD='+vpro+'&QTE='+vqte);
}

function Get_Value(wid)
{ 
  var wreturn;
  if (document.getElementById)
    {
    wreturn=document.getElementById(wid).value;
    }
  else if (document.all)
    {
    wreturn=document.all[wid].value;
    }
 return wreturn;
}

function Get_Value_Parent(wid)
{ 
  var wreturn;
  if (parent.document.getElementById)
    {
    wreturn=parent.document.getElementById(wid).value;
    }
  else if (parent.document.all)
    {
    wreturn=parent.document.all[wid].value;
    }
 return wreturn;
}



function montre(id) {
if (document.getElementById) {
document.getElementById(id).style.display="block";
} else if (document.all) {
document.all[id].style.display="block";
} else if (document.layers) {
document.layers[id].display="block";
}
}

function cache(id) {
if (document.getElementById) {
document.getElementById(id).style.display="none";
} else if (document.all) {
document.all[id].style.display="none";
} else if (document.layers) {
document.layers[id].display="none";
}
}

function switchvis(id)
{
var flgcache=0;
if (document.getElementById) 
 {
   if (document.getElementById(id).style.display=="block")
	{
		flgcache=1;
	}
 } 
else if (document.all) 
 {
	alert("2");
	if (document.all[id].style.display=="block")
	{
	  flgcache=1;
	}
 } 
else if (document.layers) 
 {
	alert("3");
	if (document.layers[id].display=="block")
	{
	 flgcache=1;
	}
 }

if (flgcache)
{
 cache(id);
}
else
{
 montre(id);
}

}

function OpenWind(valeur)
{
 fenetre=window.open(valeur,"Recap","top=0,left=300,width=700,height=460,directories=no,toolbar=no,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes");	
}


