var on_time = 0;

function cant_look_NN(event) {
if(event.which==3) alert('Right-click cannot be used.');
return;
}
function cant_look_IE() {
if (event.button==2) alert('Right-click cannot be used.');
return;
}
function cant_look_NN_M(event) {
on_Date = new Date();
on_time = on_Date.getTime(); 
return;
}
function cant_look_NN_M2() {
var off_time;
off_Date = new Date();
off_time = off_Date.getTime(); 
if((off_time - on_time)>300){
alert('It is locked.');
}
return;
}
function cant_look_IE_M() {
on_Date = new Date();
on_time = on_Date.getTime(); 
return;
}
function cant_look_IE_M2() {
var off_time;
off_Date = new Date();
off_time = off_Date.getTime(); 
if((off_time - on_time)>300){
alert('It is locked.');
}
return;
}
if (navigator.appVersion.indexOf("Mac",0) != -1){
if (navigator.appName == "Netscape")
{
window.captureEvents(Event.CLICK);
document.onmousedown = cant_look_NN_M;
document.onmouseup = cant_look_NN_M2;
}else{
document.onmousedown = cant_look_IE_M;
document.onmouseup = cant_look_IE_M2;
}
}else{
if (navigator.appName == "Netscape")
{
window.captureEvents(Event.CLICK);
document.onmousedown = cant_look_NN;
}else{
document.onmousedown = cant_look_IE;
}
}

