 function apercu(id) {
    window.open('apercu.php?id='+id,'','nostatus=1');
 }
 
 function ImgOver(obj) {
	if(document.all) obj.filters.alpha.opacity=95
	else obj.style.setProperty("-moz-opacity", 0.95, "");
 }
 
 function ImgOut(obj) {
	if(document.all) obj.filters.alpha.opacity=35
	else obj.style.setProperty("-moz-opacity", 0.35, "");
 }
 
 function choixType(id){
	val='<?=$idImage?>';
    if (id=='image') {
        document.getElementById('ligneImage').style.display='';
        document.getElementById('ligneVideo').style.display='none';
		document.frmImage.action.value=(val)?'modifierImage':'ajouterImage';
    }
    else {
        document.getElementById('ligneImage').style.display='none';
        document.getElementById('ligneVideo').style.display='';
		document.frmImage.action.value=(val)?'modifierVideo':'ajouterVideo';
    }
 }

 modeLink=false;
 function linkMode() {
    if (modeLink) {
        modeLink=false;
        document.getElementById('btModeLink').style.display='';
        document.getElementById('divModeLink').style.display='none';
        document.getElementById('btModeLink').value='Activer le mode link';
        document.getElementById('imgCible').disabled=true;
        document.getElementById('imgCible').style.cursor='default';
		if(document.all) document.images('imgCible').filters.alpha.opacity=100;
		else document.getElementById('imgCible').style.setProperty("-moz-opacity", 1, "");
    }
    else {
        modeLink=true;
        document.getElementById('btModeLink').style.display='none';
        document.getElementById('divModeLink').style.display='';
        document.getElementById('imgCible').disabled=false;
        document.getElementById('imgCible').style.cursor='url(./images/curseurs/link.cur),pointer';
		if(document.all) document.images('imgCible').filters.alpha.opacity=85;
		else document.getElementById('imgCible').style.setProperty("-moz-opacity", 0.85, "");
    }
 }

 function activLink(over,id) {
    if (over) {
        document.getElementById('img'+id).style.background='#FFEC79';
		document.getElementById("lien"+id).style.background="#FFEC79";
		if(document.all) document.images('img'+id).filters.alpha.opacity=60;
		else document.getElementById('img'+id).style.setProperty("-moz-opacity", 0.60, "");
    }
    else {
        document.getElementById('img'+id).style.background='';
		document.getElementById("lien"+id).style.background="";
		if(document.all) document.images('img'+id).filters.alpha.opacity=50;
		else document.getElementById('img'+id).style.setProperty("-moz-opacity", 0.5, "");
    }
 }
 
 function showSpan(id) {
 	if (document.getElementById(id).style.display=="") {
 	   document.getElementById(id).style.display="none";
 	}
 	else {
 	   document.getElementById(id).style.display="";
 	   document.forms['frm'+id].nom.focus();
 	}
 }

