var imgwidth=document.body.offsetWidth; 
var imgheight=document.body.offsetHeight-100;

function exit()
{
if (confirm("Are you sure: You want to close !\n\nÊtes-vous sûr de vouloir fermer !")){window.close();};
}

function message()
{
window.alert("You can click on pictures !\n\nVous pouvez cliquer sur les dessins !");
}

if (navigator.appName == "Microsoft Internet Explorer") {imgwidth=document.body.offsetWidth; imgheight=document.body.offsetHeight-100;}
else 
{
if (navigator.appName == "Netscape") {imgwidth=window.innerWidth; imgheight=window.innerHeight-100;}
else {document.write(" Indispensable: Internet Explorer / Netscape");} 
}

function links(a)
{
window.open(a, "_blank", "resizable=1,scrollbars=1,toolbar=0,location=0,menubar=0,status=0,width="+(imgwidth-100)+",height="+(imgheight+50)+",left=50,top=10");
}

function poster(a)
{
window.open(a, "_blank", "resizable=0,scrollbars=0,toolbar=0,location=0,menubar=0,status=0,width="+reserve_1+",height="+reserve_2+",left=10,top=10");
}

function poster2(a)
{
window.open(a, "_blank", "resizable=0,scrollbars=0,toolbar=0,location=0,menubar=0,status=0,width="+reserve_1+",height="+reserve_2+",left="+(imgwidth-reserve_1-10)+",top=10");
}

document.write("<DIV ID='LAYER1' STYLE='POSITION:ABSOLUTE; LEFT:-0px; TOP:-0px; Z-INDEX:1'>");
document.write("<CENTER>");
document.write("<TABLE BORDER='0' WIDTH="+(imgwidth-30)+">");

document.write("<TR>");
document.write("<TD COLSPAN='5'>");
document.write("<EMBED SRC='../data/"+active_pict+".swf' WIDTH="+(imgwidth-30)+" HEIGHT="+imgheight+" BGCOLOR='#000000' ALT="+active_pict+" PLUGINSPAGE='http://www.macromedia.com/shockwave/download/' TYPE='application/x-shockwave-flash'></EMBED>");
document.write("</TD>");
document.write("</TR>");

document.write("<TR>");
document.write("<TD WIDTH='5'>");
document.write("&nbsp;");
document.write("</TD>");

document.write("<TD ALIGN='left'>");
var nom = "book";
var domaine = "para2000.org"; 
var slash = " / "; 
if (page_number == "") {slash="";}
document.write("<A HREF=\"mailto:" + nom + "@" + domaine + "?subject=P@r@2000/Book/"+active_page+"/&body=Para2000/Book/Page/Ref.: "+active_page+"-"+page_number+"/"+last_page_number+"-"+active_pict+"\">");
document.write("<img src='../../buttons/xp_email.gif' border='0' width='19' height='19' alt='Message &gt; &gt; &gt; P@r@2000'></A>");
document.write("</TD>");

document.write("<TD ALIGN='left' WIDTH='300'>");
document.write("<FONT Class=number> &nbsp; &nbsp; "+active_page+" - "+page_number+slash+last_page_number+"</FONT>");
document.write("</TD>");
document.write("<TD>");

document.write("<IMG SRC='../base/buttons_"+bottom_buttons+".gif' ALIGN='right' WIDTH='300' HEIGHT='30' BORDER='0' ALT='' USEMAP='#bottom_buttons_Map'>");
document.write("<MAP NAME='bottom_buttons_map'>");
document.write("<AREA SHAPE='rect' ALT='Return-Main-Menu / Retour-Menu-Principal' COORDS='7,5,27,25' HREF='../base/00101.html' TARGET='_self'>");

if (bottom_buttons == "photo") {
document.write("<AREA SHAPE='rect' ALT='Available-Photo / Photo-Disponible' COORDS='83,5,103,25' HREF=../"+chapter+"/"+photo_1+".html>");
document.write("<EMBED SRC='../base/sound_more.wav' width='0' height='0' volume='100' loop='false' autostart='true' hidden='false'></EMBED>");
}

if (bottom_buttons == "more") {
document.write("<AREA SHAPE='rect' ALT='More-Informations / Informations-complémentaires' COORDS='83,5,103,25' HREF=../"+chapter+"/"+more+".html>");
document.write("<EMBED SRC='../base/sound_more.wav' width='0' height='0' volume='100' loop='false' autostart='true' hidden='false'></EMBED>");
}

if (bottom_buttons == "click") {
document.write("<AREA SHAPE='rect' ALT='Click on picture / Cliquez sur les dessins' COORDS='83,5,103,25' HREF='javascript:message()'>");
document.write("<EMBED SRC='../base/sound_more.wav' width='0' height='0' volume='100' loop='false' autostart='true' hidden='false'></EMBED>");
}

if (bottom_buttons == "printer") {
document.write("<AREA SHAPE='rect' ALT='Page-Printer / Impression-Page' COORDS='83,5,103,25' HREF=../"+chapter+"/"+more+".html TARGET='_new'>");
}

document.write("<AREA SHAPE='rect' ALT='First-page / Première-Page' COORDS='121,5,141,25' HREF=../"+previous_chapter+"/"+first_page+".html>");

if (bottom_buttons == "click") {
document.write("<AREA SHAPE='rect' ALT='Previous-Page / Page-Précédente' COORDS='159,5,179,25' HREF=../"+previous_chapter+"/"+previous_page+".html>");
}

document.write("<AREA SHAPE='rect' ALT='Previous-Page / Page-Précédente' COORDS='159,5,179,25' HREF='javascript:history.go(-1)'>");

document.write("<AREA SHAPE='rect' ALT='Next-Page / Page-Suivante' COORDS='197,5,217,25' HREF=../"+next_chapter+"/"+next_page+".html>");
document.write("<AREA SHAPE='rect' ALT='Next-Paragraph / Paragraphe-Suivant' COORDS='235,5,255,25' HREF=../"+next_chapter+"/"+last_page+".html>");
document.write("<AREA SHAPE='rect' ALT='Close-Window / Fermer-la-Fenêtre' COORDS='273,5,293,25' HREF='javascript:exit()'>");
document.write("</MAP>");

/*
if (navigator.appVersion.substring(0,1)>=3)
{
document.write("<SCRIPT LANGUAGE='javascript'>");
document.write("I1='new Image';");
document.write("I1.SRC='../data/"+next_page+".swf' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/' TYPE='application/x-shockwave-flash';");
document.write("</SCRIPT>");
}
*/

document.write("</TD>");
document.write("<TD WIDTH='10'>");
document.write("&nbsp;");
document.write("</TD>");
document.write("</TR>");
document.write("</TABLE>");
document.write("</CENTER>");
document.write("</DIV>");

if (next_pict == "") {next_pict=next_page;}

document.write("<DIV ID='LAYER2' STYLE='POSITION:ABSOLUTE; LEFT:0px; TOP:-0px; Z-INDEX:2'>");
document.write("<EMBED SRC='../data/"+next_pict+".swf' WIDTH='10' HEIGHT='10' BGCOLOR='#000000' ALT="+next_pict+" PLUGINSPAGE='http://www.macromedia.com/shockwave/download/' TYPE='application/x-shockwave-flash'></EMBED>");
document.write("</DIV>");


document.onkeydown = keyHit;

	if (document.layers) {
		document.captureEvents(Event.KEYDOWN);
		ltArrow = 28;
		rtArrow = 29;
	}
	else {
		ltArrow = 37;
		rtArrow = 39;
	}
	
function keyHit(evt) {
		if (evt) {
			thisKey = evt.which;
		}
		else {
			thisKey = window.event.keyCode;
		}
		if (thisKey == ltArrow) {
			javascript:history.go(-1);
		}
		else if (thisKey == rtArrow) {
			window.open("../"+next_chapter+"/"+next_page+".html","_self");
		}
		if (thisKey == 27) {
	    exit();
		}
	}
