<!--

function Add_A_Favorite() 
{
  if (window.sidebar) { // Mozilla Firefox Bookmark
    window.sidebar.addPanel(document.title, location.href,"");
  } else if( window.external ) { // IE Favorite
    window.external.AddFavorite( location.href, document.title); }
  else if(window.opera && window.print) { // Opera Hotlist
    return true; }
}
 
function clipme2(image)
{
    var Hauteur;
    var Largeur;
    var Letop;
    var Leleft;
    
    window.open('http://www.jnauto.com/'+document.getElementById("THEIMG").title, "", "width=800,height=600,resizable=no,scrollbars=no,location=no,statut=no");
}

function ouvrecalc(page)
{
   window.open(page,"Calc","width=650,height=750,left=1,top=1,fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no");
}

function ouvre_popup2(page3)
{
       window.open(page3,"Popupvideo","menubar=no,status=no,scrollbars=yes,width=1100,height=750");
}

function ouvre_popuphd(page3)
{
       window.open(page3,"Popupvideohd","menubar=no,status=no,scrollbars=yes,width=1500,height=1000");
}

function rand()
{
  var now=new Date();
  var num=(now.getSeconds())%10;
  var num=num+1;
  return num;
}

function ouvre(page)
{
   window.open(page,"","width=830,height=600,left=1,top=1,resizable=yes,scrollbars=yes,statusbar=no,toolbars=no");
}

function Image_onclick(Image) {
    window.open(Image,"Véhicule","height=0,width=0,scrollbars");
}

function Retour_onclick() {
    history.back(-1);
}


function clipme(ID)
{
clipwin = window.open("addcompare.asp?ID="+ID, "clipwindow", "width=350,height=240");
}

function OpenCity()
{
    curpage = document.location;
    Imgwin2 = window.open("http://www.cvautos.com/ville.asp?PAGE=" + curpage,"ville","width=320 height=120");
}


function carproof(page)
{
   window.open(page,"","width=700,height=750,left=1,top=1,resizable=no,scrollbars=yes,statusbar=no,toolbars=no");
}

function envoyerami(page)
{
   window.open(page,"","width=600,height=650,left=1,top=1,resizable=yes,scrollbars=yes,statusbar=no,toolbars=no");
}

function changeimgg(x,y)
{
    var LINK1;
    var LINK2;


    LINK1 = "/images_vehicules/F_img_detail_";
    LINK2 = "/images_vehicules/G_img_detail_";
    if (y == '0')
    {
        LINK2 = LINK2 + x  + ".jpg";
        document.getElementById("THEIMG").src = LINK2 ;
        document.getElementById("THEIMG").title = "G_img_detail_" + x + ".jpg";
    }
    else
    {
        LINK1 = LINK1 + x + "_" + y + ".jpg";
        document.getElementById("THEIMG").src = LINK1;
        document.getElementById("THEIMG").title = "F_img_detail_" + x + "_" + y + ".jpg";
    }
}

function changeimggz(x,y)
{
    var LINK1;
    var LINK2;


    LINK1 = "/images_vehicules/F_img_detail_";
    LINK2 = "/images_vehicules/G_img_detail_";
    if (y == '0')
    {
        LINK2 = LINK2 + x  + ".jpg";
        document.getElementById("THEIMG").src = LINK2  ;
        document.getElementById("THEIMG").title = "G_img_detail_" + x + ".jpg";
        document.getElementById("THEIMG").src = LINK2  ;
        MojoZoom.makeZoomable(document.getElementById("THEIMG"), LINK2);
    }
    else
    {
        LINK1 = LINK1 + x + "_" + y + ".jpg";
        document.getElementById("THEIMG").src = LINK1;
        document.getElementById("THEIMG").title = "F_img_detail_" + x + "_" + y + ".jpg";
        document.getElementById("THEIMG").src = LINK1;
        MojoZoom.makeZoomable(document.getElementById("THEIMG"), LINK1);
    }
}
function changeimggm(x,y)
{
    var LINK1;
    var LINK2;


    LINK1 = "/images_vehicules/F_img_detail_";
    LINK2 = "/images_vehicules/G_img_detail_";
    if (y == '0')
    {
        LINK2 = LINK2 + x  + ".jpg";
        document.getElementById("THEIMG").src = LINK2  ;
        document.getElementById("THEIMG").title = "G_img_detail_" + x + ".jpg";
        document.getElementById("THEIMG").src = LINK2  ;
        MojoMagnify.makeMagnifiable(document.getElementById("THEIMG"), LINK2);
    }
    else
    {
        LINK1 = LINK1 + x + "_" + y + ".jpg";
        document.getElementById("THEIMG").src = LINK1;
        document.getElementById("THEIMG").title = "F_img_detail_" + x + "_" + y + ".jpg";
        document.getElementById("THEIMG").src = LINK1;
        MojoMagnify.makeMagnifiable(document.getElementById("THEIMG"), LINK1);
    }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Resizeimg() {
  // retourne 65% de la largeur de la fenetre active
  myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  myWidth = (myWidth * 0.65) ;
  return myWidth;
}

function largeurfenetre() {
  // retourne la largeur de la fenetre active
  myWidth2 = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth2 = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth2 = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth2 = document.body.clientWidth;
  }
  return myWidth2;
}

//-->
