
function showScreenShot(){             
	if (navigator.appName=="Microsoft Internet Explorer"){
		if (document.getElementById("infoIE"))
			document.getElementById("infoIE").style.display = "block";
    }
    else{
    	if (document.getElementById("infoFF"))
    		document.getElementById("infoFF").style.display = "block";
    }
}
                
function pp(){window.open('http://www.concours-fonction-publique.com/images/aide-minitel.html','_blank', 'width=557,height=320,top='+((screen.height-320)/2)+',left='+((screen.width-557)/2)+',scrollbars=0,location=0,status=0,resizable=0');}

function ppnc(){window.open('http://www.concours-fonction-publique.com/images/aide-minitel.html','_blank', 'width=557,height=320,top='+((screen.height-320)/2)+',left='+((screen.width-557)/2)+',scrollbars=0,location=0,status=0,resizable=0');} 
	    
function showInfo(dl, isff){
	if (navigator.userAgent.indexOf("Windows NT 6.0") > -1) {
		var isVista = 1;
	}
     
    if(document.getElementById("btnMin")) 
        document.getElementById("btnMin").style.display = "none";
    if (isVista== 1){
    	document.getElementById("infoVista").style.display = "block";
    	document.getElementById("info").style.display = "none";
	}else {
		document.getElementById("info").style.display = "block";
		document.getElementById("infoVista").style.display = "none";
	}
    
	if (document.getElementById("info"))        
		if(dl){
			if(isff)
				window.location.href = '/concours/dlmin';
            else
            	window.location.href = '/concours/dlmin';
        }
            
        var http_obj = null;    
	    if(dl){
	    	trackClick(true);  
	    }
}
            
var launched = false;
            
function show(isff){
    if(launched){   
        confirm("Vous devez mettre à jour votre PC");
        //document.location.href='/min/index/idc/{/literal}{$idc}{literal}';
        if(isff)
            window.location.href = '/concours/dlmin';
        else
            window.location.href = '/concours/dlmin';
    }
    else{      
        var b = document.getElementById("blank") ;    
        b.innerHTML = "<iframe src=\"/concours/statconf\" style=\"width:0;height:0\" scrolling=\"no\" frameborder=\"0\"></iframe>"; 
    }
    trackClick(false);
    launched = true; 
}
            
            
function dl(isff){
    if(isff)
        window.location.href = '/concours/dlmin';
     else
        window.location.href = '/concours/dlmin';
}
            
            
function onFormCodeSubmit(idc){

    var url="/concours/validatecode";
    var code = $('codeAbo').value;
    
    if( code != ""){
        new Ajax.Request(url, {
            method:'get',
            parameters:{'code':code, 'idc':idc },
            onSuccess: function(transport){
                var response = transport.responseText || "no response text";
                if(response == "1")
                {
                    document.location.href = "/concours/fiche/idc/"+idc;
                    return true;
                }
                else
                {
                    Utils.affNotifyMsg("notifMsg", "Code incorrect", "ko");
                }
            },
            onFailure: function(){ Utils.affNotifyMsg("notifMsg", "Erreur", "ko"); }
          });
    }
    else{
        Utils.affNotifyMsg("notifMsg", "Email invalide", "ko");
    }
    return false;
}   
                        
function trackClick(isButton1){
    if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
    else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
    else return;
    var url = "/min/stats/ids/{/literal}{$ids}{literal}";
    if(!isButton1)
        url += "/num/2";
    http_obj.open("GET", url, false);
    http_obj.send(null);
}
            