//*--------------------*
//*Status Bar disabling*
//*--------------------*

var boodschap = 'Welkom bij Garage Meijer Toyota Automobielbedrijf'; 
function dgstatus()
{
  window.status = boodschap;
  timerID= setTimeout("dgstatus()", 99);
}
dgstatus();

//*------------------*
//*Keyboard disabling*
//*------------------*

function keypressed() {
alert("Sorry no button access");
}
document.onkeydown=keypressed;

//*------------------*
//*  Mouse disabling *
//*------------------*

//set the skin of the menu (0 or 1, with 1 rendering a default Windows menu like skin)
var menuskin=0

//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=0


function showmenuie5(){
//Find out how close the mouse is to the corner of the window
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<ie5menu.offsetWidth)
//move the horizontal position of the menu to the left by it's width
ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
ie5menu.style.left=document.body.scrollLeft+event.clientX

//same concept with the vertical position
if (bottomedge<ie5menu.offsetHeight)
ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
else
ie5menu.style.top=document.body.scrollTop+event.clientY

ie5menu.style.visibility="visible"
return false
}

function hidemenuie5(){
ie5menu.style.visibility="hidden"
}

function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}

function lowlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}

function jumptoie5(){
if (event.srcElement.className=="menuitems"){
if (event.srcElement.getAttribute("target")!=null)
window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
else
window.location=event.srcElement.url
}
}

//*------------------*
//*    Mouse Menu    *
//*------------------*

function menu()
{
  document.write(
	"<!--[if IE]>"
	+"<span ID='oHomePage' class='home'>"
	+"<font face='arial' size=2 color='black'>"
	+"<div id='ie5menu' class='skin0' onMouseover='highlightie5()' onMouseout='lowlightie5()' onClick='jumptoie5()'>"
	+"<div class='menuitems' url='javascript:AddToFavorites();'>Add To Favorites</div>"
	+"<div class='menuitems' HREF onClick='javascript:MakeStartPage();'>Make Startpage</div>"
	+"<hr>"
	+"<div class='menuitems' url='javascript:history.go(0);'>Refresh</div>"
	+"</font>"
	+"<![endif]-->");
  if (document.all&&window.print)
  {
    if (menuskin==0)
    ie5menu.className="skin0"
      else
    ie5menu.className="skin1"
    document.oncontextmenu=showmenuie5
    document.body.onclick=hidemenuie5
  }
}

function AddToFavorites()
{
  window.external.AddFavorite("http://www.toyota-meijer.nl","Garage Meijer");
}

function MakeStartPage()
{
  oHomePage.setHomePage("http://www.toyota-meijer.nl");
  event.returnValue = false;
}

//*------------------*
//* No Mousebuttons *
//*------------------*

 if (window.Event) // Only Netscape will have the CAPITAL E.
         document.captureEvents(Event.MOUSEUP); // catch the mouse up event
        
       function nocontextmenu()  // this function only applies to IE4, ignored otherwise.
       {
        event.cancelBubble = true
        event.returnValue = false;
        
        return false;
       }
        
       function norightclick(e) // This function is used by all others
       {
        if (window.Event) // again, IE or NAV?
        {
         if (e.which == 2 || e.which == 3)
          return false;
        }
        else
         if (event.button == 2 || event.button == 3)
         {
          event.cancelBubble = true
          event.returnValue = false;
          return false;
         }
        
       }
        
       document.oncontextmenu = nocontextmenu;  // for IE5+
       document.onmousedown = norightclick;  // for all others
