<!--
// Setup Globals
components = new Array();

CorePreloadImage('/cache/sv/1322852602508/postcard/images/busy.gif');

function Initialize() {
	// Create component objs
	phoneObj = new Object();
	contentObj = new Object();
	stripeObj = new Object();
	blurbObj = new Object();
	samplesObj = new Object();
	menuObj = new Object();
	taglineObj = new Object();

	// Set component position offsets
	phoneObj.x = 0; phoneObj.y = 0;
	taglineObj.x = 315; taglineObj.y = 96;
	stripeObj.x = 14; stripeObj.y = 115;
	contentObj.x = 272; contentObj.y = 117;
	//contentObj.x = 302; contentObj.y = 137;
	menuObj.x = 34; menuObj.y = 369;
	blurbObj.x = 45; blurbObj.y = 439;
	if (is_nav) {
		blurbObj.y = blurbObj.y - 10;
	}
	samplesObj.x = 529; samplesObj.y = 440;

	// Save element handles
	phoneObj.el = $('phone');
	taglineObj.el = $('tagline');
	stripeObj.el = $('stripe');
	contentObj.el = $('content');
	menuObj.el = $('menuBar');
	blurbObj.el = $('blurb');
	samplesObj.el = $('samples');
	
	//Save the objects
	components.push(phoneObj);
	components.push(contentObj);
	components.push(stripeObj);
	components.push(blurbObj);
	components.push(samplesObj);
	components.push(menuObj);
	components.push(taglineObj);
	
	// Set graphics
	if (is_nav || is_ie7up) {
		suffix = 'png';
	} else {
		suffix = 'gif';
	}
	
	phoneObj.el.src = RandomPhone() + suffix;
	$('menuBar').style.backgroundImage = 'url(/cache/sv/1322852602508/postcard/images/purple_box_menu.' + suffix + ')';
	
	// Make style changes
	if (is_nav) {
		$('bottomText').className = 'bottomTextNav';
		$('footerLogo').style.top = '-4px';
	} else {
		$('footerLogo').style.top = '-1px';
	}

	SetPositions();
	
	ButtonInit();
}
phoneImgCount = 3;
function RandomPhone() {
	var ranNum= Math.floor(Math.random()*phoneImgCount);
	return "/cache/sv/1322852602508/postcard/images/main_phone" + ranNum + ".";
}
function SetPositions() {
	// Set element positions
	var pos = findPos($('mainbox_top'));
	var left = pos[0];
	var top = pos[1];
	
	for (var i=0; i< components.length; i++) {
		components[i].el.style.left = left + components[i].x + 'px';
		components[i].el.style.top = top + components[i].y + 'px';
	}
}
//-->
