var curseur;
var page;
var gnHstList;
var gnCurrHstPos;
var evenement;

maxZoom=4
minZoom=.5
baseZoom=1.05
baseRatio=1

var nIconNum;
nIconNum = 1;

var expdate = new Date();
expdate.setTime (expdate.getTime() + (365 * 24 * 60 * 1000)); // One year from now 

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

function golist(){
if (Access.location.href.search("Kernel") > 0){
	var url = '../Exploit/'+gsFName+'/pdf/'+lib_lang+'/'+gsFName+'.pdf'
}else{
	var url = './pdf/'+gsFName+'.pdf'
}
    dnl=window.open(url,'apercu','toolbar = no, menubar = yes, personalbar = yes, resizable = yes');
//dnl.print();
}

function RefreshVisu(grandeur){
NaVs();
Access.getElementById('ifra_thumbnail').style.width = grandeur+"px";
}
	
function ShowThumbNail() {
	document.write('<table cellspacing=0 cellpadding=0 width="1" border="0">');
	for(var i = 0;i < Cata.length; i++)
	{
var multth = Cata[i][1].split(",");
var multlk = Cata[i][2].split(",");
for(var j = 0;j < multth.length; j++)
	{
	document.write('<tr><td width="1"><a href="javascript:goPage(' + i + ');govignettes();"><img border="0" src="' + multth[j] + '"></a></td></tr>');
	document.write('<tr><td>' + multlk[j] + '</td></tr>');
	}
		
	}
	document.write('</table>');
}

function dwnld(url,typ) {
//if(browser.isIE){
//    dnl=window.open(url,'','status = no, scrollbars=no, resize=no, toolbar = no, menubar = no, personalbar = no, resizable = no');
//    dnl.resizeTo(1,1);
//    dnl.location.reload();
//    dnl.blur();
//    dnl.document.execCommand('SaveAs');
//    dnl.close();
//}

    var multurl = url.split(",");
    var tst = 0;
for(var i = 0;i < multurl.length; i++)
	{
	if(multurl[i] != ""){
	tst = tst+1;
	memo = i;
	}
	}
	
if(browser.isIE && multurl.length > 1 && tst > 1){
	dnl = window.open('','','toolbar = no, menubar = no, personalbar = no, resizable = yes, scrollbars=yes, width=150, height=400');
	dnl.document.writeln("<HTML><HEAD>");
	dnl.document.writeln("<style type=\"text/css\">"); 
if (Access.location.href.search("Kernel") > 0){
	dnl.document.writeln("    @import url(\"../Exploit/"+gsFName+"/css/thumbnail.css\");");
}else{
	dnl.document.writeln("    @import url(\"librairies/css/thumbnail.css\");");
}
	dnl.document.writeln("    </style>");

	dnl.document.writeln("</HEAD><BODY>");
	
var multth = Cata[eval(top.window.document.getElementById('curseur').value)][1].split(",");
var multlk = Cata[eval(top.window.document.getElementById('curseur').value)][2].split(",");

	switch (typ)
	{
	  case 'pdf':
		var message = MSGacrobat;
	    break;
	  case 'xls':
		var message = MSGxls;
	    break;
	  case 'doc':
		var message = MSGdoc;
	    break;
	}
		
	dnl.document.writeln("<table cellspacing=\"0\" cellpadding=\"0\" width=\"1\" border=\"0\">");
	for(var i = 0;i < multurl.length; i++)
	{
	if(multurl[i] != ""){
if (Access.location.href.search("Kernel") > 0){
	var th = multth[i];
}else{
	var th = multth[i].replace('../','./');
}	
	dnl.document.writeln("<tr><td width=\"1\"><a href=\"#\" OnClick=\"window.open('" + multurl[i] + "','','toolbar = no, menubar = yes, personalbar = yes, resizable = yes');\"><img border=\"0\" src=\"" + th + "\" alt=\"" + message +"\"></a></td></tr>");
	dnl.document.writeln("<tr><td>" + multlk[i] + " : " + message  + "<br><br></td></tr>");
	}
	}
	dnl.document.writeln("</table>");
	 
	dnl.document.writeln("</BODY></HTML>");
}else{
if(tst == 1){
	window.open(multurl[memo],'','toolbar = no, menubar = yes, personalbar = yes, resizable = yes');
}else{
for(var i = 0;i < multurl.length; i++)
	{
	if(multurl[i] != ""){
	window.open(multurl[i],'','toolbar = no, menubar = yes, personalbar = yes, resizable = yes');
	}
	}
}
}
 
 //  if(!i || i==0){
//    var i = 0;
//    dnl=window.open('','apercu','toolbar = no, menubar = yes, personalbar = yes, resizable = yes');
//    dnl.location.href=multurl[0];
//    i = i+1
//   }

//if(multurl.length > 0){
//if(multurl[i]){
//if(confirm('Fichier Suivant ?')){
//    dnl.location.href=multurl[i];
//    i = i+1;
//}else{
//return;
//}}else{
//return;
//}}
}

function goacrobat() {

    dwnld(Cata[eval(top.window.document.getElementById('curseur').value)][3],'pdf');
    
}

function goxls() {

    dwnld(Cata[eval(top.window.document.getElementById('curseur').value)][5],'xls');
    
}

function godoc() {

    dwnld(Cata[eval(top.window.document.getElementById('curseur').value)][6],'doc');
    
}

function PrintProcess(){

NaVs('pop');

	var printid = eval(top.window.opener.window.top.window.document.getElementById('Entitie').value);
if(printid == "-1"){var tst=1; var printid=0;}
var multpg = Cata[eval(top.window.opener.window.top.window.document.getElementById('PrintList').value)][0].split(",");
var multid = Cata[eval(top.window.opener.window.top.window.document.getElementById('PrintList').value)][4].split(",");
var multla = Cata[eval(top.window.opener.window.top.window.document.getElementById('PrintList').value)][7].split(",");
var multha = Cata[eval(top.window.opener.window.top.window.document.getElementById('PrintList').value)][8].split(",");
var la;
var ha;
//alert(printid);
//for(var j = 0;j < multpg.length; j++)

if (Access2.getElementById('swf')){

if(multla[printid] != ""){la = eval(multla[printid]);}else{la = eval(gsFL);}
if(multha[printid] != ""){ha = eval(multha[printid]);}else{ha = eval(gsFH);}

var rt = eval(700/la);
//alert(eval(la*rt));
//alert(eval(ha*rt));

top.window.document.getElementById('image').innerHTML=GetFlash(multpg[printid],eval(la*rt),eval(ha*rt),'pop');
setTimeout("SizeW('swf');",100);

}else{

top.window.document.getElementById('image').innerHTML = '<img border="0" name="chksize" src="' + multpg[printid] + '" style="position: relative; left: 0; top: 0; width:100%;">';
setTimeout("SizeW();",100);
}

top.window.opener.window.top.window.document.getElementById('Entitie').value = eval(printid+1);

setTimeout("window.print();",300);
if(tst == 1){
setTimeout("whosnext();",10000);
}
}

function SizeW(med){
if(med == "swf"){
top.window.resizeTo(700,1019);
}else{
top.window.resizeTo(541,788);
}
}

function whosnext(){
NaVs('pop');
var printid = eval(top.window.opener.window.top.window.document.getElementById('Entitie').value);
var multpg = Cata[eval(top.window.opener.window.top.window.document.getElementById('PrintList').value)][0].split(",");

if(printid < multpg.length){
PrintProcess();
}else{
return;
}

}

function ResetMain() {
//Ecriture du cookie => Applicatif 
commande = GetCookie (gsFName);
 if ((commande == null) || (commande.length < 1)){
	SetCookie(gsFName,"", expdate, "/");
 }
///Remise à 0 du calcul d'affichage (première page à 100%)
top.window.document.getElementById('curseur').value = 0;
top.window.document.getElementById('ratio').value = baseRatio;
///reseter la combo zoom si elle existe
///Afficher la page

iImg();

NaVs();
if(Access.getElementById('dropdown1')){
pgcombo();
Access.getElementById('dropdown1').selectedIndex = 0;
}
if(Access.getElementById('T1')){
Access.getElementById('T1').value = MSGrech;
}
}

function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}    

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

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;
}

function goa_basket(){
	//alert ("valeur en cours = " + lgcom);
	valtoadd = top.window.document.getElementById('curseur').value
	if (valtoadd >=0){
		value = GetCookie(gsFName);
		
		if (value == null || value.length<1)
		 	{value =  "_"+valtoadd+"_"}
		else
			{

		zeval="_"+valtoadd+"_"
		dedans=value.indexOf(zeval)
		//alert(dedans+"  "+value+" uuu "+zeval)
		if (dedans>=0) {
			alert(MSGin2bask)
			return false;
			}

		value = value + "¤_" + valtoadd+"_";}
		SetCookie(gsFName,value,expdate, "/");
		alert(MSGaddbask);
		gov_basket(1);
	}

}

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function URLDecode(psEncodeString) 
{
  // Create a regular expression to search all +s in the string
  var lsRegExp = /\+/g;
  // Return the decoded string
  return unescape(String(psEncodeString).replace(lsRegExp, " ")); 
}

var ar_chr = new Array();
for (var i=1;i<=255;i++)	ar_chr[i]=unescape('%' + i.toString(16));
	    
function ar_C2ASCII(c) {
	for (var i=1;i<=255;i++) {
		if (ar_chr[i] == c)	return i;
	}
	return c;
}

function urlencode(text){
	var tmp = '';
	var n, i;
	for (i=0; i<text.length; i++){
		n=ar_C2ASCII(text.charAt(i));
		if (n<=38 || (n>=58 && n<=64) || (n>=122 && n<=191)) tmp += '%' + n.toString(16)
			else tmp += text.charAt(i);
	}
	return tmp;
}

function EcrirePage()
{
NaVs();
reg = new RegExp('%20','g');

var host;
var fic;
//alert(Access.location.href);
if (Access.location.href.search("Kernel") > 0){
host =  Access.location.href.substr(0, Access.location.href.search("Kernel"));
//alert(Cata[eval(top.window.document.getElementById('curseur').value)][3].replace("../",""));

}else{
host =  Access.location.href.substr(0, Access.location.href.search(gsFName));
//alert(Cata[eval(top.window.document.getElementById('curseur').value)][3].replace("./",""));

}

commande = GetCookie (gsFName);
 concat = MSGmsgbask+"<br><br>";
if ((commande == null) || (commande.length < 1))
 {
 //concat = concat+"<tr><td width='780'><p align='center'><font face='Arial' size='2'>" + "<br><br>Vous n'avez rien enregistré" + "</font></td></tr>";
 }
else
 {
commande = commande.replace(reg," ");
ligne = commande.split("¤");

nblignes = ligne.length;

if (Access.location.href.search("Kernel") > 0){
var relativ = "../Exploit/"+gsFName+"/";
}else{
var relativ = "../";
}

for (i=1;i <= nblignes; i++)
 { 
 lenum=0
 element = ligne[i-1].split("_");
//   alert(element[1])
 nref = element[1];

//alert(host);

 concat = concat+"<center><table cellspacing='0' cellpadding='0' width='1' border='0'><tr>";

var multpg = Cata[nref][1].split(",");
var multlk = Cata[nref][2].split(",");
var multfi = Cata[nref][3].split(",");
var multid = Cata[nref][4].split(",");

for(var j = 0;j < multpg.length; j++)
	{
 concat = concat+"<td align='center'><a href='javascript:goPage(" + nref + ");gov_basket();'><img src='" + multpg[j] + "'></a></td>";
	}

 concat = concat+"</tr><tr>";
for(var j = 0;j < multpg.length; j++)
	{
 concat = concat+"<td align='center'>"+multlk[j]+"</td>";
	}
 concat = concat+"</tr><tr>";
for(var j = 0;j < multpg.length; j++)
	{
fic="";
if (Access.location.href.search("Kernel") > 0){
fic = host+multfi[j].replace("../","");
}else{
fic = host+gsFName+multfi[j].replace("./","/");
}

 concat = concat+"<td align='center'><br>"
 concat = concat+"<a href=javascript:goprint(" + (nref) + "," + j + ")><img src='"+relativ+"mes_images/imprimer.gif' alt='"+MSGprint+"'></a><img src='"+relativ+"img/sep_0_1.gif'>";
 concat = concat+"<a href=mailto:?Subject="+urlencode(MSGsubmel)+"&amp;body="+urlencode(MSGbodmel).replace("\\r","%0D")+"%20%0A%0D"+urlencode(fic)+"><img src='"+relativ+"mes_images/envoyer.gif' alt='"+MSGmelbask+"'></a><img src='"+relativ+"img/sep_0_1.gif'>";
 concat = concat+"<a href=javascript:SL(" + (i-1) + ")><img src='"+relativ+"mes_images/suprimer.gif' alt='"+MSGdelbask+"'></a>"; 
 concat = concat+"</td>";
	}


 concat = concat+"</tr></table></center><br><br>";


 }
 }
// concat = concat+"</table>"; 
Access3.getElementById('blist').innerHTML = concat; 
}

function Search() {
NaVs();
achercher=Access.getElementById("T1").value
//alert(Access.nav.achercher)
//searchname = "recherche.htm"
//alert (searchname)
if (Access.getElementById("T1").value=="") {
	alert("Entrez une valeur à rechercher");
	//return true;
	}
if (Access.getElementById("T1").value!="") {
	//parent.main.location=searchname
	//document.mypk.submit();
	gorech(1);
	}
}


//NS4 = (document.layers) ? true : false;
function checkEnter(event)
{
NS4 = false;
	var code = 0;
	if (NS4)
		code = event.which;
	else
		code = event.keyCode;
	if (code==13) {
		Search();
		}
}

function SL(nm) // supprime ligne nm
{
 valeur = GetCookie(gsFName);
 
 value = "";
 if (nm == 0)
     {
         if (nblignes == 1) DeleteCookie(gsFName,"/");
         if (nblignes > 1)
             {   value = ligne[1];
             for (i = (nm + 2); i < nblignes; i++)
                 {value = value + "¤" + ligne[i];}
             }        
     }
 
 if (nm > 0)
     {   value = ligne[0];

     if (nblignes > 1)
             {
             //alert ("deb nb > 1");
             for (j=1; j < nm; j++)
                 {
                     value = value + "¤" + ligne[j];
                     //alert("prem partie : j =  "+ j);
                     //alert("nblignes " + nblignes);    
             //alert(nm + 1);    
             }
             for (k=nm+1; k<nblignes; k++)
                 {
                     value = value + "¤" + ligne[k];
                     //alert("2 partie : k =  "+ k);
                 }
             }
         }
 if (value != null) SetCookie(gsFName,value,expdate, "/");
 
// alert();
 
EcrirePage();
}

function goPage(i) {
NaVs();
switch (ThumbMod)
{
  case 'ifr':
	top.window.document.getElementById('curseur').value = i;
    break;
  case 'pop':
	window.opener.window.top.window.document.getElementById('curseur').value = i;
    break;
}
top.window.document.getElementById('evenement').value = "goPage";

if (document.location.href.search("index") > 0){
var rel = "./templates/";
}else{
var rel = "./";
}

if (Access.location.href.search("Kernel") > 0){
Access2.location.href = 'transition.asp?id='+id+'&id_lang='+id_lang;
}else{
Access2.location.href = rel+'transition.htm';
}
}

function goPage_vroom() {
switch (ThumbMod)
{
  case 'ifr':
	iImg();
    break;
  case 'pop':
	iImg('pop');
    break;
}
}

function F5(fram){
NaVs();
if (Access.location.href.search("Kernel") > 0){
Access2.location.href = 'transition.asp?id='+id+'&id_lang='+id_lang;
}else{
if(fram != "1"){
Access2.location.href = './templates/transition.htm';
}else{
Access2.location.href = 'transition.htm';
}
}
}

function gorew() {
top.window.document.getElementById('evenement').value = "gorew";
F5();
}

function gorew_vroom() {
	top.window.document.getElementById('curseur').value = 0;
	iImg();
}

function gofwd() {
top.window.document.getElementById('evenement').value = "gofwd";
F5();
}

function gofwd_vroom() {
	top.window.document.getElementById('curseur').value = Cata.length-1;
	iImg();
}

function gonext(fram) {
NaVs();
top.window.document.getElementById('evenement').value = "gonext";
F5(fram);
}

function gonext_vroom() {
	top.window.document.getElementById('curseur').value = eval(top.window.document.getElementById('curseur').value)+1;
	iImg();
}

function goprev(fram) {
NaVs();
top.window.document.getElementById('evenement').value = "goprev";
F5(fram);
}

function goprev_vroom() {
	top.window.document.getElementById('curseur').value = eval(top.window.document.getElementById('curseur').value)-1;
	iImg();
}

function goret() {
NaVs();
top.window.document.getElementById('evenement').value = "goret";
F5();
}

function goret_vroom() {
	gnCurrHstPos = eval(top.window.document.getElementById('gnCurrHstPos').value);
	gnHstList = top.window.document.getElementById('gnHstList').value;
var malist;
malist = gnHstList.split(",");
	gnCurrHstPos = gnCurrHstPos - 1;
	top.window.document.getElementById('curseur').value = malist[gnCurrHstPos];
	top.window.document.getElementById('gnCurrHstPos').value = gnCurrHstPos;
	iImg("",1);
}

function goava() {
NaVs();
top.window.document.getElementById('evenement').value = "goava";
F5();
}

function goava_vroom() {
	gnCurrHstPos = eval(top.window.document.getElementById('gnCurrHstPos').value);
	gnHstList = top.window.document.getElementById('gnHstList').value;
var malist;
malist = gnHstList.split(",");
	gnCurrHstPos = gnCurrHstPos + 1;
	top.window.document.getElementById('curseur').value = malist[gnCurrHstPos];
	top.window.document.getElementById('gnCurrHstPos').value = gnCurrHstPos;
	iImg("",1);
}

function Iota(){
if (top.window.document.getElementById('evenement').value){
var IO = top.window.document.getElementById('evenement').value+'_vroom'

eval(IO)();

}

top.window.document.getElementById('evenement').value = "";

}

function switchB(){
switch (curseur)
	{
	  case 0:
if (Access.getElementById('rew_0') != null){Access.getElementById('rew_0').innerHTML = "<img src='"+grewImg[1]+"' border='0'>";}
if (Access.getElementById('prev_0') != null){Access.getElementById('prev_0').innerHTML = "<img src='"+gprevImg[1]+"' border='0'>";}
if (Access.getElementById('fwd_0') != null){Access.getElementById('fwd_0').innerHTML = "<a href='#' onClick='JavaScript:gofwd(); return false'><img src='"+gfwdImg[0]+"' border='0' alt=\""+gfwdImg[2]+"\"></a>";}
if (Access.getElementById('next_0') != null){Access.getElementById('next_0').innerHTML = "<a href='#' onClick='JavaScript:gonext(); return false'><img src='"+gnextImg[0]+"' border='0' alt=\""+gnextImg[2]+"\"></a>";}
	    break;
//gNextImg gFwdImg
	  case Cata.length-1:
if (Access.getElementById('rew_0') != null){Access.getElementById('rew_0').innerHTML = "<a href='#' onClick='JavaScript:gorew(); return false'><img src='"+grewImg[0]+"' border='0' alt=\""+grewImg[2]+"\"></a>";}
if (Access.getElementById('prev_0') != null){Access.getElementById('prev_0').innerHTML = "<a href='#' onClick='JavaScript:goprev(); return false'><img src='"+gprevImg[0]+"' border='0' alt=\""+gprevImg[2]+"\"></a>";}
if (Access.getElementById('fwd_0') != null){Access.getElementById('fwd_0').innerHTML = "<img src='"+gfwdImg[1]+"' border='0'>";}
if (Access.getElementById('next_0') != null){Access.getElementById('next_0').innerHTML = "<img src='"+gnextImg[1]+"' border='0'>";}
	    break;

	  default:
if (Access.getElementById('rew_0') != null){Access.getElementById('rew_0').innerHTML = "<a href='#' onClick='JavaScript:gorew(); return false'><img src='"+grewImg[0]+"' border='0' alt=\""+grewImg[2]+"\"></a>";}
if (Access.getElementById('prev_0') != null){Access.getElementById('prev_0').innerHTML = "<a href='#' onClick='JavaScript:goprev(); return false'><img src='"+gprevImg[0]+"' border='0' alt=\""+gprevImg[2]+"\"></a>";}
if (Access.getElementById('fwd_0') != null){Access.getElementById('fwd_0').innerHTML = "<a href='#' onClick='JavaScript:gofwd(); return false'><img src='"+gfwdImg[0]+"' border='0' alt=\""+gfwdImg[2]+"\"></a>";}
if (Access.getElementById('next_0') != null){Access.getElementById('next_0').innerHTML = "<a href='#' onClick='JavaScript:gonext(); return false'><img src='"+gnextImg[0]+"' border='0' alt=\""+gnextImg[2]+"\"></a>";}
	   break;
	}

if (Access.getElementById('ret_0') != null){
Access.getElementById('ret_0').innerHTML = "<img src='"+gretImg[1]+"' border='0'>";
if (gnCurrHstPos > 1){Access.getElementById('ret_0').innerHTML = "<a href='#' onClick='JavaScript:goret(); return false'><img src='"+gretImg[0]+"' border='0' alt=\""+gretImg[2]+"\"></a>";}
}

malist = gnHstList.split(",");
if (Access.getElementById('ava_0') != null){
Access.getElementById('ava_0').innerHTML = "<img src='"+gavaImg[1]+"' border='0'>";
if (eval(gnCurrHstPos+1) < malist.length){Access.getElementById('ava_0').innerHTML = "<a href='#' onClick='JavaScript:goava(); return false'><img src='"+gavaImg[0]+"' border='0' alt=\""+gavaImg[2]+"\"></a>";}
}

var multxl = Cata[curseur][5].split(",");
var tst = 0;
for(var i = 0;i < multxl.length; i++){if(multxl[i] != ""){tst = tst+1;}}
if (Access.getElementById('xls_0') != null){
if(tst > 0){
Access.getElementById('xls_0').innerHTML = "<a href='#' onClick='JavaScript:goxls(); return false'><img src='"+gxlsImg[0]+"' border='0' alt=\""+gxlsImg[2]+"\"></a>";
}else{
Access.getElementById('xls_0').innerHTML = "<img src='"+gxlsImg[1]+"' border='0'>";
}}

var multdc = Cata[curseur][6].split(",");
var tst = 0;
for(var i = 0;i < multdc.length; i++){if(multdc[i] != ""){tst = tst+1;}}
if (Access.getElementById('doc_0') != null){
if(tst > 0){
Access.getElementById('doc_0').innerHTML = "<a href='#' onClick='JavaScript:godoc(); return false'><img src='"+gdocImg[0]+"' border='0' alt=\""+gdocImg[2]+"\"></a>";
}else{
Access.getElementById('doc_0').innerHTML = "<img src='"+gdocImg[1]+"' border='0'>";
}}

}

function pgcombo() {
NaVs();
p = new Option();
p.text = new String(MSGgopg);
p.value = "#";

Access.getElementById('dropdown1').options[0] = p;

var asc = 1;
	for(var i = 0;i < Cata.length; i++)
	{
var multlk = Cata[i][2].split(",");
for(var j = 0;j < multlk.length; j++)
	{
//document.writeln('<OPTION VALUE="'+i+'">' + multlk[j] + '</option>');

p = new Option();
p.text = new String(multlk[j].replace(/&#44;/g,','));
p.value = i;
Access.getElementById('dropdown1').options[asc] = p;
asc = asc+1;
	}
	}
}

function NavRef(pg) {
 
i=0;
  while (Catan[i] != pg) {
i++;
  }
return i;
}

function iImg(k,nomove,relod) {
//this.options[this.selectedIndex].value
	if(k == 'pop'){
	NaVs('pop');
	curseur = eval(top.window.opener.top.window.document.getElementById('curseur').value);
	NavRef();
	Access.getElementById('dropdown1').selectedIndex = eval(NavRef(curseur)+1);

if(relod != 1){
	gnCurrHstPos = eval(top.window.opener.top.window.document.getElementById('gnCurrHstPos').value);
	gnHstList = top.window.opener.top.window.document.getElementById('gnHstList').value;
}
	}else{
	NaVs();
	curseur = eval(top.window.document.getElementById('curseur').value);
	
	if(Access.getElementById('dropdown1')){
	Access.getElementById('dropdown1').selectedIndex = eval(NavRef(curseur)+1);
	}

if(relod != 1){
	gnCurrHstPos = eval(top.window.document.getElementById('gnCurrHstPos').value);
	gnHstList = top.window.document.getElementById('gnHstList').value;
}
	}

if(relod != 1){
	if(nomove != 1){	
      gnCurrHstPos = gnCurrHstPos + 1;
      	}

	if(nomove != 1){      	
var malist;
malist = gnHstList.split(",");
var i = 0;
gnHstList = "";
  while (i < gnCurrHstPos) {
	if(malist[i]){gnHstList  = gnHstList+","+malist[i];}
	i= i+1;
  }
      gnHstList = gnHstList+","+curseur;
	}

	if(k == 'pop'){
	top.window.opener.top.window.document.getElementById('gnCurrHstPos').value = gnCurrHstPos;
	if(nomove != 1){
	top.window.opener.top.window.document.getElementById('gnHstList').value = gnHstList;
	}
	}else{
	top.window.document.getElementById('gnCurrHstPos').value = gnCurrHstPos;
	if(nomove != 1){
	top.window.document.getElementById('gnHstList').value = gnHstList;
	}
	}
	
switchB();
}

var multpg = Cata[curseur][0].split(",");
var multla = Cata[curseur][7].split(",");
var multha = Cata[curseur][8].split(",");
var vrac;
var la;
var ha;
var swf;
vrac = '<table cellspacing="0" cellpadding="0" width="1" border="0"><tr>';
for(var i = 0;i < multpg.length; i++)
	{
vrac = vrac+'<td width="1" nowrap>';
vrac = vrac+Struct(i);
if(multpg[i].search("swf") > 0){
swf = 1;
if(multla[i] != ""){la = eval(multla[i]);}else{la = eval(gsFL);}
if(multha[i] != ""){ha = eval(multha[i]);}else{ha = eval(gsFH);}
vrac = vrac+GetFlash(multpg[i],la,ha,k);
vrac = vrac+'<img src="pixel.gif" OnLoad=\'RevSiz("' + i + '","' + top.window.document.getElementById('ratio').value + '","' + eval(la*top.window.document.getElementById('ratio').value) + '","' + eval(ha*top.window.document.getElementById('ratio').value) + '");fnLoadCngs(' + i + ');\'>';
//	RevSiz(multpg[i],top.window.document.getElementById('ratio').value,la,ha);
//fnLoadPngs(Access2.getElementById('cg_'+i));
//fnLoadPngs(Access2.getElementById('cd_'+i));

}else{
vrac = vrac+'<img src="' + multpg[i] + '" id="pg_'+i+'" OnLoad=\'SuperSizeMe('+i+',"'+k+'");\'>';
}

//vrac = vrac+'<map name="Map">';
//vrac = vrac+'  <area shape="rect"  coords="5,8,332,226" href="#" alt="sqdsq">';
//vrac = vrac+'</map>';

vrac = vrac+'</td>';
	}
vrac = vrac+'</tr></table>';	
vrac = vrac+'<span id="map"></span>';

if(swf == 1){vrac = vrac+'<span id="swf"></span>';}
//	alert(vrac);
// OnLoad="SuperSizeMe('+k+');"
//    NumPg();
//Access2.getElementById('basket').style.display = "none";


Access2.getElementById('code').innerHTML = '';
if (Access.location.href.search("Kernel") > 0){
	inc("../Exploit/"+gsFName+"/html/"+lib_lang+"/"+curseur+".js");
}else{
	inc("../html/"+curseur+".js");
}

Access2.getElementById('image').style.display = "block";
Access2.getElementById('image').innerHTML = vrac;

}

function Struct(i)
{
struct = '';
struct = struct+'<div style="position:absolute; z-index:11">';
struct = struct+'<table id="cdp_'+i+'" border="0" cellspacing="0" cellpadding="0">';
struct = struct+'<tr><td id="cell_'+i+'" colspan="2">&nbsp;</td></tr>';
struct = struct+'<tr>';
struct = struct+'<td align="left" valign="bottom"><img border="0" src="cg2.png" id="cg_'+i+'" style="visibility:hidden;"></td>';
struct = struct+'<td align="right" valign="bottom"><img border="0" src="cd2.png" id="cd_'+i+'" style="visibility:hidden;"></td>';
struct = struct+'</tr>';
struct = struct+'</table></div>';

struct = struct+'<div style="position:absolute; z-index:12"> <img border="0" src="pixel.gif" usemap="#Map" id="ray_'+i+'"></div>';

return struct;
}

/* jsHandler.js */
function inc(filename)
{
var body = Access2.getElementsByTagName('body').item(0);
script = Access2.createElement('script');
script.src = filename;
script.type = 'text/javascript';
body.appendChild(script)
}

function SuperSizeMe(itm,k) {
	if(k == 'pop'){
	top.window.opener.top.window.document.getElementById('hauteur').value = Access2.getElementById('pg_'+itm).height;
	Access2.getElementById('pg_'+itm).height = window.opener.top.window.document.getElementById('hauteur').value*window.opener.top.window.document.getElementById('ratio').value;
	RevSiz(itm,window.opener.top.window.document.getElementById('ratio').value,Access2.getElementById('pg_'+itm).width,Access2.getElementById('pg_'+itm).height);
	fnLoadCngs(itm);
	}else{
	top.window.document.getElementById('hauteur').value = Access2.getElementById('pg_'+itm).height;
	Access2.getElementById('pg_'+itm).height = top.window.document.getElementById('hauteur').value*top.window.document.getElementById('ratio').value;
	RevSiz(itm,top.window.document.getElementById('ratio').value,Access2.getElementById('pg_'+itm).width,Access2.getElementById('pg_'+itm).height);
	fnLoadCngs(itm);
}


}

function RevSiz(itm,ratio,l,h) {

	Access2.getElementById('cg_'+itm).height = 58*ratio;
	Access2.getElementById('cg_'+itm).width = 58*ratio;
	Access2.getElementById('cg_'+itm).style.width = eval(58*ratio) + "px";
	Access2.getElementById('cg_'+itm).style.height = eval(58*ratio) + "px";
	
	Access2.getElementById('cd_'+itm).height = 58*ratio;
	Access2.getElementById('cd_'+itm).width = 58*ratio;
	Access2.getElementById('cd_'+itm).style.width = eval(58*ratio) + "px";
	Access2.getElementById('cd_'+itm).style.height = eval(58*ratio) + "px";


	Access2.getElementById('cell_'+itm).height = eval(h-eval(58*ratio));

	Access2.getElementById('cdp_'+itm).height = h;
	Access2.getElementById('cdp_'+itm).width = l;

	Access2.getElementById('ray_'+itm).height = h;
	Access2.getElementById('ray_'+itm).width = l;

shape= '';
if(MapNav == "Vrai"){
shape = shape+'<map name="Map">';
if(curseur > 0){shape = shape+'  <area alt="'+gprevImg[2]+'" shape="rect" coords="0,0,' + eval(l/2) + ',' + h + '" href="JavaScript:goprev(\'1\');">';}
if(curseur < eval(Cata.length-1)){shape = shape+'  <area alt="'+gnextImg[2]+'" shape="rect" coords="' + eval(l/2) + ',0,' + l + ',' + h + '" href="JavaScript:gonext(\'1\');">';}
shape = shape+'</map>'
}
// onClick='JavaScript:gonext(); return false'><img src='"+gnextImg[0]+"' border='0' alt=\""+gnextImg[2]+"\">

	Access2.getElementById('map').innerHTML = shape;
}

function fnLoadCngs(i) {
if(!Access2.getElementById('cg_'+eval(i-1))){
fnLoadPngs(Access2.getElementById('cg_'+i));
}
if(!Access2.getElementById('cd_'+eval(i+1))){
fnLoadPngs(Access2.getElementById('cd_'+i));
}
}

function fnLoadPngs(img) {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

//	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
//		if (itsAllGood && img.src.match(/\.png$/i) != null) {
		if (itsAllGood) {
			var src = img.src;
			img.style.width = img.width + "px";
			img.style.height = img.height + "px";
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
			img.src = "pixel.gif";
		}
		//alert(Coin2Pg);
if(Coin2Pg == "Vrai"){
		img.style.visibility = "visible";
	}
}

function GetFlash(fic,lf,hf,k){
var rt;
if(k == 'pop'){
rt = 1;
}else{
rt = eval(top.window.document.getElementById('ratio').value);
}

flash = '';
if(k == 'pop'){

	var isMacIE = false;
	
	if(navigator.appName == "Microsoft Internet Explorer" && navigator.platform == "MacPPC") {
		isMacIE = true;
	}

flash = flash+'<object id="software_object" name="'+fic+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + eval(lf*rt) + '" height="' + eval(hf*rt) + '">';
flash = flash+'<param name="movie" value="'+fic+'" />';
flash = flash+'<param name="quality" value="high" />';
flash = flash+'<param name="menu" value="0" />';
flash = flash+'<param name="bgcolor" value="#FFFFFF" />';
flash = flash+'<param name=FlashVars value="loc=en_US&isMacIE=' + isMacIE + '" />';
flash = flash+'<embed id="solutions_object" name="'+fic+'" type="application/x-shockwave-flash" src="'+fic+'" flashvars="loc=en_US&isMacIE=' + isMacIE + '" quality="high" bgcolor="#FFFFFF" menu="0" width="' + eval(lf*rt) + '" height="' + eval(hf*rt) + '" pluginspage="http://www.macromedia.com/go/getflashplayer_fr">';
flash = flash+'</embed>';
flash = flash+'</object>';
}else{
flash = flash+'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
flash = flash+'        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + eval(lf*rt) + '" height="' + eval(hf*rt) + '">';
flash = flash+'  <PARAM NAME="flash_component" value="ImageViewer.swc" />';
flash = flash+'  <PARAM NAME="movie" VALUE="'+fic+'" />';
flash = flash+'  <PARAM NAME="bgcolor" VALUE="#ffffff" />';
flash = flash+'  <PARAM NAME="quality" VALUE="best" />';
flash = flash+'  <PARAM NAME="menu" VALUE="true" />';
flash = flash+'  <PARAM NAME="salign" VALUE="L" />';
flash = flash+'  <PARAM NAME="wmode" VALUE= "Transparent" />';
flash = flash+'  <PARAM NAME="FlashVars" value="flashlet={imageLinkTarget:\'_blank\',captionFont:\'Verdana\',titleFont:\'Verdana\',showControls:true,frameShow:false,slideDelay:5,captionSize:10,captionColor:#333333,titleSize:10,transitionsType:\'Random\',titleColor:#333333,slideAutoPlay:false,imageURLs:[\'img1.jpg\',\'img2.jpg\',\'img3.jpg\'],slideLoop:false,frameThickness:2,imageLinks:[\'http://macromedia.com/\',\'http://macromedia.com/\',\'http://macromedia.com/\'],frameColor:#333333,bgColor:#FFFFFF,imageCaptions:[]}" />';

flash = flash+'  <EMBED src="'+fic+'" ';
flash = flash+'         bgcolor="#ffffff" ';
flash = flash+'         quality="best" ';
flash = flash+'         menu="true" ';
flash = flash+'         salign="L" ';
flash = flash+'         wmode="Transparent" ';
flash = flash+'         flashvars="flashlet={imageLinkTarget:\'_blank\',captionFont:\'Verdana\',titleFont:\'Verdana\',showControls:true,frameShow:false,slideDelay:5,captionSize:10,captionColor:#333333,titleSize:10,transitionsType:\'Random\',titleColor:#333333,slideAutoPlay:false,imageURLs:[\'img1.jpg\',\'img2.jpg\',\'img3.jpg\'],slideLoop:false,frameThickness:2,imageLinks:[\'http://macromedia.com/\',\'http://macromedia.com/\',\'http://macromedia.com/\'],frameColor:#333333,bgColor:#FFFFFF,imageCaptions:[]}" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ';
flash = flash+'         width="' + eval(lf*rt) + '" height="' + eval(hf*rt) + '" ';
flash = flash+'         swLiveConnect="true" ';
flash = flash+'         TYPE="application/x-shockwave-flash" ';
flash = flash+'         PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
flash = flash+'  </EMBED></OBJECT>';
}

  
  //document.writeln(flash);
  return flash;
  //alert(flash);
}

function push2page() {
	//NaVs();
	//alert();
	//setTimeout("alert(Access.page.height)",100);
	//alert(Access.page.height);
}

function gozoomout(){
	top.window.document.getElementById('ratio').value = top.window.document.getElementById('ratio').value/baseZoom;
ImgRatio()
}

function gozoom100(){
	top.window.document.getElementById('ratio').value = baseRatio;
ImgRatio();
}

function gozoomin(){
	top.window.document.getElementById('ratio').value = top.window.document.getElementById('ratio').value*baseZoom;
ImgRatio()
}

function zoomchange(ratio) {
//alert(ratio);
//alert(top.window.document.getElementById('hauteur').value);
NaVs();
	top.window.document.getElementById('ratio').value = ratio;
	Access2.pg_prem.height = top.window.document.getElementById('hauteur').value*top.window.document.getElementById('ratio').value;
}

function ImgRatio() {
NaVs();
var i;
i = 0;
if (Access2.getElementById('swf')){
iImg('','',1);
}else{
while(Access2.getElementById('pg_'+i))
	{
//	alert(top.window.document.getElementById('hauteur').value*top.window.document.getElementById('ratio').value);
	Access2.getElementById('pg_'+i).height = top.window.document.getElementById('hauteur').value*top.window.document.getElementById('ratio').value;
	RevSiz(i,top.window.document.getElementById('ratio').value,Access2.getElementById('pg_'+i).width,Access2.getElementById('pg_'+i).height);
i++;
	}
}
}

function cZoom(led) {
tst = led.split;
cbo = new Array(); 
cbo = led.split(",");

	   document.writeln('<SELECT NAME="valzoom" onChange="zoomchange(this.value); return false">');
	   document.writeln('<OPTION VALUE=1 selected>Zoom</option>');   
	for(var i = 0;i < cbo.length; i++)
	{
	   document.writeln('<OPTION VALUE="' + cbo[i]/100 + '">' + cbo[i] + '%</OPTION>');
	}
	   document.writeln('</SELECT>');
}

function nNsep() {
   document.write('<img src="' + nSepImg + '" border=0  >');
}

function nNrew(alt) {
   document.write('<a href="#" onClick="JavaScript:gorew(); return false"><img src="' + gRewImg[nIconNum] + '" border=0   name="rew" alt="' + alt + '"></a>');
}

function nNprev(alt) {
   document.write('<a href="#" onClick="JavaScript:goprev(); return false"><img src="' + gPrevImg[nIconNum] + '" border=0   name="prev" alt="' + alt + '"></a>');
}

function nNnext(path,alt) {
   document.write('<a href="#" onClick="JavaScript:gonext(); return false"><img src="' + gNextImg[nIconNum] + '" border=0   name="next" alt="' + alt + '"></a>');
}

function nNfwd(alt) {
   document.write('<a href="#" onClick="JavaScript:gofwd(); return false"><img src="' + gFwdImg[nIconNum] + '" border=0   name="fwd" alt="' + alt + '"></a>');
}

function nNvignettes(path,alt) {
  document.write('<a href="#" onClick="JavaScript:govignettes(\'' + ThumbMod + '\'); return false"><img src="' + path + '" name="thu" border=0  alt="' + alt + '"></a>');
}

function nNacrobat(path,alt) {
  document.write('<a href="#" onClick="goacrobat(); return false"><img src="' + path + '" name="pdf" border=0  alt="' + alt + '"></a>');
}

function nNprint(path,alt) {
  document.write('<a href="#" onClick="goprint(); return false"><img src="' + path + '" name="print" border=0  alt="' + alt + '"></a>');  
}

function nNa_basket(path,alt) {
  document.write('<a href="#" onClick="javaScript:goa_basket(); return false;"><img src="' + path + '" name="addPanier" border=0  alt="' + alt + '"></a>');
}

function nNv_basket(path,alt) {
 document.write('<a href="#" onClick="javaScript:gov_basket(); return false;"><img src="' + path + '" name="viewPanier" border=0  alt="' + alt + '"></a>');
}

function search() {
NaVs();
tofind=Access.getElementById("T1").value;
//document.write("<head>")
//document.write("</head>")
//document.write("<body>")

accStr="âêîôûàèiouaéiouâêïöü";
noAcc="aeiouaeiouaeiouaeiou";

lacc=accStr.length-1
lnacc=noAcc.length-1 

 nbPages= rech.length - 1;
 decal=0
 lav=50
 lap=50
 txtC=tofind
 n=1
 nbl=0;
 isTable=0;
 isData=false
 isFound=false

             buffer = "";
             buffer = buffer+"<table width=100%>";

 for (j=1;j<=nbPages;j++) {
 // att : fonction récursive
 //alert("passage en haut");
     n=j;
     spy=false
     srL=rech[j].toLowerCase()
     srlNoAcc=srL

     for (pk=0;pk<=lacc;pk++) {
         zf=pk+1;
         src=new RegExp(accStr.substring(pk,zf),"g")
         rpl = noAcc.substring(pk,zf)
         srlNoAcc=srlNoAcc.replace(src,rpl);
         }

     txtCL=txtC.toLowerCase()
     txtCLnoAcc=txtCL

     for (pk=0;pk<=lacc;pk++) {
         zf=pk+1;
         src=new RegExp(accStr.substring(pk,zf),"g")
         rpl = noAcc.substring(pk,zf)
         txtCLnoAcc=txtCLnoAcc.replace(src,rpl);
         }

     a=srlNoAcc.search(txtCLnoAcc)
     //alert(j+"  "+n+"  "+a);
     if (a>-1) {
         isFound=true
         isTable++;
         if (isTable==1) {
             buffer = buffer+"<table width=100%>";
                         }

         isData=true; // il y a des infos
         ll=txtC.length
         //alert(ll)
         avant=a-lav

         if (avant<0) avant=0;
         apres=a + ll + lap

         if (apres >rech[j].length) apres = rech[j].length;
         part1="<font size=1 face='Arial, Helvetica, Verdana'>"+rech[j].substring(avant,a)
         part2="<b><span style='background-color: #99FF66'>"+rech[j].substring(a,a+ll)+"</span></b>"
         part3=rech[j].substring(a+ll,apres)

         //alert(part3)
         rech[j]=rech[j].substring(a+ll)
         j=n-1
         spy=true;

         }

         if (spy==true) {
             nbl++;
             realPage=(j+1+decal).toString()
//alert(numImg)
	
             if (nbl==1) {

                 buffer = buffer+"<tr>";

var multpg = Cata[Catan[eval(j+1)]][1].split(",");
var multlk = Cata[Catan[eval(j+1)]][2].split(",");
var multid = Cata[Catan[eval(j+1)]][4].split(",");

                 buffer = buffer+"<tr><td><br>";	
//

 buffer = buffer+"<table cellspacing='0' cellpadding='0' width='1' border='0'><tr>";

for(var k = 0;k < multpg.length; k++)
	{
	if(eval(multid[k]) == eval(j+1)){	
 buffer = buffer+"<td align='center'><a href='javascript:goPage(" + Catan[eval(j+1)] + ");gorech();'>"+multlk[k]+"</a></td>";
	}
	}

 buffer = buffer+"</tr><tr>";
for(var k = 0;k < multpg.length; k++)
	{
	if(eval(multid[k]) == eval(j+1)){	
 buffer = buffer+"<td align='center'><a href='javascript:goPage(" + Catan[eval(j+1)] + ");gorech();'><img src='" + multpg[k] + "' border='0'></a></td>";
	}
	}
 buffer = buffer+"</tr></table>";
 //
                 buffer = buffer+"</td></tr><tr><td>";

                 buffer = buffer+"</tr><tr><td>";	
                 concat= part1 + part2 + part3
                 tablo=concat.split(" ")
                 lt=tablo.length
                 nl="... "

                 if(tablo[0].toLowerCase()==txtCL || tablo[0].toLowerCase()==txtCLnoAcc ) nl=nl+tablo[0];
                 //for (pk=1;pk<(lt-1);pk++) {nl=nl+tablo[pk]+" "}

                 for (pk=0;pk<lt;pk++) {nl=nl+tablo[pk]+" "}
                 buffer = buffer+nl  +"...<br>";
                 }

             if (nbl>1) {
                 concat= part1 + part2 + part3
                 tablo=concat.split(" ")
                 lt=tablo.length
                 nl="... "
                 //if(tablo[0].toLowerCase()==txtCL || tablo[0].toLowerCase()==txtCLnoAcc ) nl=nl+tablo[0];
                 //for (pk=1;pk<(lt-1);pk++) {nl=nl+tablo[pk]+" "}

                 for (pk=0;pk<lt;pk++) {nl=nl+tablo[pk]+" "}
                 buffer = buffer+nl  +"...<br>";
                     }   
                 }

         if(j==n) {
             nbl=0;
             buffer = buffer+"</td></tr>";
             }

     //alert(a)

     }

     if (isFound==false){
     buffer = buffer+"<tr><td><b>"+txtC+" : </b>"+MSGemprech+"</td></tr>";
         }

     if (j>nbPages) buffer = buffer+"<tr><td>&nbsp;</td></tr></table>";

Access3.getElementById('blist').innerHTML = buffer;
 }
