// JavaScript Document


////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
function sbAnimateNav()
{
  var iSpeed = 300;
  jQuery("#idNavArea a").each(function(){
    var ths = jQuery(this);
    var pre = ths.parent().prev();
    ths.hover(
      function()
      {
        if(pre.is(':animated'))
          pre.stop().animate( {'color':'#3F8ED3'}, iSpeed);
        else
          pre.animate( {'color':'#3F8ED3'}, iSpeed);
      }
      ,function()
      {
        if(pre.is(':animated'))
          pre.stop().animate( {'color':'#fff'}, iSpeed);
        else
          pre.animate( {'color':'#fff'}, iSpeed);
      }
    );
  });
}


////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
iPromptInterval = 300;
function sbBlink()
{
  try
  {
    if(document.getElementById("idPrompt").style.visibility == "visible")
      document.getElementById("idPrompt").style.visibility = "hidden";
    else
      document.getElementById("idPrompt").style.visibility = "visible"; 
    setTimeout("sbBlink()",iPromptInterval);     
  }
  catch(er) {}  
}


////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
function openWin(url, width, height)
{ 
  // set javascript params
  windowName = "popup";
  params = "toolbar=0,";
  params += "location=0,";
  params += "directories=0,";
  params += "status=0,";
  params += "menubar=0,";
  params += "scrollbars=0,";
  params += "resizable=0,"; 
  params += "width="+width+",";
  params += "height="+height;
  
  win = window.open(url, windowName, params);
  if(!win)
    alert ("Turn off pop-up blockers");
  else
  { 
    win.moveTo((screen.availWidth - width)/2, (screen.availHeight - height)/4)
    win.focus();
  }
}



                    

