
Event.observe(window, 'load', loadAccordions, false);

function loadAccordions() {
	var bottomAccordion = new accordion('vertical_container', {
		resizeSpeed : 8,
		classNames : {
		    toggle : 'accordion_toggle',
		    toggleActive : 'accordion_toggle_active',
		    content : 'accordion_content'
		},
		direction : 'vertical',
		onEvent : 'click'
	});
	//document.getElementById('vertical_container').style.display = 'block';
	//bottomAccordion.activate($$('#vertical_container .accordion_toggle')[0]);
}
function hideAccordions(){
	var verticalAccordions = $$('.accordion_content');
	verticalAccordions.each(function(accordion) {
	    $(accordion.next(0)).setStyle({
	        height: '0px'
	    });
	});
}
hideAccordions();
function showPosition(posNum){
	document.getElementById('careertext').style.display = 'none';
	document.getElementById('careerListing').style.display = 'none';
	document.getElementById('careerId_' + posNum).style.display = 'block';
}
function returnAllPos(posNum){
	document.getElementById('careertext').style.display = 'block';
	document.getElementById('careerListing').style.display = 'block';
	document.getElementById('careerId_' + posNum).style.display = 'none';
}
/* ~~~~~~~~~~~~~~~~~~[ download resume form ] ~~~~~~~~~~~~~~~~~~~ */
function showDownloadform(careerListing){
	document.getElementById('downloadForm').style.display = 'block';
	document.RequestForm.Position_Name.value = careerListing;
	document.getElementById('careerListing').style.display = 'none';
	document.getElementById('leftcontent').style.display = 'none';
}
function cancelDownloadRequest(){
	document.getElementById('downloadForm').style.display = 'none';
	document.getElementById('leftcontent').style.display = 'block';	
	document.getElementById('careerListing').style.display = 'block';
}
function loadFormRightAway(){
	if(getQueryVariable('form') == 'true'){
		showdownloadform();
	}else{
		
	}
}
function getQueryVariable(variable) {
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split("=");
		if (pair[0] == variable) {
			return pair[1];
		}
  	}
	return "999";
}
document.write('<' + 'script');
document.write(' language="javascript"');
document.write(' type="text/javascript"');
document.write(' src="/javascriptO2/cookies.js">');
document.write('</' + 'script' + '>');