<!--
	// preload images for use with rollovers
	// usage example: onLoad="preloadImages('/images/image1.gif', '/images/image2.gif')"
	var imageArray=new Array()
	function preloadImages() {
		for (i=0;i<preloadImages.arguments.length;i++) {
			imageArray[i]=new Image()
			imageArray[i++].src=preloadImages.arguments[i]
		}
	}
	
	// image swapper
	function swap(strName, imgSrc ,strStatus) {
		imgSrc = "images/" + imgSrc
		document.images[strName].src = imgSrc;
		window.status = strStatus;
		return true;
	}
	
	// Announcement Popup
	function openAnnouncement(url) {
		window.open(url, "Announcement", "width=670,height=580,scrollbars=yes"); 
	}		
	// Specials Coupon Popup Printer
	function openCoupon(url) {
		window.open(url, "Coupon", "width=380,height=500"); 
	}
	// Large Photo Popup
	function openPhoto(url) {
		window.open(url, "Photo", "width=670,height=500"); 
	}
	
	// Function to highlight the current value in a Drop Down List Box
	function selectListValue(list, value) {
	   for (var ctr=0;ctr<list.length;ctr++) {
	      if (list.options[ctr].value==value) {
	         list.options[ctr].selected=true;
	      }
	   }
	}
	
	// Function to limit number of characters entered into a textarea
	function textLimiter(field, maxlimit) {
		if (field.value.length > maxlimit) { 
			// if too long alert and trim it
			alert('Please limit your entry to ' + maxlimit + ' characters.');
			field.value = field.value.substring(0, maxlimit);
		}
	}
	
	// Function for setting focus to a particular form field
	function setFocus(field) {
		field.focus();
		if (field.type != 'select-one' && field.type != 'select-multiple') {
			field.select();
		}
	}
	// Function to confirm deletions
	function confirmDelete(url, itemName) {
		if (itemName == null) {
			itemName = "item"
		}
		if (confirm("Are you sure you want to Delete this " + itemName +"?")) {
			document.location=url;
		}
		return;
	}
	
	// Function to navigate pages from dropdown list
	function doHeaderNav(frm)
	{
		if (frm.page.value != "")
		{
			frm.action=frm.page.value;
			frm.submit();
			return true;
		}	 
	}
	
	// Function to dynamically change status icon
	function selectIcon(strStatus) {
		if (strStatus == "True") {
			document.getElementById('statusIcon').src = "../images/system/icon_active.gif";
			document.getElementById('statusIcon').alt = "Active";
		} else {
			document.getElementById('statusIcon').src = "../images/system/icon_inactive.gif";
			document.getElementById('statusIcon').alt = "Inactive";	
		}
	}	
// -->