function gcon_BookmarkPage() { 
	//alert(9);return;
try{
	var title=document.title;
	var url=location.href;
	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; 
	}else {alert('Il tuo browser probabilmente non supporta questa funzione');}
}catch(e){
	alert('Il tuo browser probabilmente non supporta questa funzione');
}
} 

function gcon_ZoomIN(sel){
	var currsize=parseFloat($(sel).css('font-size'));
	var currlheight=parseFloat($(sel).css('line-height'));
	
	$(sel).css('font-size', (currsize+2)+'px');
	$(sel).css('line-height', (currlheight+2)+'px');
	
	
}

function gcon_ZoomOUT(sel){
	var currsize=parseFloat($(sel).css('font-size'));
	var currlheight=parseFloat($(sel).css('line-height'));
	if((currsize-2)>0){
		$(sel).css('font-size', (currsize-2)+'px');
		$(sel).css('line-height', (currlheight-2)+'px');
	
		
	}
}


function gcon_js_checkTextAreaLen(e,max, ctextarea, cdisplay){ 
	var characterCode ;
	
	if(e && e.which){ //if which property of event object is supported (NN4)
		e = e;
		characterCode = e.which ;
	}
	else{
		e = event;
		characterCode = e.keyCode ;
	}
	
	
	var retval=false;
	
	if((characterCode == 13) ){
		//alert('charcode='+characterCode);
		retval=true;
	}else{
		
		
		var diff=1;
		if((characterCode == 8) || (characterCode == 46)){diff=-1;}
		var s=ctextarea.value;
		l=s.length+diff;
		if(l<=max){
			retval= true;
			var rem=(max-(l));
			
			document.getElementById(cdisplay).innerHTML=(rem);
		}else {
			ctextarea.value=s.substr(0,max);
			retval=false;
		}
		
		
	}
	return retval;

}
