
// nasconde/rende visibile il contenuto del div whichLayer
function ddToggleLayer( whichLayer )
{
	var elem, vis;
	if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( whichLayer );
	else if( document.all ) // this is the way old msie versions work
		elem = document.all[whichLayer];
	else if( document.layers ) // this is the way nn4 works
		elem = document.layers[whichLayer];
	vis = elem.style;
	// if the style.display value is blank we try to figure it out here
	if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
		vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
	vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}


// SIMILE A toggleLayer
function show_div(div_id) {
    // hide all the divs
    document.getElementById('the_div_1').style.display = 'none'; 
    document.getElementById('the_div_2').style.display = 'none';
    document.getElementById('the_div_3').style.display = 'none';

    // show the requested div
    document.getElementById(div_id).style.display = 'block';
}



// - - - - - - - - - - - - - - - - - - - - - - - -
function ddBuildMessageBody() {
	
	var             firstName = document . input_form . firstName . value;
	var             lastName  = document . input_form . lastName . value;
	var           affiliation = document . input_form . affiliation . value; 
	var        streetAddress  = document . input_form . streetAddress . value;	
	var                  city = document . input_form . city . value;	
	var            postalCode = document . input_form . postalCode . value; 
	var               country = document . input_form . country . value; 
	var                 eMail = document . input_form . eMail . value;	
	var   dietaryRestrictions = document . input_form . dietaryRestrictions . value; 
	var                 notes = document . input_form . notes . value;

	var message_body;
	
	message_body = "%0A%0ADear " + firstName +",%0A"
		+	"%0A"
		// 
		+ "before  sending the  current mail,  please  take a  while to  check%0A"
		+ "carefully the information you filled  in the form (please note that%0A"
		+ "no input  validation is  performed).%0A"
		// 	
		+ "Please also  note that just  providing  personal information is not%0A"
		+ "enough to be registered to the conference. You also have to pay the%0A"
		+ "conference fee either by credit card or by bank transfer, according%0A"
		+ "to the instructions available  on  the  conference site.%0A"
		+ "%0A%0A"
		// 		
		+ " : : : : : : : : : : :  : : : : : : : : : : : : : : : : : : : : : :%0A%0A"
		+	"This is the information you filled in FOMI 2008 registration form.%0A"
		+	"%0A"
		// 
		+ "    Name: " + firstName + " " + lastName + "%0A"
		+ "    Affiliation: " + affiliation + "%0A"
		+ "    Address: " + streetAddress + "%0A"
		+ "    City: " + city + "%0A"
		+ "    Postal Code: " + postalCode + "%0A"
		+ "    Country: " + country + "%0A"
		+ "    E-mail: " + eMail + "%0A"
		+ "    Dietary restrictions: " + dietaryRestrictions + "%0A"
		+ "    Notes: " + notes + "%0A%0A"
		+ " : : : : : : : : : : :  : : : : : : : : : : : : : : : : : : : : : :%0A%0A"	
		// 
		+	"Sincerely,%0A"
		+	"  Daniele Radicioni %0A"
		+ "  on behalf of the FOMI 2008 Local Organization Committee%0A%0A%0A";

	return message_body;
}