
function resetTxtBox(objTxtbox,defText){
	if (objTxtbox.value == defText){
		objTxtbox.value  = "";
	}
}

function doSubmitSearch(objTxtbox,defText,msg){
	if (objTxtbox.value == defText || objTxtbox.value ==""){
		alert(msg);
		return false;
	}
	return true;
}

//Au démarage de l'application parcourt de toutes les images pour géréer le mouse ouver
	function initOverImage() {
		if (!document.getElementById) return
		var imgOriginSrc;
		var imgTemp = new Array();
		var imgarr = document.getElementsByTagName('img');
		for (var i = 0; i < imgarr.length; i++) {
			if (imgarr[i].getAttribute('hsrc')) {
				imgTemp[i] = new Image();
				imgTemp[i].src = imgarr[i].getAttribute('hsrc');
					
				imgarr[i].onmouseover = function() {
					imgOriginSrc = this.getAttribute('src');
					this.setAttribute('src',this.getAttribute('hsrc'));
					document.getElementById(this.getAttribute('itemTexte')).className = document.getElementById(this.getAttribute('itemTexte')).className + "Hover";
				}
				imgarr[i].onmouseout = function() {
					this.setAttribute('src',imgOriginSrc);
					document.getElementById(this.getAttribute('itemTexte')).className = document.getElementById(this.getAttribute('itemTexte')).className.replace("Hover","");
				}
			}
		}
	}


	//Effectue la modification de la puce pour suivre le texte
	function mouseOverText(strId) {
		imgOriginSrc = document.getElementById(strId).src;
		document.getElementById(strId).src = document.getElementById(strId).getAttribute('hsrc');
	}

	//Effectue la modification de la puce pour suivre le texte
	function mouseOutText(strId){
		document.getElementById(strId).src = imgOriginSrc;
	}
		
	//Initialisation
	function init() {
		initOverImage();
	}
	
	//Fermeture de la fenêtre popup
	function closeFrame()
	{		
		parent.cClick();
	}
	
	//Conserve la formation actuellement affiché pour éviter le flicquer
		var strActuelle;   
	    
		function switchTabFormation(strNumFichier, strIdName ) {
	
			strNumPage = strNumFichier;

			if (strActuelle != strNumPage) {
			
				strActuelle = strNumPage;
				
				cptTabFormation = 1;
				while (document.getElementById("tabFormation_" + cptTabFormation ) != null){
					document.getElementById("tabFormation_" + cptTabFormation).style.backgroundImage = "url('/images/Frame/back_06.gif')";
					document.getElementById("tabFormation_" + cptTabFormation).className = "FormationOFF";
					cptTabFormation = cptTabFormation + 1;
				}
			
			
				if (strNumFichier != '0') {
				
					window.frames["ifrmFormation"].location  = "/iframe.aspx?pathPage="+ strNumPage;
		 
			                        
					document.getElementById(strIdName).style.backgroundImage = "url('/images/Frame/back_07.gif')";
					document.getElementById(strIdName).className = "FormationON";
				}

			}   
	            
		}	
		
		function OLiframeContent(src, width, height, name) {
			return ('<iframe frameborder="0" src="'+src+'" width="'+width+'" height="'+height+'"'
			+(name?' name="'+name+'" id="'+name+'"':'')+' scrolling="no">'
			+'<div>[iframe not supported]</div></iframe>');
		}
		
		function popUp(pagePath, lang, hauteur, offsetY) {
			return overlib(OLiframeContent('/popup.aspx?lang='+ lang +'&pagePath=' + pagePath+'&x=480&y='+hauteur, 480, hauteur, 'Detail'), 
							REF,'spTitre', 
							REFY,offsetY,
							REFX,16,
							WRAP, 
							TEXTPADDING,0, 
							BORDER,0, 
							STICKY,
							CAPTIONPADDING,4,
							CLOSECLICK,HIDESELECTBOXES, 
							STATUS,'',
							FGCOLOR, '#FFFFFF',
							BGCOLOR,'#ff00ff',
							CGCOLOR,'#EA0030');
		}
	
