function SetValueAndSubmit(sFieldName, sFieldValue)
{
	if(sFieldName == 'sMacroGrp' && sFieldValue == '')
		document.getElementById('frmMain').action = 'catalogue.asp';
	else if(sFieldName == 'sMacroGrp')
		document.getElementById('frmMain').action = 'cataloguemg.asp';
	else if(sFieldName == 'sGruppo')
		document.getElementById('frmMain').action = 'catalogueg.asp';
	else if(sFieldName == 'sSottoGrp')
		document.getElementById('frmMain').action = 'cataloguesg.asp';
	document.getElementById(sFieldName).value = sFieldValue;
	document.getElementById("frmMain").submit();
}

function SetMGGValueAndSubmit(sMacroGrpValue, sGruppoValue)
{
	document.getElementById('frmMain').action = 'catalogueg.asp';
	document.getElementById('sMacroGrp').value = sMacroGrpValue;
	document.getElementById('sGruppo').value = sGruppoValue;
	document.getElementById("frmMain").submit();
}

function SetMGGSGValueAndSubmit(sMacroGrpValue, sGruppoValue, sSottoGrpValue)
{
	document.getElementById('frmMain').action = 'cataloguesg.asp';
	document.getElementById('sMacroGrp').value = sMacroGrpValue;
	document.getElementById('sGruppo').value = sGruppoValue;
	document.getElementById('sSottoGrp').value = sSottoGrpValue;
	document.getElementById("frmMain").submit();
}

function NavigateToBrand(nId)
{
	if(nId == 1)
		location.href = 'catalogue.asp?sBrand=ANYCOOL';
	else if(nId == 2)
		location.href = 'catalogue.asp?sBrand=APPLE';
	else if(nId == 3)
		location.href = 'catalogue.asp?sBrand=BLACKBERRY';
	else if(nId == 4)
		location.href = 'catalogue.asp?sBrand=CELLY';
	else if(nId == 5)
		location.href = 'catalogue.asp?sBrand=E-BLUE';
	else if(nId == 6)
		location.href = 'catalogue.asp?sBrand=EASY PROJECT';
	else if(nId == 7)
		location.href = 'catalogue.asp?sBrand=GENIUS';
	else if(nId == 8)
		location.href = 'catalogue.asp?sBrand=HELLO KITTY';
	else if(nId == 9)
		location.href = 'catalogue.asp?sBrand=HTC';
	else if(nId == 10)
		location.href = 'catalogue.asp?sBrand=LEXAR';
	else if(nId == 11)
		location.href = 'catalogue.asp?sBrand=LG';
	else if(nId == 12)
		location.href = 'catalogue.asp?sBrand=MALOPERRO';
	else if(nId == 13)
		location.href = 'catalogue.asp?sBrand=MOTOROLA';
	else if(nId == 14)
		location.href = 'catalogue.asp?sBrand=MUVIT';
	else if(nId == 15)
		location.href = 'catalogue.asp?sBrand=NERISSIME';
	else if(nId == 16)
		location.href = 'catalogue.asp?sBrand=NGM';
	else if(nId == 17)
		location.href = 'catalogue.asp?sBrand=NOKIA';
	else if(nId == 18)
		location.href = 'catalogue.asp?sBrand=OTTERBOX';
	else if(nId == 19)
		location.href = 'catalogue.asp?sBrand=SAMSUNG';
	else if(nId == 20)
		location.href = 'catalogue.asp?sBrand=SANDISK';
	else if(nId == 21)
		location.href = 'catalogue.asp?sBrand=SITEL';
	else if(nId == 22)
		location.href = 'catalogue.asp?sBrand=SONY-ERICSSON';
	else if(nId == 23)
		location.href = 'catalogue.asp?sBrand=SWEET YEARS';
	else if(nId == 24)
		location.href = 'catalogue.asp?sBrand=SWEET YEARS JEANS';
	else if(nId == 25)
		location.href = 'catalogue.asp?sBrand=TAKE MS';
	else if(nId == 26)
		location.href = 'catalogue.asp?sBrand=TOPCOM';
	else if(nId == 27)
		location.href = 'catalogue.asp?sBrand=TOPCOM KIDZZZ';
}
