var CID=null
function clickHandler(){clearTimeout(CID)
CID=setTimeout(getSuggestions,333);}
function getSuggestions(){var input=escape(document.getElementById("searchstringid").value);ASPAjax.liveASP('suggestresults("'+input+'")','SUGGESTIONS')}
function touche(evenement)
{var touche=window.event?evenement.keyCode:evenement.which;if(touche==40){document.blttemp.btl.focus();}}
function ScrollerAdd(ImgId, TitleAlt) {
         TableauUrlImg[NbImages] = Array();
         TableauUrlImg[NbImages][0] = "/med/185/"+ImgId+".jpg";
         TableauUrlImg[NbImages][1] = TitleAlt;
         TableauUrlImg[NbImages][2] = "/photos/hebdo.asp?Id="+ImgId;
         NbImages++;
}
function ScrollerInit() {
         NbImages = 0;
         Debut = 0;
         TableauUrlImg = Array();
         ScrollerAdd("00522","Mouette");
         ScrollerAdd("00312","Rivi&egrave;re");
         ScrollerAdd("00454","Nuages");
         ScrollerAdd("00025","Burano");
         ScrollerAdd("00507","Soleil");
         ScrollerAdd("00042","Grafiti");
         ScrollerAdd("00453","Chats");
         ScrollerAdd("01381","Immeubles");
}
function ScrollerGauche() {if (Debut>2) {Debut=Debut-4;ScrollerAffiche()}}
function ScrollerDroite() {if (Debut<NbImages-1) {if (Debut>0) {Debut=Debut-2};ScrollerAffiche()}}
function ScrollerAffiche() {
for (i=1; i<4; i++) {
         Debut++;
         document.getElementById("scrolimg"+i).src = TableauUrlImg[Debut][0];
         document.getElementById("scrolimg"+i).title = TableauUrlImg[Debut][1];
         document.getElementById("scrolimg"+i).alt = TableauUrlImg[Debut][1];
         document.getElementById("scrolurl"+i).href = TableauUrlImg[Debut][2];
}}

function sendIt(fileName) {if (fileName != "") {location.href=fileName}}

Add_Remove_Comparateur = function(IdLogiciel){
ASPajax.LiveASP('AddRemoveComparateur("'+IdLogiciel+'")',function(result){
if (result==1) {
IdImage = 'cpr' + IdLogiciel ;
document.getElementById(IdImage).src = '/images/c2.gif';
document.getElementById(IdImage).title='Ne plus comparer';
document.getElementById(IdImage).alt='Ne plus comparer'; 
NbLog = LireCookie("logithequecomparateur").split(';').length - 1;
document.getElementById('cpt' + NbLog).src = '/images/c2.gif';
if (NbLog>=2) {
document.links.urlcomp1.href = '/scripts/comparateur.asp';
document.links.urlcomp1.title = 'Lancer la comparaison';
} else {
document.links.urlcomp1.href = '#';
document.links.urlcomp1.title = '';
}
} else
{
if (result==5) {alert('Pas plus de 5 logiciels à comparer !');}
else
{
IdImage = 'cpr' + IdLogiciel ;
document.getElementById(IdImage).src = '/images/c1.gif';
document.getElementById(IdImage).title='Comparer';
document.getElementById(IdImage).alt='Comparer';
NbLog = LireCookie("logithequecomparateur").split(';').length ;
document.getElementById('cpt' + NbLog).src = '/images/c1.gif';
if (NbLog>2) {
document.links.urlcomp1.href = '/scripts/comparateur.asp';
document.links.urlcomp1.title = 'Lancer la comparaison';
} else {
document.links.urlcomp1.href = '#';
document.links.urlcomp1.title = '';
}
}
}
})}

function getCookieVal(offset)
{
var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function LireCookie(nom)
{
var arg=nom+"=";
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;
}

RazComp = function(bof){ASPajax.LiveASP('VideCookies("'+bof+'")',function(result){
for (i=1;i<6;i++) {document.getElementById('cpt' + i).src = '/images/c1.gif';}
document.links.urlcomp1.href = '#';
document.links.urlcomp1.title = '';

for (i = 0; i < document.images.length; ++i) 
{
L = document.images[i].src.length;
a = document.images[i].src.substr(L-14,14);
if (a== "/images/c2.gif" ) 
document.images[i].src = "/images/c1.gif";
}

})}

function navigation(wth,hth,scrl) { fen = window.open ("","fiche","0,0,0,0,0,scrollbars=scrl,0,width="+wth+",height="+hth); if( self.focus ) fen.focus(); }

