//script de la mort  pop_b version même extension

function pop_b(imageObject)
	{

	var chemin = imageObject.src;
	var left = chemin.substring(0,chemin.lastIndexOf('.'));
	var right = chemin.substring(chemin.lastIndexOf('.'));
	var newSrc = left+"_b"+right;

	var h = imageObject.bigH;
	var w = imageObject.bigW;
	var title = imageObject.title;
	html = '<HTML><HEAD><TITLE>'+imageObject.titleB+'</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG onclick="window.close();" SRC="'+newSrc+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+31)" alt="Cliquez pour fermer - Click to close the window" style="cursor:hand;"></CENTER></BODY></HTML>';
	var p = 'width='+(parseInt(w))+',height='+(parseInt(h))+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1';
	popupImage = window.open('','popup_', p);

	
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close();
	popupImage.focus();
	
};
//script de la mort  pop_b version mettre en paramètre extension

function pop_b2(imageObject,ext,title2,width,height)
	{
	var chemin = imageObject.src;
	var left = chemin.substring(0,chemin.lastIndexOf('.'));
	var right = chemin.substring(chemin.lastIndexOf('.'));
	var newSrc = left+"_b."+ext;
	
	var h = imageObject.bigH;
	if( h==''||h==null )
		h = ''+height;
	var w = imageObject.bigW;
	if( w==''||w==null )
		w = ''+width;
	var title = imageObject.titleB;
	if( title==''||title==null )
		title = title2;
	//alert( title2 );
	html = '<HTML><HEAD><TITLE>'+title+'</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG onclick="window.close();" SRC="'+newSrc+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+31)" alt="Cliquez pour fermer - Click to close the window" style="cursor:pointer;"></CENTER></BODY></HTML>';
	//alert( html );
	var p = 'width='+(parseInt(w))+',height='+(parseInt(h))+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1';
	popupImage = window.open('','popup_', p);
	
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close();
	popupImage.focus();
	};
	
	function pop_href(url,title)
	{

	var chemin = url;
	var left = chemin.substring(0,chemin.lastIndexOf('.'));
	var right = chemin.substring(chemin.lastIndexOf('.'));
	//var newSrc = left+"_b."+ext;
	//alert( chemin );
	var h = 10;
	var w = 10;
	//var title = title;
	html = '<HTML><HEAD><TITLE>'+title+'</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG onclick="window.close();" SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+31)" alt="Cliquez pour fermer - Click to close the window" style="cursor:pointer;"></CENTER></BODY></HTML>';
	//alert( html );
	var p = 'width='+(parseInt(w))+',height='+(parseInt(h))+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1';
	popupImage = window.open('','popup_', p);

	//alert( p );
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close();
	popupImage.focus();
	};

function menu (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "menu", "dependent=0,menubar=0,resizable=1,scrollbars=1,toolbar=1,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));  
   OpenWindow.focus();   
    return false;
}
function popUp (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "pop750", "dependent=0,menubar=0,resizable=1,scrollbars=1,toolbar=0,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));  
   OpenWindow.focus();   
    return false;
}

function popUp2 (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "pop640", "dependent=0,menubar=0,resizable=1,scrollbars=1,toolbar=0,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));
   OpenWindow.focus();
    return false;
}
function popUpInfo (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "popInfo", "dependent=0,menubar=0,resizable=1,scrollbars=1,toolbar=0,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));
   OpenWindow.focus();
    return false;
}
function popUpAvecScroll (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "pop640", "dependent=0,menubar=0,resizable=1,scrollbars=1,toolbar=0,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));
   OpenWindow.focus();
    return false;
}


function popUpPdf (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "pop640", "dependent=0,menubar=0,resizable=1,scrollbars=0,toolbar=0,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));    
    return false;
}

function Video (p_AnchorObject, p_width, p_height) {
   OpenWindow = window.open(p_AnchorObject.href, "DemoInternet", "dependent=0,menubar=0,resizable=0,scrollbars=0,toolbar=0,width=" + new String(p_width) + ",height=" + String(p_height) + ",top=" + new String((screen.height / 2 ) - (p_height / 2)) + ",left=" + new String((screen.width / 2) - (p_width / 2)));
   OpenWindow.focus();
    return false;
}

