//*--------------------*
//*Status Bar disabling*
//*--------------------*

//var boodschap = 'Kansas Law Enforcement Resourses'; 
//function dgstatus()
//{
//  window.status = boodschap;
//  timerID= setTimeout("dgstatus()", 25);
//}
//dgstatus();
//
//*------------------*
//*Keyboard disabling*
//*------------------*

//function keypressed() {
//alert("Keys are Disabled");
//}
//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=1

//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://kansascops.tripod.com","Kansas Law Enforcement Resourses");
}

function MakeStartPage()
{
  oHomePage.setHomePage("www.get-your-own-brady-bunch.com");
  event.returnValue = false;
}
