var message = "Immagini e dati non riproducibili - Copyright Diego Veglia";

// Seleziona la riga specificata.
selectRow = function(row)
{	
	row.className = 'highlighted';
}

// Deseleziona la riga specificata.
deselectRow = function(row)
{
	row.className = 'dehighlighted';
}

// Mostra in un popup la pagina della scheda dettagli
// visualizzando i dati relativi all'imbarcazione con
// pk "pkImbarcazione" e lingua "lingua"
showImbarcazione = function(pkImbarcazione, lingua)
{
	showConsole('Schede/PageSchedaDettagli.aspx?PK=' + pkImbarcazione + '&lingua=' + lingua,'Details',690,650);
}

centerScreen = function(win ,winWidth, winHeight)
{
    var screenWidth = window.screen.width;
    
    var left = (screenWidth - winWidth) / 2;
    
    if(left > 0)
        win.moveTo(left,20);
    else
        win.moveTo(0,0);
}

showConsole = function(page,name,width,height)
{	
    var win = window.open(page,name,"width=" + width + ",height=" + height + ",status=no,resizable=yes,scrollbars=yes");

    centerScreen(win,width,height);
    win.focus();
}

// Impedisce l'uso del tasto destro del mouse.
lockMouse = function()
{	
	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")
}


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;
		}
	}
}
