
function getStringTaille(chaine){
	var lengthString = chaine.length;
	var size = chaine.substr(0,lengthString-2);
	return size;
}

function getBorderTaille(){
	var LeftHeightTotal, LeftTopHeight,LeftBottomHeight,LeftBottomTop;
	var RightHeightTotal, RightTopHeight,RightBottomHeight,RightBottomTop;

	var td = document.getElementsByTagName('table')[0].getElementsByTagName('tr')[0].getElementsByTagName('td');
	var NB = td.length;
	var Leheight = td[0].offsetHeight;

	LeftHeightTotal = Leheight;
	RightHeightTotal = Leheight;
	if(document.getElementById('left_top2')){
		if(document.getElementById('left_bottom2')){
			LeftTopHeight = document.getElementById('left_top2').offsetHeight;
			LeftBottomHeight = document.getElementById('left_bottom2').offsetHeight;
			document.getElementById('left_mid2').style.height = LeftHeightTotal - LeftTopHeight - LeftBottomHeight  + 'px';

			RightTopHeight = document.getElementById('right_top2').offsetHeight;
			RightBottomHeight = document.getElementById('right_bottom2').offsetHeight;
			document.getElementById('right_mid2').style.height = RightHeightTotal - RightTopHeight - RightBottomHeight + 'px';
		}
	}
	
}

function changeImgMenu(idBtn, imgPath){
	document.getElementById(idBtn).src = imgPath;
}
function changeLink(idBtn, link){
	document.getElementById(idBtn).href = link;
}
function changeLinkTarget(idBtn, link,target){
	document.getElementById(idBtn).href = link;
	document.getElementById(idBtn).target = target;
}

function changeImg(idImg, imgSrc,imgTitle,imgAlt){
	document.getElementById(idImg).src = imgSrc;
	document.getElementById(idImg).title = imgTitle;
	document.getElementById(idImg).alt = imgAlt;
}


function VideoStop() {
	if (navigator.appName == "Microsoft Internet Explorer"){
		document.MediaPlayer.stop();
	}
}

function ImageMax(chemin){
	html = '<html> <head> <title>ImageMax</title> </head> <body onClick="top.close()"><IMG src="'+chemin+'" BORDER=0 NAME=ImageMax onLoad="window.resizeTo(document.ImageMax.width+25, document.ImageMax.height+70)"></body></html>';
	popupImage =    window.open('','_blank','top=250, left=250, toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=1');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
}


function FondEcran(chemin){
	html = '<html><head><title>Fond d\'Ecran</title></head><body  style="background-color:#E0D5FD;"><table width="100%" height="100%" border="0"><tr><td colspan="2"><IMG src="'+chemin+'" BORDER=0 NAME=FondEcran"></td></tr><tr><td colspan="2" style="color:#FFF;font-weight:bold;">Comment installer facilement un fond d’écran ?</td></tr><tr><td width="50%" valign="top" style="color:#FFF;font-weight:bold;"><u>Si tu as un PC</u><br />Fais un « clic droit » avec ta souris sur l’image que tu souhaites mettre en fond d’écran.<br />Sélectionne "Etablir en tant que papier peint" ou "Etablir en tant qu’élément d’arrière plan".<br />Et voila, le fond d’écran est installé sur ton ordinateur !</td><td width="50%" valign="top" style="color:#FFF;font-weight:bold;"><u>Si tu as un Mac</u> (l’ordinateur avec une pomme)<br />Clique avec ta souris sur l’image en maintenant le clic enfoncé.<br />Choisis "Téléchargez l’image sur le disque".<br />Va dans le menu "Pomme", puis "Tableaux de bord", "Apparence", "Bureau" et, enfin, clique sur "Placer une image"... puis choisis le fond d’écran que tu viens de télécharger sur ton mac.<br />Clique sur "Appliquer".<br />Et voila, le fond d’écran est installé sur ton ordinateur !</td></tr></table></body></html>';
	popupImage =    window.open('','_blank','width=800, height=600 top=250, left=250, toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=1');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
}
