var custom;
var for_hire;

function eventAttach(tar, event, handler) {
	if (window.attachEvent)
		tar.attachEvent('on'+event, handler);
	else
		tar.addEventListener(event, handler, false);
		
	return tar;
}

function $(target) {
	return document.getElementById(target);
}

function ShowHide(tar, show) {
	if (show)
		tar.style.display="block";
	else
		tar.style.display="none";
	return tar;
}

function clickCustom() {
	ShowHide(custom, true);
	ShowHide(for_hire, false);
}

function clickHire() {
	ShowHide(custom, false);
	ShowHide(for_hire, true);
}

function start() {
	var error = ''
	if ($('error'))
		error = $('error').value;
	custom = ShowHide($('custom'), (error=='custom')?true:false);
	for_hire = ShowHide($('for_hire'), (error=='for_hire')?true:false);
	
	eventAttach($('sel_1'), 'click', clickCustom);
	eventAttach($('sel_2'), 'click', clickHire);
}

eventAttach(window, 'load', start);
