function turnOnCell(myCell,wLang,wSection)
{
	/*
	id 1 = Publicite Illico Hodes
	id 2 = Rit@ Services
	id 3 = CV Manager
	id 4 = Hodes solutions
	id 5 = La langue (français-anglais)
	*/
	switch(myCell.id){
		case "1":
			myCell.className='m_PIH_OVER';
			switch(wLang){
				case "F":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_pih.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_pih.jpg";
					break;
				case "E":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_pih_e.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_pih_e.jpg";
					break;
			}
			break;
		case "2":
			myCell.className='m_RITA_OVER';
			switch(wLang){
				case "F":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_rita.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_rita.jpg";
					break;
				case "E":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_rita_e.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_rita_e.jpg";
					break;
			}
			break;
		case "3":
			myCell.className='m_CVMANAGER_OVER';
			switch(wLang){
				case "F":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_cvmanager.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_cvmanager.jpg";
					break;
				case "E":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_cvmanager_e.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_cvmanager_e.jpg";
					break;
			}
			break;
		case "4":
			myCell.className='m_HODES_OVER';
			switch(wLang){
				case "F":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_hodes.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_hodes.jpg";
					break;
				case "E":
					if(wSection != 'typeA')
						document.images["fenetre"].src = "images/fenetre_hodes_e.jpg";
					else
						document.images["fenetre"].src = "images/a_fenetre_hodes_e.jpg";
					break;
			}
			break;
		case "5":
			myCell.className='m_LANG_OVER';
			if(wSection != 'typeA')
			{
				switch(wLang){
					case "F":
						document.images["fenetre"].src = "images/fenetre_english.jpg";
						break;
					case "E":
						document.images["fenetre"].src = "images/fenetre_francais.jpg";
						break;
				}
				break;
			}
	}
}

function turnOffCell(myCell,wSection)
{
	/*
	id 1 = Publicite Illico Hodes
	id 2 = Rit@ Services
	id 3 = CV Manager
	id 4 = Hodes solutions
	id 5 = La langue (français-anglais)
	*/
	switch(myCell.id){
		case "1":
			myCell.className='m_PIH';
			if(wSection != 'typeA')
				document.images["fenetre"].src = "images/fenetre.jpg";
			else
				document.images["fenetre"].src = "images/a_fenetre.jpg";
			break;
		case "2":
			myCell.className='m_RITA';
			if(wSection != 'typeA')
				document.images["fenetre"].src = "images/fenetre.jpg";
			else
				document.images["fenetre"].src = "images/a_fenetre.jpg";
			break;
		case "3":
			myCell.className='m_CVMANAGER';
			if(wSection != 'typeA')
				document.images["fenetre"].src = "images/fenetre.jpg";
			else
				document.images["fenetre"].src = "images/a_fenetre.jpg";
			break;
		case "4":
			myCell.className='m_HODES';
			if(wSection != 'typeA')
				document.images["fenetre"].src = "images/fenetre.jpg";
			else
				document.images["fenetre"].src = "images/a_fenetre.jpg";
			break;
		case "5":
			myCell.className='m_LANG';
			if(wSection != 'typeA')
			{
				document.images["fenetre"].src = "images/fenetre.jpg";
			}
			break;
	}
}
// ============================================================================================
function nouvelleImage(path)
{
	if (document.images)
	{
		var resultat = new Image();
		resultat.src = path;
		return resultat;
	}
}
// ============================================================================================
function flip(nomImage, source)
{
	document.images[nomImage].src = source;
}
// ============================================================================================

function allowMaxCharacters(wText, wLen)
{
	var tmpStr = new String(wText.value);
	
	if(tmpStr.length >= wLen)
	{
		alert("Vous avez atteint la limite de " + wLen + " caractères pour ce champs");
	}
}
// ==============================================================================================

function showButton()
{
	document.sForm.submitButton.style.visibility = "visible";
}

//===============================================================================================

function showPopUp(wPage)
{
	var width = 300;
	var height = 250;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open(wPage,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,toolbar=no," + pos);
}

//==========================================================================================================================================================

function openForum(forumPath)
{
	var width = 636;
	var height = 496;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open(forumPath,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

//==========================================================================================================================================================================

function openSendEmail()
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("sendEmail.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

// ====================================================================================================================================================================

function repondre(wID)
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("repondre.asp?ID="+wID,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function supprimerSujet(unSujetID)
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("delete_sujet.asp?ID="+unSujetID,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function supprimerReponse(unReponseID,unSujetID)
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("delete_reponse.asp?repID=" + unReponseID + "&sujID=" + unSujetID,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function nouveauSujet()
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("nouveau_sujet.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

// =========================================================================================================================================================================

// =========================================================================================================================================================================

function sendForum()
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("../gestion/sendForum/form_sendForum.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function afficheCalendrier()
{
	var width = 700;
	var height = 500;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("calendrier/list_calendar.asp?WCAL=CAL_EVENEMENT","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}


// =========================================================================================================================================================================

function SendMessage()
{
	var width = 615;
	var height = 600;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("newletter_placerh/form.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function nouvelleCat(wSection)
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	if(wSection == "PIH")
	{
		window.open("nouvelleCat.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
	}
	else
	{
		window.open("nouvelleCat_hodes.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
	}
}

// =========================================================================================================================================================================

function modifierCat(wSection)
{
	var width = 430;
	var height = 180;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	if(wSection == "PIH")
	{
		window.open("modifierCat.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
	}
	else
	{
		window.open("modifierCat_hodes.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
	}
}

// =========================================================================================================================================================================

function calendrier()
{
	var width = 759;
	var height = 704;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("../../calendrier/showcal.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function calendrierForm()
{
	var width = 416;
	var height = 540;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("form.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function calendrierDesc(wID)
{
	var width = 416;
	var height = 420;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("description.asp?id=" + wID,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function calendrier_f()
{
	var width = 759;
	var height = 704;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("../calendrier_f/showcal.asp","","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}

// =========================================================================================================================================================================

function calendrierDescRH(wID)
{
	var width = 416;
	var height = 420;
	
	var top = (screen.height - height) / 2;
	if(top < 0)
	{
		top = 0;
	}
	
	var left = (screen.width - width) / 2;
	if(left < 0)
	{
		left = 0;
	}
	
	var pos = "top=" + top + ", left=" + left + ", width=" + width + ", height=" + height;
	
	window.open("../../calendrier/description.asp?id=" + wID,"","width=" + width + ",height=" + height + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no," + pos);
}

// =========================================================================================================================================================================
