	
	function showHero(index)
	{
		document.getElementById('home-heros').innerHTML = heroImage[index];
		document.getElementById('hero-buttons').style.backgroundPosition = 'left -' + (index * 61) + 'px';
	}

	function slideFamilyNav(spin, pos, offSet, lowBound, upBound){
		if(pos >= lowBound && pos <= upBound) {
			document.getElementById('familyNavWrapper').style.height = pos+'px';
			pos = (spin * offSet) + pos;
			setTimeout('slideFamilyNav('+spin+', '+pos+', '+offSet+', '+lowBound+', '+upBound+');',10); 
		}else{
			if(pos <= 0) document.getElementById('familyNavWrapper').style.height = '1px';
		}
	}

	function toggleFamilyNav()
	{
		if (document.getElementById('familyNavWrapper').style.height == '140px') {
			setTimeout("slideFamilyNav(-1, 140, 14, 0, 140);",10); 
		} else {
			setTimeout("slideFamilyNav(1, 0, 14, 0, 140);",10); 
		}
	}

	var tileSlider = {
		pageSize: 4,
		offset: 135,
		delay: 10,
		sliderObj: { },
		timeout: {},
		count: 0, 
		pos: 0,
		curPos: 0,
		
		init:function(newTileCount, newSliderObj){
			this.count = newTileCount;
			this.sliderObj = newSliderObj;
			this.sliderObj.style.width = this.offset + (newTileCount * this.offset) + 'px';
		},

		prev:function(){
			var curPage = (Math.ceil(Math.abs(this.pos / this.offset)) / this.pageSize) + 1;
			if (curPage > 1) {
				this.curPos = this.pos;
				this.pos += (this.offset * this.pageSize);
				this.timeout = setTimeout('tileSlider.moveTiles(\'right\');',this.delay); 
			}
		},

		next:function(){
			var lastPage = (Math.ceil(this.count / this.pageSize));
			var curPage = (Math.ceil(Math.abs(this.pos / this.offset)) / this.pageSize) + 1;
			if (curPage < lastPage) {
				this.curPos = this.pos;
				this.pos = this.pos - (this.offset * this.pageSize);
				this.timeout = setTimeout('tileSlider.moveTiles(\'left\');',this.delay); 
			}
		},
		
		moveTiles:function(direction) {
			var k = false;
			this.curPos = (direction == 'left')?this.curPos - (this.offset/4):this.curPos + (this.offset/4);
			k = (direction == 'left')?this.curPos >= this.pos:this.curPos <= this.pos;
		    if (k)
		    {
				this.sliderObj.style.left = this.curPos + "px";
				this.timeout = setTimeout('tileSlider.moveTiles(\''+direction+'\');',this.delay); 
		    } else {
				this.sliderObj.style.left = this.pos + "px";
			}
		}
	}


	var EulaHandler = {
	    agreed: false,

	    accept:function(){
		    this.agreed = true;
	    }
	}

    function _toggleDisable(e){
	    (e.disabled)?e.disabled = false:e.disabled = true;
    }
