var str = new Object;
str['firstname'] = "Form incomplete: Please enter your first name.";
str['lastname'] = "Form incomplete: Please enter your last name.";
str['email'] = "Form incomplete: Please enter your e-mail address.";
str['email_format'] = "Invalid e-mail address: Please enter a valid e-mail address."

function validateForm(form) {
    if (form.firstname.value == '') {
		alert(str['firstname']);
		form.firstname.focus();
		return false;
	}
	if (form.lastname.value == '') {
		alert(str['lastname']);
		form.lastname.focus();
		return false;
	}
    if (form.email.value == '') {
		alert(str['email']);
		form.email.focus();
		return false;
	}
    if (validateEmail(form.email.value) == false) {
		alert(str['email_format']);
		form.email.focus();
		return false;
	}
    return true;
}

function validateEmail(str) {
	if (str.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,6}$/i)) { 
            return true; 
	} 
	return false; 
} 

/*
function casestudy(client){
    var title, challenge, solution, result;
        switch (client){
            case 'amex':
                title = 'American Express: The Need for more Plastic';
                challenge = 'American Express is in a highly competitive market in the charge card/credit card industry and was looking for ways to acquire more customers as well as keep existing customers engaged.  TBG was asked to work on new product offerings to solve this challenge.';
                solution = 'TBG conducted Playground sessions, an ethnographic study and quantitative research to gain in-depth insight into understanding key drivers that motivate consumers to engage with charge/credit instruments.';
                result = 'The Membership Rewards program';
            break;
            case 'att':
                title = 'AT&T: Young Adults and Telecommunications';
                challenge = 'AT&T asked TBG to help them understand how young adults use telecommunications and what motivates them to use technology.  We were also tasked with identifying Young Adult trends.';
                solution = 'TBG embarked on a cross-country trip to meet with young adults on their turf.  We utilized our Across America documentary tool to film the lives of young adults engaged with their mobile/internet devices.  Additionally, we used our urban-DNA digital tool to field quantitative research nation-wide.';
                result = 'A messaging architecture and strategic platform used to launch a Young Adult advertising campaign.';
            break;
            case 'elpaso':
                title = 'City of El Paso: Re-branding a City';
                challenge = 'The City of El Paso hired TBG to develop a brand positioning that would unify marketing efforts for several constituents within the city including Tourism, Business Development, Art and Culture, as well as Health and Education.';
                solution = 'TBG sent a team of "secret visitors" to El Paso for a week to experience the city and its residents in order to understand the external and internal perceptions of El Paso. Additionally, we conducted one-on-one interviews with business relocation consultants, students and tourists. We also conducted national focus groups.';
                result = 'TBG identified El Paso\'s brand essence as well as developed its brand positioning.  We also utilized our creative consumers to develop a unifying tagline for El Paso.  Lastly, we developed a strategic blueprint for all of the City\'s advertising agencies.';
            break;
            case 'statefarm':
                title = 'State Farm: Consumers and Finance';
                challenge = 'Understand how consumers feel about the current economic environment and how it is affecting their daily lives.';
                solution = 'TBG and its documentary camera crew traveled 8400 miles coast-to-coast to gain an in-depth understanding of the emotional financial turmoil consumers are feeling today.';
                result = 'Development of new brand propositioning based on consumers\' emotional triggers.';
            break;
            case 'lucent':
                title = 'Lucent Technologies';
                challenge = 'TBG was retained to develop a strategic framework to launch a new suite of VOIP products targeted to businesses.';
                solution = 'TBG conducted research (focus groups) with senior IT professionals worldwide to determine brand and product efficacy as it relates to VOIP and Lucent.  Additionally, we utilized our playground sessions to harness the creativity of the IT managers in ideating relevant value propositions.  Lastly, we used our urban-DNA digital tools to validate our hypothesis.';
                result = 'Development of a new VOIP company: Avaya';
            break;
        }
        document.getElementById('inset').style.backgroundColor = '#f7f5f5';
        document.getElementById('casetitle').innerHTML = title;
        document.getElementById('challenge').innerHTML = '<b>Challenge:</b> '+challenge;
        document.getElementById('solution').innerHTML = '<b>Solution:</b> '+solution;
        document.getElementById('caseresult').innerHTML = '<b>Result:</b> '+result;
}
*/

var timer;
var pause = 0;
var currentPosition = 1;
var numberOfSlides = 0;
var slideWidth = 990;
var captions = 0; //[0, '<img src="../images/capdesign.gif" width="500" height="60" />', '<img src="../images/capinteract.gif" width="500" height="60" />', '<img src="../images/capvoice.gif" width="500" height="60" />','<img src="../images/capplay.gif" width="500" height="60" />','<img src="../images/capinsight.gif" width="500" height="60" />','<img src="../images/capdesign.gif" width="500" height="60" />'];
function resetButtons(){
	$('#button1').css('backgroundColor', '#605252');
	$('#button2').css('backgroundColor', '#5f6052');
	$('#button3').css('backgroundColor', '#52605f');
	$('#button4').css('backgroundColor', '#5f5260');
	$('#button5').css('backgroundColor', '#52605c');
	switch(currentPosition){
		case 1: $('#button1').css('backgroundColor', '#b48686'); break;
		case 2: $('#button2').css('backgroundColor', '#a1b486'); break;
		case 3: $('#button3').css('backgroundColor', '#869fb4'); break;
		case 4: $('#button4').css('backgroundColor', '#b486a2'); break;
		case 5: $('#button5').css('backgroundColor', '#86b4ac'); break;
	}
}

function slideSwitch() {
	if (pause) return;
    currentPosition = (currentPosition + 1 == numberOfSlides) ?  0 : currentPosition + 1;
    if (currentPosition == 0){
    	$('#slideInner').css('marginLeft', 0);
    	currentPosition = 1;
    }
    //alert(currentPosition);
    resetButtons();
    //$('#button'+currentPosition).css('backgroundColor', '#cc0000');
    if (captions){
		$('#slidesCaption').animate({opacity: 0.0}, 100, function(){
			$('#slideInner').animate({'marginLeft': slideWidth*(-currentPosition)}, 500, function(){
				$('#slidesCaption').html(captions[currentPosition]).animate({opacity: 1.0}, 1000);
			});
		});
	} else {
		$('#slideInner').animate({'marginLeft': slideWidth*(-currentPosition)}, 500);
	}
}

function slideTo(n) {
	clearInterval(timer);
	currentPosition = n;
	resetButtons();
	//$('#button'+currentPosition).css('backgroundColor', '#cc0000');
	if (captions){
		$('#slidesCaption').animate({opacity: 0.0}, 100, function(){
			$('#slideInner').animate({'marginLeft': slideWidth*(-currentPosition)}, 500, function(){
				$('#slidesCaption').html(captions[currentPosition]).animate({opacity: 1.0}, 1000);
			});
		});
	} else {
		$('#slideInner').animate({'marginLeft': slideWidth*(-currentPosition)}, 500);
	}
	timer = setInterval('slideSwitch()', 4000);
}

function doit(){
	pause = 1;
}

function undoit(){
	pause = 0;
}

function over(n){
	var bio;
	switch(n){
		case 1: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 215px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/paris.jpg" width="220" height="183">'+
						'<div class="column" style="width:145px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Paris Buchanan</h3>'+
							'<p>Co-Founder<br />Brand Strategist<br />Artist/Designer<br />Shoe Diva<br />Reality-Show Junkie<br />Foodie<br />Real Estate Addict</p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;
		case 2: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 215px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/cindy.jpg" width="220" height="183">'+
						'<div class="column" style="width:145px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Cindy Dunbar</h3>'+
							'<p>Brand Strategist<br />Client Service Diva<br />Foodie<br />Professional Mom (Twins)<br />Chef<br />Bookworm<br />Scotch Expert<br />Ex-Ballerina</p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;break;
		case 3: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 270px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/loren.jpg" width="180" height="239">'+
						'<div class="column" style="width:145px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Loren Ellis</h3>'+
							'<p>Experiential Designer<br />Harley Lover<br />Sports Fanatic<br />Ohio State Buckeye Fan<br />Tech Junkie<br />1980\'s Music Genius<br />Past Yugo Owner<br /></p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;
		case 4: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 270px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/antonio.jpg" width="180" height="239">'+
						'<div class="column" style="width:185px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Antonio Patric Buchanan "APB"</h3>'+
							'<p>Co-Founder<br />Creative Enabler<br />Innovation Strategist<br />Tennis Fanatic<br />Jazz Expert<br />Wanna-Be Parisian (Really)<br />Design Junkie<br />Potato Chip Connossieur</p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;
		case 5: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 270px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/vanessa.jpg" width="180" height="239">'+
						'<div class="column" style="width:185px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Vanessa Justine</h3>'+
							'<p>Experiential Strategist<br />Client Service Diva<br />Facebook Addict<br />Carnivore<br />Bath Tub Aficionado<br />Designer Sunglass Lover<br />Knows words to all 2 Pac songs</p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;
		case 6: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 270px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/michael.jpg" width="180" height="239">'+
						'<div class="column" style="width:145px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Michael Jimenez</h3>'+
							'<p>Creative Director<br />Industrial/Graphic Designer<br />Viva Puerto Rico<br />Artist<br />Surfer Dude<br />Furniture Designer<br />Traveled to 148 cities...and counting</p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;
		case 7: 
			bio = '<div style="margin: 10px; background-color: #000000; width: 405px; height: 215px;">'+
					'<div style="padding: 15px; color:#d1cfcf;">'+
						'<img style="float: left;" src="../images/paul.jpg" width="220" height="183">'+
						'<div class="column" style="width:145px; padding-left: 10px;">'+
							'<h3 style="color:#ab2328; font-size: 10pt;">Paul Cragin</h3>'+
							'<p>Data Strategist<br />Trend Watcher<br />Jazz Man<br />Adopted Home: New Zealand<br />Florida Keys Fan<br />Newlywed</p>'+
						'</div>'+
					'</div>'+
				'</div>';
			$('#member').html(bio);
			break;
	}
	$('#member').fadeIn(500);

}

function out(u){
	$('#member').fadeOut(500);
}
