function ViewImage(UrlImage)
{
	oFenetre = window.open(UrlImage ,'Image','left=0,top=0,width=400,height=400,toolbar=no,scrollbars=no,resizable=no');
}

function ShowPrintDialog()
{
	window.print();
}

function twPopupImage(img, titre, auteur) { 
  // Compatible IE5+ / NN6+ / Mozilla
  oFenetre = window.open('','Image','left=0,top=0,width=400,height=400,toolbar=no,scrollbars=yes,resizable=yes');
  oFenetre.document.write("<html><head><title>"+titre+"</title></head>"); 
  oFenetre.document.write("<script type=\"text/javascript\">function twAjustePopUp() { if (document.images[0].complete) { w = document.images[0].width+50; h = document.images[0].height+100; if (w>800){ w=800;} if (h>600){ h=600;} window.resizeTo( w , h);  window.moveTo((screen.width-w)/2, (screen.height-h)/2); window.focus();} else { setTimeout('twAjustePopUp()',1000) } }</"+"script>");
  oFenetre.document.write("<body onload='twAjustePopUp()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>"); 
  oFenetre.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><tr><td valign='middle' align='center'>"); 
  oFenetre.document.write("<img src='"+img+"' border='0' alt='"+auteur+"' title='"+auteur+"'>");
  oFenetre.document.write("</td></tr></table></body></html>"); 
  oFenetre.document.close(); 
}

function disableListItems(checkBoxListId, checkBoxIndex, numOfItems)
{
    // Get the checkboxlist object.
    objCtrl = document.getElementById(checkBoxListId);
    
    // Does the checkboxlist not exist?
    if(objCtrl == null)
    {
        return;
    }

    var i = 0;
    var objItem = null;
    // Get the checkbox to verify.
    var objItemChecked = 
       document.getElementById(checkBoxListId + '_' + checkBoxIndex);

    // Does the individual checkbox exist?
    if(objItemChecked == null)
    {
        return;
    }

    // Is the checkbox to verify checked?
    var isChecked = objItemChecked.checked;
    
    // Loop through the checkboxes in the list.
    for(i = 0; i < numOfItems; i++)
    {
        objItem = document.getElementById(checkBoxListId + '_' + i);

        if(objItem == null)
        {
            continue;
        }

        // If i does not equal the checkbox that is never to be disabled.
        if(i != checkBoxIndex)
        {
            // Disable/Enable the checkbox.
            objItem.disabled = isChecked;
            // Should the checkbox be disabled?
            if(isChecked)
            {
                // Uncheck the checkbox.
                objItem.checked = false;
            }
        }
    }
}
