SafariSearch = {
	
	init:function(id) {
		var isWebkit = (parseInt(navigator.productSub)>=20020000) && (navigator.appVersion.match(/OmniWeb|Safari|Webkit/));
		var DEF_VAL = "infochord durchsuchen"; // Default Value
		var AUTOSAVE_URL = "de.infochord.suche"; // Autosave URL
		var NUM_RESULTS = 5; // Number of Results
		
		var field = document.getElementById(id);
		
		if(isWebkit) {
			field.setAttribute('type', 'search');
			field.setAttribute('placeholder', DEF_VAL);
			field.setAttribute('autosave', AUTOSAVE_URL);
			field.setAttribute('results', NUM_RESULTS);
			document.getElementById('searchform').className = 'webkit';
		} else {
			field.onfocus = function() { if (this.value == DEF_VAL) this.value = ''; };
			field.onblur  = function() { if (this.value == '')      this.value = DEF_VAL; };
			if (field.value == '') field.value = DEF_VAL;
		}
	}
	
}