// JavaScript Document
//Bibliothèquestockmilitaire.com
//2007-10-01
var nom_site = 'stockmilitaire';
var dom_site = nom_site + '.com';
<!--
var infoShow;
function createInfoShow(urlInfo) {
	var chaine = ""+location;
	if ( chaine.search('/localhost/') == -1 ) {
		var urlSite = 'http://www.' + dom_site;
	}
	else {
		var urlSite = 'http://localhost/' + nom_site;
	}
	if ( chaine.search('/administration/') != -1 ) {
		var urlSite = urlSite + '/administration';
	}
	infoShow = window.open(urlSite + '/info.php' + urlInfo,'infoShow','scrollbars=yes,width=800,height=600,screenX=0,screenY=0,top=10,left=10');
}
function info(url) {
	if(typeof(infoShow)!="undefined") {
		if(infoShow.closed!=true)
			infoShow.close();
	}
	var urlInfo  = '?info=' + url;
	createInfoShow(urlInfo);
}
function closeInfoShow() {
	if(typeof(infoShow)!="undefined") {
		if(infoShow.closed!=true)
			infoShow.close();
	}
}
//-->

<!-- nbre caractères maxi
function CheckLen(Target,Nbre)
{
StrLen = Target.value.length
if (StrLen > Nbre )
{
Target.value = Target.value.substring(0,Nbre);
CharsLeft = Nbre;
}
else
{
CharsLeft = StrLen;
}
var CharsLeft1 = Nbre - CharsLeft;
document.form1.abd.value = CharsLeft1;
}
//-->
//barre de statuts vierge
window.defaultStatus = 'stockmilitaire.com - Le spécialiste du militaire à bon prix !'

<!--Alerte suppression-->
function supp(texte,lien) {
	if (confirm(texte))
		window.location=lien;
}

function carClavier(e) {
	if (window.event)
		// Pour IE Explorer
		return String.fromCharCode(window.event.keyCode);
	else
		// Pour Netscape
		return String.fromCharCode(e.which);
}

function testNum(e) {
	caractere = carClavier(e);
	if (caractere < "0" || caractere > "9") return false;
	else return true;
}

function dateHeure()  {
<!--affichage de la date et de l'heure
semaine = new Array ('dimanche','lundi','mardi','mercredi','jeudi','vendredi','samedi')
mois = new Array ('janvier','f&eacute;vrier','mars','avril','mai','juin','juillet','ao&ucirc;t','septembre','octobre','novembre','d&eacute;cembre')
heure = new Array ('00','01','02','03','04','05','06','07','08','09',10,11,12,13,14,15,16,17,18,19,20,21,22,23)
minute = new Array ('00','01','02','03','04','05','06','07','08','09',10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59)
Aujourdhui = new Date ()
document.write(semaine [Aujourdhui.getDay()] + ' ' + [Aujourdhui.getDate()] + ' ')
document.write(mois [Aujourdhui.getMonth()] + ' ')
document.write(heure [Aujourdhui.getHours()] + 'H')
document.write(minute [Aujourdhui.getMinutes()])
//-->
}

<!-- ajout favoris
function addFav(url_site) {
	if ((navigator.appName.search('Microsoft Internet Explorer') != -1)&&(navigator.userAgent.search('Opera') == -1))  { 
		//url_site="http://www.web-13.com/democcaz/";
		titre_site = "! Solution WEB-13 !";
		document.write('<a href="#" onClick="window.external.AddFavorite(url_site,titre_site);return(false);"><img src="../images/go_fav.gif" alt="Ajouter à vos favoris" /></a>')
	} 
	if ((navigator.appName.search('Microsoft Internet Explorer') != -1)&&(navigator.userAgent.search('Opera') != -1))  { 
		document.write('Ctrl+T pour ajouter à vos signets'); 
	} 
	/*if (navigator.appName == "Netscape")  { 
		document.write('Ctrl+D pour marquer cette page'); 
	} */
} 
//ajout favoris -->

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function JumpSelect(targ,adresse,selObj,restore){ 
  eval(targ+".location='"+adresse+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

