function do_slide_up() {
    Effect.SlideUp('dynamic_promo',{duration:1.0});
    Effect.SlideUp('dynamic_promo_close',{duration:1.0});
    Effect.SlideUp('dynamic_promo_close_button',{duration:1.0});
}

function delay_slide_up() {
	setTimeout('do_slide_up()','10000')
}

function close_popup() {
    d = document.getElementById('dynamic_promo_popup');
    d.style.display = 'none';
}
function setup_slider() {
	var slider_width = 384;	
	var pos = (window_width()-slider_width)/2;
	var dyn_promo_div = document.getElementById('dynamic_promo');
	var dyn_promo_close_div = document.getElementById('dynamic_promo_close');
	var dyn_promo_close_button_div = document.getElementById('dynamic_promo_close_button');
	dyn_promo_div.style.left = pos+'px';
	dyn_promo_div.style.visibility = 'visible'; 
	dyn_promo_close_div.style.left = pos+335+'px';
	dyn_promo_close_div.style.visibility = 'visible';
	dyn_promo_close_button_div.style.left = pos+245+'px';
	dyn_promo_close_button_div.style.visibility = 'visible';
}

function window_width() {
	var windowWidth = 0;
	if( typeof( window.innerWidth ) == 'number' ) {		
		windowWidth = window.innerWidth;  //Non-IE
	} else if( document.documentElement && document.documentElement.clientWidth ) {
		windowWidth = document.documentElement.clientWidth;  //IE 6+ in 'standards compliant mode'
	} else if( document.body && document.body.clientWidth ) {
		windowWidth = document.body.clientWidth;  //IE 4 compatible
	}
	return windowWidth;
}
