//disabling right click
function disable_right_click(e)
{
    var browser = navigator.appName.substring ( 0, 9 );
    var event_number = 0;
    if (browser=="Microsoft") {
      event_number = event.button;
    }
    /*
    else 
    if (browser=="Netscape") {
        event_number = e.which;
    }
    */

    if ( event_number==2 || event_number==3 )
    {
      alert ("Right Mouse Button Is Disabled to make your ordering clean.");
      return (false);
    }

    return (true);
}

//document.onmousedown = disable_right_click;
function changeToSecure(secureSwitch,serverName, requestURI){
  var url = ""+window.location.href;
  if(secureSwitch == "true" && url.indexOf("https") == -1){
     //alert("new url: "+ "https://"+serverName+requestURI);
     window.location.href = "https://"+serverName+requestURI;
  }
}


function changeToUnSecure(secureSwitch,serverName, requestURI){
  var url = ""+window.location.href;
  if(secureSwitch == "true" && url.indexOf("http:") == -1){
     //alert("new url: "+ "https://"+serverName+requestURI);
     window.location.href = "http://"+serverName+requestURI;
  }
}

