var win = null;
function popupcentree(mypage,myname,w,h,scroll,size,menu){
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',status=false,scrollbars='+scroll+',resizable=no,menubar='+menu+''
		win = window.open(mypage,myname,settings);
	}
	
	function newWindow(myPage)
	{
		window.open(myPage);
	}


//reconnaissance iPhone
function checkClient(){
        if((navigator.userAgent.match(/iPhone/i))||
          (navigator.userAgent.match(/iPod/i))){
        document.getElementById('iphone_alert').innerHTML="<h1 style='text-align:center; border: 10px solid #475a85; -webkit-border-radius: 15px;'><a href='http://p148.phpnet.org/edmp/blog.php/'>Tapez ici pour naviguer sur la version du site optimis&eacute;e pour iPhone.</a></h1>";
        }else{
        document.getElementById('iphone_alert').innerHTML="";
        }
}

//detection du plugin flash
var UseFlash = 0;

if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;

if (plugin && parseInt(plugin.description.substring(plugin.descr iption.indexOf(".")-1))>=3)
UseFlash = 1;
}
else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1
&& navigator.userAgent.indexOf("Windows") != -1
&& navigator.userAgent.indexOf("Windows 3.1") == -1) {
UseFlash = 1;
}

if (UseFlash) {
// utilisateur Flash ok
}
else {
// redirection vers la version html
document.location.replace("http://p148.phpnet.org/edmp/blog.php");
}
