var emag;

function openEmag() {
/*
	if (exists && emag) {
		emag = window.open("http:///lib/emag.php?site_from=", 'emag', 'height=586,width=798,scrollbars=no');
	}
*/
	
	if (!emag || emag.closed) {
		emag = window.open("http:///lib/emag.php?site_from=", 'emag', 'height=592,width=780,scrollbars=no');
	} else {
		emag.focus();
	}
}
function openEmagAuthentification() {

	if (!emag || emag.closed) {
		emag = window.open("http:///lib/emag.php?site_from=&etape=3", 'emag', 'height=592,width=780,scrollbars=no');
	} else {
		emag.focus();
	}
}
function openEmagChoixPapier() {
	if (!emag || emag.closed) {
		emag = window.open("http:///lib/emag.php?site_from=&etape=2&msg=8", 'emag', 'height=592,width=780,scrollbars=no');
	} else {
		emag.focus();
	}
}
function openEmagDesinscNews(){
	if (!emag || emag.closed) {
		emag = window.open("http:///lib/emag.php?site_from=&desinsc_news=1", 'emag', 'height=592,width=780,scrollbars=no');
	} else {
		emag.focus();
	}
}