﻿javascript:window.history.forward(1); 
    //To disable Back Button
   
   var message="Sorry, Right Click is disabled.";
   
//    function click(e) {
//    if (document.all) {
//    if (event.button == 2) {
//    alert(message);
//    return false;
//    }
//    }
//    if (document.layers) {
//    if (e.which == 3) {
//    alert(message);
//    return false;
//    }
//    }
//    }
//    if (document.layers) {
//    document.captureEvents(Event.MOUSEDOWN);
//    }
//    document.onmousedown=click;
   
   function clickIE()

{if (document.all)
{(message);return false;}}

function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
   
    
    function alphaNumWithoutSpace(text)
{

	var c= event.keyCode;

	event.keyCode=(!((c>=65 && c<=90) ||(c>=97 && c<=122) || (c>=48 && c<=57) ))?0:event.keyCode;

}
    
    
    
    function isAlphaKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if ((charCode >=65 && charCode<=90 )||(charCode >=97 && charCode<=122)|| (charCode == 46) || (charCode ==32)||(charCode==45))
            {
            return true;
            }
            else
            {
            return false;
            }
         return true;
      }
           
     function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
          {
            return false;
          }
         return true;
      }
    
    function isNumberDotKey(evt)
      {
    
       var charCode = (evt.which) ? evt.which : event.keyCode
     
     if((charCode >= 48 && charCode <= 57 )||(charCode == 46 ))
     {
     return true;
     }
     else
     {
     return false;
     }
     }
     


function textMaxLength(obj, maxLength, evt)
{
var charCode=(evt.which) ? evt.which : event.keyCode
var max = maxLength - 0;
var text = obj.value;
if(text.length > max)
{
var ignoreKeys = [8,46,37,38,39,40,35,36];
for(i=0;i<ignoreKeys.length;i++)
{
if(charCode==ignoreKeys[i])
{
return true;
}
}
return false;
}else
{
return true;
}
} 


