// ***************************************************************
//                                                               *
// 2006 Nevin Holdings Australia. All rights reserved.           *
//                                                               *
// ********************* JavaScript Functions ********************

// ***************************************************************
//                                                               *
// By Murat Erten, April 2006                                    *
// ITopia Software and Systems.                                  *  
//                                                               *
// ITopia Software and Systems grants you a free script to use or* 
// modify, as long as all copyright messages appears on all      *
// copies.This software is provided "AS IS," without a warranty  *
// of any kind.                                                  *
// ***************************************************************


/* kill all javascript error alerts */
function WipeErrorAlert() {
return true;
}
window.onerror = WipeErrorAlert;


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

window.status=" .: Nevin Contract Packing & Assembly :. ";

function disableRightClick(e)
{
  var message = "Nevin Contract Packing & Assembly";
  
  if(!document.rightClickDisabled) // initialize
  {
    if(document.layers) 
    {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {
      alert(message);
      return false;
    }
  }
  else
  {
    alert(message);
    return false;
  }
}
disableRightClick();

function inCell(cell, newcolor){
  if(!cell.contains(event.fromElement)) {
     cell.bgColor=newcolor;
  }    
}

function outCell(cell, newcolor){
  if(!cell.contains(event.toElement)) {
     cell.bgColor=newcolor;
  }    
}