

function showBox()
	{
	var box = document.getElementById("dvDontLeaveBox")
	box.style.display = "inline"
	box.style.left = getPosition()+"px"
	box.style.top = "150px"
	}

function closeBox()
	{
	var box = document.getElementById("dvDontLeaveBox")
	box.style.display = "none"
	}

function getPosition()
{
	var width = 0, position = 0;
	if( typeof( window.innerWidth ) == 'number' )
		{
		width = window.innerWidth;
		} 
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
		{
		width = document.documentElement.clientWidth;
		} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
		{
		width = document.body.clientWidth;
		}
	position = (Number(document.body.scrollLeft)+width/2)-150;
	if(position < 0)
		{
		position = 0
		}
	return position
}
	
var http = createRequestObject();

function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

function setAsSeen() {
    http.open('get', '/tillys/dlb.aspx');
    http.onreadystatechange = handleResponse;
    http.send(null);
}

function handleResponse() {
    if(http.readyState == 4){
        showBox();
        }
    }



	
	
	