
var categorySCArray = new Array("31824","31825","31826","31827","31931","31932","31933");
var randCat = categorySCArray[Math.floor(Math.random()*categorySCArray.length)];




function getXmlHttpRequestObjectC() {	
	if (window.XMLHttpRequest) {		
		return new XMLHttpRequest();	
	} else if(window.ActiveXObject) {		
		return new ActiveXObject("Msxml2.XMLHTTP");	//Microsoft.XMLHTTP
	} //else {	document.getElementById('status_div').innerHTML = 'Status: Cound not create XmlHttpRequest Object.';	}
	
}

var receiveReqC = getXmlHttpRequestObjectC();
function getItemData() { 
	
	var baseURL = "ht"+"tp://w"+"ww.eveningbags.com/";
	var getURL = baseURL  + "/app/site/hosting/scriptlet.nl?script=3&deploy=1&compid=322285&h=1ed37a628ae5ec5b16e5&catid="+randCat;
	// alert(getURL)
	if (receiveReqC.readyState == 4 || receiveReqC.readyState == 0) 
	{	
		receiveReqC.open("GET", getURL, true);	
		receiveReqC.onreadystatechange = getItemDataCallback; 		
		receiveReqC.send(null);	
	}			
}  // end fun

var linksHTML = ""; var comspc = ""; var catHTML = "";
var catHTML 	= "";
var prodID 		= "";
var prodName 	= "";
var prodThumb 	= "";
var prodPrice 	= "";
var prodUrl 	= "";
var width		= "";
var height		= "";
var depth		= "";
var storeDesc 	= "";
var prodImage	= "";
var rightt		= "";

function getItemDataCallback() {
var linksHTML = "";
if (receiveReqC.readyState == 4) {	
	var response = eval("("+receiveReqC.responseText+")");
	for(var i=0;i < response.dataout.itminfo.length; i++) {
					
		internalID	= response.dataout.itminfo[i].internalid; 
		prodName 	= response.dataout.itminfo[i].name; prodName = unescape(prodName);
		prodThumb 	= response.dataout.itminfo[i].thumb; prodThumb = unescape(prodThumb);
		prodPrice 	= response.dataout.itminfo[i].price; prodPrice = unescape(prodPrice);
		prodUrl 	= response.dataout.itminfo[i].url; prodUrl = unescape(prodUrl);
		if (prodUrl.indexOf(".com") != -1) {prodUrl = prodUrl.split(".com/")[1]};
		width		= response.dataout.itminfo[i].width;
		height		= response.dataout.itminfo[i].height;
		depth		= response.dataout.itminfo[i].depth;
		storeDesc 	= response.dataout.itminfo[i].storedesc; storeDesc = unescape(storeDesc);
		prodImage 	= response.dataout.itminfo[i].image; prodImage = unescape(prodImage);
	
	catHTML = catHTML + "<div class='catDivv"+rightt+"'><div class='lstDiv' onmouseover=\"this.className='lstDiv lstOver'\" onmouseout=\"this.className='lstDiv'\"><div class='lstImg'><a href='/"+prodUrl+"'><img src='/img/spacer.gif' border='0' alt='"+prodName+"' title='"+prodName+" Details' style=\"background-image: url("+prodThumb+")\"><h3>"+prodName+"</h3></a></div><div class='lstPrc'>$"+prodPrice+"</div><div class='lstQckLink'><a href='javascript:;' onclick=\"showQuickView('"+internalID+"')\"><img src='/img/spacer.gif' border='0'></a></div>                 <div class='quickViewHide' id='quickView"+internalID+"'><div class='quickViewCont'><a href='javascript:;' onclick=\"hideQuickView('"+internalID+"')\" style='float: right'>X</a><table border='0' cellpadding='3' class='popTabl' width='100%'><tr><td class='popImgTD' valign='top' width='360'><img src='/img/spacer.gif' border='0'  style=\"background-image: url("+prodImage+")\"></td><td valign='top' width='190'> <h4>"+prodName+"</h4><div class='popDesc'>"+storeDesc+"</div><div class='popSpecs'><strong>Size:</strong> "+width+" in. by "+height+" in. by "+depth+" in.</div><div class='popPrc'><strong>Price:</strong> $"+prodPrice+"</div><div class='popDetails'><a href='/"+prodUrl+"'><img src='/img/spacer.gif' border='0'></a></div></td></tr></table></div></div></div></div>"
	
	prodID 		= "";
	prodName 	= "";
	prodThumb 	= "";
	prodPrice 	= "";
	prodUrl 	= "";
	width		= "";
	height		= "";
	depth		= "";
	storeDesc 	= "";
	prodImage	= "";
	rightt		= " right";
		
	} // end for

	document.getElementById("hmRitBotmCont").innerHTML =  catHTML; // from below
	
} // end if
} // end fun
/// start off with this
setTimeout("getItemData()",300)



var curPopID = "";
var quickViewOpen = 0;

function showQuickView(id) {
	///alert(id)

	var idd = id;
	if (quickViewOpen) {document.getElementById(curPopID).className = "quickViewHide";}
	
	curPopID = "quickView" + idd; 
		
	if (quickViewOpen) {setTimeout("openQuickView()",500)} else {setTimeout("openQuickView()",1)}
} // end fun

function openQuickView() {
	document.getElementById(curPopID).className = "quickViewShow";	
	quickViewOpen = 1; 
} // end fun

function hideQuickView(id) {
	curPopID = "quickView" + id; document.getElementById(curPopID).className = "quickViewHide";
	quickViewOpen = 0; 
} // end fun

