function getGiftInfoBox()
{
	var intScrollLeft = document.documentElement.scrollLeft;
	if(intScrollLeft == 0){
		intScrollLeft = document.body.scrollLeft;
	}
	var intScrollTop = document.documentElement.scrollTop;
	if(intScrollTop == 0){
		intScrollTop = document.body.scrollTop;
	}
	var intOffsetWidth = (document.body.clientWidth - 420) / 2;
	var intOffsetHeight = (document.body.clientHeight -170) / 2.8;
	
	
	document.getElementById("GiftInfoBox").style.left = intOffsetWidth+intScrollLeft;
	document.getElementById("GiftInfoBox").style.top = intOffsetHeight+intScrollTop;
	
	window.setTimeout("removeGiftInfoBox()", 4000);
}

function removeGiftInfoBox()
{
	document.getElementById("GiftInfoBox").style.left = -500;
	document.getElementById("GiftInfoBox").style.top = -500;
}

var giftLogoViewerTimeout = null;
var giftLogoViewerInterval = null;
var giftLogoViewerImages = 0;
var giftLogoViewerImagePointer = -1;
var giftLogoViewerImageOpacity = 100;
function startGiftLogoViewer(runViewer)
{
	giftLogoViewerTimeout = window.setTimeout("startGiftLogoViewer(true)", 1000);
	if(runViewer == true){
		giftLogoViewerInterval = window.setInterval("runGiftLogoViewer()", 25);
		window.clearTimeout(giftLogoViewerTimeout);
	}
}
function runGiftLogoViewer()
{
	var ImagePointer = giftLogoViewerImagePointer;
	if(ImagePointer < 0){
		ImagePointer = giftLogoViewerImages-1;
	}
	var ImageId = "giftLogoViewerImage_" + ImagePointer;
	
	var NextImagePointer = giftLogoViewerImagePointer + 1;
	if(NextImagePointer >= giftLogoViewerImages){
		NextImagePointer = 0;
	}
	var NextImageId = "giftLogoViewerImage_" + NextImagePointer;
	
	if(document.getElementById(ImageId) != null){
		document.getElementById(ImageId).style.visibility = "visible";
	}
	if(document.getElementById(NextImageId) != null){
		document.getElementById(NextImageId).style.visibility = "visible";
	}
	
	setOpacityById(ImageId, 100 - giftLogoViewerImageOpacity);
	setOpacityById(NextImageId, giftLogoViewerImageOpacity);
	giftLogoViewerImageOpacity++;
	
	if(giftLogoViewerImageOpacity >= 100){
		if(document.getElementById(ImageId) != null){
			document.getElementById(ImageId).style.visibility = "hidden";
		}
		giftLogoViewerImagePointer++;
		if(giftLogoViewerImagePointer >= giftLogoViewerImages){
			giftLogoViewerImagePointer = 0;
		}
		giftLogoViewerImageOpacity = 0;
	}
}
function logGiftPrinting()
{
	var iframeLocation = window.location.href;
	if(iframeLocation.indexOf("?") == -1){
		iframeLocation += "?";
	}else{
		iframeLocation += "&";
	}
	iframeLocation += "bLogPrinting=1";
	document.getElementById("logGiftPrinting").src = iframeLocation;
	
	print();
}