function highlightElement (element, signal) {

	e = $('e' +  element);
	
	if (signal == 1) {
	
		e.style.color = '#000';
		
	} else {
	
		e.style.color = 'rgb(80, 112, 144)';
		
	}
	
}
		
function showIntro () {

	si = $('showIntro');
	c = $('content');
	
	if (si.value == 0) { return; }
	
	if (si.value == '1') {
		
		line = 'We\'re the people you want to know.';
		si.value = '2';
		
	} else if (si.value == '2') {
	
		line = 'The ones the <i>insiders</i> call on.';
		si.value = '3';
		
	} else if (si.value == 3) {
	
		line = 'The people who get things done.<br />Regardless of how hard it is...';
		si.value = '4';
		
	} else if (si.value == 4) {
	
		line = 'Called in time and again to make it right,<br />not to make excuses...';
		si.value = '5';
		
	} else if (si.value == 5) {
	
		line = 'Using the right tools, the right methods, the right attitude...';
		si.value = '6';
		
	} else if (si.value == 6) {
	
		line = 'And a relentless devotion to quality before profits...';
		si.value = '7';
		
	} else if (si.value == 7) {
	
		line = 'Since 1996, JDI has meant &#8220;Just Do It&#8221;.';
		si.value = '8';
		
	} else if (si.value == 8) {
	
		line = 'Your solutions hotline: +1.828.333.7700.<br />Siemens MRI, CT and PET services.';
		si.value = '1';
		
	}
	
	if (c.innerHTML.length > 0) { 
	
		Effect.Fade (c, { duration: 3.0});
		setTimeout ('newLine(line)', 3000);
		
	} else {
	
		newLine(line);
		
	}
	
}

function newLine(line) {

	c = $('content');
	c.innerHTML = line;
	Effect.Appear (c, { duration: 2.0});
	setTimeout('showIntro();',3000);
	
}

function turnOffTheIntro () {

	$('showIntro').value = 0;
	
}

function evaluateForm(formId) {

	if (formId == 1) {
	
		if ($('input1').value.length > 10 && $('input2').value.length > 10) { $('input3').style.display = 'block'; } else { $('input3').style.display = 'none'; }
		
	}
	
}

function submitForm(form) {

	i1 = $('input1');
	i2 = $('input2');
	
	if (form == 1) {
	
		flag = i1.value;
		flag2 = i2.value;
		
	}
	
	new Ajax.Request('handler.php', {
		parameters: {	
			a: form,
			b: flag,
			c: flag2
		},
		onSuccess: function(transport) {
		
			response = transport.responseText;
			
			if (form == 1) { $('contactForm').innerHTML = response; }
			
			if (form == 2) { $('contactForm').innerHTML = response; }
			
		},
		onFailure: function () {
			alert ('The handler failed on signal ' + form + '.');
		}
	});

}

function wos (reference) {

//	turnOffTheIntro();
	$('content').innerHTML = '';
	c2 = $('content2');
	if (!reference) { reference = 0; }
		
	new Ajax.Request('handler.php', {
		parameters: {	
			a: 2,
			b: reference
		},
		onSuccess: function(transport) {
			c2.style.display = 'none';
			c2.innerHTML = transport.responseText;
			Effect.Appear (c2);
			
		},
		onFailure: function () {
			alert ('The wos handler failed on image ' + reference + '.');
		},
		onComplete: function () {
		}
	});


}
