var ie=document.all
var dom=document.getElementById
var ns4=document.layers

var bouncelimit=40 //(must be divisible by 8)
var direction="left"

function initbox(){
if (!dom&&!ie&&!ns4)
return
cen=(ie)? document.body.clientWidth/2-155 : (dom)?window.innerWidth/2-155  : window.innerWidth/2-155
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
crossobj.top=scroll_top-250
crossobj.width=310
crossobj.left=cen

crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<125+scroll_top)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}





function updateWin(url) {
	updateWindow = window.open(url,'update','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=455,height=570');
 }

function openindex(width,height,theurl) { 
	OpenWindow=window.open(theurl, "newwin", "height="+height+", width=" + width + ",toolbar=no,scrollbars=" + 1 + ",menubar=no,resizable=yes");
self.name="main";
}
		 
function doPopup2() {
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
var theTop=(screen.height/2)-(130/2);
var theLeft=(screen.width/2)-(300/2);
	window.open("/subnews2.shtml", "pop", "top="+theTop+",left="+theLeft+",width=300 height=130,scrollbars=no,menubar=no");
}

function doPopup1() {
crossobj.visibility="hidden"
if(document.all)showModalDialog('/subnews2.shtml',window,'dialogHeight:160px; dialogWidth:300px; dialogTop:px;dialogLeft:px; center:Yes;edge:Raised;status:no; help:no');
}

function doPopup() {


var info='<TABLE WIDTH=310 BGCOLOR="#000000" CELLPADDING=4 CELLSPACING=0"><TR><TD><TABLE BGCOLOR="#D5E2A8" CELLSPACING=0 CELLPADDING=5><TR><TD>'
+ '<DIV CLASS="header" ALIGN="center"><BR><big><b>FREE Shipping on 100S Rockers for the rest of 2011!</big></b></div><!--Fall Discounts</b></big></DIV>'
+ '<P ALIGN="Center">100S Rockers $249 now $175<BR>400S Gliders $254 now $199<BR>400S Gliders $525 now $425<BR><BR>Choose from Natural, Maple, White, Mahogany & Green Frames and many fabrics.<BR><BR><small><a href="shipping_charges.htm">Click here</a> for shiping charges<BR>ships next day if in stock</small></P>-->'

+ '<P ALIGN="Center"><a href="javascript:dismissbox()" onmouseover="window.status=\'Close window\'; return true;" onmouseout="window.status=\'Subscribe Today\'; return true"><b>Close</b></a></P>'
+ '</TD></TR></TABLE></TD></TR></TABLE>';
if (ie) {
	document.all.dropin.innerHTML = info;
	document.all.dropin.left='200';
  }	
  	else if (ns4) {
		document.layers['dropin'].document.open();
		document.layers['dropin'].document.write(info);
		document.layers['dropin'].document.close();
	}
	else if (dom) {
		document.getElementById('dropin').innerHTML= info;
	}


initbox();
}

function doPopup2() {


var info='<a target="_blank" href="/r/wealth/"><img border="0" src="/images/wealth.gif" width="300" height="300"></a><p>';
if (ie) {
	document.all.dropin.innerHTML = info;
	document.all.dropin.left='200';
  }	
  	else if (ns4) {
		document.layers['dropin'].document.open();
		document.layers['dropin'].document.write(info);
		document.layers['dropin'].document.close();
	}
	else if (dom) {
		document.getElementById('dropin').innerHTML= info;
	}


initbox();
}
<!--
function OpenMeter(meter_page) {
	window.open(
			meter_page,
			"meter",
			"width=620,height=530")
}
// -->
