var ie=document.all;
var dom=document.getElementById;
var ns4=document.layers;
var ns6=document.getElementById&&!document.all;
var calunits=document.layers? "" : "px";
var bouncelimit=8;
var direction='up';
var lpos;
function InitPopup(){
if(!dom&&!ie&&!ns4){return;}
crossobj=(dom)?document.getElementById('mypopup').style : ie? document.all.SlideDown : document.SlideDown;
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset;
crossobj.top=scroll_top-250+calunits;
crossobj.visibility=(dom||ie)? 'visible' : 'show';
dropstart=setInterval("SlideDown()",50);}
function SlideDown(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset;
if(parseInt(crossobj.top)<lpos)
crossobj.top=parseInt(crossobj.top)+25+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!="BackCompat")? document.documentElement : document.body}
function delay(x){
var d=new Date();
d=d.getSeconds()+x;
if(d>=60) d=d-60
while(true){
var d1=new Date();
if(d==d1.getSeconds())
break;}}
function DelCookie(arg1){
var expdate=new Date('January 1, 2001 23:00:00');
SetCookie(arg1,null,expdate);}
function GetCookie(arg1){
var starttext='',endtext='',cookiename=(arg1+'=');
if(document.cookie.length>0){
starttext=document.cookie.indexOf(cookiename);
if(starttext!=-1){
starttext+=cookiename.length;
endtext=document.cookie.indexOf(';',starttext);
if(endtext==-1){
endtext=document.cookie.length;}
return(unescape(document.cookie.substring(starttext,endtext)));}}
return(false);}
function SetCookie(myname,myvalue,expdate,mypath,mydomain,issec){
document.cookie=myname+'='+escape(myvalue)+((expdate==null) ? '' : '; expires='+expdate.toGMTString())+((mypath==null) ? '' : '; path='+mypath)+((mydomain==null) ? '' : '; domain='+mydomain)+((issec==null) ? '' : '; secure');}
function Delaynew(){
if(!ns4){document.getElementById('mypopup').style.visibility="visible";}
else{document.SlideDown.visibility='show';}return;}
function ShowPopup(main_bgcolor,main_texttype,main_textsize,main_textcolor,textbar,height,width,top,left,bordercolor,borderstyle,borderwidth){
lpos=top;
ans='no';
var issub=GetCookie('JillDistSub');
if(!issub){
var d=new Date();
d.setFullYear(d.getFullYear()+2);
document.cookie="popDropin="+document.lastModified+"; expires="+d.toGMTString();
SetCookie('popDropin','added',d);}
else{
DelCookie('popalert1','','');}
if(!issub){ 
if(ns4){
templayer=document.layers[0];
templayer.left=left;
templayer.top=top;
templayer.width=width;
templayer.height=height;}
else{
if(ns6){
document.getElementById("tbl").style.border=bordercolor+' '+borderwidth+'px '+borderstyle;
document.getElementById('mytext').innerHTML=textbar;
document.getElementById('mypopup').style.height=height +'px';
document.getElementById('mypopup').style.width =width +'px';
document.getElementById('mypopup').style.left =left +'px';
document.getElementById('mypopup').style.top =top +'px';
document.getElementById('mytext').style.backgroundColor=main_bgcolor;
document.getElementById('mytext').style.color=main_textcolor;
document.getElementById('mytext').style.fontFamily=main_texttype;
document.getElementById('mytext').style.fontSize=main_textsize+'px';}
else{
document.getElementById("tbl").style.border=bordercolor+' '+borderwidth+'px '+borderstyle;
document.getElementById('mytext').innerHTML=textbar;
document.getElementById('mypopup').style.height=height +'px';
document.getElementById('mypopup').style.width =width +'px';
document.getElementById('mypopup').style.left =left +'px';
document.getElementById('mypopup').style.top =top +'px';
document.getElementById('mytext').style.backgroundColor=main_bgcolor;
document.getElementById('mytext').style.color=main_textcolor;
document.getElementById('mytext').style.fontFamily=main_texttype;
document.getElementById('mytext').style.fontSize=main_textsize+'px';}}
InitPopup();}}
function IsJDSub(){
var datenow=new Date();
var delcookie=new Date();
delcookie.setTime(datenow.getTime()+(60*60*24*365*2*1000));
SetCookie('JillDistSub','true',delcookie);
dismissbox();}
