<!--

var newWin = null;

function closeWin()
{
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}

function showPopup(strURL,strType,strHeight,strWidth) 
{
	closeWin();

	var strOptions="";
	if (strType=="console")
		strOptions="resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fixed")
		strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic")
		strOptions="toolbar=no,menubar=no,scrollbars,location=no,resizable=no,titlebar=no,height="+strHeight+",width="+strWidth;

	newWin = window.open(strURL, 'newWin', strOptions);
	newWin.focus();
}

function changeCadre(src,caption,alt)
{
	document.getElementById('cadre_name').innerHTML = alt;
        document.getElementById('cadre_caption').innerHTML = caption;
	document.getElementById('cadre_slide').src = src;
	document.getElementById('cadre_slide').alt = alt;
	document.getElementById('cadre_slide').title = alt;
}

function navCadres(mod,src)
{
	alt = document.getElementById('cadre_slide').alt;
	items = document.getElementById('gallery-line-items').getElementsByTagName('img');
        for (i=0; i<items.length; i++) {
		if (items[i].alt == alt) {
			j = 0;
			if (mod == 'prev') {
				if (i == 0) {
					j = items.length - 1;
				} else {
					j = i - 1;
				}
			} else if (mod == 'next') {
                                if (i == items.length - 1) {
					j == 0;
                                } else {
					j = i + 1;
                                }
			}
			document.getElementById('cadre_'+mod).href = src[j];
		}
	}
}

//-->

