function PrintQueue(itemPrefix, strClassName, strSelectedClassName, strOverClassName, strClickHandler) {
   	if (arguments.length > 0) {
		this.init(itemPrefix, strClassName, strSelectedClassName, strOverClassName, strClickHandler);
	}
	
	this.strIcon = "DELETE";
	this.hshHeadlines = new Array();
	this.hshHeadlinesKeys = new Array();
	this.str
}

//inherit from ItemList
PrintQueue.prototype = new ItemList();

PrintQueue.prototype.setRemoveIcon = function(strIcon) {
	this.strIcon = strIcon.replace("[[REMOVE_LINK]]", "objItemList.removeFromQueue('[[ID]]')");
}

PrintQueue.prototype.loadQueue = function() {
	this.loadCookie();
}

PrintQueue.prototype.saveQueue = function() {
	this.saveCookie();
}

PrintQueue.prototype.addManyToQueue = function(lstArticles, strPrefix, lstIDs) {
	var arrIDs = lstIDs.split(",");
	var arrArticles = lstArticles.split("#:#");
	for (var i = 0; i < arrIDs.length && i < arrArticles.length; ++i)
	{
		this.addToQueue(arrArticles[i], strPrefix + "_" + arrIDs[i]);	
	}
}

PrintQueue.prototype.addToQueue = function(strArticle, strUniqueId) {
	if (this.hshHeadlines[strUniqueId] == null || this.hshHeadlines[strUniqueId] == "undefined")
	{
		var objRow = document.createElement("tr");
		var strNewID = this.strItemPrefix + this.arrItems.length + "-" + strUniqueId;
		objRow.id = strNewID;
	
		var objItemCell = document.createElement("td");
		var objRemoveCell = document.createElement("td");
	
		objItemCell.innerHTML = strArticle;
		objItemCell.className = "queueHeadline";
		
		objRemoveCell.innerHTML = "&nbsp;"
		objRemoveCell.className = "queueRemoveCell";
		objRemoveCell.strItemID = strNewID;
		
		objRemoveCell.onclick = function() {
			var objCheckbox = objDOM.getLayerReference( "checkbox_"+strUniqueId );
			
			if (objCheckbox) {
				objCheckbox.checked = false;
			}
				objItemList.removeFromQueue(this.strItemID);
		}
		//objRemoveCell.onmouseover = function() {
		//	this.className = "queueRemoveCellOver";
		//}
		//objRemoveCell.onmouseout = function() {
		//	this.className = "queueRemoveCell";
		//}
		
		this.hshHeadlines[strUniqueId] = strArticle;
		this.hshHeadlinesKeys[strUniqueId] = strNewID;
		
		objRow.appendChild(objItemCell);
		objRow.appendChild(objRemoveCell);
		this.addItem(objRow);
	}
}


PrintQueue.prototype.toggleQueue = function( strArticle, strUniqueId, objEvent ) {

	if (!objEvent) var objEvent = window.event;
	
	/*
	var locationProps = [
		"pageX", 
		"pageY", 
		"clientX", 
		"clientY", 
		"offsetX", 
		"offsetY", 
		"x",
		"y"
	];
	var strProps = "";
	for ( var i = 0; i < locationProps.length; i++ )
	{
		strProps += locationProps[i] +": "+ objEvent[ locationProps[i] ] +"\n";
	}
	*/
	
	var objTarget;
	
	if (objEvent.target)
	{
		objTarget = objEvent.target;
	} 
	else if (objEvent.srcElement)
	{
		objTarget = objEvent.srcElement;
	}
	// defeat Safari bug
	if (objTarget.nodeType == 3) objTarget = objTarget.parentNode;
	
	var intX, intY;
	
	if (objEvent.pageX || objEvent.pageY)
	{
		intX = objEvent.pageX;
		intY = objEvent.pageY;
	}
	else if (objEvent.clientX || objEvent.clientY)
	{
		var blnIsCompat = (document.compatMode && document.compatMode.toLowerCase() != "backcompat");
		var docRoot = blnIsCompat ? document.documentElement : (document.body || null);
		
		intX = objEvent.clientX + docRoot.scrollLeft;
		intY = objEvent.clientY + docRoot.scrollTop;
	} 
	else if ( objEvent.offsetX || objEvent.offsetY )
	{
		intX = Math.abs(objEvent.offsetX);
		intY = Math.abs(objEvent.offsetY);
	}
  	
	var strMessage = "";
	
	if ( this.hshHeadlines[strUniqueId] )
	{
		var strEvenMoreUniqueID = this.hshHeadlinesKeys[strUniqueId];
		this.removeFromQueue( strEvenMoreUniqueID );
		
		strMessage = "Removing "+strArticle+" from the Print List."
		
		if ( hshFaders[strUniqueId] )
		{
			hshFaders[strUniqueId].killFade();
		}
		hshFaders[strUniqueId] = new Fader("hshFaders['"+strUniqueId+"']");
		hshFaders[strUniqueId].fade(intX, intY, strMessage);
	}
	else
	{
		this.addToQueue( strArticle, strUniqueId );
		
		strMessage = "Adding "+strArticle+" to the Print List."

		if ( hshFaders[strUniqueId] )
		{
			hshFaders[strUniqueId].killFade();
		}
		hshFaders[strUniqueId] = new Fader("hshFaders['"+strUniqueId+"']");
		hshFaders[strUniqueId].fade(intX, intY, strMessage);
	}
}

PrintQueue.prototype.printAnalysis = function(intID) {
	openPopUp("print/?aid=" +intID, 500, 500);
}

PrintQueue.prototype.printAlert = function(intID) {
	openPopUp("print/?alid=" +intID, 500, 500);
}

PrintQueue.prototype.removeFromQueue = function(strID) {
	this.hshHeadlines[this.getUniqueID(strID)] = null;
	this.hshHeadlinesKeys[this.getUniqueID(strID)] = null;
	this.remove(strID);
}

PrintQueue.prototype.saveCookie = function() {
	var strCookie = "";
	var arrCookie = new Array();
	for (strUniqueID in this.hshHeadlines) {
		if (this.hshHeadlines[strUniqueID] != null && this.hshHeadlines[strUniqueID] != "undefined") {
			arrCookie[arrCookie.length] = strUniqueID + "::#::" + this.hshHeadlines[strUniqueID];
		}
	}
	strCookie = arrCookie.join("##:##");
	createCookie("printqueue", strCookie, 365);
}

PrintQueue.prototype.loadCookie = function() {
	var strCookie = readCookie("printqueue");
	if (strCookie != null && strCookie != "")
	{
		var arrArticles = strCookie.split("##:##");
		for (var i = 0; i < arrArticles.length; ++i)
		{
			var arrElements = arrArticles[i].split("::#::");
			this.addToQueue(arrElements[1], arrElements[0]);
			this.selectCheckbox( arrElements[0] );
		}
	}
}

PrintQueue.prototype.selectCheckbox = function( strUniqueId ) {
	var strCheckboxID = "checkbox_" + strUniqueId;
	var objCheckboxElement = objDOM.getLayerReference( strCheckboxID );
	if (objCheckboxElement) {
		objCheckboxElement.checked = true;
	}
}

PrintQueue.prototype.printManyNow = function(strPrefix, lstIDs) {
	var arrIDs = lstIDs.split(",");
	for (var i = 0; i < arrIDs.length; ++i) {
		arrIDs[i] = strPrefix + '_' + arrIDs[i] ;
	}
	openPopUp("/site/print/?ids=" + arrIDs.join(","), 500, 500);
}

PrintQueue.prototype.printNow = function(strID) {
	openPopUp("/site/print/?ids=" + strID, 500, 500);
}

PrintQueue.prototype.printArticles = function() {
	if (this.intCount == 0)
	{
		alert("You haven\'t added any items to your print list.");
	}
	else
	{
		var arrIDs = new Array();
		for (strUniqueID in this.hshHeadlines)
		{
			if (this.hshHeadlines[strUniqueID] != null)
			{
				arrIDs[arrIDs.length] = strUniqueID;
			}
		}
		var url = "/site/print/?ids=" + arrIDs.join(',');
		openPopUp(url, 500, 500);
		this.removeAll();
		this.hshHeadlines = new Array();
	}
}
