// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

/*
<div id="dropin" style="position:absolute;visibility:hidden;left:130px;top:100px;width:500px;height:100px;background-color:#F5F5F5">

<table border="0" width="500" cellspacing="0" cellpadding="2" bgcolor="#1964F0">
  <tr>
    <td width="100%">
      <table border="0" width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="2">
        <tr>
          <td width="100%" bgcolor="#F3F3F3"><font face="Verdana" size="4"><b><a href="http://www.dhs.gov/dhspublic/display?theme=29" target="_blank" style="color:red">National Threat Advisory &nbsp;<img src="images/dhs_advisory_high.gif" align="baseline" border="0"></a></b></font>
            <p class="basictext"> The United States Government has raised the nation’s threat level for the aviation sector to Code Orange or High for all commercial aviation operating in or destined for the United States</p>
			<p class="basictext">Please see the <a href="http://www.dhs.gov/dhspublic/display?theme=29" target="_blank">U.S. Department of Homeland Security</a> website for more information.</p>
            <div align="right"><a href="#" onClick="dismissbox();return false">[Close Box] </a></div>
 </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

*/

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=32 //(must be divisible by 8)
var direction="up"

function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossobj.top=scroll_top-250+calunits
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top=parseInt(crossobj.top)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


//window.onload=initbox
