function createFavourite(url, title) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; 
	}	
}

var ddFulltextSearchForm = new Class({
	
	initialize: function(formId, inputId) {
		this.form = $(formId);
		this.input = $(inputId);
		if(this.input != null){
		
			if (this.input.value) {
				this.input.setStyle('background-image','url(/fileadmin/staatsoperette-dresden/images/layout/fulltextBgActive.gif)');
			}		
			
			this.input.addEvent('focus', function() {
				if (!this.input.value) {
					this.input.setStyle('background-image','url(/fileadmin/staatsoperette-dresden/images/layout/fulltextBgActive.gif)');
				}
			}.bind(this));
			
			this.input.addEvent('blur', function() {
				if (!this.input.value) {
					this.input.setStyle('background-image','url(/fileadmin/staatsoperette-dresden/images/layout/fulltextBgInactive.gif)');
				}
			}.bind(this));	
		}
	}
});

window.addEvent('domready', initFulltextSearchForm);
function initFulltextSearchForm() {
	
	
	fulltextSearchForm = new ddFulltextSearchForm('fulltextSearch', 'fulltextSearchInput');

	// fonts resize
	if ($("zoomp")) {
		$("zoomp").addEvent("click", function() {resizeText('pageContent', 1.5);});
		$("zoomreset").addEvent("click", function() {resizeText('pageContent', 1.2);});
		$("zooms").addEvent("click", function() {resizeText('pageContent', 0);});
	}
}
