﻿/* © absolu'TIC */

/*function externalUrls() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "_blank") anchor.target = "_blank";
 }
} window.onload = function() { externalUrls(); } // onload (X)Html Strict
//remplace target = "_blank" par rel

function noCache(url) { // In IE, if you make x-requests using the same URL, IE will give you the same result each time !
url + ((url.indexOf("?") == -1)?"?":"&") + "timestamp=" + new Date().valueOf();
}
*/
function context()  {alert('© absolu\'TIC'); return(false); }
document.oncontextmenu = context;

function swf(theSWF, features, divId, bgColor) {
	if (theSWF ==  null)  theSWF = "swflash.swf"; 
	if (features ==  null)  features = "width='100%' height='100%' align='middle' "; 
	if (divId ==  null)  divId = "swflash"; 
	if (bgColor == null) bgColor = "#666666";
	swfContent = "";
	swfContent = swfContent +'<object type="application/x-shockwave-flash" data='+theSWF+' '+features+'>';
	swfContent = swfContent +'<param name="movie" value='+theSWF+' /><param name="bgcolor" value='+bgColor+' />';
	swfContent = swfContent +'<param name="wmode" value="transparent" /><param name="quality" value="high" />';
	swfContent = swfContent +'<a href="http://www.adobe.com/go/getflash/"><img src="img/noflash.jpg" alt="Get Flashplayer" /></a>';
	swfContent = swfContent +'</object>';

	if (navigator.userAgent.indexOf("Firefox") != -1) { // adapt to Firefox !
		var swfContent = '<embed src='+theSWF+' '+features+' wmode="transparent" allowfullscreen="true" quality="high" pluginspage="http://www.adobe.com/go/getflash/" type="application/x-shockwave-flash"></embed>';
	}
	
	if(!divId || document.getElementById(divId) == null) document.writeln(swfContent);

	if (divId) {
		var container = document.getElementById(divId);
		container.innerHTML = swfContent;
	}
}

//GenericJS v1.1
function show(elem){if(document.getElementById(elem)){document.getElementById(elem).style.display='';}}
function hide(elem){if(document.getElementById(elem)){document.getElementById(elem).style.display='none';}}
function pop_up(theURL,winName,features) {window.open(theURL,winName,features);}
function goTo(link){document.location.href=link;}
function isAlphaNumeric(string){var regex=/^[0-9A-Za-z]+$/;if(regex.test(string)){return true;}else{return false;}}
function isNumeric(string){var regex=/^[0-9]+$/;if(regex.exec(string)){return true;}else{return false;}}
function OutLink(text,href,title,after_text,rel){if(text==null||typeof(text)=='undefined')text='undefined';if(href==null||typeof(href)=='undefined')href='/';if(title==null||typeof(title)=='undefined')title=text;if(rel==null||typeof(rel)=='undefined')rel='nofollow';if(after_text==null||typeof(after_text)=="undefined")after_text="";document.write('<a rel='+rel+' href="'+href+'" title="'+title+'">'+text+'</a>'+after_text);}
function addToFavorites(){var title=window.document.title;var url=window.document.location;if(window.sidebar){window.sidebar.addPanel(title,url,"");}else if(window.opera){var a=document.createElement("A");a.rel="sidebar";a.target="_search";a.title=title;a.href=url;a.click();}else if(window.external){window.external.AddFavorite(url,title);}}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}func();};}}
/* */
//function blockError(){return true;}
//window.onerror = blockError;

//if (parent.location.href == self.location.href){window.location.href = 'index.php' } // use comment in local use
 
function loading() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=loading.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 pop_img(Width,Height,img) { winpop=open("",'popup','width='+Width+',height='+Height+',top=0,left=100,toolbar=no,scrollbars=no,resizable=yes,title=no');
	winpop.document.write("<html>\n<head>\n<title>pop-up image</title>\n</head>\n<body>\n<center>\n<img src="+img);
	winpop.document.write("\n<br><br>\n<font size='2'><a href='javascript:window.close();'>Fermer la fenêtre</a></font>\n</center>\n</body>\n</html>"); }

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=0,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
	
function pop_up(theURL,winName,features) {window.open(theURL,winName,features);}

function datedmy() {
	var jour,mois;
	var temps = new Date();
	var jours=temps.getDay()+1 ;
	
	if (jours == 1) jour = "Dimanche";
		else if (jours == 2) jour = "Lundi";
		else if (jours == 3) jour = "Mardi";
		else if (jours == 4) jour = "Mercredi";
		else if (jours == 5) jour = "Jeudi";
		else if (jours == 6) jour = "Vendredi";
		else if (jours == 7) jour = "Samedi";

	var moisa=temps.getMonth()+1 ;
	if (moisa == 1) mois = " Janvier";
		else if (moisa == 2) mois = " Février";
		else if (moisa == 3) mois = " Mars";
		else if (moisa == 4) mois = " Avril";
		else if (moisa == 5) mois = " Mai";
		else if (moisa == 6) mois = " Juin";
		else if (moisa == 7) mois = " Juillet";
		else if (moisa == 8) mois = " Août";
		else if (moisa == 9) mois = " Septembre";
		else if (moisa == 10) mois = " Octobre";
		else if (moisa == 11) mois = " Novembre";
		else if (moisa == 12) mois = " Décembre";

	var annee=temps.getYear();
	if ( annee < 2000 )
		annee=annee+1900;

	var texte = "<span class='date'> "+jour+" "+temps.getDate()+" "+mois+" "+annee+"&nbsp;</span>";
	document.write(texte); }
//-->
