function loadPanel_quickLook(itemid) {
	content = 'itemid' + '=' + escape(itemid);
	var URL = unescape(location.href);
	var SCRIPTEXE = 'sub_webcart_quickLook.php';
	if (URL == 'http://www.iowa80.com/') {
		SCRIPTEXE = 'DirectionsWEB/sub_webcart_quickLook.php';
	}
	doLoadPanelQuickLookPost(SCRIPTEXE, content, 'processLoadPanelQuickLook');
}

function processLoadPanelQuickLook(result) {

	var windowHeight = 0;
	var windowBottom = 0;
	var windowTop = 0;

	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
			else {
			}
		}
	}
	
	if (typeof(window.pageYOffset) == 'number') {
		windowBottom = windowHeight + window.pageYOffset;
	}
	else {
		if (document.body && document.body.scrollTop) {
			windowBottom = windowHeight + document.body.scrollTop;
		}
		else {
			if (document.documentElement && document.documentElement.scrollTop) {
				windowBottom = windowHeight + document.documentElement.scrollTop;
			}
			else {
			}
		}
	}
	
	windowTop = (windowBottom - windowHeight);
	if (windowTop < 0) {
		windowTop = 0;
	}

	var x = Math.round(windowTop);
	x = (x + 10);
	var y = 350;
	
	var xTxt = x + 'px';
	var yTxt = y + 'px';
	
	quickLookObj = document.getElementById('quickLookBox');
	quickLookObj.innerHTML = result;
	quickLookObj.style.position = 'absolute';
	quickLookObj.style.display = 'block';
	quickLookObj.style.top = xTxt;
	quickLookObj.style.left = yTxt;
	
}

function doLoadPanelQuickLookPost(url, content, callback_name) {

	var async_requestLoadPanelQuickLook = false;
	try {
		// Firefox, Opera 8.0+, Safari, IE7+
		async_requestLoadPanelQuickLook = new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
		try {
			async_requestLoadPanelQuickLook = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			async_requestLoadPanelQuickLook = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}

	async_requestLoadPanelQuickLook.open('POST', url, true);
	async_requestLoadPanelQuickLook.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	async_requestLoadPanelQuickLook.onreadystatechange = function() {
		if (async_requestLoadPanelQuickLook.readyState == 4) { 
			if (async_requestLoadPanelQuickLook.status == 200) {
				response_content = async_requestLoadPanelQuickLook.responseText;
				eval(callback_name + '(response_content);');
			}
		}
	}
	async_requestLoadPanelQuickLook.send(content);
}

