function changeOptionsGroup(e,groupname) {
	for (var i=0; i<optionsGroups.length; i++) {
		document.getElementById('group-'+optionsGroups[i]).style.display = "none";
	}
	document.getElementById('group-'+groupname).style.display = "block";
	if (e) e.preventDefault();
	if (window.event) window.event.returnValue = false;
	return false;
}

function changeMainsOptionsGroup(e,groupname) {
	for (var i=0; i<mainsGroups.length; i++) {
		document.getElementById('mainsgroup-'+mainsGroups[i]).style.display = 'none';
		if(document.getElementById('mainsgroup_button_span-'+mainsGroups[i]).currentstyle)
		{
     // for msie 
     document.getElementById('mainsgroup_button_span-'+mainsGroups[i]).style.backgroundcolor = '#570101';
    }
    else
    {
     // for real browsers ;) 
     document.getElementById('mainsgroup_button_span-'+mainsGroups[i]).style.setProperty('background-color', '#570101', '');
    } 
	}
	document.getElementById('mainsgroup-'+groupname).style.display = 'block';
  document.getElementById('mainsgroup_button_span-'+groupname).style.fontDecoration = 'underline'; 
  // for msie
  if(document.getElementById('mainsgroup_button_span-'+groupname).currentstyle)
	{ 
   document.getElementById('mainsgroup_button_span-'+groupname).style.backgroundcolor = '#800000';
  }
  else
  {     
   // for real browsers ;) 
   document.getElementById('mainsgroup_button_span-'+groupname).style.setProperty('background-color', '#800000', ''); 
  }    
	if (e) e.preventDefault();
	if (window.event) window.event.returnValue = false;
	return false;
}

function changeSubOptionsGroup(e,groupname) {
	for (var i=0; i<suboptionsGroups.length; i++) {
		document.getElementById('subgroup-'+suboptionsGroups[i]).style.display = "none";
		document.getElementById('subgroup_button-'+suboptionsGroups[i]).style.fontDecoration = "normal";
	}
	document.getElementById('subgroup-'+groupname).style.display = "block";
	document.getElementById('subgroup_button-'+groupname).style.fontDecoration = 'underline';
	if (e) e.preventDefault();
	if (window.event) window.event.returnValue = false;
	return false;
}



function changeProfilOptionsGroup(e,groupname) {
	for (var i=0; i<profiloptionsGroups.length; i++) {
		document.getElementById('profilgroup-'+profiloptionsGroups[i]).style.display = "none";
		document.getElementById('profil-button-'+profiloptionsGroups[i]).style.fontDecoration = "normal";
	}
	document.getElementById('profilgroup-'+groupname).style.display = 'block';
	document.getElementById('profil-button-'+groupname).style.fontDecoration = 'underline';
	if (e) e.preventDefault();
	if (window.event) window.event.returnValue = false;
	return false;
}

function changeGalleryOptionsGroup(e,groupname) {
	for (var i=0; i<galleryoptionsGroups.length; i++) {
		document.getElementById('gallerygroup-'+galleryoptionsGroups[i]).style.display = "none";
		//document.getElementById('gallery-button-'+galleryoptionsGroups[i]).style.fontDecoration = "normal";
	}
	document.getElementById('gallerygroup-'+groupname).style.display = 'block';
	//document.getElementById('gallery-button-'+groupname).style.fontDecoration = 'underline';
	if (e) e.preventDefault();
	if (window.event) window.event.returnValue = false;
	return false;
}
