function PopupImage(titre, img) {
	w=open('','image','width=20,height=20,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write('<html><HEAD><TITLE>'+titre+'</TITLE></HEAD>');
	w.document.write('<META http-equiv="imagetoolbar" CONTENT="no">');
	w.document.write('<script language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout("check()",250) } }</script>');
	w.document.write('<body onload="checksize()" leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src="'+img+'" border=0>');
	w.document.write('</body></html>');
	w.document.close();
}

var getByID = (document.getElementById) ? true : false;
var docAll = (document.all) ? true : false;
var opera=(navigator.userAgent.indexOf("Opera") > 0) ? true : false;

function loadwindow(img){
	if (docAll) {
		document.all['dwindow'].style.visibility='visible';
		document.all['img'].src=img;
	}
 	else if (getByID) {
		document.getElementById('dwindow').style.visibility='visible';
		document.getElementById('img').src=img;
	}
}

function showbubble(layer){
	if (docAll) {
		document.all[layer].style.visibility='visible';
	}
 	else if (getByID) {
		document.getElementById(layer).style.visibility='visible';
	}
}

function hidebubble(layer) {
	if (docAll) {
		document.all[layer].style.visibility='hidden';
	}
	else if (getByID) {
		document.getElementById(layer).style.visibility='hidden';
	}
}

function closeit(){
	if (docAll) {
		document.all['dwindow'].style.visibility='hidden';
		document.all['img'].src='images/spacer.gif';
	}
	else if (getByID) {
		document.getElementById('dwindow').style.visibility='hidden';
		document.getElementById('img').src='images/spacer.gif';
	}
}

function displaycontrols(display) {

	TheForm=document.modifylisting;
	if (TheForm.type)
		TheForm.type.style.visibility=display;
	if (TheForm.status)
		TheForm.status.style.visibility=display;
	if (TheForm.category)
		TheForm.category.style.visibility=display;
	if (TheForm.dept)
		TheForm.dept.style.visibility=display;
	if (TheForm.agent)
		TheForm.agent.style.visibility=display;
}
