/****************************************
* Good Experience
* Base JavaScript
****************************************/

// Perform initial window onloads

window.addEvent('domready', function() {
	setupForms();
});

// Set up for behaviors

function setupForms() {
	// Fake :focus state for IE
	$$('input[type=text]', 'select', 'textarea').each(function(input) {
		input.addEvent('focus', function() {
			this.addClass('focus');
		});

		input.addEvent('blur', function() {
			this.removeClass('focus');
		});
	});
}

// Hide Something

function hideThis(target) {
	$(target).setStyle('display','none');
}

// Show Something

function showThis(target) {
	$(target).setStyle('display','block');
}

// Go to a url

function goTo() {
	var sE = null, url;
	if(document.getElementById) {
		sE = document.getElementById('urlList');
	} else if(document.all) {
		sE = document.all['urlList'];
	}
	if(sE && (url = sE.options[sE.selectedIndex].value)) {
		location.href = url;
	}
}
