	var window_handle = "";
	function openPage(page,name)
	{
		// test pour eviter des requetes simultanées au configurateur
		
		if (!checkLoading())
		{
			if (window_handle && !window_handle.closed) 
			{
    			//window_handle.close(); // focus sur popup
			}
			
			window_handle = window.open(page,name);
   			window_handle.focus(); // focus sur popup
			
			
		}	
	}
	
	function openCustomPopup3(page, nom, width, height, scroll, resize)
	{	    
		window_handle = window.open(page, nom, "scrollbars=" + scroll + ",resizable=" + resize + ",menubar=no,width=" + width + ",height=" + height);
   		window_handle.focus(); // focus sur popup
	}
	
	function openCustomPopupPrintConfiguration(page, nom, width, height, scroll, text)
	{	    
		// test pour eviter des requetes simultanées au configurateur
		
		if (!checkLoading())
		{
			if (window_handle && !window_handle.closed) 
			{
    			window_handle.close(); // focus sur popup
			}
			
			if (checkPrintEnabled())
    		{
   				//alert('ouverture popup');
   				window_handle = window.open(page, nom, "scrollbars=" + scroll + ",menubar=no,width=" + width + ",height=" + height);
   				window_handle.focus(); // focus sur popup
			}
			else 
    			alert(text);
			
			
		}	
	}
		
	
	function openCustomPopup2(page, nom, width, height, scroll)
	{	    
		// test pour eviter des requetes simultanées au configurateur
		
		if (!checkLoading())
		{
			if (window_handle && !window_handle.closed) 
			{
				//window_handle.close(); // focus sur popup
			}
			
   			window_handle = window.open(page, nom, "scrollbars=" + scroll + ",menubar=no,width=" + width + ",height=" + height);
   			window_handle.focus(); // focus sur popup
			
			
		}	
	}
	
	function openOtherLink(nom,width,height,formname)
	{
		window.open('',nom,"scrollbars=0, resizable=0, menuBar=0, width=" + width + ",height=" + height);
		document.getElementById(formname).submit();	
	}
	
	function openPopupWithXMLLink(url)
	{	
		window.open('','MiniSite','scrollbars=0, resizable=0, menuBar=0, width=800, height=600');
		document.XMLForm.target = "MiniSite";
		document.XMLForm.action = url;
		document.XMLForm.submit();
	}




function OpenLink(url, type)
{
	var target = "_top"; // "_self";
	var style = "";
	
	switch (type)
	{
		case "New":
		{
			target = "_blank";
			break ;
		}
		
		case "Popup":
		{
			target = "_blank";
			style = "scrollbars=no, status=no, resizable=no";
			break ;
		}
		
		case "Self":
		{
			target = "_self";
			break ;
		}
	}

	window_handle = window.open(url, target, style);
	window_handle.focus();	// focus sur popup
}

function OpenCustomPopup(url, target, width, height, scroll)
{	    
	window_handle = window.open(url, target, "scrollbars=" + (scroll ? "1" : "0") + ",menubar=no,status=yes,width=" + width + ",height=" + height);
	window_handle.focus();
}


function OpenCustomLink(url, target, params)
{	    
	window_handle = window.open(url, target, params);
	window_handle.focus();	// focus sur popup
	return false;
}
