
// 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

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

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


function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
 dismissbox();
}

function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features); 
} 


function initbox(){
if (!dom&&!ie&&!ns4)
return
cen=(ie)? document.body.clientWidth/2-235 : (dom)?window.innerWidth/2-235  : window.innerWidth/2-235
//cen=(ie)? document.body.clientWidth/2-360 : (dom)?window.innerWidth/2-360  : window.innerWidth/2-360
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)<300+scroll_top)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function staton(st) {
	window.status='Contact Us';
	return true;
	}
function statoff() {
	window.status='';
}


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 cont(email) {
	var qry = "";
	var win = "/contact.cfm";
	var left = (screen.width/2) - 300;
	var top = (screen.height/2) - 215;
	if (email.length > 0) qry = "?email=" + email; 
	OpenWindow = null;
	OpenWindow = window.open(win + qry, "newwin", 'height=430, width=600,toolbar=no,scrollbars=' + 1 + ',menubar=no,resizable=yes,status=no,left='+left+',top='+top+',screenX='+left+',screenY='+top);
	OpenWindow.focus();
	self.name = "main";
}

function conterr() {
	var win = "/contacterr.cfm";
	var left = (screen.width/2) - 300;
	var top = (screen.height/2) - 215;
	OpenWindow = null;
	OpenWindow = window.open(win, "newwin", 'height=430, width=600,toolbar=no,scrollbars=' + 1 + ',menubar=no,resizable=yes,status=no,left='+left+',top='+top+',screenX='+left+',screenY='+top);
	OpenWindow.focus();
	self.name = "main";
}


function doPopup() {

var info='<TABLE WIDTH=460 BORDER=0 CELLPADDING=0 CELLSPACING=0 style="border:1px solid #000000;"><TR><TD>'
+ '<a href=http://www2.enter.net/sales/computers/laptops.php><img src=http://www.enter.net/dropdowns/computer-sales020108.jpg border=0></a>'
+ '</td></tr><tr bgcolor=white>'
+ '<TD align=center>[<a href="javascript:SetCookie(\'snowcookie10\',5,100);">Don\'t show this again</a>]'
+ '[<a href="javascript:dismissbox();">Close</a>]</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();
}
