function getWindowWidth() {
    var windowWidth = 0;
    if (typeof(window.innerWidth) == 'number') {
        windowWidth = window.innerWidth;
    } else {
        if (document.documentElement && document.documentElement.clientWidth) {
            windowWidth = document.documentElement.clientWidth;
        } else {
	if (document.body && document.body.clientWidth) {
	    windowWidth = document.body.clientWidth;
	}
         }
    }
    return windowWidth;
}
function poplink(texte)
{
	return true;
}
function killlink()
{
	return true;	
}
function zindex(hauteur) {
	dv = document.getElementById("menuFlash");
	dv.style.zIndex = hauteur;
}


function poplink(msg) {
	var skn = document.getElementById("topdecklink").style;
	var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1><TR><TD BGCOLOR=#FFFFFF><FONT COLOR=#000000 SIZE=2 face='Arial'>"+msg+"</TD></TR></TABLE></TD></TR></TABLE>"; 
	
	if (domok) {
	  	document.getElementById("topdecklink").innerHTML = content;
	  	skn.visibility = "visible";
  	}
}

function get_mouse(e) {
	var skn = document.getElementById("topdecklink").style;
	var x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
	var y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
	skn.left = x - 60;
	skn.top = y+20;
}

function killlink() {
	var skn = document.getElementById("topdecklink").style;
	if (domok) var content ="";
	document.getElementById("topdecklink").innerHTML = content;
	skn.visibility = "hidden";
}
function champRechercheFormation()
{
	var formation=new Array('Word','Excel','PowerPoint','Photoshop','Joomla','InDesign','Adobe','Illustrator', 'After Effects', 'Premiere Pro', 'Internet','Multimedia', 'Flash', 'ActionScript', 'Quark XPress', 'Gimp', 'Scribus', 'Inkscape', 'OpenOffice', 'Writer', 'Calc', 'Access', 'PHP', 'HTML', 'Creation site internet', 'Creation site Flash', 'Windev', 'Webdev', 'Photoshop', 'Bureautique', 'Joomla');
	var champ=document.getElementById('champRechercheFormation');
	if(champ.value=='')
	{
		var num=Math.round(Math.random()*(formation.length-1));
		champ.value='Formation '+formation[num];
	}
	addEvent(document.getElementById('champRechercheFormation'),'focus',champRechercheFormationVide);
	addEvent(document.getElementById('champRechercheFormation'),'click',champRechercheFormationVide);
}
function champRechercheFormationVide()
{
	var champ=document.getElementById('champRechercheFormation');
	champ.value="";
}
function champRechercheFormationInit()
{
	addEvent(document.getElementById('champRechercheFormation'),'mouseout',champRechercheFormation);
	addEvent(document.getElementById('champRechercheFormation'),'focus',champRechercheFormationVide);
	addEvent(document.getElementById('champRechercheFormation'),'click',champRechercheFormationVide);
	champRechercheFormation();
	domok = document.getElementById;
	
	if (domok) {
		if(navigator.appName.substring(0,3) == "Net") document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = get_mouse;
	}

}
function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, false); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
}

addEvent(window, 'load', champRechercheFormationInit);	
