if (document.images) 
{ 
    /*petite flèche chercher détaillant */
    btnSendDetaillantON = new Image 
    btnSendDetaillantOFF = new Image 
    btnSendDetaillantON.src = 'images/General/Partout/btnSendDetaillant.png' 
    btnSendDetaillantOFF.src = 'images/General/Partout/btnSendDetaillantOFF.png'
    /*petite flèche chercher détaillant */
    passionKimpexONFR = new Image 
    passionKimpexOFFFR = new Image 
    passionKimpexONFR.src = 'images/FR/Accueil/passionKimpexON.png' 
    passionKimpexOFFFR.src = 'images/FR/Accueil/passionKimpexOFF.png'
    passionKimpexONEN = new Image 
    passionKimpexOFFEN = new Image 
    passionKimpexONEN.src = 'images/EN/Accueil/passionKimpexON.png' 
    passionKimpexOFFEN.src = 'images/EN/Accueil/passionKimpexOFF.png'
    /*Images Catalogue */
    
    imgMotoneigeOFF = new Image 
    imgMotoneigeONFR = new Image 
    imgMotoneigeONEN = new Image
    imgMotoneigeOFF.src = 'images/General/Partout/motoneige.jpg'
    imgMotoneigeONFR.src = 'images/General/Partout/motoneigeFR.jpg'
    imgMotoneigeONEN.src = 'images/General/Partout/motoneigeEN.jpg'
    
    imgVTTOFF = new Image 
    imgVTTONFR = new Image 
    imgVTTONEN = new Image
    imgVTTOFF.src = 'images/General/Partout/vtt.png'
    imgVTTONFR.src = 'images/General/Partout/vttFR.jpg'
    imgVTTONEN.src = 'images/General/Partout/vttEN.jpg'
    
    imgMotoOFF = new Image 
    imgMotoONFR = new Image 
    imgMotoONEN = new Image
    imgMotoOFF.src = 'images/General/Partout/motocyclette.jpg'
    imgMotoONFR.src = 'images/General/Partout/motocycletteFR.jpg'
    imgMotoONEN.src = 'images/General/Partout/motocycletteEN.jpg'
    
    imgMarineOFF = new Image 
    imgMarineONFR = new Image 
    imgMarineONEN = new Image
    imgMarineOFF.src = 'images/General/Partout/marine.png'
    imgMarineONFR.src = 'images/General/Partout/marineFR.jpg'
    imgMarineONEN.src = 'images/General/Partout/marineEN.jpg'
    
    imgTendanceOFF = new Image 
    imgTendanceONFR = new Image 
    imgTendanceONEN = new Image
    imgTendanceOFF.src = 'images/General/Partout/tendance.jpg'
    imgTendanceONFR.src = 'images/General/Partout/tendanceFR.jpg'
    imgTendanceONEN.src = 'images/General/Partout/tendanceEN.jpg'
}
function afficherDealers(ID)
{
    var codePostal = document.getElementById(ID).value
    if(codePostal != "")
    {
        if(codePostal != "Code Postal" && codePostal != "Postal Code" && codePostal != "Zip Code")
        {
           document.location = "dealerLocator.aspx?CodePostal=" +codePostal.toString();
        }
    }    
}
function goToNew()
{
    document.location.href="newproduits.aspx";
}
function fctLocatorDealer(ID)
            {
                
                var codePostal = document.getElementById(ID).value
                if(codePostal != "")
                {
                    if(codePostal != "Code Postal" && codePostal != "Postal Code" && codePostal != "Zip Code")
                    {
                       document.location.href = "dealerLocator.aspx?CodePostal=" + codePostal.toString();
                    }
                    else
                    {
                        document.getElementById(ID).value = "Invalid";
                    }
                }    
            }
function FCTdealerLocator(ID)
{
    var codePostal = document.getElementById(ID).value
    if(codePostal != "")
    {
        if(codePostal != "Code Postal" && codePostal != "Postal Code" && codePostal != "Zip Code")
        {
           document.location.href = "dealerLocator.aspx?CodePostal=" + codePostal.toString();
        }
        else
        {
            document.getElementById(ID).value = "Invalid";
        }
    }    
}
function changerPage(url)
{
    alert(url.ToString());
}
function changerImg()
{
    setTimeout('changerImgCentre()',3000)
}
function changerImgCentre()
{
    var randomnumber=Math.floor(Math.random()*14);
    var nombreString = "";

    if(randomnumber <= 9)
    {
        nombreString = "0" + randomnumber.toString();
    }
    else
    {
        nombreString = randomnumber.toString();
    }
   
    document.getElementById("imgCentre").src = "images/General/Accueil/" + nombreString.toString() + "_image_centre.png"
    changerImg();
}
function blendimage(millisec) {
    var speed = Math.round(millisec / 100);
    var timer = 0;
    var randomnumber=Math.floor(Math.random()*14);
    var nombreString = "";

    if(randomnumber <= 9)
    {
        nombreString = "0" + randomnumber.toString();
    }
    else
    {
        nombreString = randomnumber.toString();
    }
    
    //set the current image as background
    document.getElementById("imgCentre").style.backgroundImage = "url(" + document.getElementById("imgCentre").src + ")";
    
    //make image transparent
    changeOpac(0);
    
    //make new image
    document.getElementById("imgCentre").src = "images/General/Accueil/" + nombreString.toString() + "_image_centre.png";

    //fade in image
    for(i = 0; i <= 100; i++) {
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
        timer++;
    }
} 
function changeOpac(opacity) {
    var object = document.getElementById("imgCentre").style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}

function afficherImage()
{
    
     document.getElementById("imgCentre").src = "images/General/Accueil/" + nombreString.toString() + "_image_centre.png"
}
function texteON(ID)
{
    document.getElementById(ID).style.color="red";
}
function texteOFF(ID)
{
    document.getElementById(ID).style.color="black";
}
function getCookieVal(offset) {
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1)
      		endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
function getCookie2(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 getCookie(langue)
{
    alert(getCookie2.toString());
}


function mouseOver(ID,URL)
{
    document.getElementById(ID).src = URL;
    if(ID == "imgAccesDetaillant")
    {
        document.getElementById(ID).style.color = "#000000"; 
    }
                                
}
function mouseOut(ID,URL)
{
    document.getElementById(ID).src = URL; 
    if(ID == "imgAccesDetaillant")
    {
        document.getElementById(ID).style.color = "#FFFFFF"; 
    }
}
function goToOrder()
{
    window.open("http://order.kimpex.com");
}
function lienLogo(adresse)
{
    if(adresse != "1")
    {
        document.location.href = adresse;
    }
}
                            function effetDetaillantUPFR()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='13px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '9px'
                            }
                            function effetDetaillantDOWNFR()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='11px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '17px'
                            }
                            function effetDetaillantUP2FR()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='13px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '8px'
                            }
                            function effetDetaillantDOWN2FR()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='11px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '17px'
                            }
                             function effetDetaillantUP2EN()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='14px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '20px'
                            }
                            function effetDetaillantDOWN2EN()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='12px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '30px'
                            }
                            function effetDetaillantUPEN()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='14px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '28px'
                            }
                            function effetDetaillantDOWNEN()
                            {
                                document.getElementById("lblAccesDetaillant").style.fontSize='12px'
                                document.getElementById("lblAccesDetaillant").style.marginLeft = '35px'
                            }
                            function mouseInFleche(ID)
                            {
                                document.getElementById(ID).src = "images/General/Partout/btnSendDetaillantOFF.png";
                            }
                            function mouseOutFleche(ID)
                            {
                                document.getElementById(ID).src = "images/General/Partout/btnSendDetaillant.png";
                            }
                            function mouseOverPassion(ID)
                            {
                                document.getElementById(ID).src = "images/" + document.getElementById("txtHidden").value + "/Accueil/passionKimpexON.png" ;
                            }
                            function mouseOutPassion(ID)
                            {
                                document.getElementById(ID).src = "images/" + document.getElementById("txtHidden").value + "/Accueil/passionKimpexOFF.png" ;
                            }
                           
