//************************************************
//Fichier Javascript avec fonctions perso du blog
//************************************************
// Permet de rendre transparentes les Images png pour les version d'IE>5.5 <7.0
	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);
	if (version >= 5.5 && version < 7.0){
	      window.attachEvent("onload", IE_CorrectAlpha_PNG);
	 }
	function IE_CorrectAlpha_PNG(){
		for(i=0; i<document.images.length; i++){
			img    = document.images[i];
			imgExt  = img.src.substring(img.src.length-3, img.src.length);
			imgExt  = imgExt.toUpperCase();
			if (imgExt == "PNG"){
				imgID    = (img.name) ? "id='" + img.name + "' " : "";
				imgClass= (img.className) ? "class='" + img.className + "' " : "";
				imgTitle= (img.title) ? "title='" + img.title + "' " : "title='Cliquer sur l image pour la dimmention réelle' ";
				imgStyle= "display:inline-block;" + img.style.cssText;
				if (img.align == "left") { imgStyle = "float:left;"  + imgStyle; } else if (img.align == "right"){ imgStyle = "float:right;" + imgStyle; }
				if (img.parentElement.href)   { imgStyle = "cursor:hand;" + imgStyle; }       
				strNewHTML    = '<span '+imgID+imgClass+imgTitle+' style="width:'+img.width+'px; height:'+img.height+'px;'+imgStyle+';'+'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+img.src+'\', sizingMethod=\'scale\');"></span>';
				img.outerHTML = strNewHTML;
				i = i-1;
			}
		}
	}
// Dédoublement de la fonction de recherche sur dans un blog
	function BlogRecherche2(MonObjet) {
		Formul = eval('document.FormBlogRecherche2');
		Formul.method = "POST";
		Formul.action = "http://blog." + LoadCafe("1") + ".com/espace.aspx?page=mot_clef&ct_id="+LoadCafe("0");
		Formul.target = "_Blank";
		return true;
	}
// Dédoublement de choix d'un blog au hasard
	function BlogAuHasard2() {
			window.document.location.href = "http://blog." + LoadCafe("1") + ".com/blog_au_hasard.aspx?site=" + LoadCafe("1") +"&ct_id="+LoadCafe("0");
		}

// Fonction qui permet de rendre visvible ou de cacher un DIV
	function DivStatus( nom ){
		var divID = nom ;
		if (document.getElementById && document.getElementById(divID)){
			Pdiv = document.getElementById(divID);
			PcH = true;
		}
		else if (document.all && document.all[divID]){
			Pdiv = document.all[divID];
			PcH = true;
		}
		else if (document.layers && document.layers[divID]){
			Pdiv = document.layers[divID];
			PcH = true;
		}
		else{											
			PcH = false;
		}
		if (PcH){
			Pdiv.className = (Pdiv.className == 'cachediv') ? '' : 'cachediv';
		}
	}
	// Fonction qui permet de changer le contenue de div monimg par en changer la largeur et hauteur
	if (document.getElementById){
		document.getElementById("monimg").innerHTML = '<IMG src="http://frederic.blog.sudouestjob.com/public/Images/photo.jpg" border=0>';
	}
	else if (document.all){
		document.all["monimg"].innerHTML = '<IMG src="http://frederic.blog.sudouestjob.com/public/Images/photo.jpg" border=0>';
	}
// Fonctions qui s'effectues uniquement sur la page d'accueil
if (StartPage == 1){
	// Remplacement de la zone day-date uniquement pour la page d'accueil
	var contentHtml;
	if (document.getElementById){
		contentHtml=document.getElementById("content").innerHTML;
	}
	else if (document.all){
		contentHtml=document.all["content"].innerHTML;
	}
	if (contentHtml!=''){
		var NewHeaderHtml='<div id="StartFred" style="background: url(../public/Images/warning.jpg); height:100px;"><a href="http://frederic.blog.sudouestjob.com/index.php/category/CV-Emploi" border="0"><center><p style="padding-top:20px; font-family: Georgia, Times New Roman, Times, serif; font-size: 1em; color: #FFFFFF; ">Bienvenue sur le CVBlog de fr&eacute;d&eacute;ric,<br>cliquez sur ce texte pour acc&eacute;der directement &agrave; mon CV<br>sinon bonne lecture.</p></center></a></div>';
		if (document.getElementById){
			document.getElementById("content").innerHTML=NewHeaderHtml+contentHtml;
		}
		else if (document.all){
			document.all["content"].innerHTML=NewHeaderHtml+contentHtml;
		}
		StartPage = 0;
	}
}else{
	if (document.getElementById){
		document.getElementById("blogextra").style.background="transparent";
	}
	else if (document.all){
		document.all["blogextra"].style.background="transparent";
	}
}

