
function OpenWin(URL,width,height,nom)
{
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=no");
}


function OpenWin2(URL,nom,width,height)
{
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");
}


function Openselection(url,largeur,hauteur,options) {
var haut=(screen.height-(hauteur+80));
var Gauche=(screen.width-(largeur+10));
var w=window.open(url,"chat","top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
w.document.close();
w.focus();
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function aff_plan(mypage, myname, w, h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


 function pop_centre(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
 selection_gal_pop = window.open(page,"Selection","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}


function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 4;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function afficher_caddie(adresses,params)
{
var winl = (screen.width - 900) / 2;
var wint = (screen.height - 680) / 4;
var scroll = 'yes';
pagges=window.open(adresses,params,'width=900,height=680,top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,menubar=no,location=no,directories=no,resizable');
if (parseInt(navigator.appVersion) >= 4) { pagges.window.focus(); }

}
	
function afficher_agrandissement(adresse,param)
{
var winl = (screen.width - 900) / 2;
var wint = (screen.height - 680) / 4;
var scroll = 'auto';
remote=window.open(adresse,param,'width=900,height=680,top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,menubar=no,location=no,directories=no,resizable');
if (parseInt(navigator.appVersion) >= 4) { remote.window.focus(); }
}


function double_lien(fr1 , fr2)
{
	window.location.href=fr1;
	parent.frame_droite.location.href=fr2; 
} 	

function double_reload()
{
	window.document.nbr_photos.submit();
	parent.frame_droite.location.reload(false); 
} 

function lance_recherche()
{
	window.document.recherche.submit();
	window.location.reload(false);
}

/*function suppression(prod_titre , prod_id, php_self)
{
	Check = confirm('Êtes-vous sûr de vouloir supprimer la photo "'+prod_titre+'" de votre sélection ?');
	if(Check == true)
	{
		ajax('id='+prod_id+'&act=rien&titre='+prod_titre, '<?=$wwwroot?>/galerie/ajax/check_gal.php', window.opener.frame_droite.document.getElementById('check_gal_'+prod_id));
		
		alert('La photo "'+prod_titre+'" va être supprimée de votre sélection !');
		//window.location.reload(false); 
		window.location.href=php_self+'?func=enleve&id='+prod_id;
		//window.opener.frame_droite.location.reload(false); 	
			
	}	
}*/

function suppression(prod_titre , prod_id, chemin, php_self)
{
if(window.opener.frame_droite) {
	ajax('id='+prod_id+'&act=rien&titre='+prod_titre, chemin, window.opener.frame_droite.document.getElementById('check_gal_'+prod_id));
	}
	alert('La photo "'+prod_titre+'" va être supprimée de votre sélection !');
	window.location.href=php_self+'?func=enleve&id='+prod_id;
	
}

function vide_liste(prod_titre , prod_id, php_self)
{
	Check = confirm('Êtes-vous sûr de vouloir vider votre liste ?');
	if(Check == true)
	{		
		frmsubmit('vide');						
	}	
}


