function doLayout() {
	var docWidth = document.viewport.getWidth();
	var docHeight = document.viewport.getHeight();

	if (!docWidth || !docHeight) {
		//alert('Quirk!');
		docWidth = document.body.clientWidth;
		docHeight = document.body.clientHeight;
	}

	fWidth = docWidth - 300;

	// main layout elements
	$('flash').style.width = fWidth;
	$('flash').style.height = docHeight;
	$('flash_object_ie').width = fWidth;
	$('flash_object_ie').height = docHeight;
	
	// if we're running in IE, we may not see the embed version
	if ($('flash_object_all') != null) {
		$('flash_object_all').height = docHeight;
		$('flash_object_all').width = fWidth;
	}
	
	$('side').style.left = fWidth;
	$('content_pad').style.height = docHeight - 246; // 10px pad + 10px copyright
	// all new tabs = 265
	// 
	$('content').style.height = docHeight - 246;

}

var count = 0;
function animateTestimonials() {
	var quotes = new Array("quote-1","quote-2","quote-3","quote-4","quote-5", "quote-6");
	
	var time = 0;
	for (var i = 0; i < quotes.length; i++) {
			var id = quotes[i];
			Effect.Appear.delay(time, id, {duration: 0.5});
			Effect.Fade.delay(time+10, id, {duration: 0.5});
			time += 10.5;
	}
	
	if (count < 2) {
		animateTestimonials.delay(time);
		count++;
	} else {
		Effect.Appear.delay(time, quotes[0], {duration: 0.5});
	}

}

function startPage() {
	doLayout();
	Event.observe(window, 'resize', function(e){ doLayout(); });
	var scrollbar = new Control.ScrollBar('content','scroll_track',{proportional: false});
}

Event.observe(window, 'load', startPage);

