if(navigator.userAgent.indexOf('MSIE 7')>=0){

    document.write('<link rel="stylesheet" href="../css/msie7.css" type="text/css" media="all" />') ;

}else if(navigator.userAgent.indexOf('MSIE 8')>=0){                                                
    document.write('<link rel="stylesheet" href="../css/msie8.css" type="text/css" media="all" />');

}



function showLogin(){
	/*b = document.getElementsByTagName('body')[0];
	c = Builder.node('div',{id:'cache'})
	c.style.height = document.viewport.getHeight()+"px"
	b.appendChild(c);*/
	$('cache').style.display = 'block';
	$('loginForm').style.display = 'block';
	$('email').focus();
}

function hideLogin(){
	$('cache').hide();
	$('loginForm').hide();
}

function limite(zone,max){
	if(zone.value.length>=max){
		zone.value=zone.value.substring(0,max);
	}
} 
function closePopInWindow( id ){

    if(document.getElementById('cache')){
        $('cache').remove();
    }
    $(id).remove();

}

function openModalWindow ( page, target, params ){
         
        if( !target ) {
            target="visualiseur";
        }
        
        new Ajax.Request( page, {
            parameters: params,
            method: 'post',
            onSuccess: function(transport){
                $(target).insert(transport.responseText, { position: 'bottom' });
            }
        });
}

function closeModalWindow(){

    if(document.getElementById('cache')){
        $('cache').remove()
    }
    $('visualiseur').down(0).remove()

}

