
function encodeSession(url) {
isid = document.location.href.indexOf(";jsessionid");
if (isid > 0 ) {
esid = document.location.href.indexOf("?",isid);
if (esid <= 0) esid = document.location.href.length;
url += document.location.href.substring(isid, esid);
}
return url;
}


var sorryMsg = "Sorry, right click not supported. ";
function putAlert() {alert(sorryMsg); return false;}

function clickIE4(){if (event.button==2) putAlert();}
function clickNN4(e){return (e.which==2||e.which==3) ? putAlert() : true;}

isIE4 = (document.all) ? true : false;
isW3C = (document.getElementById && !isIE4) ? true : false;
isNN4 = (document.layers && !isW3C) ? true : false;

if (isNN4){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNN4;}
else if (isW3C) {document.oncontextmenu=putAlert;}
else if (isIE4){document.onmousedown=clickIE4;}