/**----------------------------------------------------------------------------
 *	Description: Javascript containing funtion used in consumatori portal
 *
 *	See:					
 *-----------------------------------------------------------------------------
 * 	Author:					
 *
 *	Created:	17-10-2005			
 *
 *	Modified:
 *
 *		17-10-2005  name                Creation.
 *-----------------------------------------------------------------------------
 *	Notes:
 *			
 *---------------------------------------------------------------------------*/
 //NEW SITE CHEK
 
 if (window.location.href.indexOf("consumatoriHome.portal") != -1)
 	document.location.href = "http://www.consumatori.e-coop.it"
 
 /**
  * Check if edition is selected
  * used in /portlets/consumatori/header/localizza/index.jsp
  * @param formId form of select list
  */
  function checkEdizione(formId)
  {
    var formId = getNetuiTagName(formId);
    var edizioneObj  = getNetuiTagName('edizione');
    //var objSelect    = document.getElementById(formId).elements[edizioneObj];
    var objSelect    = document.getElementById("edizione");    
    var selectedValue = objSelect.options[objSelect.selectedIndex].text;
    if (selectedValue == "Seleziona Edizione")
    {
        alert("Selezionare un edizione.");
        return false;
    }
    //SEO FIX
    var action = "/portalWeb/consumatoriHome.portal?_nfpb=true&_windowLabel=portlet_instLabel_ConsumatoriLocalizza&portlet_instLabel_ConsumatoriLocalizza_actionOverride=%2Fportlets%2Fconsumatori%2Fheader%2Flocalizza%2FsetEdizione";
    document.getElementById(formId).action = action;
    //alert (document.getElementById(formId).action);
    return true;
  }
