// clear form field
function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

// show navigation overlay (using jQuery instead)
//function showOverlay(overlayToShow,navToShow) {
//	document.getElementById(overlayToShow).style.display='block';
//	document.getElementById(navToShow).style.backgroundColor='#CFCFCF';
//}

// manually hide navigation overlay
function hideOverlay(overlayToHide,navToHide) {
	document.getElementById(overlayToHide).style.display='none';
	document.getElementById(navToHide).style.backgroundColor='transparent';
}

// navigation switcher (requires jquery)
	var JQ = jQuery.noConflict();

	JQ(document).ready(function(){
	
		// This will hold our timer
		var myTimer1 = {};
		var myTimer2 = {};
		var myTimer3 = {};
		var myTimer4 = {};
	
		JQ("#navPlatform").mouseover(
		
			function () {
			
				document.getElementById('navPlatformA').style.backgroundColor='#CFCFCF';
				document.getElementById('navPlatformA').style.borderTop=1+'px solid #ffffff';
				document.getElementById('navPlatformA').style.borderRight=1+'px solid #ffffff';
				document.getElementById('navPlatformA').style.borderLeft=1+'px solid #ffffff';

				JQ.clearTimer(myTimer1);
				// Delay 500 second
				myTimer1 = JQ.timer(500,function(){
					JQ("#navOverlayPlatform").slideDown(350);
				});
				// end delay
			}
		);

		JQ("#navPlatform").mouseout(
		
			function () {
			
				JQ.clearTimer(myTimer1);
				
				// Delay .35 second
				myTimer1 = JQ.timer(350,function(){
					document.getElementById('navPlatformA').style.backgroundColor='transparent';
					document.getElementById('navPlatformA').style.borderTop=1+'px solid transparent';
					document.getElementById('navPlatformA').style.borderRight=1+'px solid transparent';
					document.getElementById('navPlatformA').style.borderLeft=1+'px solid transparent';
					JQ("#navOverlayPlatform").hide();
				});
				// end delay
			}
		);

		JQ("#navCustomerSuccess").mouseover(
		
			function () {
			
				document.getElementById('navCustomerSuccessA').style.backgroundColor='#CFCFCF';
				document.getElementById('navCustomerSuccessA').style.borderTop=1+'px solid #ffffff';
				document.getElementById('navCustomerSuccessA').style.borderRight=1+'px solid #ffffff';
				document.getElementById('navCustomerSuccessA').style.borderLeft=1+'px solid #ffffff';

				JQ.clearTimer(myTimer2);
				
				// Delay 500 second
				myTimer2 = JQ.timer(500,function(){
					JQ("#navOverlayCustomerSuccess").slideDown(350);
				});
				// end delay
			}
		);
		
		JQ("#navCustomerSuccess").mouseout(
		
			function () {
			
				JQ.clearTimer(myTimer2);
				
				// Delay .35 second
				myTimer2 = JQ.timer(350,function(){
					document.getElementById('navCustomerSuccessA').style.backgroundColor='transparent';
					document.getElementById('navCustomerSuccessA').style.borderTop=1+'px solid transparent';
					document.getElementById('navCustomerSuccessA').style.borderRight=1+'px solid transparent';
					document.getElementById('navCustomerSuccessA').style.borderLeft=1+'px solid transparent';
					JQ("#navOverlayCustomerSuccess").hide(0);
				});
				// end delay
			}
		);

		JQ("#navPartners").mouseover(
		
			function () {
			
				document.getElementById('navPartnersA').style.backgroundColor='#CFCFCF';
				document.getElementById('navPartnersA').style.borderTop=1+'px solid #ffffff';
				document.getElementById('navPartnersA').style.borderRight=1+'px solid #ffffff';
				document.getElementById('navPartnersA').style.borderLeft=1+'px solid #ffffff';
				
				JQ.clearTimer(myTimer3);
				
				// Delay 500 second
				myTimer3 = JQ.timer(500,function(){
					JQ("#navOverlayPartners").slideDown(350);
				});
				// end delay
			}
		);
		
		JQ("#navPartners").mouseout(
		
			function () {
			
				JQ.clearTimer(myTimer3);
				
				// Delay .35 second
				myTimer3 = JQ.timer(350,function(){
					document.getElementById('navPartnersA').style.backgroundColor='transparent';
					document.getElementById('navPartnersA').style.borderTop=1+'px solid transparent';
					document.getElementById('navPartnersA').style.borderRight=1+'px solid transparent';
					document.getElementById('navPartnersA').style.borderLeft=1+'px solid transparent';
					JQ("#navOverlayPartners").hide();
				});
				// end delay
			}
		);


		JQ("#navAboutEloqua").mouseover(		
			function () {
			
				document.getElementById('navAboutEloquaA').style.backgroundColor='#CFCFCF';
				document.getElementById('navAboutEloquaA').style.borderTop=1+'px solid #ffffff';
				document.getElementById('navAboutEloquaA').style.borderRight=1+'px solid #ffffff';
				document.getElementById('navAboutEloquaA').style.borderLeft=1+'px solid #ffffff';

				JQ.clearTimer(myTimer4);
				
				// Delay 500 second
				myTimer4 = JQ.timer(500,function(){
					JQ("#navOverlayAbout").slideDown(350);
				});
				// end delay
			}
		);
		
		JQ("#navAboutEloqua").mouseout(
		
			function () {
			
				JQ.clearTimer(myTimer4);
				
				// Delay .35 second
				myTimer4 = JQ.timer(350,function(){
					document.getElementById('navAboutEloquaA').style.backgroundColor='transparent';
					document.getElementById('navAboutEloquaA').style.borderTop=1+'px solid transparent';
					document.getElementById('navAboutEloquaA').style.borderRight=1+'px solid transparent';
					document.getElementById('navAboutEloquaA').style.borderLeft=1+'px solid transparent';
					JQ("#navOverlayAbout").hide();
				});
				// end delay
			}
		);
	});

function lgtbxSlideshowOn() {
	document.getElementById('slidescreen').style.display='block';
}

function lgtbxSlideshowOff() {
	document.getElementById('slidescreen').style.display='none';
}


