	if (document.all) {
		browserType = 'MSE';	
	} else {
		browserType = 'Moz';	
	}
	
	
	var	defaultTxt = '';
	function newsLetSearchCheck(theInput) {
		
		if (theInput == 1) {
			inputObj = document.getElementById('search_input');
		} 
		else if (theInput == 3) {
			inputObj = document.getElementById('newsletter2_input');	
		}
		else {
			inputObj = document.getElementById('newsletter_input');	
		}
		baseLetTxt = 'inserisci la tua e-mail';
		baseSearchTxt = 'Cerca';
		
		if (inputObj.value == baseLetTxt) {
			defaultTxt = baseLetTxt;
		} else if (inputObj.value == baseSearchTxt) {
			defaultTxt = baseSearchTxt;
		}
		
		if (inputObj.value == defaultTxt) {
			inputObj.value = '';
			inputObj.focus();
			return false;
		} else {
			if (inputObj.value == '') {
				inputObj.value = defaultTxt;
				return false;
			}
		}
	}
	
	function submitForm(theForm) {
		if (theForm == 1) { 
			newsLetSearchCheck(theForm);
		} else {
			//document.searchform.submit()
		}
	}
	
	function hilightTr(itemObj) {
		if (itemObj.className == 'hilight_tr_off') {
			itemObj.className = 'hilight_tr_on';
		} else {
			itemObj.className = 'hilight_tr_off';
		}
	}

	function toggleChil(itemObj) {
		if (itemObj.parentNode.className == 'openChild') {
			itemObj.parentNode.className = '';
			itemObj.style.fontWeight = 'normal';
		} else {
			itemObj.parentNode.className = 'openChild';
			itemObj.style.fontWeight = 'bold';
		}
		
		var pathObj = window.location.search;
		var pathArray = pathObj.split("/");
		//alert(pathArray[0]);

	}
	
	function openComment(idIem) {
		itemObj = document.getElementById(idIem);
		
		if (itemObj.style.display == 'none') {
			itemObj.style.display = '';
		} else {
			itemObj.style.display = 'none';
		}
	}
	
	function checkNewsletter(itamObj) {
		if ((itamObj.email.value == 'inserisci la tua e-mail') || (itamObj.email.value == '')) {
			alert('inserisci la tua e-mail');
			return false;
		} else {
			return true;
		}
	}
	
	function checkForm(formObj) {
		var formCheck = true;	
		var authorObj = document.getElementById('id_form_author');
		var commentObj = document.getElementById('id_form_comment');
		
		if (authorObj.value.length > 0) {
			authorObj.style.backgroundColor = '';
		} else {
			authorObj.style.backgroundColor = '#b0daae';
			var formCheck = false;	
		}
		
		if (commentObj.value.length > 0) {
			commentObj.style.backgroundColor = '';
		} else {
			commentObj.style.backgroundColor = '#b0daae';
			var formCheck = false;	
		}
		
		return true;
		
		/*
		
		if (formCheck == false) {
			return false;
		}
		*/
		
		
	}
