/* *********** showCard.js : gestion des pop-ups ************* */

// Ouverture de site dans une fenêtre auxiliaire
if(!site_window || site_window.closed){
	var site_window; // the unassigned variable member_window is declared with var, the evaluation results in the undefined value.
}
function popitup(url) {
	site_window = window.open(url, 'linked_site', 'width=1200,height=800,scrollbars=yes,status=no,resizable=yes,top=0,left=0');
	if(window.focus){site_window.focus()}
	return false;
}

if(!member_window || member_window.closed){
	var member_window; // the unassigned variable member_window is declared with var, the evaluation results in the undefined value.
}
if(!mission_window || mission_window.closed){
	var mission_window; // the unassigned variable mission_window is declared with var, the evaluation results in the undefined value.
}
if(!project_window || project_window.closed){
	var project_window; // the unassigned variable project_window is declared with var, the evaluation results in the undefined value.
}
if(!donation_window || donation_window.closed){
	var donation_window; // the unassigned variable donation_window is declared with var, the evaluation results in the undefined value.
}
if(!organization_window || organization_window.closed){
	var organization_window; // the unassigned variable organization_window is declared with var, the evaluation results in the undefined value.
}
if(!business_window || business_window.closed){
	var business_window; // the unassigned variable business_window is declared with var, the evaluation results in the undefined value.
}
if(!mediator_window || mediator_window.closed){
	var mediator_window; // the unassigned variable mediator_window is declared with var, the evaluation results in the undefined value.
}

function show_member_card(file, windowTitle){
	if(!member_window || member_window.closed){
		member_window = window.open(file, 'member_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=0,left=0,dependent=yes,alwaysRaised=yes");
		//member_window.moveTo(50,50);
		member_window.focus();
	}else{
		member_window.document.location.replace(file);
		member_window.focus();
	}
	return;
}

function show_mission_card(file, windowTitle){
	if(!mission_window || mission_window.closed){
		mission_window = window.open(file, 'mission_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=48,left=48,dependent=yes,alwaysRaised=yes");
		//mission_window.moveTo(50,50);
		mission_window.focus();
	}else{
		mission_window.document.location.replace(file);
		mission_window.focus();
	}
	return;
}

function show_project_card(file, windowTitle){
	if(!project_window || project_window.closed){
		project_window = window.open(file, 'project_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=60,left=60,dependent=yes,alwaysRaised=yes");
		//project_window.moveTo(50,50);
		project_window.focus();
	}else{
		project_window.document.location.replace(file);
		project_window.focus();
	}
	return;
}

function show_donation_card(file, windowTitle){
	if(!donation_window || donation_window.closed){
		donation_window = window.open(file, 'donation_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=72,left=72,dependent=yes,alwaysRaised=yes");
		//donation_window.moveTo(50,50);
		donation_window.focus();
	}else{
		donation_window.document.location.replace(file);
		donation_window.focus();
	}
	return;
}

function show_organization_card(file, windowTitle){
	if(!organization_window || organization_window.closed){
		organization_window = window.open(file, 'organization_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=84,left=84,dependent=yes,alwaysRaised=yes");
		//organization_window.moveTo(50,50);
		organization_window.focus();
	}else{
		organization_window.document.location.replace(file);
		organization_window.focus();
	}
	return;
}

function show_business_card(file, windowTitle){
	if(!business_window || business_window.closed){
		business_window = window.open(file, 'business_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=96,left=96,dependent=yes,alwaysRaised=yes");
		//business_window.moveTo(50,50);
		business_window.focus();
	}else{
		business_window.document.location.replace(file);
		business_window.focus();
	}
	return;
}

function show_mediator_card(file, windowTitle){
	if(!mediator_window || mediator_window.closed){
		mediator_window = window.open(file, 'mediator_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=108,left=108,dependent=yes,alwaysRaised=yes");
		//mediator_window.moveTo(50,50);
		mediator_window.focus();
	}else{
		mediator_window.document.location.replace(file);
		mediator_window.focus();
	}
	return;
}

/*
function show_member_card(file, windowTitle){
	if(member_window == undefined || !member_window || member_window.closed){
		var member_window;
		member_window = window.open(file, 'member_window', "width=560,height=600,menubar=no,location=no,scrollbars=yes,status=no,resizable=yes,top=0,left=0,dependent=yes,alwaysRaised=yes");
		//member_window.moveTo(50,50);
		member_window.focus();
	}else{
		member_window.document.location.replace(file);
		member_window.focus();
	}
	return;
}
*/

