﻿// JavaScript Document

var titles = new Array();
titles['large_1'] = '<p><strong>Poised to strike</strong></p>';
titles['large_2'] = '<p><strong>Box Office</strong></p>';
titles['large_3'] = '<p><strong>Out of FOCUS</strong></p>';
titles['large_4'] = '<p><strong>The friendly ghost</strong></p>';
titles['large_5'] = '<p><strong>The wings</strong></p>';
titles['large_6'] = '<p><strong>Coosh Def</strong></p>';
titles['large_7'] = '<p><strong>Saturday Knights</strong></p>';
titles['large_8'] = '<p><strong>Backstage</strong></p>';
titles['large_9'] = '<p><strong>Promoskee</strong></p>';
titles['large_11'] = '<p><strong>Defying Physicx</strong></p>';
titles['large_12'] = '<p><strong>Judges</strong></p>';
titles['large_13'] = '<p><strong>Salah in Street Clothes</strong></p>';
titles['large_14'] = '<p><strong>Eventual Finalists</strong></p>';
titles['large_15'] = '<p><strong>Top Flavor</strong></p>';
titles['large_16'] = '<p><strong>Cha Cha Cha</strong></p>';
titles['large_17'] = '<p><strong>Breath control</strong></p>';
titles['large_18'] = '<p><strong>Monkee Salute</strong></p>';
titles['large_19'] = '<p><strong>Freeze Frame</strong></p>';

var captions = new Array();
captions['large_1'] = '<p><strong>Bboy FREE focuses outside before the Coosh Crash Test</strong></p>';
captions['large_2'] = '<p><strong>1870 people passed this window to see the action</strong></p>';
captions['large_3'] = '<p><strong>Flow Mo Crew’s stand-out from Finland, B-boy Focus</strong></p>';
captions['large_4'] = '<p><strong>Casper of Boogie Brats works the room at the Coosh pre-party</strong></p>';
captions['large_5'] = '<p><strong>B-boys gather in the wings to watch the battles unfold</strong></p>';
captions['large_6'] = '<p><strong>Musical Guest Dyme Def gets familiar with the Coosh</strong></p>';
captions['large_7'] = '<p><strong>Host Tilson of the Saturday Knights band makes Coosh a fashion statement on this Saturday night</strong></p>';
captions['large_8'] = '<p><strong>S.E.V. of Dyme Def shows how he got in the green room</strong></p>';
captions['large_9'] = '<p><strong>Jeromeskee of Massive Monkees gets the word out about Coosh</strong></p>';
captions['large_11'] = '<p><strong>Rivers Crew sensation Physicx shows how he got Nike and Pepsi sponsorship in his native Korea.</strong></p>';
captions['large_12'] = '<p><strong>From left to right: Cros1, Fever One and Poe One – Over 60 years of b-boy stripes on that panel.</strong></p>';
captions['large_13'] = '<p><strong>Showstopping entertainer Salah doesn’t wear sequined sparkly shirts unless he is performing</strong></p>';
captions['large_14'] = '<p><strong>Boogie Brats and Ground Kings shared a green room, and then shared the stage in the finals</strong></p>';
captions['large_15'] = '<p><strong>K-Mel’s facial expressions add unique flavor to his top rock, or up-right dancing</strong></p>';
captions['large_16'] = '<p><strong>Art of Movement/MASH HALL’s B-boy Cha Cha gets full extention on his power moves</strong></p>';
captions['large_17'] = '<p><strong>Casper catches his breath while analyzing his opponent’s run</strong></p>';
captions['large_18'] = '<p><strong>Massive Monkees Crew takes a bow after a 20-minute theatre piece involving 19 dancers and a 7-piece band</strong></p>';
captions['large_19'] = '<p><strong>Massive Monkees Iron Mike Brysen and Lil Lazy puts an exclamation point on a routine</strong></p>';


var moving = false;
var current = 'left';
var timeout;


function hideAll(){
	all_divs = $('esb_large_img').select('div');
	all_divs.each(function(item) {
		$(item).hide();
	});
	return false;
}

function show_layer(num) {
	//alert(model)
	hideAll();
	$(num).show();
	$('title_of_photos').innerHTML = titles[num];
	if (titles[num] == null ) {
		$('title_of_photos').innerHTML = '';
	}
	$('caption_of_photos').innerHTML = captions[num];
	if (captions[num] == null ) {
		$('caption_of_photos').innerHTML = '';
	}
	
	return false
}

function moveLeft(){
	if(!moving){
		var left = $('esb_banner').getStyle('left');	
		left.replace("px","");	
		left = parseInt(left);
		if(left < 0 ){
			slideLeft();
			if(left < -1100){
				clearTimeout(timeout);
			}else if(left == -860){
				clearTimeout(timeout);
			}else if(left == -440){
				clearTimeout(timeout);
			}
		} else {
			clearTimeout(timeout);
		}
	}
	return false;
}

function slideLeft(){
	var left_px = $('esb_banner').getStyle('left');
	left_px.replace("px","");
	left_px = parseInt(left_px) + 20;
	$('esb_banner').setStyle({ left:left_px+'px' });
	timeout = setTimeout ( "moveLeft()", 50 );
}


function moveRight(){
	if(!moving){
		var left = $('esb_banner').getStyle('left');	
		left.replace("px","");	
		left = parseInt(left);
		if(left > -1091){
			slideRight();
			if (left == -400) {
				clearTimeout(timeout);
			}else if(left == -820) {
				clearTimeout(timeout);
			}else if(left == -1090){
				clearTimeout(timeout);
			}
		} else {
			clearTimeout(timeout);
		}
	}
	return false;
}



function slideRight(){
	var left_px = $('esb_banner').getStyle('left');
	left_px.replace("px","");
	left_px = parseInt(left_px) - 20;
	$('esb_banner').setStyle({ left:left_px+'px' });
	timeout = setTimeout ( "moveRight()", 50 );
}



