			function ShowZoomImage()	{

				oZoomImage = new Image();
				oZoomImage.src =  imgPath + cImgId + "/large.jpg";

				if (document.getElementById) { // DOM 3: IE5+, NS6, Firefox#

					document.getElementById("dvMainImage").style.display = "none";
					document.getElementById("dvMainImageZoom").style.display = "block";

					document.getElementById("aZoomIn").style.display = "none";
					document.getElementById("aZoomOut").style.display = "block";

					if (document.getElementById("imgClickdrag") != null) {document.getElementById("imgClickdrag").style.display = "block"};

				} else if (document.layers) { // Netscape 4

					document.dvMainImage.style.display = "none";
					document.dvMainImageZoom.style.display = "block";

					document.aZoomIn.style.display = "none";
					document.aZoomOut.style.display = "block";

					if (document.imgClickdrag != null) {document.imgClickdrag.style.display = "block"};

				} else if (document.all) { // IE 4

					document.all.dvMainImage.style.display = "none";
					document.all.dvMainImageZoom.style.display = "block";

					document.all.aZoomIn.style.display = "none";
					document.all.aZoomOut.style.display = "block";

					if (document.all.imgClickdrag != null ){document.all.imgClickdrag.style.display = "block"};
				}

				if (!oZoomImage.complete) {
					document.getElementById('dvMainImageZoom').innerHTML = document.getElementById('content_product_loading' ).innerHTML;
					tZoomLoaded = setInterval(checkZoomLoaded,'500');
				} else {
					checkZoomLoaded();
				}

			}

			function checkZoomLoaded(){
				if (oZoomImage.complete){
					document.getElementById('dvMainImageZoom').innerHTML = '<img id="imgMainImageZoom" src="' + oZoomImage.src + '" />';
					clearTimeout(tZoomLoaded);
					enableDrag('dvMainImageZoom', 'imgMainImageZoom', 0, 0);
				}
			}

			function isdefined( variable) {
			    return (typeof(window[variable]) == "undefined")?  false: true;
			}

			function HideZoomImage()	{
				if (document.getElementById) { // DOM 3: IE5+, NS6, Firefox#
					if (document.getElementById("dvMainImage") != null) {document.getElementById("dvMainImage").style.display = "block";};
					document.getElementById("dvMainImageZoom").style.display = "none";
					if (document.getElementById("aZoomIn") != null) {document.getElementById("aZoomIn").style.display = "block";};
					if (document.getElementById("aZoomOut") != null) {document.getElementById("aZoomOut").style.display = "none";};
					if (document.getElementById("imgClickdrag") != null) {document.getElementById("imgClickdrag").style.display = "none";};
				} else if (document.layers) { // Netscape 4
					if (document.dvMainImage != null) {document.dvMainImage.style.display = "block";};
					document.dvMainImageZoom.style.display = "none";
					if (document.aZoomIn != null) {document.aZoomIn.style.display = "block";};
					if (document.aZoomOut != null) {document.aZoomOut.style.display = "none";};
					if (document.imgClickdrag != null) {document.imgClickdrag.style.display = "none";};
				} else if (document.all) { // IE 4
					if (document.all.dvMainImage != null) {document.all.dvMainImage.style.display = "block";};
					document.all.dvMainImageZoom.style.display = "none";
					if (document.all.aZoomIn != null) {document.all.aZoomIn.style.display = "block";};
					if (document.all.aZoomOut != null) {document.all.aZoomOut.style.display = "none";};
					if (document.all.imgClickdrag != null) {document.all.imgClickdrag.style.display = "none";};
				}
			}



			//Drag Image Start
			var dragObject  = null;
			var mouseOffset = null;
			var dragContainer = null;

			function getCanvasWidth() {
			   return document.body.offsetWidth || innerWidth;
			}

			function getCanvasHeight() {
			   return document.body.offsetHeight || innerHeight;
			}

			function makeContainer(item){
				dragContainer = item;
				dragContainer.style.position = 'relative';
				dragContainer.style.overflow = 'hidden';
			}

			function getMouseOffset(target, ev){
				ev = ev || window.event;

				var docPos    = getPosition(target);
				var mousePos  = mouseCoords(ev);

				return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
			}

			function getPosition(obj){
				var left = 0;
				var	top = 0;

				if (obj.offsetParent) {

					left += obj.offsetLeft ;
					top += obj.offsetTop;

					while (obj = obj.offsetParent) {
						if (parseInt(obj.style.left)) {
							left -= parseInt(obj.style.left);
							top -= parseInt(obj.style.top);
						}
					}
				}
				return {x:left, y:top};
			}

			function mouseCoords(ev){
				if(ev.pageX || ev.pageY){
					return {x:ev.pageX, y:ev.pageY};
				}
				return {
					x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
					y:ev.clientY + document.body.scrollTop  - document.body.clientTop
				};
			}

			function mouseMove(ev){
				ev           = ev || window.event;
				var mousePos = mouseCoords(ev);
				var targWidth, targHeight, targPos;
				var browseWidth, browseHeight;

				browseWidth		=	getCanvasWidth();
				browseHeight	=	getCanvasHeight();

				if(dragObject){
					if (dragContainer) {
						targWidth  = parseInt(dragContainer.offsetWidth);
						targHeight = parseInt(dragContainer.offsetHeight);
						if (((mousePos.y - mouseOffset.y) < 0) && ((mousePos.y - mouseOffset.y + dragObject.height) > (targHeight)))	{dragObject.style.top	= (mousePos.y - mouseOffset.y) + 'px';}
						if (((mousePos.x - mouseOffset.x) < 0) && ((mousePos.x - mouseOffset.x + dragObject.width) > (targWidth)))	{dragObject.style.left	= (mousePos.x - mouseOffset.x) + 'px';}
					} else {
						dragObject = null;
					}
					return false;
				}
			}

			function mouseUp(){
					dragObject = null;
			}

			function makeDraggable(item){
				if(!item) return;
				try {item.style.cursor = 'move';} catch (e) {} //cursor property breaks IE5.5
				item.onmousedown = function(ev){
					dragObject  = this;
					dragObject.style.position = 'absolute';
					mouseOffset = getMouseOffset(this, ev);
					return false;
				}
			}

			function enableDrag(spContainer, imgDrag, imgWidth, imgHeight) {

				var dragItem = null;
				var dragCont = null;
				var contW, contH = 0;
				var top, left;

				document.onmousemove = mouseMove;
				document.onmouseup   = mouseUp;

				dragCont = document.getElementById(spContainer);
				makeContainer(dragCont);

				dragItem = document.getElementById(imgDrag);
				makeDraggable(dragItem);
				dragItem.style.position = 'absolute';

				dragItem.style.top = 0; dragItem.style.left = 0;
				dragItem.top = 0; dragItem.left = 0;

				top = (parseInt(dragItem.offsetHeight)/2) - (parseInt(dragCont.offsetHeight)/2);
				left = (parseInt(dragItem.offsetWidth)/2) - (parseInt(dragCont.offsetWidth)/2);

				dragItem.style.top = '-'+ top +'px';
				dragItem.style.left = '-'+ left+'px';

				dragItem.top = dragItem.style.top;
				dragItem.left = dragItem.style.left;

				//dragItem.alt = 'Click and hold to drag image';
			}
			//Drag Image End

			function SwapMainImage(thumId, imageId) {
				//alert(thumId +' '+ imageId);
				HideZoomImage();
				document.getElementById("imgMain").src = imgPath + imageId + "/medium.jpg";
				cImgId = imageId;
			}
