function lampeggio(id){
	if (document.getElementById(id).style.color == "" || document.getElementById(id).style.color == "rgb(255, 255, 255)" || document.getElementById(id).style.color == "#ffffff"){
		document.getElementById(id).style.color = "#feca00";
	} else {
		document.getElementById(id).style.color = "#ffffff";
	}
	setTimeout( "lampeggio('" + id + "')" ,500);
}
function lampeggio_lat(id){
	if (document.getElementById(id).style.color == "" || document.getElementById(id).style.color == "rgb(63, 107, 155)" || document.getElementById(id).style.color == "#3f6b9b"){
		document.getElementById(id).style.color = "#feca00";
	} else {
		document.getElementById(id).style.color = "#3f6b9b";
	}
	setTimeout( "lampeggio_lat('" + id + "')" ,500);
}
function change_type(id){
	if (id=="txtPassword"){
		if (document.getElementById(id).value == "Password"){
			var obj = document.getElementById(id);
			var newO = document.createElement('input');
			newO.setAttribute('type','password');
			newO.setAttribute('name','txtPassword');
			newO.setAttribute('id',id);
			newO.setAttribute('value','');
			newO.setAttribute('onblur','reset_type(this.id);');
			obj.parentNode.replaceChild( newO , obj);
			setTimeout("focus_on('"+id+"');", 10);
		}
	} else {
		if (document.getElementById(id).value == "User ID"){
			document.getElementById(id).value = "";
		}
	}
}
function focus_on(id){
	document.getElementById(id).focus();
}
function reset_type(id){
	if (id=="txtPassword"){
		if (document.getElementById(id).value == ""){
			var obj = document.getElementById(id);
			var newO=document.createElement('input');
			newO.setAttribute('type','text');
			newO.setAttribute('name','txtPassword');
			newO.setAttribute('id',id);
			newO.setAttribute('value','Password');
			newO.setAttribute('onfocus','change_type(this.id);');
			obj.parentNode.replaceChild(newO,obj);
		}
	} else {
		if (document.getElementById(id).value == ""){
			document.getElementById(id).value = "User ID";
		}
	}
}

function go_to(url){
	if (url!="null" && url.length >5){
		location.href = url;
	}
}
function go_top(topper){
	var scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		scrOfY = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		scrOfY = document.body.scrollTop;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		scrOfY = document.documentElement.scrollTop;
	}
	if (topper == "null"){
		topper = scrOfY;
	} else {
		topper = topper;
	}
	var new_topper = Math.round(topper/10)*1;
	
	if ((topper-new_topper)>5){
		scrollTo(0, (topper-new_topper));
		setTimeout('go_top('+((topper*1)-(new_topper*1))+')',10);
	} else {
		scrollTo(0, 0);
		return false;
	}	
}


function track1() {
document.getElementById("track").src = "/track_mail.html";
}

var message="Attenzione! I contenuti sono di proprietà di P & P Investigazioni.\nE' pertanto vietato il loro utilizzo in qualsiasi forma e la loro diffusione";

function clickIE4(){
	if (event.button==2){
		alert(message);
		return false;
	}
}

function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			alert(message);
			return false;
		}
	}
}

if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
} else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")