function reSize(nW,nH) 
{ 
	window.resizeTo(nW,nH); 
	window.moveTo(0,0); 
} 

function reSize4pic(nW,nH) 
{ 
	window.resizeTo(nW+100,nH+120);
} 


function popup_backup_auto(url)
{	
	sH = screen.height;
	sW = screen.width;

	pos_x = (sW/2) - (400/2);
	pos_y = (sH/2) - (330/2);
	
	parametres="directories=no, location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, width=400, height=330, top="+pos_y+", left="+pos_x;
	window.open(""+url+"","",""+parametres+"");
}

function popup_ecard(url)
{	
	sH = screen.height;
	sW = screen.width;

	pos_x = (sW/2) - (600/2);
	pos_y = (sH/2) - (370/2);
	
	parametres="directories=no, location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, width=600, height=370, top="+pos_y+", left="+pos_x;
	window.open(""+url+"","ecard_window",""+parametres+"");
}

function popup_banners(url,w,h)
{	
	sH = screen.height;
	sW = screen.width;
	w = w+20;
	h = h+25;

	pos_x = (sW/2) - (w/2);
	pos_y = (sH/2) - (h/2);
	
	parametres="directories=no, location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, width="+w+", height="+h+", top="+pos_y+", left="+pos_x;
	window.open(""+url+"","ecard_window",""+parametres+"");
}

function popup_find(url)
{	
	parametres="directories=no, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, titlebar=no, toolbar=no, width=400, height=330";
	window.open(""+url+"","",""+parametres+"");
}

function popup_origines(url)
{	
	parametres="directories=no, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, titlebar=no, toolbar=no, width=400, height=330";
	window.open(""+url+"","",""+parametres+"");
}
				
function popup_email(url)
{	
	parametres="directories=no, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, titlebar=no, toolbar=no, width=550, height=610, left=20, top=20";
	window.open(""+url+"","",""+parametres+"");
}

function popup_helpOLD(url)
{	
	parametres="directories=no, location=no, menubar=no, resizable=no, copyhistory=no, scrollbars=yes, status=no, titlebar=no, toolbar=no, width=400, height=330";
	window.open(""+url+"","",""+parametres+"");
}

function popup_fiche(url)
{	
	sH = screen.height;
	sW = screen.width;
	
	if (sW <= 1024){new_w = sW*0.55; new_h = 1.15*new_w;}
	if (sW >= 1280 && sW <1400){new_w = sW*0.45; new_h = 1.2*new_w;}
	if (sW >= 1400){new_w = 550; new_h = 750;}
	
	pos_x = (sW/2) - (new_w/2);
	pos_y = (sH/2) - (new_h/2) - 20;
	
	parametres="toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width="+new_w+", height="+new_h+", left="+pos_x+", top="+pos_y;
	window.open(""+url+"","",""+parametres+"");
		
}

function popup_news(url)
{	
	sH = screen.height;
	sW = screen.width;
	
	if (sW <= 1024){new_w = sW*0.75; new_h = 0.70*new_w;}
	if (sW >= 1280 && sW <1400){new_w = sW*0.70; new_h = 0.60*new_w;}
	if (sW >= 1400){new_w = sW*0.70; new_h = 0.60*new_w;}
	
	pos_x = (sW/2) - (new_w/2);
	pos_y = (sH/2) - (new_h/2) - 20;
	
	url = ""+url+"&window_height="+new_h;
		
	parametres="toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width="+new_w+", height="+new_h+", left="+pos_x+", top="+pos_y;
	window.open(""+url+"","",""+parametres+"");
		
}

function popup_pic(url,width)
{	
	sH = screen.height;
	sW = screen.width;
	
	new_h = 5;
	new_w = sW/4;
	
	pos_x = (sW/3);
	pos_y = (sH/4);
	
	url = ""+url+"&window_height="+new_h;
		
	parametres="toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width="+new_w+", height="+new_h+", left="+pos_x+", top="+pos_y;
	window.open(""+url+"","",""+parametres+"");
		
}

function popup_help(url)
{	
	sH = screen.height;
	sW = screen.width;

	pos_x = (sW/2) - (750/2);
	pos_y = (sH/2) - (350/2);

	window.open(""+url+"","","toolbar=no, location=no, directories=no, status=no, scrollbars=yes, titlebar=no, resizable=no, copyhistory=no, width=750, height=350, top="+pos_y+", left="+pos_x);
}

var el;

function showMenu() 
{
	ContextElement=event.srcElement;
	sW = screen.width;
	sH = screen.height;
	retraitX = 0;
	retraitY = 0;
	ajout = document.body.scrollTop;
	
	if ((sW - event.clientX) < 180){retraitX = 180 - (sW - event.clientX);}
	if ((sH - event.clientY) < 250){retraitY = 380 - (sH - event.clientY + ajout);}else{retraitY= - ajout;};

	menu1.style.posLeft=event.clientX-retraitX;
	menu1.style.posTop=event.clientY-retraitY;
 	menu1.style.display="";
	menu1.setCapture();
}

function showMenuFP(w,h) 
{
	ContextElement=event.srcElement;
	dH = 0;
	dW = 0;
	
	w = w-20; <!-- barre de défilement -->
	
	if ((w - event.clientX) < 170){dW = 170 - (w - event.clientX);}
	if ((h - event.clientY) < 120){dH = 120 - (h - event.clientY);}
	
	ajout = document.body.scrollTop;
	menu1.style.posLeft=event.clientX-dW;
	menu1.style.posTop=event.clientY-dH;
 	menu1.style.display="";
	menu1.setCapture();
}

function showMenuFPscroll(w,h) 
{
	ContextElement=event.srcElement;
	dH = 0;
	dW = 0;
	
	w = w-20; <!-- barre de défilement -->
	
	retraitX = 0;
	retraitY = 0;
	ajout = document.body.scrollTop;
	
	if ((w - event.clientX) < 180){retraitX = 180 - (w - event.clientX);}
	if ((h - event.clientY) < 50){retraitY = 150 - (h - event.clientY + ajout);}else{retraitY= - ajout;};

	menu1.style.posLeft=event.clientX-retraitX;
	menu1.style.posTop=event.clientY-retraitY;
 	menu1.style.display="";
	menu1.setCapture();
}

function toggleMenu() {
   el=event.srcElement;
   el.style.cursor='hand';
   if (el.className=="menuItem") {
      el.className="highlightItem";
   } else if (el.className=="highlightItem") {
      el.className="menuItem";
   }
}



function clickMenu() {
   menu1.releaseCapture();
   menu1.style.display="none";
   el=event.srcElement;
   el.style.cursor='default';
   if (el.doFunction != null) {
     eval(el.doFunction);
   }
}


// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=#91BBF4 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=#91BBF4 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}


