function openHelp(){
	openPopup("help");
}
function openPopup(location){
	window.open(homeUrl+location,null,"height=600,width=800,status=yes,toolbar=no,menubar=no,location=yes,resizable=yes,scrollbars=yes, top=0, left=0");
}
function createFlashPlayer(file,placeHolder,width,height,flashvars){
	var params = {"allowfullscreen": "true","allowScriptAccess": "always","base":homeUrl};
	swfobject.embedSWF(file+".swf",placeHolder, width, height, "8", null, flashvars, params, null);
}
function marginBottomNav(idToCenter){
	var ps = $$("#"+idToCenter+" div");
	if(idToCenter=="footerLinks")
		pWidth = 37;
	else
		pWidth = 25;
	for(var j=0;j<ps.length;j++){
		pWidth += ps[j].offsetWidth;
	}
	$(idToCenter).setStyle({width: pWidth+'px'});
}
function initIndex(){
	if($("loaderLayer")){
		createFlashPlayer("newintro","loaderhere","627","297","");
		createFlashPlayer("Tambour","flashHere","970","600","");
		setTimeout("showMainLayer()",10000,"JavaScript");
	}
	else{
		marginBottomNav("footerLinks");
		marginBottomNav("footerCopy");
		createFlashPlayer("Tambour","flashHere","970","600","");
	}
}
function initHelp(){
	//marginBottomNav("footerLinks");
	//marginBottomNav("footerCopy");
	createFlashPlayer("help","flashHere","800","600","");
}
function initResetPass(){
	marginBottomNav("footerLinks");
	marginBottomNav("footerCopy");		
	var flashvars = {
		resetpass: "true"
	};
	createFlashPlayer(homeUrl+"Tambour","flashHere","970","600",flashvars);
}
function showMainLayer(){
	$("body").removeClassName("blackbg");
	$("loaderLayer").style.display = "none";
	$("site").style.display = "block";
	marginBottomNav("footerLinks");
	marginBottomNav("footerCopy");
}
