// AUTEUR: Thomas giroire
// DATE DE CREATION: 07/02/2003 

function adapteT(){
	var largeur = screen.width
	switch (largeur){
		case 1024:
			return  50;
		case 1152:
			return 60;	
		case 1280:
			return  70;
		case 1400:
			return  80;
		case 1600:
			return  100;
		default : 
			return  1;
	}
}
function adapteL(){
	var largeur = screen.width
	switch (largeur){
		case 1024:
			return  150;
		case 1152:
			return 180;
		case 1280:
			return  200;
		case 1400:
			return  250;
		case 1600:
			return 300;
		default : 
			return 1;
	}

}
function popup_carte(page) {
	window.open(page,'popup_html','width=650,height=640toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');
}
function popup_mail(page) {   
	window.open(page,'popup_html','width=350,height=550,toolbar=false,scrollbars=false,resizable=true,top='+adapteT()+',left='+adapteL()+'');

}
function popup_copy(page) {   
	window.open(page,'popup_html','width=350,height=720,toolbar=false,scrollbars=false,resizable=true,top='+adapteT()+',left='+adapteL()+'');

}
function popup_carter(page) {
	window.open(page,'popup_html','width=650,height=700,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');
}

function popup_machine(page) {
	window.open(page,'popup_html','width=600,height=640,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');
}
function PopupQualite(page) {
	window.open(page,'popup_html','width=640,height=590,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');
}

//Popup fiche produit

function popup_carter(page) {
	window.open(page,'popup_html','width=680,height=690,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function popup_echap(page) {
	window.open(page,'popup_html','width=670,height=420,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function popup_admiss(page) {
	window.open(page,'popup_html','width=750,height=580,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function popup_support(page) {
	window.open(page,'popup_html','width=700,height=590,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function popup_turbine(page) {
	window.open(page,'popup_html','width=800,height=670toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function popup_impacteur(page) {
	window.open(page,'popup_html','width=800,height=570,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function popup_culasse(page) {
	window.open(page,'popup_html','width=870,height=500,toolbar=false,scrollbars=false,resizable=false,top='+adapteT()+',left='+adapteL()+'');

}
function detect(){
	if(navigator.appName=="Microsoft Internet Explorer")
		return "ie";
	else if(navigator.appName=="Netscape")
		return "ns";
	else
	{ return "ns"; }
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function PopupImage(img) {   // popup pour les images
	var adapteNavH = 0;
	var adapteNavW = 0;
	if(detect() == "ns"){adapteNavH =-1;adapteNavW= 10}
	w=open("",'image','width=65,height=10,top='+adapteT()+',left='+adapteL()+',toolbar=no,scrollbars=no,resizable=no');	
	w.document.write("<HTML><HEAD><TITLE>Fabris - Mécanique de présition et assemblage</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript> function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+11+"+adapteNavW+",document.images[0].height+29+"+adapteNavH+"); window.focus();} else { setTimeout('check()',250) } }</SCRIPT>");
	w.document.write("<body bgcolor='#7373A2' onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}


