<!--

// ******************************************************************
// QwertLib - v1.2.2 - Adapted/Documented for BLI (http://www.bli.ca)
// (c) 2001 Jean-Philippe Couture - Clic.net Télécommunications, inc.
// jcouture@clic.net - http://www.clic.net
// ******************************************************************
// requires a floating: <div id="showimage" style="position:absolute;visibility:hidden"></div>
// in the <body> tag: onLoad="loadImages('images.jpg', 'images1.jpg');" pre-load images on the hidden floating div
// <a href="javascript:showImage(0, 'file.gif', x, y)"><img border="0" src="thumbnail.jpg"></a>  showImage takes img number in img array. starting with zero.

var imageList = new Array()
var imageNum = 0
var imageCount = 0

function loadImages(filename){
	var i, j;

	imageNum = loadImages.arguments.length
	for (i=0; i<imageNum; i++) {
		imageList[i] = new Image()
		imageList[i].src = loadImages.arguments[i]
	}

	//IE 4+
	if (document.all || document.getElementById){
		if (showimage.style.visibility=="hidden"){

			showimage.style.left=1
			showimage.style.top=1
			for (j=0; j<imageNum; j++)
				showimage.innerHTML='<img border="0" src="'+imageList[j].src+'">'
		}
	}
	
	//Render image code for NS 4
	else if (document.layers){
		if (document.showimage.visibility=="hide"){
			document.showimage.left=1
			document.showimage.top=1
			for (j=0; j<imageNum; j++)
				document.showimage.document.write('<img border="0" src="'+imageList[j].src+'">')
			document.showimage.document.close()
		}
	}
	
	//if NOT IE 4+ or NS 4, simply display image in full browser window
	else
	return true
}

function showImage(ref, overFile, x, y) {

	//stats = "width="+imageList[ref].width+",height="+imageList[ref].height;
	stats = "width=510,height=447,status=0,menubar=0,scrollbars=0,resizable=0";
	//stats += ",status=0,menubar=0,scrollbars=0,resizable=0";
    newWin = window.open("", "Photo", stats);
	newWin.document.write("<head><title>Photo</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 background=\"", imageList[ref].src, "\"><div style=\"position:absolute; left:"+x+"; top:"+y+"; width:34px; height:34px; z-index:1\"><img border=\"0\" src=\""+ overFile +"\"></div></center>");
	//newWin.document.write("<head><title>Photo</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 background=\"", imageList[ref].src, "\"><a href=\"javascript:window.close()\"><div style=\"position:absolute; left:"+x+"; top:"+y+"; width:34px; height:34px; z-index:1\"><img border=\"0\" src=\""+ overFile +"\"></div><img border=\"0\" src=\"../images/pixel.gif\" width=\"",imageList[ref].width,"\"></a></center>");
}


function swapImage(imgName, imgSrc) {
	var idx;
		for (idx=0;idx<document.images.length;idx++) {
			if (document.images[idx].name == imgName) {
				//alert("Found it!\nSwaping: "+ document.images[idx].src +"\nfor: "+ imgSrc);
				document.images[idx].src = imgSrc;
			}
		}
}

function externLink(top, link) {
	externLinkWin = window.open("");
	externLinkWin.document.write("<html><head><title>Extern link</title></head><frameset rows=\"120,*\" frameborder=\"NO\" border=\"0\" framespacing=\"0\"><frame name=\"externLinkTopFrame\" scrolling=\"NO\" noresize  src=\""+ top +"\" frameborder=\"YES\" bordercolor=\"1\"><frame name=\"externLinkMainFrame\" src=\""+ link +"\"></frameset><noframes><body>no frames supported</body></noframes></html>");
}


// <a href="#" onMouseOver="SwapImg('test', 'big.jpg')" onMouseOut="SwapImg('test', 'small.jpg')"><img name="test" border="0" src="small.jpg"></a>


// -->