///
		

ns4 = (document.layers)? true:false
	ie4 = (document.getElementById)? true:false
	if (ie4) { 
		if (navigator.userAgent.indexOf('MSIE 5')>0) {
			ie5 = true;};}
	else {ie5=false}
	if(navigator.userAgent.indexOf('Gecko')>0){moz=true;}
	else{moz=false}
		if(navigator.userAgent.indexOf('Netscape6')>0){ns6=true;}
		else{ns6=false};
	isMac = (navigator.userAgent.indexOf('Mac') != -1)?true:false;

if(navigator.userAgent.indexOf('Netscape/7')>0){ns6=true;ns7=true;ie5=false;}
	else{ns6=false;ns7=false;}
	 if(navigator.userAgent.indexOf('Gecko')>0){moz=true;ie5=false;}
	else{moz=false;}

//nav = navigator.appName.substring(0,3);
	nav = navigator.appName;
	agent = navigator.userAgent;
	platform = navigator.platform;
	ver = navigator.appVersion.substring(0,1);
	

function doXMLHTTP(){
		var xhr_object = null;
		if(window.XMLHttpRequest){ // Firefox
		   //alert("XMLHttpRequest");
		   xhr_object = new XMLHttpRequest();
		   }
		else if(window.ActiveXObject){ // Internet Explorer
		   //alert("Microsoft.XMLHTTP");
		   xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
		   }
		else { // XMLHttpRequest non supporté par le navigateur
		   //alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		   return;
		   //xhr_object ='00';
		  }
		
		return(xhr_object);
		
}


function getsession(){
	 xhr_object=doXMLHTTP(); //http://localhost/mateo/myV52/index_getlogin.php
	if(!xhr_object){document.getElementById("dyn_userbox").style.visibility='visible';return;}
else{	 		
xhr_object.open("POST", ajax_login_file, true);
			 xhr_object.onreadystatechange = function() {
		      if(xhr_object.readyState == 4)
							//usersession='';
		         //eval un retour de JS
		        if(eval(xhr_object.responseText)){}else{usersession='';};
		         //document.loginbox.userid.value=usersession;
		         if(usersession!=''){show_userbox(useridref,usersession,username,s); }
		         else{document.getElementById("dyn_userbox").style.visibility='visible'; }
		         //alert(xhr_object.responseText);
		         //document.getElementById("sessiontd").innerHTML=xhr_object.responseText
		   }
		
		   xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		  // var data = "family="+escape(l1.options[index].value)+"&form="+f.name+"&select=list2";
		  var data = "";
		   xhr_object.send(data);
 }		
}
function getcartcount(){
	 xhr_object=doXMLHTTP(); 
	if(!xhr_object){}//document.getElementById("dyn_userbox").style.visibility='visible';return;}
else{	 		
xhr_object.open("POST", ajax_login_file, true);
			 xhr_object.onreadystatechange = function() {
		      if(xhr_object.readyState == 4)
						ncadie=0;
					if(eval(xhr_object.responseText)){}else{ncadie=0;};
		         //alert(xhr_object.responseText);
		         if(ncadie!=0){jsncadie=ncadie; }
		         else{jsncadie=0;}
		         //	alert(xhr_object.responseText);alert(jsncadie);
		         //	alert(jsncadie+' //  '+document.getElementById("imgcountcart").src+' -> '+ajax_imgurl+'PC_viewcart_'+jsncadie+'_'+jslang+'.jpg');
		         //document.getElementById("imgcountcart").src=ajax_imgurl+"PC_viewcart_"+jsncadie+"_"+jslang+".jpg";
		         document.getElementById("fontcountcart").innerHTML=jsncadie;
		   }
		xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		  var data = "";
		   xhr_object.send(data);
 }		
}
function autoevalcurr(){
	xhr_object=doXMLHTTP(); //http://localhost/mateo/myV52/index_getlogin.php
 if(!xhr_object){return;}
 else{
	xhr_object2.open("POST", "autocurr.php", true);
			 xhr_object2.onreadystatechange = function() {
		      if(xhr_object2.readyState == 4)
						eval(xhr_object2.responseText);
		          //alert(mailTo);
		   }
		xhr_object2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		   var data = "";
		   xhr_object2.send(data);
 }
}

function jsautomail(valmail){
	 xhr_object2=doXMLHTTP(); 
	if(!xhr_object2){window.open('automail.php?'+valmail,'','');return;}
  else{
	 xhr_object2.open("POST", ajax_mail_file, true);
			 xhr_object2.onreadystatechange = function() {
		      if(xhr_object2.readyState == 4)
						eval(xhr_object2.responseText);
		          alert(mailTo);
		   }
		xhr_object2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		   var data = "valmail="+escape(valmail);
		   xhr_object2.send(data);
 }
}
////////////////////////////
///fct fullsearch/////
seltab='';vis=0;
function showtab(vis,tabnum){
	if(vis==0){
        	 if(tabnum!=''){
      eval('tmpsrc=document.getElementById("imgtab_'+tabnum+'").src');
      tmpsrcON=tmpsrc.replace(/_ON.gif/g,".gif");
      tmpsrcON=tmpsrcON.replace(/_ON.jpg/g,".jpg");
      tmpsrcON=tmpsrcON.replace(/_ON_ON.jpg/g,".jpg");
      eval('document.getElementById("imgtab_'+tabnum+'").src=tmpsrcON');
         }
       }
         else if(vis==1){
      eval('tmpsrc=document.getElementById("imgtab_'+tabnum+'").src');
      tmpsrcON=tmpsrc.replace(/.gif/g,"_ON.gif");
      tmpsrcON=tmpsrcON.replace(/.jpg/g,"_ON.jpg");
      tmpsrcON=tmpsrcON.replace(/_ON_ON.jpg/g,"_ON.jpg");
      eval('document.getElementById("imgtab_'+tabnum+'").src=tmpsrcON');
           	}
 }
     function clicktab(tabnum){
     	seltab=tabnum;
	   for(i=1;i<=7;i++){
	   	 if(i!=tabnum){
	      eval('tmpsrc=document.getElementById("imgtab_'+i+'").src');
       tmpsrcOff=tmpsrc.replace(/_ON.gif/g,".gif");
       tmpsrcOff=tmpsrcOff.replace(/_ON.jpg/g,".jpg");
       eval('document.getElementById("imgtab_'+i+'").src=tmpsrcOff');
        }
       }
      eval('tmpsrc=document.getElementById("imgtab_'+tabnum+'").src');
      tmpsrcON=tmpsrc.replace(/_ON.gif/g,"_ON.gif");
      tmpsrcON=tmpsrcON.replace(/_ON.jpg/g,"_ON.jpg");
     eval('document.getElementById(\'search_hid_1\').value=hid_'+tabnum);
      eval('document.getElementById(\'search_hid_2\').value=hid2_'+tabnum);
      eval('document.fullsearch.action=action_'+tabnum);
      eval('document.getElementById("tabbedsearch").innerHTML=searchHTML_'+tabnum);
    }
    
 function searchsubmit(){
    if(document.fullsearch.action=="glb_search.php"){
    		    newtext=document.fullsearch.text_search.value;
    		    location=('RH.php?type=search&incl=glb_search.php&text_search='+newtext+'&lang=$lang'); 
      	 	}
    	else{ 
    		   if(document.fullsearch.Shid2.value=='multicrit'){}
    		   else{ ttext=document.fullsearch.text_search.value;
   				  	newtextY =newtextX.replace(/%/g,"_pc_");
      	      newtextY =newtextY.replace(/_pc_20/g,"___");
    		      document.fullsearch.text_search.value=newtextY; }
    		   document.fullsearch.submit();
    		}
   }


////////////////////////////



function onload_cookie(){
	  if(cookie_val1 !="" && cookie_val2 !="" && cookie_val1 !=null && cookie_val2 !=null){
		//alert(cookie_val1+' / '+cookie_val2);
		top.hidden_frame2.location=('checklogin.php?userid='+cookie_val1+'&userpass='+cookie_val2+'&lang='+cookie_val3);}
	}
	
function onload_ordercookie(){
	//alert('onload_ordercookie '+cookie_order+'  '+cookie_orderid);
  if(cookie_order !="" && cookie_orderid !="" && cookie_order !=null && cookie_orderid !=null){
		location=('cart_cookie.php?act=updt&id='+cookie_order+'&oldsess='+cookie_orderid);}
	}
function getCookieVal (offset) { 
var endstr = document.cookie.indexOf (";", offset); 
if (endstr == -1) 
endstr = document.cookie.length; 
return unescape(document.cookie.substring(offset, endstr)); } 

function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; } 
return null; } 

// CAFE NOIR

function setnewlang2(newlang2){
   	mainhref=top.location;
	  isindex=mainhref.toString().split('?');
	 if(!isindex[1] || isindex[1]=='' || 
	 /* CAFE NOIR 25 10 2007 */
	 /*mainhref=='index.php'){location=(mainhref+'?lang='+newlang2);}*/
	mainhref=='index.php'){location=('RH.php?lang='+newlang2);}
	else{//mainhrefREG=new RegExp("lang=[a-z][a-z]","i");
		  //mainhref=mainhref.replace(mainhrefREG,"")  // .replace(/"lang="/g,"");  // .replace(/px/g,"");
	  	     location=(mainhref+'&lang='+newlang2);};
	}
// CAFE NOIR essai de traduction
function setnewlang3(newlang2){
   	mainhref=top.location;
	  isindex=mainhref.toString().split('?');
	 if(!isindex[1] || isindex[1]=='' || mainhref=='index.php' || newlang2=='en'){
	 /* CAFE NOIR 25 10 2007 */
	 /*location=(mainhref+'?lang='+newlang2);}*/
	/*location=('RH.php?lang='+newlang2);}*/
	location=('gift_for_men.htm');
	}
	if(!isindex[1] || isindex[1]=='' || mainhref=='index.php' || newlang2=='fr'){
	 /* CAFE NOIR 25 10 2007 */
	 /*{location=(mainhref+'?lang='+newlang2);}*/
	/*location=('RH.php?lang='+newlang2);}*/
	location=('cadeau_pour_homme.htm');
	}
	else{//mainhrefREG=new RegExp("lang=[a-z][a-z]","i");
		  //mainhref=mainhref.replace(mainhrefREG,"")  // .replace(/"lang="/g,"");  // .replace(/px/g,"");
	  	     location=(mainhref+'&lang='+newlang2);};
	}
	
 function setnewlang(){
	  newlang=document.getElementById("lang").options[document.getElementById("lang").selectedIndex].value;
	  mainhref=top.location;
	  isindex=mainhref.toString().split('?');
	 if(!isindex[1] || isindex[1]=='' || mainhref=='index.php'){location=(mainhref+'?lang='+newlang);}
	  else{location=(mainhref+'&lang='+newlang);};
	}
	

function consultgo(){ //onchange de la liste select des dernieres elet visité
      newconsult=document.getElementById("conslist").options[document.getElementById("conslist").selectedIndex].value;
			ocation=('RH.php?type=products&idref='+newconsult+'&lang=$lang');
		}
function consultgo2(){
		newconsult2=document.getElementById("conslist2").options[document.getElementById("conslist2").selectedIndex].value;
	 if(newconsult2=='namedselect=selection1&stype=usersel' || newconsult2.substring(0,6)=='search'){
	 	   location=('prod_type.php?type=products&'+newconsult2+'&user=$useridref&lang=$lang');}
	 else{location=('RH.php?type=products&'+newconsult2+'&lang=$lang');}
		}
       								
function popup_win(){
	  popup_win=window.open("popup.php?imgdir=$imgdir","popup_win","status=no,location=no,menubar=no,resizable=no,toolbar=no,alwaysRaised,width=429,height=312");
	  }

function submit_login(){
	document.loginbox.submit();}
	
function searchloginpress(e){
	if (!e) e = window.event;
 	  charE = e['keyCode'];
 	if(charE == 13) {submit_login();}
    return true;
}

function glb_search(){
		if (document.getElementById('text_search').value !=""){
      ttext=document.getElementById('text_search').value;
     if(ttext.length<=2){alert('le mot-clé doit comporter au moins 3 caractères \\n \\n \\n text search must be at least 3 character');}
      else{
      	search_select="0";
        newtext0=escape(ttext);//escape(ttext.toLowerCase());
      	 newtext =newtext0.replace(/%/g,"_pc_");
      	 newtext =newtext.replace(/_pc_20/g,"___");
      	  /*newtext = ttext.replace(/ê/g,"_pc_EA");
      	  newtext = ttext.replace(/é/g,"_pc_E9");
      	  newtext = ttext.replace(/è/g,"_pc_E8");
      	  newtext = ttext.replace(/&agrave;/g,"_pc_E0");
      	  newtext = ttext.replace(/ç/g,"_pc_E9");
 					newtext = ttext.replace(/ë/g,"_pc_EB");
      	  newtext = ttext.replace(/î/g,"_pc_EE");
      	  newtext = ttext.replace(/â/g,"_pc_E2");
      	  newtext = ttext.replace(/ö/g,"_pc_F6");
      	  newtext = ttext.replace(/&/g,"_pc_26");
      	  newtext = ttext.replace(/'/g,"_pc_27");
      	  newtext = ttext.replace(/"/g,"_pc_22");
      	 */ 
      		if( search_select=="1"){addsearchurl="&car=1";}
      	   else if( search_select=="2"){addsearchurl="&car=2";}
      	   else{addsearchurl="";}
      	 if(search_select=="0" || search_select=="1" || search_select=="2"){
      	   location=('RH.php?type=products&stype=search&text_search='+newtext+''+addsearchurl+'&lang=".$lang."'); 
      	  }
      	 else{ 
      	 	 location=('RH.php?type=search&incl=glb_search.php&text_search='+newtext+'&lang=".$lang."'); 
      	 	 }
      };
    }
 }
 function searchkeypress(e){
 	if (!e) e = window.event;
 	   charE = e['keyCode'];
 	 if(charE == 13) {
   if (document.getElementById('text_search').value !=""){
     ttext=document.getElementById('text_search').value;
   if(ttext.length<=2){alert('le mot-clé doit comporter au moins 3 caractères \\n \\n \\n text search must be at least 3 character');}
      else{ 
      	search_select="0";
        newtext0=escape(ttext);//escape(ttext.toLowerCase());
      	 newtext =newtext0.replace(/%/g,"_pc_");
      	newtext =newtext.replace(/_pc_20/g,"___");
      	if( search_select=="1"){addsearchurl="&car=1";}
      	   else if( search_select=="2"){addsearchurl="&car=2";}
      	   else{addsearchurl="";}
      	 if(search_select=="0" || search_select=="1" || search_select=="2"){
      	   document.searchform.action='RH.php';
					 document.getElementById('text_search').value=(newtext+''+addsearchurl);
					 document.searchform.submit();
      	     //location=('RH.php?type=products&stype=search&text_search='+newtext+''+addsearchurl+'&lang=".$lang."'); 
      	  }
      	 else{ 
      	 	 location=('RH.php?type=search&incl=glb_search.php&text_search='+newtext+'&lang=".$lang."'); 
      	 	 }
       };
    }
  }
 return true;
}   
   
colorcell_0='white';
colorcell_1='50b7a6';
function colorcell(rownum){
 eval('document.getElementById("table'+rownum+'").style.backgroundColor=colorcell_1');
 }
function clearcell(rownum){
eval('document.getElementById("table'+rownum+'").style.backgroundColor=colorcell_0');
  }
	
	function linkvoid(){
return true;
}

function reloader(){
  window.clearTimeout(rld_time);
  //alert('<? echo"$L_autodisconnect"; ?>')
  //top.location='disconnect.php';
  location.reload(true);
}	



function viewcart(){
tmpmain=location;
location='viewcart.php?url=tmpmain';
}


//function popshowtype(div,num){return true;}

	
	///////////////////:
	
subon="";
gron="";
selgron="";
function showselgr(numgr){
   if(selgron!="" ){
   	eval('document.getElementById("selgr_'+selgron+'").style.visibility="hidden";');
   	eval('document.getElementById("grlnk_'+selgron+'").style.color="blue";');
   	eval('document.getElementById("grlnk_'+selgron+'").style.backgroundColor="#666699";');
   	eval('actimg=document.getElementById("grimglnk_'+selgron+'").src;');
   	newimg=actimg.substr(0,(actimg.length-7))+actimg.substr((actimg.length-4),4);
   	//alert(newimg)
   	eval('document.getElementById("grimglnk_'+selgron+'").src="'+newimg+'";');
   	
   		}
    if(numgr!=0){eval('document.getElementById("selgr_'+numgr+'").style.visibility="visible";');
    	eval('document.getElementById("grlnk_'+numgr+'").style.color="red";');
    	eval('document.getElementById("grlnk_'+numgr+'").style.backgroundColor="white";');	
    	eval('actimg=document.getElementById("grimglnk_'+numgr+'").src;');
   	newimg=actimg.substr(0,(actimg.length-4))+'_ON'+actimg.substr((actimg.length-4),4);
   	//alert(newimg)
   	eval('document.getElementById("grimglnk_'+numgr+'").src="'+newimg+'";');
   	
    	}
    selgron=numgr;
   for(i=0;i<array_cat.length;i++){
   	//alert(array_cat[i]);
  	eval('document.getElementById("subselprod'+array_cat[i]+'").style.visibility=\"hidden\";');
  			}
     getsubselprod(numgr);
    
 }
 
function showgr(numgr){
	for(i=1;i<(array_type.length);i++){
		eval('document.getElementById("sub_type_'+array_type[i]+'").style.visibility="hidden";');
		  eval('document.getElementById("sub_type_'+array_type[i]+'").style.position="absolute";');
 		 }
	showsub('a');
	for(i=1;i<(array_cat.length);i++){ 
	    if(array_cat[i]!="a"){eval('document.getElementById("sub_catpop_'+array_cat[i]+'").style.visibility="hidden";');
	     eval('document.getElementById("sub_catpop_'+array_cat[i]+'").style.position="absolute";');}
	 }
	if(navigator.userAgent.indexOf('Netscape/7')>0){ns6=true;ns7=true;}
	else{ns6=false;ns7=false;}
	 if(navigator.userAgent.indexOf('Gecko')>0){moz=true;}
	else{moz=false;}
	//alert('gron : '+gron);
	if(gron!="" ){eval('document.getElementById("ingr_'+gron+'").style.position="absolute";');
		     eval('document.getElementById("ingr_'+gron+'").style.visibility="hidden";');
		   }
	if(numgr!=0){eval('document.getElementById("ingr_'+numgr+'").style.visibility="visible";');
	 	if(ns6==true || moz==true){eval('document.getElementById("ingr_'+numgr+'").style.position="relative";');
   			      eval('document.getElementById("ingr_'+numgr+'").style.top="-1px";');}
   	 	else{eval('document.getElementById("ingr_'+numgr+'").style.position="fixed";');}
   	      }
 	gron=numgr;
  }
 
function showsub2(numsc,numcat,url){
	if(navigator.userAgent.indexOf('Netscape/7')>0){ns6=true;ns7=true;}
	else{ns6=false;ns7=false;}
	 if(navigator.userAgent.indexOf('Gecko')>0){moz=true;}
	else{moz=false;}
	
	if(subon!=""){
		   	eval('document.getElementById("sub_type_'+subon+'").style.position="absolute";');
		   	eval('document.getElementById("sub_type_'+subon+'").style.visibility="hidden";');
		   	}
		tmpnumtype=(numsc+'_'+numcat)
		offtype=1 	
	for(i=1;i<(array_type.length);i++){
		 //alert(tmpnumtype+'  :  '+array_type[i]);
		if(array_type[i]==tmpnumtype){
		  eval('document.getElementById("sub_type_'+numsc+'_'+numcat+'").style.visibility="visible";');
		  if(ns6==true || moz==true){eval('document.getElementById("sub_type_'+numsc+'_'+numcat+'").style.position="relative";');
   			      eval('document.getElementById("sub_type_'+numsc+'_'+numcat+'").style.top="-1px";');}
   		  else{eval('document.getElementById("sub_type_'+numsc+'_'+numcat+'").style.position="fixed";');}
 		  subon=(numsc+'_'+numcat);
 		  offtype=0;break;
 		  }
 		  else{offtype=1;}
		}
	if(offtype==1 && url!="" ){location=('RH.php?type=products&'+url);}
	}
 	
 numon="";	
function showsub(numsub){
	//alert(numsub+'   '+numact);
	if(navigator.userAgent.indexOf('Netscape/7')>0){ns6=true;ns7=true;}
	else{ns6=false;ns7=false;}
	 if(navigator.userAgent.indexOf('Gecko')>0){moz=true;}
	else{moz=false;}
   if(numact!=numsub && numact!=""){eval('document.getElementById("sub_catpop_'+numact+'").style.visibility="hidden";');
	     eval('document.getElementById("sub_catpop_'+numact+'").style.position="absolute";');
	     numon=numsub;
	     prodlinkout('prod',numact);}
	     
   if(numsub!="a"){if(ns6==true || moz==true){eval('document.getElementById("sub_catpop_'+numsub+'").style.position="relative";');
   			      eval('document.getElementById("sub_catpop_'+numsub+'").style.top="-1px";');}
   		   else{eval('document.getElementById("sub_catpop_'+numsub+'").style.position="fixed";');}
 		eval('document.getElementById("sub_catpop_'+numsub+'").style.visibility="visible";');
 		//eval('document.getElementById("sub_catpop_'+numsub+'").style.left="150px";');
  		//eval('document.getElementById("sub_catpop_'+numsub+'").style.top="150px";');		alert(numsub);prodlinkon('prod',numsub);
 		numact=numsub;
 		//alert(numsub);
 		//return true;//
 		//eval('document.getElementById("sub_catpop_'+numsub+'").style.top="15px";');
 		//showsubpanne('a');
 	}		
//for(i=1;i<=<? echo"$totcats"; ?>;i++){
// 	 eval('document.getElementById("sub_catpop_'+i+'").style.visibility="hidden";');
//	   eval('document.getElementById("sub_catpop_'+i+'").style.position="absolute";');
//	     prodlinkout('prod',i); 
//	      }

}
/////////////////////////////:

	
linkcolor="";numact="";
//numsub="";
function prodlinkon(divsect,numon){
	//prodlinkout('prod',numon);
	//eval('linkcolor=document.getElementById("Acat'+divsect+''+numon+'").style.color;');
	//alert('on '+numon+'  '+numact);
	eval('document.getElementById("Acat'+divsect+''+numon+'").style.color="crimson";');}//// 
//function prodlinkon2(divsect,numon){
	//eval('linkcolor=document.getElementById("Acat'+divsect+''+numon+'").style.color;');
//	eval('document.getElementById("Acat'+divsect+''+numon+'").style.color="crimson";');}//// 
function prodlinkout(divsect,numon){
	//for(i=1;i<=<? echo"$totcats"; ?>;i++){
	 //if(i!=numon){
	 //alert(divsect+' '+numon);
	 //alert('off '+numon);
	  if(numon!=numact){  eval('document.getElementById("Acat'+divsect+''+numon+'").style.color="pink";');}
	 }
	// } 
	//}
//function prodlinkout2(divsect,numon){
//	eval('document.getElementById("Acat'+divsect+''+numon+'").style.color="pink";');}
	
function alertme(addimg1,addimg2,addurl){
//alert(addimg1+'  '+addimg2+'   '+addurl);	
document.getElementById("adimg2").src="img/ads/"+addimg1;
document.getElementById("adimg1").src="img/ads/"+addimg2;
document.getElementById("adurl1").href=addurl;
document.getElementById("adurl2").href=addurl;
}	 
 	 
//Spécifie la largeur de la banderole (en pixels)
var marqueewidth=650
//Specifie la hauteur de la banderole (en pixels, nécessaire que sous NS)
var marqueeheight=20
//Spécifie la vitesse de défilement (au plus élevé, au plus vite)
var speed=4
//Spécifie le texte de la banderole

var marqueecontents=('<font style="face:Verdana, Arial, Helvetica, sans-serif;size:2px"><b>..:: <? echo"$L_welcmarquee"; ?> ::..</b></font>')
//<? // if (!$usersession){echo"var marqueecontents='<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><b>..:: Bienvenue sur le site Officiel de Mustek France  ::..</b></font>'; ";}
   // else{echo"var marqueecontents='<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><b>..:: Bienvenue sur le site Officiel de Mustek France , <font style=\"color:red\">$usersession</font> ::..</b></font>'; ";} ?>
//if (document.all)
// <? // if($X_15 !="" && $Y_15 !="" ){ echo "document.write('<div id=\"GHPS_marquee\" style=\"position:absolute;visibility:$V_15;left:$X_15;top:$Y_15;height:$H_15;width:$W_15;z-index:$Z_15\">');";$endmarquee="</div>";}
    // echo"document.write('<marquee scrollAmount='+speed+' style=\"font-face:Verdana, Arial, Helvetica, sans-serif;font-size:10px\">'+marqueecontents+'</marquee>');";
    // echo"document.write('$endmarquee');";
//?>
function regenerate(){
///cause le reload non stop de Safari ???
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",200)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.width
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.left-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.left=marqueewidth
scrollit()
}
}

//window.onload=regenerate2

////////////////////////////////////////////:
/*
function showpop(){
	alert('on');
 if(ie4){document.getElementById('addpop0').style.visibility='visible';document.getElementById('addpop').style.visibility='hidden';}
 else{document.addpop0.visibility='visible';document.addpop.visibility='hidden';}
 }
function hidepop(){
	alert('out');
 if(ie4){document.getElementById('addpop0').style.visibility='hidden';document.getElementById('addpop').style.visibility='visible';}
 else{document.addpop0.visibility='hidden';document.addpop.visibility='visible';};
 }
 */
 
 var hidepop2;
var slidepop;
var slidepopup;

function keepshowtype(div,num){
	window.clearTimeout(hidepop2);
	window.clearInterval(slidepopup);
	window.clearInterval(slidepop);
seldiv=div;
if (num==1){ 
		eval('document.getElementById("'+div+'").style.visibility="visible";')
		slidepop=window.setInterval(popslide,downdelay);
		}

}

function hidetype(){
	window.clearInterval(slidepop);
slidepopup=window.setInterval(popslideup,updelay);
window.clearTimeout(hidepop2);
}




function popslide(){
	if(direction=="down"){eval('tmptop=document.getElementById("'+seldiv+'").style.top');}
	else if(direction=="left"){eval('tmptop=document.getElementById("'+seldiv+'").style.left');}
	if (ie4){ tmptop=tmptop.replace(/px/g,"");};
	if (ns4){   tmptop=tmptop;}; 
 	tmptop=new Number(tmptop);
  	if(stepslide>0){
  	  if((tmptop)>=(y_20+Maxdown)){window.clearInterval(slidepop);}
  	  else{   if(direction=="down"){eval('document.getElementById("'+seldiv+'").style.top='+(tmptop+stepslide)+';');}
  		else if(direction=="left"){eval('document.getElementById("'+seldiv+'").style.left='+(tmptop+stepslide)+';');}
  		};  }
  	else if(stepslide<0){
  	  if((tmptop)<=(y_20-Maxdown)){window.clearInterval(slidepop);}
  	  else{   if(direction=="down"){eval('document.getElementById("'+seldiv+'").style.top='+(tmptop+stepslide)+';');}
  		else if(direction=="left"){eval('document.getElementById("'+seldiv+'").style.left='+(tmptop+stepslide)+';');}
  		};  }
  	}
  	
function popslideup(){window.clearTimeout(hidepop2);
	if(direction=="down"){eval('tmptop2=document.getElementById("'+seldiv+'").style.top');}
	else if(direction=="left"){eval('tmptop2=document.getElementById("'+seldiv+'").style.left');}
	if (ie4){ tmptop2=tmptop2.replace(/px/g,"");};
	if (ns4){   tmptop2=tmptop2;}; 
 	tmptop2=new Number(tmptop2);
 	moveback=false;
 	if(stepslide>0){// alert(tmptop2+'   '+y_20);
	 	if(tmptop2<=(maxup_plus)){window.clearInterval(slidepopup);window.clearInterval(slidepop);eval('document.getElementById("'+seldiv+'").style.visibility="hidden";');showsub('a');showsubpanne('a');seldiv=0;window.clearTimeout(hidepop2);
	 					for(i=1;i<(array_type.length);i++){
						eval('document.getElementById("sub_type_'+array_type[i]+'").style.visibility="hidden";');
						  eval('document.getElementById("sub_type_'+array_type[i]+'").style.position="absolute";');
				 		 }
					showsub('a');
					for(i=1;i<(array_cat.length);i++){ 
					    if(array_cat[i]!="a"){eval('document.getElementById("sub_catpop_'+array_cat[i]+'").style.visibility="hidden";');
					     eval('document.getElementById("sub_catpop_'+array_cat[i]+'").style.position="absolute";');}
					 }
					 showgr(0);
					 moveback=true;
			}
		 }
	 else if (stepslide<0){eval('document.getElementById("'+seldiv+'").style.borderColor="green";');//alert('back');
	 	if(tmptop2>=(maxup_min)){window.clearInterval(slidepopup);window.clearInterval(slidepop);eval('document.getElementById("'+seldiv+'").style.visibility="hidden";');showsub('a');showsubpanne('a');seldiv=0;window.clearTimeout(hidepop2);
	 					for(i=1;i<(array_type.length);i++){
						eval('document.getElementById("sub_type_'+array_type[i]+'").style.visibility="hidden";');
						  eval('document.getElementById("sub_type_'+array_type[i]+'").style.position="absolute";');
				 		 }
					showsub('a');
					for(i=1;i<(array_cat.length);i++){ 
					    if(array_cat[i]!="a"){eval('document.getElementById("sub_catpop_'+array_cat[i]+'").style.visibility="hidden";');
					     eval('document.getElementById("sub_catpop_'+array_cat[i]+'").style.position="absolute";');}
					 }
					 showgr(0);
					 moveback=true;
			}
		}
  	if(moveback==false){	if(direction=="down"){  //inutile ici
  				if (stepslide<0){eval('document.getElementById("'+seldiv+'").style.top='+(tmptop2-stepslide)+';');}
  				else {eval('document.getElementById("'+seldiv+'").style.top='+(tmptop2-stepslide)+';');};
  				}
  		else if(direction=="left"){eval('document.getElementById("'+seldiv+'").style.left='+(tmptop2-stepslide)+';');}
  		};
  	}
