    if(navigator.userAgent.match(/Opera/ig))
    {
        location.replace("opera-not-supported.html");
    }
    var isnn,isie,isoo
    if(navigator.appName=='Microsoft Internet Explorer') //check the browser
    { 
        isie=true
    }
    if(navigator.appName=='Netscape')
    {
        isnn=true
    }
    if(navigator.appName=='Opera')
    {
        isoo=true
    }

function right(e) //to trap right click button
{
 if (isnn && (e.which == 3 || e.which == 2 ))
 return false;
  
 else if (isie && (event.button == 2 || event.button == 3))
 {
 myWindow = window.open("msg.htm", "Info", "width=250,height=50,toolbars=0,left=360,top=450","alwaysRaised=yes","z-lock=yes");
 myWindow.document.alwaysRaised="yes";

 //confirm_message();
//  alert("Sorry, you do not have permission to right click on this page.");
//  return false;
 }
 if (isoo && (e.which == 3 || e.which == 2 ))
  return false;
  return true;
}

function key(k)  
{
 if(isie)
 {
     if(event.keyCode==17 || event.keyCode==111 || event.keyCode==18 || event.keyCode==93 || event.keyCode==44 || event.keyCode==154 || event.keyCode==99)
     {
         myWindow = window.open("msg.htm", "Info", "width=250,height=50,toolbars=0,left=360,top=450","alwaysRaised=yes","z-lock=yes");
            myWindow.document.alwaysRaised="yes";
  
  // confirm_message();
//   return false;
   }
 }

 if(isnn)
     {
  myWindow = window.open("msg.htm", "Info", "width=250,height=50,toolbars=0,left=360,top=450","alwaysRaised=yes","z-lock=yes");
  myWindow.document.alwaysRaised="yes";
 
  //confirm_message();
//  return false;
        }  
}

if (document.layers) window.captureEvents(Event.KEYPRESS); 
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
document.onkeydown=key; 
document.onmousedown=right;
document.onmouseup=right;
window.document.layers=right;

function confirm_message()
{
  if (confirm("")==true)
    redirect();
  else
    return false;
}
function redirect()
{
  ref = document.referrer;
  if (ref && ref.toLowerCase().indexOf('google.com') !=-1) url = 'fromgoogle.html'
  else url = 'purchase.aspx'
  location = url;
// location.replace(url); /* uncomment this and comment the line before if you want the page to replace this page in history */
}

function setClipBoardData()
{
//alert("samsher");
//setInterval("window.clipboardData.clearData('Image','')", 10);
    setInterval("window.clipboardData.setData('text','')",10);
}
function blockError()
{
    window.location.reload(true);
    return true;
}
function doSomething(e)
{
 var code;
 if (!e) var e = window.event;
 if (e.keyCode) code = e.keyCode;
 else if (e.which) code = e.which;
 var character = String.fromCharCode(code);
 alert('Character was ' + character);
}
function hidestatus()
{
	window.status=''
    return true
}

if
(document.layers)

document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus

document.onmouseout=hidestatus
