			// used for the checkboxes list ,1768,134,707 etc...
			var listOfIds = '';
			function updateListOfIds(checkbox_field)	{
				if (checkbox_field.checked)	{
					// add to the list
					listOfIds += ',' + checkbox_field.id;
				}
				else	{
					// remove from the list
					listOfIds = listOfIds.replace(',' + checkbox_field.id,'');
				}
			}
			// print all selected ads
			function print_selected(strURL)	{
				printWindow = window.open(strURL + '&strListOfIDs=' + listOfIds,'printWindow','top=0,left=0,toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=' + screen.width-20 + ',height=' + screen.height-20);
			}
			// print one - prints only one record
			function print_one(strURL,str_id,str_msg)	{
				if (confirm(str_msg)) {
					printWindow = window.open(strURL + '&strListOfIDs=' + str_id,'printWindow','top=0,left=0,toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=' + screen.width-20 + ',height=' + screen.height-20);
				}
			}

			// select all checkboxes
			function select_all_results()	{
				var elements = document.getElementsByTagName('input');
				for (var i = 0; i < elements.length; i++) {
					if (elements.item(i).type == 'checkbox')	{
						elements.item(i).checked = true;
						listOfIds += ',' + elements.item(i).getAttribute('id');
					}
				}
			}
			// deselect all checkboxes
			function deselect_all_results()	{
				var elements = document.getElementsByTagName('input');
				for (var i = 0; i < elements.length; i++) {
					if (elements.item(i).type == 'checkbox')	{
						elements.item(i).checked = false;
						listOfIds = listOfIds.replace(',' + elements.item(i).getAttribute('id'),'');
					}
				}
			}
			// select all checkboxes, print them & deselect
			function print_all_basket()	{
				select_all_ads();
				print_ads();
				deselect_all_ads();
			}
			function remove_all_basket()	{
				select_all_ads();
				location.href='cookies.asp?action=remove&strListOfIds=' + listOfIds;
			}
			// actually select checkboxes for removal
			function remove_selected_from_suitcase()	{
				var elements = document.getElementsByTagName('input');
				for (var i = 0; i < elements.length; i++) {
					if (elements.item(i).getAttribute('checked'))	{
						// place it in the list
						listOfIds += ',' + elements.item(i).getAttribute('id');
					}
				}
				suitcaseWindow = window.open('cookies.asp?action=remove&strListOfIds=' + listOfIds,'suitcaseWindow','top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1,height=1');
			}
			// open popup - opens a popup window with nothing but scrollbars (used in forms, ad focus etc...)
			function open_pop(strURL,popWindowId,intWidth,intHeight)	{
				var LeftPosition = (screen.width) ? (screen.width-intWidth)/2 : 0;
				var TopPosition = (screen.height) ? (screen.height-intHeight)/2 : 0-20;
				popWindow = window.open(strURL,popWindowId,'top=' + TopPosition + ',left=' + LeftPosition + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + intWidth + ',height=' + intHeight + '');
			}

			// add_to_suitcase - ads a list of id's to the suitcase
			function add_to_suitcase(strList)	{
				suitcaseWindow = window.open('cookies.asp?action=add&strListOfIDs=' + strList,'suitcaseWindow','top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1,height=1');
//				suitcaseWindow = window.showModalDialog('cookies.asp?action=add&strListOfIDs=' + strList,,'top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1,height=1');
			// add_to_suitcase - ads a list of id's to the suitcase
			}
			function add_selected_to_suitcase()	{
				suitcaseWindow = window.open('cookies.asp?action=add&strListOfIDs=' + listOfIds,'suitcaseWindow','top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1,height=1');			
			}
			// remove from suitcase
			function remove_from_suitcase(strList)	{
				suitcaseWindow = window.open('cookies.asp?action=remove&strListOfIDs=' + strList,'suitcaseWindow','top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1,height=1');
			}
			// sets the display to any given object
			function setDisplay(object,val) { 
				document.getElementById(object).style.display = val; 
			}
			// sets the display to any given object
			function setAutoDisplay(object_id) { 
				var obj = document.getElementById(object_id);
				if (obj.style.display == 'none')	{
					obj.style.display = 'inline';
				}
				else	{
					obj.style.display = 'none';
				}
			}
			function write_to_selected(subject,intWidth,intHeight)	{
				open_pop('write_to_zimmer_form.asp?zimmer_id=' + listOfIds + '&subject=' + subject +'','write_to_zimmerWin',intWidth,intHeight);
			}
			/***********************************************
			* Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
			* This notice MUST stay intact for legal use
			* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
			***********************************************/
			
			function disableSelection(target){
			if (typeof target.onselectstart!="undefined") //IE route
				target.onselectstart=function(){return false}
			else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
				target.style.MozUserSelect="none"
			else //All other route (ie: Opera)
				target.onmousedown=function(){return false}
			target.style.cursor = "default"
			}