//afpn.fr

//PLEIN ECRAN
function PleinEcran()
{
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height-30);
}

//Initialisations
window.defaultStatus='';

//________________________________________________________________________
//PAS DE CLICK DROIT
var Msg="Copyright \u00A9 2009 AFPN";
function NoClickDroit(btnClick)
{
if (navigator.appName=="Netscape" && btnClick.which==3)
{
alert(Msg);
return false;
}
else if (navigator.appName=="Microsoft Internet Explorer" && event.button==2)
{
alert(Msg);
return false;
}
}
document.onmousedown=NoClickDroit;

//________________________________________________________________________
function TexteMail()
{
//Décomposition de l'adresse e-mail pour
//qu'elle ne soit pas reprise pas les robots
var monmail="";
monmail +="<font color=#990000>";
monmail +="<A TITLE='Ecrivez nous...'";
monmail +="HREF=mailto:";
monmail +="contact";
monmail +="@";
monmail +="afpn";
monmail +=".fr>";
monmail +="<B>AFPN</B></A></font>";
document.write(monmail);
}


//________________________________________________________________________
function ImageMail()
{
//Décomposition de l'adresse e-mail pour
//qu'elle ne soit pas reprise pas les robots
var monmail="";
monmail +="<A TITLE='Ecrivez nous...'";
monmail +="HREF=mailto:";
monmail +="contact";
monmail +="@";
monmail +="afpn";
monmail +=".fr>";
monmail +="<IMG BORDER=0 SRC=images/mail.gif WIDTH=20 HEIGHT=20></A>";
monmail +="<BR>";
document.write(monmail);
}

//________________________________________________________________________
function ImageActu()
{
//Décomposition de l'adresse e-mail pour
//qu'elle ne soit pas reprise pas les robots
var monmail="";
monmail +="<A TITLE='Venez nous voir...'";
monmail +="HREF=actu.htm#forum>";
monmail +="<IMG BORDER=0 SRC=images/logo_forum_2007.gif width=102 height=112></A>";
monmail +="<BR>";
document.write(monmail);
}

//________________________________________________________________________
function goPellicule(sFichier)
{
//alert('nomMenu : ' + nomMenu);
//alert('window.parent.f_SOMM.document.title : ' + window.parent.f_SOMM.document.title);
//alert(sFichier);
if (parent.frames.length==0) parent.location.href="index.php";
window.parent.f_SOMM.document.location=sFichier;
}

//________________________________________________________________________
function VerifMenu(nomMenu)
{
//alert('nomMenu : ' + nomMenu);
//alert('window.parent.f_SOMM.document.title : ' + window.parent.f_SOMM.document.title);
//if (nomMenu == "menu_1") alert('Test');
if (parent.frames.length==0) parent.location.href="index.php";
if (window.parent.f_SOMM.document.title != nomMenu) window.parent.f_SOMM.document.location=nomMenu+".htm";
}


//________________________________________________________________________
function goCatalog()
{
window.parent.f_SOMM.document.location="menu_2.htm";
window.parent.f_PRIN.document.location="hats_01.htm";
}


//________________________________________________________________________
function goCommande()
{
window.parent.f_SOMM.document.location="menu_2.htm";
window.parent.f_PRIN.document.location="b_commde.htm";
}

//________________________________________________________________________
function goAccueil()
{
window.parent.f_SOMM.document.location="menu_1.htm";
window.parent.f_PRIN.document.location="accueil.htm";
}

//________________________________________________________________________
function goVoyages()
{
//window.parent.f_SOMM.document.location="../../../menu_1.htm";
//window.parent.f_PRIN.document.location="../../../voyages.htm";
//alert(document.location);
window.parent.f_SOMM.document.location="menu_1.htm";
window.parent.f_PRIN.document.location="voyages.htm";
}

//________________________________________________________________________
function goVoyages2()
{
//window.parent.f_SOMM.document.location="../../../menu_1.htm";
//window.parent.f_PRIN.document.location="../../../voyages.htm";
//alert(document.location);
window.parent.f_SOMM.document.location="../../menu_1.htm";
window.parent.f_PRIN.document.location="../../voyages.htm";
}

//________________________________________________________________________
function goRapports()
{
//window.parent.f_SOMM.document.location="../../../menu_1.htm";
//window.parent.f_PRIN.document.location="../../../voyages.htm";
//alert(document.location);
if (parent.frames.length==0) parent.location.href="http://www.afpn.fr/";
}

//________________________________________________________________________
function Remonte()
{
window.scrollTo(0,0);
}

//________________________________________________________________________
function popup_photo(chemin, img)
{
  //alert("chemin : "+chemin+" , img : "+img);

  //popTmp = "";
	imgload=new Array();
  imgload[0]=new Image();
  imgload[0].src=chemin+img+".jpg";
  //setTimeout("",30000);
  //alert("imgload[0].src : "+imgload[0].src);

  // Compatible IE5+ / NN6+ / Mozilla
  if(navigator.appName.substring(0,3) == "Mic")
  {
   //popTmp = window.open("","","width=100,height=100,toolbar=0,status=0,directories=0,hotkeys=0,location=0,menuBar=0,scrollbars=0,resizable=0");
   popTmp = window.open("","","width=800,height=600,toolbar=0,status=0,directories=0,hotkeys=0,location=0,menuBar=0,scrollbars=0,resizable=1");
	//popTmp.document.open("","replace");
	}
  else
  {
   //popTmp = window.open("","","width=screen.width,height=screen.height,toolbar=0,status=0,directories=0,hotkeys=0,location=0,menuBar=0,scrollbars=1,resizable=1");
   popTmp = window.open("","","width=800,height=600,toolbar=0,status=0,directories=0,hotkeys=0,location=0,menuBar=0,scrollbars=1,resizable=1");
  }
  popTmp.document.writeln("<html>");
  popTmp.document.writeln("<head>");
  popTmp.document.writeln("<title>"+img+"</title>");
  popTmp.document.writeln("</head>");

  //Ajuste la taille de la fenetre a la taille de l'image - UNE FOIS L'IMAGE CHARGEE !!!
  popTmp.document.writeln("<script type=\"text/javascript\">");
  popTmp.document.writeln("function AjustePopUp()");
  popTmp.document.writeln("{");
  popTmp.document.writeln("  self.resizeTo(document.images[0].width+40,document.images[0].height+80); self.moveTo((screen.width/2)-(document.images[0].width/2)-20,(screen.height/2)-(document.images[0].height/2)-40); window.focus();");
  popTmp.document.writeln("}");
  popTmp.document.writeln("</"+"script>");

  popTmp.document.writeln("<body onload='AjustePopUp();' onblur='self.close(); return true;' onclick='self.close(); return true;' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0 background='../fond.jpg' link='#800000' vlink='#800000' alink='#800000'>");
  popTmp.document.writeln("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'>");
  popTmp.document.writeln(" <tr><td valign='middle' align='center'>");
  popTmp.document.writeln("  <img src='" + chemin + img + ".jpg' border='1' alt='Cliquez pour fermer' title='Cliquez pour fermer'>");
  popTmp.document.writeln("</td></tr>");
  popTmp.document.writeln("</table>");
  popTmp.document.writeln("</body>");
  popTmp.document.writeln("</html>");
  //alert('en test !!!');
  popTmp.document.close();
	//return true;
}


//________________________________________________________________________
function Imprime()
{
parent.f_PRIN.focus();
window.print();
}


//________________________________________________________________________
function wSt(s)
{
window.status=s;
return true;
}


//________________________________________________________________________
function Infos()
{
window.defaultStatus='';
alert('Copyright \u00A9 2008 AFPN');
}


//________________________________________________________________________
function AdFav()
{
 if(navigator.appName.substring(0,3) == "Mic")
 {
  //window.external.addfavorite('http://www.afpn.fr', '\u221A  A.F.P.N. - Aide à la Formation Paramédicale au Népal');
  window.external.addfavorite('http://www.afpn.fr', 'A.F.P.N. - Aide \340 la Formation Param\351dicale au N\351pal');
 }
 else
 {
  alert('Fonction non disponible sous Mozilla ou Netscape, Effectuez l\'op\351ration dans le menu : marque-pages');
 }
}

function addToFavorites()
{
var urlAddress = "http://www.afpn.fr";
var pageName = "A.F.P.N. - Aide \340 la Formation Param\351dicale au N\351pal";
if (document.all)
 window.external.AddFavorite(urlAddress, pageName);
else if (window.sidebar)
 window.sidebar.addPanel(pageName, urlAddress, "")
}

//________________________________________________________________________
function Pop_Up_3d()
{
//var vNomFic = vDir + '' + vNomFic;
//alert("chemin et fichier : " + vDir + " , fichier : " + vNomFic);
var vScreenW = screen.width - 10;
//vScreenW = 800;
var vScreenH = screen.height;

//var vOptions = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no";

var vOptions = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=" + vScreenW;
//var vOptions = "innerWidth=1, innerHeight=1, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no";

//maFenetre = window.open(vNomFic,"A.F.P.N.",vOptions);
//maFenetre = open("images/vue3d.htm", "", vOptions);
maFenetre = open("images/vue3d.htm", "", vOptions);

//alert("Test !");
//window.resizeTo(970,100%);

//maFenetre.focus();
}

//________________________________________________________________________
function Centre_Pop_Up()
{
//Centrage de la fenêtre
var x = 0;
var y = 0;
if(navigator.appName.substring(0,3) == "Mic") {
 x = document.body.offsetWidth;
 y = document.body.offsetHeight;
}
else {
 x = document.width;
 y = document.height;
}
//alert ("x : " + x + " et y : " + y);

x = (screen.width-x) / 2;
y = (screen.height-y) / 2;
//30px enlevé dans la hauteur cause barre des taches
y = y - 30;
//alert ("x : " + x + " et y : " + y);

window.moveTo(x,y);
//alert("Fin !");
}

//________________________________________________________________________
function open_carte_nepal(url)
{
//Centrage de la fenêtre
var x = 0;
var y = 0;
//alert ("x : " + x + " et y : " + y);
x = (screen.width-800) / 2;
y = (screen.height-600) / 2;
//30px enlevé dans la hauteur cause barre des taches
y = y - 30;
//alert ("x : " + x + " et y : " + y);
window.open(url , 'carte', 'left='+x+',top='+y+',width=800, height=600, toolbar=0, menubar=0, status=0 ,scrollbars=0, resizable=1');
}