function inizializza() {
	a = document.getElementsByTagName('A');
	for(i=0;a[i];i++){ 
		if(a[i].className.indexOf('blank') != -1) {
			a[i].onclick = function () {window.open(this.href, '_blank'); return false;};
			a[i].onkeypress = function (e) {
				k = (e) ? e.keyCode : window.event.keyCode;
				if(k==13) {
					window.open(this.href, '_blank');
					return false;
				}
			}
		}
	}
}

function reloadImages(){
	allimg = document.images;

	for (i=0; i<allimg.length; i++){
		allimg[i].src = allimg[i].src+'?'+new Date().getTime();
	}
}

function checkAll(form,check)
{
	check = (check ? true : false);
	form = document.getElementById(form).elements;

	for (i=0; i<form.length; i++){
		if(form[i].type == "checkbox")
			form[i].checked = check;
	}
}

function confirmSubmit(str)
{
	var agree=confirm(str);
	if (agree)
		return true ;
	else
		return false ;
}

function html_entity_decode( string ) {
    var ret, tarea = document.createElement('textarea');
    tarea.innerHTML = string;
    ret = tarea.value;
    return ret;
} 
