/********************
 *
 *	JAVASCRIPT_CALENDAR.JS
 *	Public javascripts
 * 
********************/


// Updates the queue total in the customer nav
function updateCustomerNavQueueTotal(Amnt) {
	document.getElementById('RentalsTotal').innerHTML = Amnt;
}

// Toggle the full description
function showFullDescription(ItemID) {
	
	with (document) {
		FullContainer  = getElementById('FullDescription_' + ItemID);
		FullNotShowing = FullContainer.style.display == 'none';

		getElementById('FullDescription_' + ItemID).style.display = (FullNotShowing)?'block':'none';
		getElementById('InitDescription_' + ItemID).style.display = (FullNotShowing)?'none':'block';
	}
}


// Opens a popup for an item image
function openItemImage(ImgSrc, w, h, WinTitle) {
	ImageWin = window.open('', 'ImageWinName', 'width=' + (w+25) + ',height=' + (h+50) + ',status');
	
	with (ImageWin.document) {
		open();
		write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"');
		write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		write('<head><title>' + WinTitle + '</title></head>');
		write('<body onClick="window.opener.focus(); window.close()" style="text-align: center; font-family: \'Arial\'; font-size: 10px">');
		write('<img src="' + ImgSrc + '" style="margin-bottom: 10px"><br>(click to close window)');
		write('</body></head>');
		close();
	}
}
