//////////////////////////////
// MODIFS
// 25.11.01 17:31 - modif photos -> la fenêtre ne se rezize plus osus Netscape 6.2 ->
//							fermeture puis réouverture de la fenêtre
// 29.12.01 18:02 - modif pour liste actif, ajout de parent.parent.document.title ...
//
// 22.01.02 21:28 - ajout des fonctions pour impressions, petite fenêtre
// 31.01.02 17:43 - terminer fonctions de petites fenêtres
//	21.04.2003 17:31 -  mise à jour pour ce 2003 -> suppression de fct non nécessaires.
//////////////////////////////
// DIVERS variables

	var beIE = document.all?true:false

	var windowX = 100;
	var windowY = 100;


//////////////////////////////
// PHOTOS

	var photo_ie = false ;

	function photo_window(link,titre,w,h){

		if (photo_ie)
			close_photo_box() ;

		if (beIE){
			opt = 'width='+w+',height='+h+',resizable=no' ;
		} else {
			opt = 'width='+(w)+',height='+(h)+',resizable=no' ;
		}

		photo_window_box = window.open("croisee/photos_popup.php?link="+link+"&titre="+titre, 'Photo', opt);
		photo_window_box.moveTo(windowX,windowY) ;
		window.onunload = function(){photo_window_box.close()}

		if (parseInt(navigator.appVersion) >= 4) {
			photo_window_box.focus();
		}

		photo_ie = true ;

	}

	function close_photo_box(){
		photo_window_box.close() ;
	}

//////////////////////////////
// ALL Windows

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll;
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}


//////////////////////////////
// OVer from ph 7.0 with modifications

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages(item,link) {
	if (document.images) {
		item = newImage(link);
		preloadFlag = true;
	}
}

