plan = null; gal = null; ref = null; formu =  null; aide = null; news = null; news2 =null;
/*
function closeTout() {
	if (gal != null && gal.open) gal.close();
	if (ref != null && ref.open) ref.close();//{ alert(window.name)};
	if (formu != null && formu.open) formu.close();
	if (aide != null && aide.open) aide.close();
	if (plan != null && plan.open) plan.close();
	}
*/
function winPlan(URL,winName,w,h)
	{
	if (gal != null && gal.open) gal.close();
	if (ref != null && ref.open) ref.close();
	if (formu != null && formu.open) formu.close();
	if (news != null && news.open) news.close();
	if (news2 != null && news2.open) news2.close();
	if ( (!window.plan) || (plan.closed) ) {
		plan=window.open(URL,winName,"scrollbars=0,resizable=0,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0");
		plan.location.href=URL;
		plan.focus();
	} else {
		plan.location.href=URL;
		plan.focus();
	}
}

function winForm(URL,winName,w,h)
	{
	if (gal != null && gal.open) gal.close();
	if (ref != null && ref.open) ref.close();
	if (news != null && news.open) news.close();
	if (plan != null && plan.open) plan.close();
	if (news2 != null && news2.open) news2.close();
	if ( (!window.formu) || (formu.closed) ) {
		formu=window.open(URL,winName,"scrollbars=1,resizable=0,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0");
		formu.location.href=URL;
		formu.focus();
	} else {
		formu.location.href=URL;
		formu.focus();
	}
}

function winGal(URL,winName)
	{
	if (ref != null && ref.open) ref.close();
	if (formu != null && formu.open) formu.close();
	if (news != null && news.open) news.close();
	if (plan != null && plan.open) plan.close();
	if (news2 != null && news2.open) news2.close();
	if ( (!window.gal) || (gal.closed) ) {
		gal = window.open(URL,winName,"scrollbars=0,resizable=0,width=540,height=460,screenX=0,screenY=0,top=0,left=0");
		gal.location.href = URL;
		gal.focus();
	} else {
		gal.location.href=URL;
		gal.focus();
	}
}

function winRef(URL,winName,w,h)
	{
	if (gal != null && gal.open) gal.close();
	if (formu != null && formu.open) formu.close();
	if (news != null && news.open) news.close();
	if (plan != null && plan.open) plan.close();
	if (news2 != null && news2.open) news2.close();
	if ( (!window.ref) || (ref.closed) ) {
		ref = window.open(URL,winName,"scrollbars=1,resizable=0,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0");
		ref.location.href = URL;
		ref.focus();
	} else {
		ref.location.href=URL;
		ref.focus();
	}
}

function winNews(URL,winName,s,w,h)
	{
	if (ref != null && ref.open) ref.close();
	if (gal != null && gal.open) gal.close();
	if (formu != null && formu.open) formu.close();
	if (aide != null && aide.open) aide.close();
	if (plan != null && plan.open) plan.close();
	if (news2 != null && news2.open) news2.close();
	if ( (!window.news) || (news.closed) ) {
		news = window.open(URL,winName,"scrollbars="+s+",resizable=0,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0");
		news.location.href = URL;
		news.focus();
	} else {
		news.location.href=URL;
		news.focus();
	}
}

function winNews2(URL,winName,s,w,h)
	{
	if (ref != null && ref.open) ref.close();
	if (gal != null && gal.open) gal.close();
	if (formu != null && formu.open) formu.close();
	if (aide != null && aide.open) aide.close();
	if (plan != null && plan.open) plan.close();
	if (news != null && news.open) news.close();
	if ( (!window.news2) || (news2.closed) ) {
		news2 = window.open(URL,winName,"scrollbars="+s+",resizable=0,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0");
		news2.location.href = URL;
		news2.focus();
	} else {
		news2.location.href=URL;
		news2.focus();
	}
}

function winAide(URL,winName,w,h)
	{
	if (gal != null && gal.open) gal.close();
	if (ref != null && ref.open) ref.close();
	if (formu != null && formu.open) formu.close();
	if (news != null && news.open) news.close();
	if (plan != null && plan.open) plan.close();
	if (news2 != null && news2.open) news2.close();
	if ( (!window.aide) || (aide.closed) ) {
		aide = window.open(URL,winName,"scrollbars=1,resizable=0,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0");
		aide.location.href = URL;
		aide.focus();
	} else {
		aide.location.href=URL;
		aide.focus();
	}
}

function openOrganigr() {
var org;
//var URL="http://www.sstvoyages.com/dupin/flash/000.html";
var URL="organigr.html";
var winName = "org";
var scroll = "no";
var h = screen.availHeight-25;
var w = screen.availWidth-10;
org = window.open(URL,winName,'scrollbars='+scroll+',resizable=no,width='+w+',height='+h+',top=0,left=0,screenX=0,screenY=0');
org.location.href=URL;
org.focus();
}

function openGalerie() {
//alert("openGalerie");
var galerie;
//var URL="http://www.sstvoyages.com/dupin/flash/000.html";
var URL="galeriesMD.html";
var winName = "galeriePrincip";
var scroll = "no";
var h = screen.availHeight-25;
var w = screen.availWidth-10;
galerie = window.open(URL,winName,'scrollbars='+scroll+',resizable=no,width='+w+',height='+h+',top=0,left=0,screenX=0,screenY=0');
galerie.location.href=URL;
galerie.focus();
}

function autoClose() {
	setTimeout("window.close()",500);
}
