LONG_DATE_FORMAT = '%A %d %B %Y';
LONG_DATETIME_FORMAT = '%A %d %B %Y %H:%M';
SHORT_DATE_FORMAT = '%a %d %b %y';
SHORT_DATETIME_FORMAT = '%a %d %b %y %H:%M';
TIME_FORMAT = '%H:%M';

var longDayNames = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
var longMonthNames = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
var shortDayNames = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var shortMonthNames = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');

var phrases = {
    click : "Click to view more",
		shorturl : "Short URL",
		email : "eMail to...", 
		download : "Download",
		open : "Open",
		olangs : "Other Languages",
		en : "English Version",
		nl : "Dutch Version",
		da : "Danish Version",  
		de : "German  Version",
		es : "Spanish Version", 
		fr : "French Version",   
		it : "Italian Version", 
		no : "Norwegian Version",
		pl : "Polish Version",   
		pt : "Portuguese Version",
		fi : "Finnish Version", 
		sv : "Swedish Version",  
		ru : "Russian Version",
		ar : "Arabic Version",
		surle : "Below is a list of URLs which can be used to access this file.",
		clipboard : "Would you like to attempt to copy this to your clipboard?\nPlease note not all browsers support this function.",
		givemeail : "Please enter your email and click \"Email my password\" again",
		emailsent : "Your login details have been sent to your email address",
		loginnotfound : "Your login details were not found, would you like to register now?",
		noreg : "This email address has already been registered on the system, if you've forgotten your login details please use Email my Password link on login page",
		reg : "Welcome to the hpstoragemedia site.\nA \"welcome to www.hpstoragemedia.com\" email has been sent to you, please read that email to see how to unlock the full potential of the site.",
		alreadyValidated : "Your email address has already been validated",
		revalidate : "A \"welcome to www.hpstoragemedia.com\" email has been sent to your account. Please click the link in that email to validate your email address",
		search : 'Search',
		searchRes : 'Search returned #1# items. Viewing #2#...#3#',
		searchNext : 'Next Page &gt;&gt;',
		searchLast : '&lt;&lt; Last Page',
		searchNone : 'No matches found',
		notvalidated : 'In order to use this feature you must first validate your email address.\nPlease see My Details page for more information.',
		formIncomplete : 'The contains missing or invalid information. The problem field will be highlighted once OK is clicked',
		pageInfo : 'Page #1# of #2#',
		basketEmpty: "Are you sure you want to empty your shopping basket?",
		basketRemove : "Are you sure you want to remove #1# from your basket?",
		basketAdded: "The item #1# has been added to your shopping basket",
		basketAdd : 'Add to Basket...',
		basketNoItems : 'Your shopping basket is empty',
		itemTitle : 'Item Title',
		language : 'Language',
		pubNo : 'Pub No',
		copies : 'Copies',
		avail : 'Availability',
		dateAdded : 'Date Added',
		item : 'item',
		items : 'items',
		elements : 'Elements...',
		minOrder : 'Minimum order quantity is #1# units.',
	 	noFiles : 'Please select the files you wish to download by checking them above',
		guestRegister : 'Guests are not permitted to use this feature.\nWould you like to register/login now?',
		detailsSaved : 'Details saved'
};

function GetFileSize(fsize)
{
	var types = new Array('KB', 'MB', 'GB', 'TB');
	var type = -1;
	do {
		fsize /= 1024.0;
		type++;
	} while (fsize >= 1024);
	var i = Math.floor(fsize);
	//return i + types[type];
	return i + '.' + Math.round((fsize - i) * 100) + ' ' + types[type];
}
