function expandLink(contentSrc,enlrgHTML,fWidth,fHeight) {
	// Netscape 6 - does not like setting style to display:none and back to display block
	var eny, yScroll, enx, itopY, itopX;
	// Get screen height, viewport height;
	if (typeof(window.innerHeight) == 'number') {
		eny = window.innerHeight;
		yScroll = window.pageYOffset;
		enx = window.innerWidth;
	} else {
		if (typeof(document.body.clientHeight) == 'number') {
			eny = document.body.clientHeight;
			yScroll = document.body.scrollTop;;
			enx = document.body.clientWidth;
		} else {
			if (typeof(document.documentElement.clientHeight) == 'number') {
				eny = document.documentElement.clientHeight;
				yScroll = document.documentElement.scrollTop;
				enx = document.documentElement.clientWidth;
			} else {
					enx=0;
					eny=0;
					yScroll=0;
				}
		}
	}
	itopY = Math.floor((eny-fHeight)/2) + yScroll - 20;
	if (itopY<0) itopY=0;
	itopX = Math.floor((enx-fWidth)/2) -10;
	if (itopX<0) itopX=0;

	if ((document.getElementById('enlrg'))    ) {
		enDivObj=document.getElementById('enlrg')
		enDivObj.style.display = 'block';
		enDivObj.innerHTML = enlrgHTML;
		if (document.getElementById('enlrgIF')) {
			enIFObj=document.getElementById('enlrgIF')
			enDivObj.style.left = itopX;
			enDivObj.style.top = itopY;
			enDivObj.style.cursor='hand';
			enDivObj.style.display = 'block';
			enDivObj.onclick = function() {
				enDivObj.innerHTML = ""
			};
			enIFObj.style.width = fWidth+'px';
			enIFObj.style.height = fHeight+'px';
			enIFObj.style.position = 'relative';
			enIFObj.style.marginLeft = '10px';
			enIFObj.style.marginRight = '10px';
			enIFObj.style.display = 'block';
			enIFObj.src = contentSrc;
		}
	}
}


function viewIFrm(popUpSrc,fWidth,fHeight) {
	var enlrgHTML;
	enlrgHTML='<FONT SIZE="2">close</FONT><iframe src="../images/dot.gif" width="0" height="0" id="enlrgIF"></iframe><FONT SIZE="2">close</FONT>';
	expandLink(popUpSrc+'/index.html',enlrgHTML,fWidth,fHeight);
}


function viewImg(imgSrc,title,imgWidth,imgHeight) {
	var enlrgHTML, closeLeftPosn=imgWidth-25;
	enlrgHTML=title+'<img src="'+imgSrc+'" width="'+imgWidth+'" height="'+imgHeight+'" alt="expanded image" id="enlrgIF">close X<div style="position:absolute; top:0px; left:'+closeLeftPosn+'px;">close X</div>';
	expandLink(imgSrc,enlrgHTML,imgWidth,imgHeight);
}

