Event.observe(window, 'load', function() {
	var suggestionJournalInput = new SuggestionJournalInput(
								'inputJournal',
								'referenceEntryForm',
								'journalSuggestion',
								'h3',
								'Journal Search Keyword Suggestion Result',
								'referenceEntryForm',
								'../images/suggestionLoading.gif', 
								'../images/suggestionPrev.gif',
								'../images/suggestionNext.gif', 
								'journalInputSuggestionAction.do',
								'post');
});

var SuggestionJournalInput = Class.create();
Object.extend(SuggestionJournalInput.prototype, Suggestion.prototype);
Object.extend(SuggestionJournalInput.prototype, {

	// 候補キーワードリストの位置をブラウザごとに微調整を行います。 (オーバーライド)
	adjustSuggestion: function(left, top, width) {
		if (this.client.isWinOS && this.client.isIE) {
			left += 0; top -= 1; width -= 0;
			
		} else if (this.client.isWinOS && this.client.isFirefox) {
			left += 0; top -= 1; width -= 3;
			
		} else if (this.client.isWinOS && this.client.isSafari) {
			left += 3; top -= 0; width -= 3;
			
		} else if (this.client.isWinOS && this.client.isOpera) {
			left += 0; top -= 1; width -= 3;
			
		}  else if (this.client.isMacOS && this.client.isFirefox) {
			left += 0; top += 0; width -= 3;
			
		} else if (this.client.isMacOS && this.client.isSafari) {
			left += 3; top -= 0; width -= 3;
			
		} else if (this.client.isLinuxOS && this.client.isFirefox) {
			left += 0; top -= 1; width -= 3;
		}
		
		return '{left: ' + left + ', top: ' + top + ', width: '+ width +'}';
	}
});