	var alphaPer = 0;
	var picTOP = 0;
	var picLEFT = 0;

	function imgView(src, imgWidth, imgHeight) {
		picLEFT = (document.body.offsetWidth/2);
		picTOP = (document.body.offsetHeight/2) - (imgHeight/2) + document.body.scrollTop;
		imgBoxDivAlpha.style.display = '';
		imgCanvas(src, imgWidth, imgHeight);
	}
	function imgCanvas(src, imgWidth, imgHeight) {
		imgBoxDiv.innerHTML = "<div id = 'imgSrcView' style = 'background-color: #FFFFFF; width:0px; height:0px; padding: 10px 10px 10px 10px;POSITION:absolute;left: "+ picLEFT +";top:"+ picTOP +";'>&nbsp;</div>";
		imgCanvasReSize(src, imgWidth, imgHeight);
	}
	function imgCanvasReSize(src, imgWidth, imgHeight) {
		
		var canvasWidth = eval((imgSrcView.style.width).replace(/px/gi,""));
		var canvasHeight = eval((imgSrcView.style.height).replace(/px/gi,""));
		var canvasLeft = eval((imgSrcView.style.left).replace(/px/gi,""));

		if(canvasWidth < imgWidth || canvasHeight < imgHeight) {
			if(canvasWidth < imgWidth) imgSrcView.style.width = canvasWidth + 14;
			if(canvasHeight < imgHeight) imgSrcView.style.height = canvasHeight + 14;
			if(canvasWidth < imgWidth) imgSrcView.style.left = canvasLeft - 7;
			
			setTimeout("imgCanvasReSize('"+src+"', "+imgWidth+", "+imgHeight+")",1);
		} else {
			imgSrcView.innerHTML = "<img id = 'imgSrc' src = '"+ src +"' style = 'filter:Alpha(Opacity=0);cursor: hand' onclick = 'closeImg()'>";
			alphaView();
		}
	}
	function closeImg() {
		imgBoxDivAlpha.style.display = 'none';
		imgBoxDiv.innerHTML = "";
	}
	
	function alphaView() {
		if(alphaPer < 100) {
			alphaPer = alphaPer + 3;
			imgSrc.style.filter="alpha(opacity:"+ alphaPer +")";
			setTimeout("alphaView()",1);
		} else {
			imgSrc.style.filter="alpha(opacity:100)";
			alphaPer = 0;
		}
	}
	document.write("<div id = 'imgBoxDivAlpha' style = 'filter:Alpha(Opacity=35); display: none;background-color: #888888;POSITION:absolute; left:0px; top:0px; width: 100%; height: 100%'></div>");
	document.write("<div id = 'imgBoxDiv' style = 'POSITION:absolute; left:0px; top:0px;'></div>");
