﻿function memberlogin() {
	var www = location.href.indexOf("http://www.anorgend.org")
	var ww2 = location.href.indexOf("http://www2.anorgend.org")
	var loc = location.href.indexOf("http://localhost")
	if (www == 0) { setTimeout("self.location.href='http://www.ctsve.com/php/memberlogin.php';",0); }
	if (ww2 == 0) { setTimeout("self.location.href='http://www.ctsve.com/php/memberlogin2.php';",0); }
	if (loc == 0) { setTimeout("self.location.href='/ie/';",0); }
	}

function pagepub() {
	setTimeout("self.location.href='/contents/pub/';",0);
	}

function maj()
{
	date		=document.lastModified;
	jour		=date.charAt(3)+date.charAt(4);
	mois		=date.charAt(0)+date.charAt(1);
	annee		=date.charAt(6)+date.charAt(7)+date.charAt(8)+date.charAt(9);
	heures 		=date.charAt(11)+date.charAt(12);
	minutes		=date.charAt(14)+date.charAt(15);
	secondes	=date.charAt(17)+date.charAt(18);
	return("Derni&egrave;re mise &agrave; jour:  "+jour+"/"+mois+"/"+annee+" &agrave; "+heures+":"+minutes+".");
}

function maj2()
{
	date		=document.lastModified;
	jour		=date.charAt(3)+date.charAt(4);
	mois		=date.charAt(0)+date.charAt(1);
	annee		=date.charAt(6)+date.charAt(7)+date.charAt(8)+date.charAt(9);
	heures 		=date.charAt(11)+date.charAt(12);
	minutes		=date.charAt(14)+date.charAt(15);
	secondes	=date.charAt(17)+date.charAt(18);
	return("Derni&egrave;re mise &agrave; jour: "+jour+"/"+mois+"/"+annee);
}

function maj3()
{
	date		=document.lastModified;
	jour		=date.charAt(3)+date.charAt(4);
	mois		=date.charAt(0)+date.charAt(1);
	annee		=date.charAt(6)+date.charAt(7)+date.charAt(8)+date.charAt(9);
	heures 		=date.charAt(11)+date.charAt(12);
	minutes		=date.charAt(14)+date.charAt(15);
	secondes	=date.charAt(17)+date.charAt(18);
	return("Derni&egrave;re mise &agrave; jour: "+jour+"/"+mois+"/"+annee);
}

function copyr()
{
	var thistoday = new Date();
	var year  = thistoday.getYear();
	if (year < 1900){
	    year += 1900;
	   }

	copyryear=" Copyright " +year+" - ANORGEND. Tous droits r&eacute;serv&eacute;s.<br>R&eacute;alis&eacute par l&#39;Adjudant-Chef (R) Harald LORAZO.<br>Remerciements au concepteur Marc NYCZ et Sylvain CEDORGE.</small>";
	return(copyryear);
}

function horloge(){

    today = new Date();
    var this_month = new Array(12);
    this_month[0]  = "Janvier";
    this_month[1]  = "F&eacute;vrier";
    this_month[2]  = "Mars";
    this_month[3]  = "Avril";
    this_month[4]  = "Mai";
    this_month[5]  = "Juin";
    this_month[6]  = "Juillet";
    this_month[7]  = "Ao&ucirc;t";
    this_month[8]  = "Septembre";
    this_month[9]  = "Octobre";
    this_month[10] = "Novembre";
    this_month[11] = "D&eacute;cembre";

    var this_day = new Array(7);
    this_day[0] = "Dimanche";
    this_day[1] = "Lundi";
    this_day[2] = "Mardi";
    this_day[3] = "Mercredi";
    this_day[4] = "Jeudi";
    this_day[5] = "Vendredi";
    this_day[6] = "Samedi";

    var thistoday = new Date();
    var hrs   = thistoday.getHours();
    var mns   = thistoday.getMinutes();
    var day   = thistoday.getDate();
    var jour  = thistoday.getDay();
    var month = thistoday.getMonth();
    var year  = thistoday.getYear();
    if (year < 1900){
        year += 1900;
    }

    heure = today.getHours();
    minute = today.getMinutes();
    seconde = today.getSeconds();
    if (heure < 10){
    heure = "0"+heure}
    if (minute < 10){
    minute = "0"+minute}
    if (seconde < 10){
    seconde = "0"+seconde}
    temps.innerHTML = this_day[jour]+"<br>"+day+" "+this_month[month]+" " +year+"<br>"+heure+':'+minute+':'+seconde;
    window.setTimeout("horloge();", 100)
}

function horloge2(){

    today = new Date();
    var this_month = new Array(12);
    this_month[0]  = "Janvier";
    this_month[1]  = "F&eacute;vrier";
    this_month[2]  = "Mars";
    this_month[3]  = "Avril";
    this_month[4]  = "Mai";
    this_month[5]  = "Juin";
    this_month[6]  = "Juillet";
    this_month[7]  = "Ao&ucirc;t";
    this_month[8]  = "Septembre";
    this_month[9]  = "Octobre";
    this_month[10] = "Novembre";
    this_month[11] = "D&eacute;cembre";

    var this_day = new Array(7);
    this_day[0] = "Dimanche";
    this_day[1] = "Lundi";
    this_day[2] = "Mardi";
    this_day[3] = "Mercredi";
    this_day[4] = "Jeudi";
    this_day[5] = "Vendredi";
    this_day[6] = "Samedi";

    var thistoday = new Date();
    var hrs   = thistoday.getHours();
    var mns   = thistoday.getMinutes();
    var day   = thistoday.getDate();
    var jour  = thistoday.getDay();
    var month = thistoday.getMonth();
    var year  = thistoday.getYear();
    if (year < 1900){
        year += 1900;
    }

    mois  = date.charAt(0)+date.charAt(1);
    heure = today.getHours();
    minute = today.getMinutes();
    seconde = today.getSeconds();
    if (heure < 10){
    heure = "0"+heure}
    if (minute < 10){
    minute = "0"+minute}
    if (seconde < 10){
    seconde = "0"+seconde}
    temps.innerHTML = "Date de l'impression: "+day+"/"+mois+"/" +year+" ? "+heure+':'+minute;
    window.setTimeout("horloge2();", 100)
}

function mailpage()
{
	chaine_mail = "mailto:?subject=Site www.anorgend.org: " + document.title;
	chaine_mail += "&body=Je recommande cette page: " + document.title;
	chaine_mail += ". %0A%0AConsultable ? l'adresse : " + location.href; 
	location.href = chaine_mail;
}

function printpage()
{
	chaine_page = location.href; 
	chaine_page = chaine_page.replace(/contents/,"prints");
	window.open(chaine_page);
}

function loadpage()
{
	chaine_page = location.href; 
	chaine_page = chaine_page.replace(/contents/,"prints");
	chaine_page = chaine_page.replace(/html/,"pdf");
	window.open(chaine_page);
}

function reloadpage()
{
 chaine_page = location.href; 
 location.href = chaine_page;
}

function showpage()
{
	str = location.href;
	place = str.indexOf("/",1);

 	strnb = str.length;
	place = str.indexOf("/",1);
	str = str.substring(place,strnb);
 
	var out = "", flag = 0;
	for (i = 0; i < str.length; i++)
	{
		if (str.charAt(i) != "/") 
		{
			out += str.charAt(i);
			flag = 0;
		}
		else 
		{
			if(flag == 0)
			{
				out += " > ";
				flag = 1;
			}
		}
	}
  	chaine = "";
  	var ok = 1
  	while (ok == 1) 
	{
  		tableau = out.split(">");
  		q = tableau.length;
  		q = q
		for ( i = 2; i < q; i++ ) 
		{
			result = tableau[i];
				if ( result != "undefined" ) 
				{
					ok = 0;
				}
			chaine += " | "+result;
		}
	}	
	lgchaine=chaine.length;
	out = chaine.substring(2,lgchaine);
	out = "<img src=/library/images/bt_way_green.gif border=0>"+out;

	return(out);
}

function inscriptconf()
{
 chaine_mail = "mailto:secretariat@anorgend.org?subject=Adh?sion pour l'ann?e en cours&body=Cher secr?taire,%0A%0AAdh?sion ? l'ann?e en cours%0A%0ALe Grade: GGG Nom: NNN Pr?nom: PPP N? de T?l. TTT.%0ATexte%0A%0ARemplacez :%0A- les G par votre grade,%0A- les N par votre Nom%0A- les P par votre Pr?nom%0A- les T par votre N? de T?l.%0A-Texte%0A%0AVotre e-mail comptant pour une signature.";
 location.href = chaine_mail;
}

function mailtomasterpub()
{
 chaine_mail = "mailto:webmaster@anorgend.org?subject=Inscription ? une parutiion pour une ann?e&body=Cher Webmaster,%0A%0ANous souhaitons inscrire notre soci?t? ? une parution pour une ann?e%0Asur votre site Internet http://www.anorgend.org.";
 location.href = chaine_mail;
}

function mailtopresident()
{
	var contact		= "philippe.tissier"
	var emailHost	= "anorgend.org"
	var sujet1		= "subject=Suggestions,&nbsp;id?es&nbsp;et&nbsp;critiques..."
	var sujet2		= "&body=Cher&nbsp;Pr?sident,%0A%0AJe&nbsp;me&nbsp;permet&nbsp;de..."
	var sujet		= sujet1+sujet2
	var mailto		= "<a href=" + "mail" + "to:" + contact + "@" + emailHost + "?" + sujet + ">"
	var mailaqui	= contact + "@" + emailHost + "</a>"
	var mailtoaqui	= mailto+mailaqui
	return(mailtoaqui);
}

function mailtosecretaire()
{
	var contact		= "philippe.pezet"
	var emailHost	= "anorgend.org"
	var sujet1		= "subject=Suggestions,&nbsp;id?es&nbsp;et&nbsp;critiques..."
	var sujet2		= "&body=Cher&nbsp;Secr?taire,%0A%0AJe&nbsp;me&nbsp;permet&nbsp;de..."
	var sujet		= sujet1+sujet2
	var mailto		= "<a href=" + "mail" + "to:" + contact + "@" + emailHost + "?" + sujet + ">"
	var mailaqui	= contact + "@" + emailHost + "</a>"
	var mailtoaqui	= mailto+mailaqui
	return(mailtoaqui);
}


function mailtotresorier()
{
	var contact		= "michel.kriszt"
	var emailHost	= "anorgend.org"
	var sujet1		= "subject=Suggestions,&nbsp;id?es&nbsp;et&nbsp;critiques..."
	var sujet2		= "&body=Cher&nbsp;Tr?sorier,%0A%0AJe&nbsp;me&nbsp;permet&nbsp;de..."
	var sujet		= sujet1+sujet2
	var mailto		= "<a href=" + "mail" + "to:" + contact + "@" + emailHost + "?" + sujet + ">"
	var mailaqui	= contact + "@" + emailHost + "</a>"
	var mailtoaqui	= mailto+mailaqui
	return(mailtoaqui);
}


function mailtowebmaster()
{
	var contact		= "harald.lorazo"
	var emailHost	= "anorgend.org"
	var sujet1		= "subject=Suggestions,&nbsp;id?es&nbsp;et&nbsp;critiques..."
	var sujet2		= "&body=Cher&nbsp;Webmaster,%0A%0AJe&nbsp;me&nbsp;permet&nbsp;de..."
	var sujet		= sujet1+sujet2
	var mailto		= "<a href=" + "mail" + "to:" + contact + "@" + emailHost + "?" + sujet + ">"
	var mailaqui	= contact + "@" + emailHost + "</a>"
	var mailtoaqui	= mailto+mailaqui
	return(mailtoaqui);
}

function objectFlash(theFile, largeur, hauteur, flashvars, mode ) 
{
    document.write('<object type=\"application/x-shockwave-flash\" data=\"' + theFile + '\" width=\"' + largeur + '\" height=\"' + hauteur + '\">' +
    ' <param name=\"FlashVars\" value=\"' + flashvars + '\" />' +
    ' <param name=\"movie\" value=\"' + theFile + '\" />' + 
    ' <param name=\"wmode\" value=\"' + mode + '\" />' + 
    ' </object>');

}