﻿// LuxPageFooter.js

// Show or hide the contact information
function ToggleContactDetails( ) {
	if ( document.getElementById( 'LuxPageFooterContactDetails' ).style.visibility == 'visible' ) {
		 document.getElementById( 'LuxPageFooterContactDetails' ).style.visibility = 'hidden';
	} else {
		 document.getElementById( 'LuxPageFooterContactDetails' ).style.visibility = 'visible';
		 if ( document.getElementById( 'LuxPageFooterSignupDetails' ) ) {
			document.getElementById( 'LuxPageFooterSignupDetails' ).style.visibility = 'hidden';
		}
	}
}

// Show or hide the signup form
function ToggleSignupForm( ) {
	if ( document.getElementById( 'LuxPageFooterSignupDetails' ).style.visibility == 'visible' ) {
		 document.getElementById( 'LuxPageFooterSignupDetails' ).style.visibility = 'hidden';
	} else {
		 document.getElementById( 'LuxPageFooterSignupDetails' ).style.visibility = 'visible';
		 document.getElementById( 'LuxPageFooterContactDetails' ).style.visibility = 'hidden';
	}
}

// Validate and submit the signup form
function ValidateSignupForm( ) {
	var objLuxSignupName = document.getElementById( 'ctl00_LuxPageFooter_LuxSignupName' );
	var objLuxSignupEmail = document.getElementById( 'ctl00_LuxPageFooter_LuxSignupEmail' );
	
	if ( objLuxSignupName.value == "Name"  ||  objLuxSignupName.value == "" ) {
		alert( 'Please enter your name.' );
		return;
	}
	if ( objLuxSignupEmail.value == "Email"  ||  objLuxSignupEmail.value == "" ) {
		alert( 'Please enter your email address.' );
		return;
	}
	
	document.forms[0].submit();
}

// Focus/Blur for the signup fields
function FocusSignupName( objField ) {
	if ( objField.value == "Name" ) {
		objField.value = "";
	}
}

function BlurSignupName( objField ) {
	if ( objField.value == "" ) {
		objField.value = "Name";
	}	
}

function FocusSignupEmail( objField ) {
	if ( objField.value == "Email" ) {
		objField.value = "";
	}
}

function BlurSignupEmail( objField ) {
	if ( objField.value == "" ) {
		objField.value = "Email";
	}
}




function randomImage(){
	var image = new Array ();
	image[0] = "1";
	image[1] = "2";
	var i = Math.round(1*Math.random());

	var imageNumber = image[i];
}




