window.name = "autodirect"

/*function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}*/

function clipme2(image)
{
	var Hauteur;
	var Largeur;
	var Letop;
	var Leleft;
	
	clipwin3 = window.open("", "", "width=0,height=0");
	clipwin3.document.write('<body topmargin=0 leftmargin=0 onLoad="if (window.focus) window.focus()"><center>');
	clipwin3.document.write('<a href="javascript:window.close()">');
	clipwin3.document.write('<img border=0 src="' + image + '">');
	clipwin3.document.write('</a>');
	clipwin3.document.write('</center></body>');
	clipwin3.document.title = "<Cliquer pour fermer l'image>";
	while (clipwin3.document.images[0].complete == false)
	{
	}
	
	//Hauteur = clipwin3.document.images[0].height + 30;

	//Largeur = clipwin3.document.images[0].width;
	//Letop=(screen.height-hauteur)/2;
	//Leleft=(screen.width-largeur)/2;
	//clipwin3.moveTo(0,0);
	//window.alert(Hauteur);
	clipwin3.resizeTo(clipwin3.document.images[0].width,clipwin3.document.images[0].height+30);
	clipwin3.moveTo(150,150);
	clipwin3.document.close();
}

function changeimg(x,y)
{
	var LINK1;
	var LINK2;


	LINK1 = "http://www.quebecweb.com/file_mm/image_supp_SMALL.asp?NoVehicule=";
	LINK2 = "http://www.quebecweb.com/file_mm/image_SMALL.asp?NoVehicule=";
	if (y == '0')
	{
		LINK2 = LINK2 + x;
		document.getElementById("THEIMG").src = LINK2;
	}
	else
	{
		LINK1 = LINK1 + x;
		LINK1 = LINK1 + "&idImage=" + y;
		document.getElementById("THEIMG").src = LINK1;
	}
  

}

function popupAll(x)
{
	Imgwin = window.open("http://www.quebecweb.com/royetmooreautos/all_image.asp?NoVehicule=" + x,"image","scrollbars=no,menubar=no,width=500");

}

