function hm(su,li)
{
self.location.href="mailto:?subject=www.honyvem.it - "+su+"&body="+li}

function changeImage( id_tag_img, new_img ) {
	
	try {
		tagImage = document.getElementById( id_tag_img );
		tagImage.src = new_img;
	} catch(e) {}
	
}

function changeFontSize( size ) {
	
	divContent = document.getElementById('id_content');
	
	divContent.className = "font_size_" + size;
	
}

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");}
	
	function swapF(from){
	var to,setF=false;
	if(from.type=='password'){
		to=from.form.holder;
	}
	else {
		to=from.form.psw;
		setF=true;
	}
	if(setF || from.value==''){
		// swappa solo se:
		// e' da settare il focus (quindi to e' pass)
		// oppure non viene inserito valore nel campo pass 
		to.style.display='block';
		from.style.display='none';
	}
	if(setF) to.focus();
}

function subm()
{if(trim(document.cse.q.value)=='') {alert('inserire il testo per la ricerca');document.cse.q.focus();return}
document.cse.submit();
}
function submlog()
{if(trim(document.logut2.login.value)=='' || trim(document.logut2.psw.value)=='') {alert('inserire e-mail e password');return}
document.logut2.submit();
}
function apri(d)
{if(document.getElementById(d).style.display=="block") 
{document.getElementById(d).style.display="none";
document.getElementById("f"+d).style.backgroundPosition="8px 10px"
document.getElementById("f"+d).style.backgroundImage="url(img/fr3.gif)"}
else 
{document.getElementById(d).style.display="block";
document.getElementById("f"+d).style.backgroundPosition="4px 12px"
document.getElementById("f"+d).style.backgroundImage="url(img/fr2.gif)"}
}
