/****************************************************************************************************** 
 * TRIM_tips.js
 * Copyright Rapunzel Web (UWA) 2006
 * 
 * Version	Date		Author					Comments
 * 1.0		23/01/2006	tontis@iinet.net.au		Written by Julian Tonti-Filippini
 * 
 * Script for writing a user tip to an html page. Two methods are available... 
 * 
 * rd_next_tip(time_unit, id) - Gets the next tip from a predefined list of tips
 * 	time_unit:	the frequency in milliseconds with which the tip should change. The following constants
 * 				may be used, DAY, MINUTE, SECOND. 
 * 	id:	the html id of the element into which the tip will be inserted.
 * 	
 * rd_random_tip(id) - Get a random tip from a predefined list of tips
 * 	id:	the html id of the element into which the tip will be inserted.
 ******************************************************************************************************/

var tips = new Array();

tips[0] = "Need archiving advice? Contact the University Archivist on x7234";
tips[1] = "TRIM Tip! Before requesting a paper file in TRIM, have you checked the assignee? Only request files that are marked with Archives & Records locations.";
tips[2] = "Processing a lot of mail merged documents for electronic files? Let us show you how to use the Word Merge program to save registration time. Contact the TRIM helpdesk on x3023 for more information.";
tips[3] = "TRIM Tip! To start a new search, press Ctrl+F or go to Search Ð Find Records.";
tips[4] = "Electronic Files - Do not print out emails for scanning! You can save these in TRIM yourself. Forgotten how? Contact the TRIM helpdesk on x3023";
tips[5] = "TRIM Tip! Moving to a new position on campus? Remember to move your files and Bring Forwards too!";
tips[6] = "Are you in central administration and need records management advice? Contact the Records Coordinator on x3019 for more information. Faculty and School staff should contact the University Archivist on x7234";
tips[7] = "TRIM Tip! To place a request on a record in TRIM click the \"Red Truck\" on your toolbar, or press F8.";
tips[8] = "Emails are university records too! Make sure you capture business emails on file. ";
tips[9] = "TRIM Tip! Over 500 UWA staff have active TRIM accounts. Do you need one too? Contact the TRIM Helpdesk on x3023 for more information.";
tips[10] = "Don\'t leave paper files sitting on your desk next to windows. Sunlight fades file covers.";
tips[11] = "TRIM Tip! To refine your search in TRIM, press F7 on your keyboard.";
tips[12] = "Remember files are university property. University files should never be moved off campus unless special permission is obtained from the Records Coordinator.";
tips[13] = "TRIM Tip! To change the assignee of a paper file, press F6 on your keyboard.";
tips[14] = "Do not use highlighters to mark text on paper documents. Text that has been highlighted will fade quickly, and it\'s also horrible to scan for electronic records.";
tips[15] = "TRIM Tip! To filter your search (e.g. search for only one record type), click on the filter tab at the search window.";
tips[16] = "Stick to one subject per email when creating new messages. This will make them easier to respond to and easier to file later.";
tips[17] = "TRIM Tip! TRIM WebDrawer is available for all staff to search for UWA position descriptions. Click <a href=\"http://www.admin-eds.uwa.edu.au/\">here</a> to access TRIM WebDrawer ";
tips[18] = "Make sure the titles of your emails are meaningful. This will make them easier to file later.";
tips[19] = "TRIM Tip! Need refresher training to find out new TRIM tips? Contact the TRIM helpdesk on x3023 to organise a time.";
tips[20] = "Dedicate half an hour a week to filing your emails. This will prevent your inbox from becoming cluttered and make important information easier to find.";
tips[21] = "TRIM Tip! To count your search results, click on the 123 button on your TRIM toolbar, or press F10";
tips[22] = "Do not use post-it notes or sticky labels on records that are likely to be of permanent value.";
tips[23] = "TRIM Tip! To sort search results by date created, click on the date created column of your list pane.";
tips[24] = "Sticky tape should never be used on records, particularly long term temporary or archival records.";
tips[25] = "TRIM Tip! Need to change an electronic document in TRIM? You can check it out to make a new revision. Call the TRIM helpdesk on x3023 to find out how.";
tips[26] = "Thermal facsimiles are unstable and deteriorate quickly Ð photocopy faxes onto good quality paper before filing";
tips[27] = "TRIM Tip! To view all volumes of a record, click on the \"Navigate to all parts\" icon on your toolbar.";
tips[28] = "Need tips on preserving your paper records? Click <a href=\"http://www.archives.uwa.edu.au/__data/page/84538/Advice_Sheet_21_-_Preservation_tips_for_paper.pdf\">here</a>";
tips[29] = "TRIM Tip! To make title word searching easier, remember the wildcard. You can use either % or * as the wildcard.";
tips[30] = "Need tips on preserving electronic records? Click <a href=\"http://www.archives.uwa.edu.au/__data/page/84538/Advice_Sheet_28_Preservation_tips_for_electronic_records.pdf\">here</a>";
tips[31] = "TRIM Tip! Go to Tools - User Configuration - Options - Get Global to set the global UWA settings.";
tips[32] = "Faculties and Schools can purchase archival materials such as boxes and paper by contacting the Archives Assistant on x3885";
tips[33] = "TRIM Tip! To find out all files marked out to a person in TRIM, do an \"assignee\" search.";
tips[34] = "Like to know more about UWA\'s amazing history? Click <a href=\"http://www.archives.uwa.edu.au/page/84805\">here</a> for more information.";
tips[35] = "TRIM Tip! Searching for electronic records in TRIM that you have created? Do a \"creator\" search.";
tips[36] = "Archives are assets, they are NOT replaceable";
tips[37] = "TRIM Tip! To view our TRIM Advice Sheets, click <a href=\"http://www.archives.uwa.edu.au/page/58947\">here</a>.";
tips[38] = "You can only legally destroy records in accordance with an existing Disposal Schedule or approved General Disposal Authority. Click <a href=\"http://www.archives.uwa.edu.au/page/84576\">here</a> for more information.";
tips[39] = "Need help sentencing your records? Contact the University Archivist on x7234";
tips[40] = "Archives are forever!";

var RD_DAY = 1000*60*60*24;
var RD_HOUR = 1000*60*60;
var RD_MINUTE = 1000*60;
var RD_SECOND = 1000;

//Get the next tip on a specified rotation schedule
function rd_next_tip(time_unit, id) {
	if (time_unit!=RD_DAY && time_unit!=RD_HOUR && time_unit!=RD_MINUTE && time_unit!=RD_SECOND) time_unit = RD_SECOND;

	var now = new Date();	
	var start_of_year = new Date(now.getFullYear(),0,1);
	var elapsed_time = Math.floor((now.getTime() - start_of_year.getTime()) / time_unit);
	
	if (document.getElementById(id)) {
		document.getElementById(id).innerHTML = tips[elapsed_time % (tips.length-1)];
	}
}

//Get a random tip right now
function rd_random_tip(id) {
	var random_tip = tips[Math.round(Math.random() * (tips.length-1))];
	if (document.getElementById(id)) {
		document.getElementById(id).innerHTML = random_tip;
	}
}
