var last="";

function hideShow(idMenu){

 document.getElementById(idMenu).style.display="block";

 if (last !="")
 {
   document.getElementById(last).style.display="none";
 }
 
 last = idMenu;
}


function moveLeft (item) {
	
	item.style.marginLeft = 0;
	item.style.width = "309px";
}

function moveRight (item) {
	
	item.style.marginLeft = "10px";
	item.style.width = "299px";
}

var lastToggle = "empty";


function toggle_profile (id, suppress) {

	if (!(suppress == true)) {
		if (lastToggle != "empty") {
			//alert ("PREVIOUS TOGGLE IS " + lastToggle);
			toggle_profile (lastToggle, true);
		}
		lastToggle = id;
	//	alert ("SAVING TOGGLE " + id);
	}
	
	
	var thumb = document.getElementById ("profileThumb" + id);
	var image = document.getElementById ("profileImg" + id);
	var box = document.getElementById ("profileItem" + id);
	var content = document.getElementById ("profileContent" + id);
	var contentbig = document.getElementById ("profileContentBig" + id);

	var expanded = (thumb.style.visibility == "hidden");
	if (expanded) {
		// shrink
		//content.className = "profileContentBox";
		thumb.style.visibility="visible";
		image.style.visibility="hidden";
		thumb.style.display="inline";
		image.style.display="none";
		content.style.display="inline";
		content.style.visibility="visible";
		contentbig.style.display="none";
		contentbig.style.visibility="hidden";

		box.className = "profileItem";
	}
	else
	{
		// expand
		//content.className = "profileContentBoxExpanded";
		thumb.style.visibility="hidden";
		image.style.visibility="visible";
		thumb.style.display="none";
		image.style.display="inline";
				contentbig.style.display="inline";
		contentbig.style.visibility="visible";
		content.style.display="none";
		content.style.visibility="hidden";
		box.className = "profileItemExpanded";
	}


}

function validateMe () {
	
	name = document.getElementById ("name").value;
	address = document.getElementById ("address").value;
	phone = document.getElementById ("phone").value;
	email = document.getElementById ("email").value;
	
	if (name == "" || address == "" || phone == "" || email == "") {
	
		alert ("Please complete the required fields and try again.");
		return false;
	}
	
	return true;

}