// JavaScript Document
var rep_info_array = {
	'loll': {
		'name':'Loll Designs',
		'email':'sales@lolldesigns.com',
		'phone':'877.740.3387'
	},
	'deb': {
		'name':'Deborah Scroggins',
		'phone':'312.802.1830',
		'email':'deborah@intectural.com'
	},
	'hillary': {
		'name':'Hillary Tripoli',
		'phone':'801.809.9840',
		'email':'hillary@unek-environments.com'
	},
	'jim': {
		'name':'Jim MacAllister',
		'phone':'480.982.5485',
		'email':'massoc1003@qwestoffice.net'
	},
	'matt': {
		'name':'Matt Eastvold',
		'phone':'651.210.2294',
		'email':'matt@intectural.com'
	},
	'megan': {
		'name':'Megan Griffith',
		'phone':'310.500.6245',
		'email':'megan@denizendesigngallery.com'
	},
	'patrick': {
		'name':'Patrick Bradley',
		'phone':'321.246.4873',
		'email':'pbradley@dwellfire.com'
	},
	'wendi': {
		'name':'Wendi Harris',
		'phone':'801.809.9840',
		'email':'harris1310@comcast.net'
	},
	'dave': {
		'name':'Dave Hines',
		'phone':'231.924.8933',
		'email':'davehines@comcast.net'
		}
};
function showRepFor(code) {
	var rep = getRepFor(code);
	$('repInfoDiv').fade('hide');
	if (rep == null) $('repInfoDiv').empty();
	$('repInfoDiv').set('html', 'Contact: '+rep.name+'<br/>E-mail: <a href="mailto:'+rep.email+'">'+rep.email+'</a><br/>Phone: '+rep.phone+'<br/>');
	$('repInfoDiv').fade('in');
}

function getRepFor(code) {
	switch(code) {
		case 'none': rep = null; break;
		case 'AZ': rep = 'jim'; break;
		case 'CO': rep = 'wendi'; break;
		case 'FL': rep = 'patrick'; break;
		case 'MI': rep = 'dave'; break;
		case 'NM': rep = 'jim'; break;
		case 'UT': rep = 'hillary'; break;
		case 'WY': rep = 'hillary'; break;
		case 'IL': //rep = 'deb'; break;
		case 'IA': // rep = 'matt'; break;			   
		case 'CAs':// rep = 'megan'; break;			   
		case 'AK':
		case 'AL':
		case 'AR':
		case 'CAn':
		case 'CT':
		case 'DC':
		case 'DE':
		case 'GA':
		case 'HI':
		case 'ID':
		case 'IN':
		case 'KS':
		case 'KY':
		case 'LA':
		case 'MA':
		case 'MD':
		case 'ME':
		case 'MN':
		case 'MO':
		case 'MS':
		case 'MT':
		case 'NC':
		case 'ND':
		case 'NE':
		case 'NH':
		case 'NJ':
		case 'NV':
		case 'NY':
		case 'OH':
		case 'OK':
		case 'OR':
		case 'PA':
		case 'RI':
		case 'SC':
		case 'SD':
		case 'TN':
		case 'TX':
		case 'VA':
		case 'VT':
		case 'WA':
		case 'WI':
		case 'WV':
		default: rep = 'loll'; break;
	}
	return rep_info_array[rep];
}

window.addEvent('domready', function() {
	$('repSelector').selectedIndex = 0;
});

