<!--
function GS_jumpMenu(prod_link){ 
  window.location.href=prod_link.options[prod_link.selectedIndex].value;
}

function GS_addProd(ogg) { 
	var v=eval("document.getElementById('q"+ogg+"')");
	var qdiv=eval("document.getElementById('qtext"+ogg+"')");
	var mm = eval("q"+ogg);
	var vv=parseInt(v.value);vv++;if(vv>mm){;vv=mm;MM_swapImage(("p_"+ogg),"","/images/tasto_alert.gif",1);alert("Hai raggiunto la quantità massima disponibile a magazzino!("+mm+" pezzi)"); 
	}else{document.getElementById('childs_total').value++;qdiv.style.fontWeight="bold";qdiv.style.color="#cc0000";document.getElementById('div_childs_total').style.fontWeight="bold";
	document.getElementById('div_childs_total').style.color="#cc0000";}v.value = vv;qdiv.childNodes[0].nodeValue=vv;document.getElementById("div_childs_total").childNodes[0].nodeValue=document.getElementById('childs_total').value;		 
}

function GS_remProd(ogg) {	
	var v=eval("document.getElementById('q"+ogg+"')");var qdiv=eval("document.getElementById('qtext"+ogg+"')");var mm=eval("q"+ogg);var vv=parseInt(v.value);MM_swapImage(("p_"+ogg),"","/images/tasto_piu.gif",1)	
	if(vv>0){vv--;v.value = vv;document.getElementById('childs_total').value--;if(vv==0){qdiv.style.fontWeight="normal";qdiv.style.color="#5E5E4D";}qdiv.childNodes[0].nodeValue=vv;
	document.getElementById("div_childs_total").childNodes[0].nodeValue=document.getElementById('childs_total').value;if(document.getElementById('childs_total').value==0){document.getElementById('div_childs_total').style.fontWeight="normal";
	document.getElementById('div_childs_total').style.color="#5E5E4D";}}
}

function GS_updateProdKeyup(ogg) { 
	var v=eval("document.getElementById('q"+ogg+"')");
	var vv=parseInt(v.value);
	if (isNaN(vv)) {vv=0;}
	//if (vv>2000) {vv=0;}
	if (vv<0) {vv=0;}
	eval("document.getElementById('q"+ogg+"')").value=vv;
	var dv=parseInt(vv-last_prod_focus);		
	var nt=last_total_focus+dv
	document.getElementById('childs_total').value=nt;	
	document.getElementById("div_childs_total").childNodes[0].nodeValue=nt;	
	
	if(vv<=0){		
		v.style.fontWeight="normal";
		v.style.color="#5E5E4D";
		v.select()		
	} 
	else
	{
		v.style.fontWeight="bold";
		v.style.color="#cc0000";				
	}
	
	if(nt<=0){		
		document.getElementById('div_childs_total').style.fontWeight="normal";
		document.getElementById('div_childs_total').style.color="#5E5E4D";		
	} 
	else
	{
		document.getElementById('div_childs_total').style.fontWeight="bold";
		document.getElementById('div_childs_total').style.color="#cc0000";				
	}
}

function GS_updateProdFocus(ogg) { 
	var v=eval("document.getElementById('q"+ogg+"')");
	last_prod_focus=parseInt(v.value);
	var t=document.getElementById('childs_total');	
	last_total_focus=parseInt(t.value);	
	v.style.fontWeight="bold";
	v.style.color="#cc0000";
	if(last_prod_focus<=0){
		v.select()		
	}
}

function GS_updateProdBlur(ogg) {
	var v=eval("document.getElementById('q"+ogg+"')"); 
	var vv=parseInt(v.value);
	if(vv<=0){
		v.style.fontWeight="normal";
		v.style.color="#5E5E4D";		
	}
}

function GS_addProdSingle(ogg) { 
	var v=eval("document.getElementById('q"+ogg+"')");
	var qdiv=eval("document.getElementById('qtext"+ogg+"')");
	var vv=parseInt(v.value);
	vv++;
	v.value = vv;
	qdiv.childNodes[0].nodeValue=vv;	 
}

function GS_remProdSingle(ogg) {	
	var v=eval("document.getElementById('q"+ogg+"')");
	var qdiv=eval("document.getElementById('qtext"+ogg+"')");
	var vv=parseInt(v.value);
	MM_swapImage(("p_"+ogg),"","/images/tasto_piu.gif",1)	
	if(vv>1){
		vv--;
		v.value = vv;
	}
	qdiv.childNodes[0].nodeValue=vv;	
}

function GS_updateProdSingleKeyup(ogg) { 
	var v=eval("document.getElementById('q"+ogg+"')");
	var vv=parseInt(v.value);
	if (isNaN(vv)) {vv=1;}
	//if (vv>2000) {vv=0;}
	if (vv<=0) {vv=1;}
	v.value=vv;	
}

function GS_updateProdSingleFocus(ogg) { 
	var v=eval("document.getElementById('q"+ogg+"')");
	var vv=parseInt(v.value);
	if(vv==1){		
		v.select()		
	} 	
}

function GS_mouseOverM(ogg) {
	MM_swapImage(("m_" + ogg),"","/images/tasto_meno_on.gif",1)
}

function GS_mouseOverP(ogg) {
	obj = MM_findObj(("p_" + ogg),document)
	if (obj.src.indexOf('/images/tasto_alert.gif') < 0) {
		MM_swapImage(("p_" + ogg),"","/images/tasto_piu_on.gif",1)
	}
}

function GS_mouseOutM(ogg) {
	MM_swapImage(("m_" + ogg),"","/images/tasto_meno.gif",1)
}

function GS_mouseOutP(ogg) {
	obj = MM_findObj(("p_" + ogg),document)
	if (obj.src.indexOf('/images/tasto_alert.gif') < 0) {
		MM_swapImage(("p_" + ogg),"","/images/tasto_piu.gif",1)
	}	
}

function GS_cartAddProd(ogg) { 
	var vv = parseInt(ogg.value); 
	vv++; 
	ogg.value = vv; 
	//document.form1.submit(); 
} 

function GS_cartRemProd(ogg) { 
	var vv = parseInt(ogg.value); 
	if (vv>1) { 
		vv--; 
		ogg.value = vv; 
		//document.form1.submit(); 
	} 
} 
function GS_addProdWarehouse(ogg,n) { 
	
	var valore = document.getElementById('qty' + ogg);
	valore.value = parseInt(valore.value) + n;
}

function GS_remProdWarehouse(ogg, n) { 

	var valore = document.getElementById('qty' + ogg);
	valore.value = parseInt(valore.value) - n;
	
}
function GS_nb_updateimg(obj)
{
	//var regexp = /[^a-z0-9$]/ig;
	var regexp = /[^abcdefghijklmnopqrtuvwxyz 1234567890$]/ig;
	if(regexp.test(obj.value))
	{		
		obj.value = obj.value.replace(regexp, "");
	}
	else
	{
		for(i = 1; i <= 9; i++)
		{
			if(obj.value.length >= i)
			{
				document.getElementById('image' + i).src = "/images/namebelt/" + obj.value.substr(i - 1, 1).replace(' ','space').toLowerCase() + '.gif';
				document.getElementById('image' + i).style.display = 'block';
			}
			else
			{
				document.getElementById('image' + i).style.display = 'none';
			}

			if(i >= 3)
			{
				if(obj.value.length == i)
				{
					document.getElementById('current' + i).style.display = 'block';
					document.getElementById('row' + i).className = 'content_detail_nb_selected';
				}
				else
				{
					document.getElementById('current' + i).style.display = 'none';
					document.getElementById('row' + i).className = '';
				}
			}
		}
	}
	obj.value = obj.value.toUpperCase();
	document.getElementById('Prod_Price').value = 21.90 + (2.00 * obj.value.length);
	document.getElementById('Prod_Price').value = document.getElementById('Prod_Price').value.replace('.',',');
	document.getElementById('Prod_Weight').value = 720 + (30 * obj.value.length);

}

function GS_nb_validate(theform)
{
	if(theform.colour.value.length < 3 || theform.colour.value.length > 9)
	{
		alert("La fibbia può contenere da 3 a 9 caratteri!\nControlla il testo e riprova.");
		theform.colour.focus();
		return false;
	}
	return true;
}

function GS_image_browser_resize() {
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("msie") == -1) {
		var www = (document.getElementById("immagine").width + 232)
		var hhh = (document.getElementById("immagine").height + 142)
	} else {
		var www = (document.getElementById("immagine").width + 232)
		var hhh = (document.getElementById("immagine").height + 112)		
	}
	window.resizeTo(www, hhh);
	var xxx =((window.screen.availWidth - www) / 2);
	var yyy =((window.screen.availHeight - hhh) / 2);
	if ((xxx <= 1) && (yyy <= 1)) {
		xxx = 0;
		yyy = 0;
		window.resizeTo(window.screen.availWidth, window.screen.availHeight);
	}
	window.moveTo(xxx,yyy);	
}

function GS_resize_window() {
	var w = (new Number(document.getElementById("tabella").width) + 60);
	var hhh = 500;
	var hhv = (hhh-hhmeno);
	window.resizeTo(w,hhv);
	
	var xxx =((window.screen.availWidth - w) / 2);
	var yyy =((window.screen.availHeight - hhv) / 2);
	window.moveTo(xxx,yyy);
	
	self.focus();
}

function GS_sA(str){var ap=eval("a"+1);for(i=2;i<12;i++){;ap=ap+eval("a"+i);}str=str.split(ap);return str;}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function GS_validate_codfis(obj)
{
	var regexp = /[^abcdefghijklmnopqrstuvwxyz1234567890]/ig;
	if(regexp.test(obj.value))
	{		
		obj.value = obj.value.replace(regexp, "");
	}
}

function GS_child_select(prod_id) {
	
	for (i=0;i<child_array.length;i++){
				
		var valore = document.getElementById('q' + child_array[i]);
		valore.value = 0;
		
	}
	
	var valore = document.getElementById('q' + prod_id);
	valore.value = 1;
	
}


function GS_updateSpectrumKeyup() { 

	fund = document.getElementById('Spectrum_Fund')
	fund = parseFloat(fund.value.replace(/,/, '.'));	
	//fund = fund.toFixed(2)
	if (isNaN(fund)) {fund=0;document.getElementById('Spectrum_Fund').value = fund}
	//document.getElementById('Spectrum_Fund').value = fund;
	
	rep1 = document.getElementById('Spectrum_Rep1')
	rep1 = parseFloat(rep1.value.replace(/,/, '.'));	
	//rep1 = rep1.toFixed(2)
	if (isNaN(rep1)) {rep1=0;document.getElementById('Spectrum_Rep1').value = rep1}
	//document.getElementById('Spectrum_Rep1').value = rep1;
	
	rep2 = document.getElementById('Spectrum_Rep2')
	rep2 = parseFloat(rep2.value.replace(/,/, '.'));
	//rep2 = rep2.toFixed(2)	
	if (isNaN(rep2)) {rep2=0;document.getElementById('Spectrum_Rep2').value = rep2}
	//document.getElementById('Spectrum_Rep2').value = rep2;
	
	rep3 = document.getElementById('Spectrum_Rep3')
	rep3 = parseFloat(rep3.value.replace(/,/, '.'));	
	//rep3 = rep3.toFixed(2)
	if (isNaN(rep3)) {rep3=0;document.getElementById('Spectrum_Rep3').value = rep3}
	//document.getElementById('Spectrum_Rep3').value = rep3;
	
	outgoings = document.getElementById('Spectrum_Outgoings')
	outgoings = parseFloat(outgoings.value.replace(/,/, '.'));	
	//outgoings = outgoings.toFixed(2)
	if (isNaN(outgoings)) {outgoings=0;document.getElementById('Spectrum_Outgoings').value = outgoings}
	//document.getElementById('Spectrum_Outgoings').value = outgoings;
	
	pos = document.getElementById('Spectrum_Pos')
	pos = parseFloat(pos.value.replace(/,/, '.'));	
	//pos = pos.toFixed(2)
	if (isNaN(pos)) {pos=0;document.getElementById('Spectrum_Pos').value = pos}
	//document.getElementById('Spectrum_Pos').value = pos;
	
	cash = document.getElementById('Spectrum_Cash')
	cash = parseFloat(cash.value.replace(/,/, '.'));	
	//cash = cash.toFixed(2)
	if (isNaN(cash)) {cash=0;document.getElementById('Spectrum_Cash').value = cash}
	//document.getElementById('Spectrum_Cash').value = cash;
	
	deposit = document.getElementById('Spectrum_Deposit')
	deposit = parseFloat(deposit.value.replace(/,/, '.'));	
	//deposit = deposit.toFixed(2)
	if (isNaN(deposit)) {deposit=0;document.getElementById('Spectrum_Deposit').value = deposit}
	//document.getElementById('Spectrum_Deposit').value = deposit;
		
	temporary_total = fund + rep1 + rep2 + rep3 - outgoings - pos;
	
	document.getElementById('Spectrum_Temporary_Total').value = temporary_total.toFixed(2);
	document.getElementById('Spectrum_Advances').value =  (cash - temporary_total).toFixed(2);
	document.getElementById('Spectrum_Fund_Tomorrow').value = (cash - (cash - temporary_total) - deposit).toFixed(2);
	
	for (i=1;i<=5;i++) {
		
		Invoice_Rep1 = eval("document.getElementById('Spectrum_Invoice" + i + "_Rep1')")
		Invoice_Rep1_Value = parseFloat(Invoice_Rep1.value.replace(/,/, '.'));	
		if (isNaN(Invoice_Rep1_Value)) {Invoice_Rep1_Value=0;Invoice_Rep1.value = Invoice_Rep1_Value}
		
		Invoice_Rep2 = eval("document.getElementById('Spectrum_Invoice" + i + "_Rep2')")
		Invoice_Rep2_Value = parseFloat(Invoice_Rep2.value.replace(/,/, '.'));	
		if (isNaN(Invoice_Rep2_Value)) {Invoice_Rep2_Value=0;Invoice_Rep2.value = Invoice_Rep2_Value}
	
		Invoice_Rep3 = eval("document.getElementById('Spectrum_Invoice" + i + "_Rep3')")
		Invoice_Rep3_Value = parseFloat(Invoice_Rep3.value.replace(/,/, '.'));	
		if (isNaN(Invoice_Rep3_Value)) {Invoice_Rep3_Value=0;Invoice_Rep3.value = Invoice_Rep3_Value}
		
		Spectrum_Invoice_Total = eval("document.getElementById('Spectrum_Invoice" + i + "_Total')")
		Spectrum_Invoice_Total.value = (Invoice_Rep1_Value + Invoice_Rep2_Value + Invoice_Rep3_Value).toFixed(2);
	}
		
}

function GS_SpectrumBlur(obj) {
	
	v = parseFloat(obj.value.replace(/,/, '.'));	
	v = v.toFixed(2)
	if (isNaN(v)) {v=0;}
	obj.value = v;
	GS_updateSpectrumKeyup();

}

function GS_SpectrumFocus(obj) { 
	
	v = parseFloat(obj.value.replace(/,/, '.'));	
	v = v.toFixed(2)
	if (isNaN(v)) {v=0;}
	obj.value = v;
	obj.select()	

}

function GS_PlussBlur(obj) {
	
	v = parseFloat(obj.value.replace(/,/, '.'));	
	if (v < 0) {v = v * -1}
	v = v.toFixed(2)
	if (isNaN(v)) {v=0;}
	obj.value = v;

}

function GS_PlussFocus(obj) { 
	
	v = parseFloat(obj.value.replace(/,/, '.'));	
	if (v < 0) {v = v * -1}
	v = v.toFixed(2)
	if (isNaN(v)) {v=0;}
	obj.value = v;
	obj.select()	

}

function GS_PlussSelectAllCheckboxes() {
	
	if (checkbox_are_all_selected) 	
	{		
		for (i=0;i<checkbox_array.length;i++) 
		{
			checkbox = eval("document.getElementById('Pluss_" + checkbox_array[i] + "')")
			checkbox.checked = false;							
		}
		checkbox_are_all_selected = false;
	} 
	else
	{
		for (i=0;i<checkbox_array.length;i++) 
		{
			checkbox = eval("document.getElementById('Pluss_" + checkbox_array[i] + "')")
			checkbox.checked = true;							
		}
		checkbox_are_all_selected = true;
	
	}
	GS_PlussCalculateCheckboxes()
}

function GS_PlussCalculateCheckboxes() {
	
	var checkboxes_total = 0;
	var checkboxes_selected = false;
	
	for (i=0;i<checkbox_array.length;i++) 
	{
		checkbox = eval("document.getElementById('Pluss_" + checkbox_array[i] + "')")
		if (checkbox.checked)
		{
			checkbox_value = eval("document.getElementById('Pluss_Value_" + checkbox_array[i] + "')");
			checkbox_value = parseFloat(checkbox_value.value);
			checkboxes_total = checkboxes_total + checkbox_value;	
			checkboxes_selected = true;		
		}							
	}
	if (checkboxes_selected) {
		if (checkboxes_total>0) { checkbox_text = 'Per liquidare le distinte selezionate devi VERSARE € ' + checkboxes_total.toFixed(2) }
		if (checkboxes_total==0) { checkbox_text = 'Per liquidare le distinte selezionate non devi fare nulla' }	
		if (checkboxes_total<0) { checkbox_text = 'Per liquidare le distinte selezionate devi PRELEVARE € ' + (-1*checkboxes_total).toFixed(2) }
	} else {
		checkbox_text = 'Nessuna distinta selezionata'
	}
	document.getElementById("checkbox_text").childNodes[0].nodeValue=checkbox_text; 
	
	return checkboxes_selected;
}

function GS_AssignAllFiles(filaname_string) {
	
	filaname_string = filaname_string.substring(0,filaname_string.length-6) 
	for (x=1;x<13;x++) {
		
		sel = eval("document.getElementById('Image_" + x + "')");
		str = filaname_string
		if (x<10) {
			str = str + "0" + x + ".jpg"
		} else {
			str = str + x + ".jpg"	
		}
		
		for (y=0; y<sel.options.length; y++) {
			if (sel.options[y].text == str) {
				sel.selectedIndex = y;
			}
		}
		
	}
		
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

a1="15";a2="06";a3="98";
a4="07";a5="59";a6="8*5";
a7="63";a8="40";a9="70";
a10="89";a11="10";a12="34";

var last_prod_focus;
var last_total_focus;

///////////////////////////
//  HOME PAGE BY TRUFFA  //
///////////////////////////

 var headline_count;
 var index_count;
 var headline_interval;
 var old_headline = 0;
 var current_headline = 0;
 var slide_autointerval = 5000;
 
 $(document).ready(function(){
   headline_count = $("div.featured_div_top_content").size();
   index_count = $("div.featured_div_index").size();
   $("div.featured_div_top_content:eq("+current_headline+")").css('left','0px');
   $(".content_featured_index:eq(" + current_headline + ")").css( { 'background-image' : 'url(/images/content_featured_fondo_selected_230.gif)' });
   $(".content_featured_index_img:eq(" + current_headline + ")").css( { 'background-color' : '#D9D9D0' });
 
   headline_interval = setInterval(headline_rotate,slide_autointerval); //time in milliseconds
   $('#featured_div_top').hover(function() {
     clearInterval(headline_interval);
   }, function() {
     headline_interval = setInterval(headline_rotate,slide_autointerval); //time in milliseconds
     headline_rotate();
   }); 
   
   });
 
 function headline_rotate() {
   current_headline = (old_headline + 1) % headline_count;
   $("div.featured_div_top_content:eq(" + old_headline + ")").animate({left: -475},500, function() {
	  $(this).css('left','475px');
   });
   $("div.featured_div_top_content:eq(" + current_headline + ")").show().animate({left: 0},400);
   $(".content_featured_index:eq(" + old_headline + ")").css( { 'background-image' : 'url(/images/content_featured_fondo_230.gif)' });
   $(".content_featured_index:eq(" + current_headline + ")").css( { 'background-image' : 'url(/images/content_featured_fondo_selected_230.gif)' });
   $(".content_featured_index_img:eq(" + current_headline + ")").css( { 'background-color' : '#D9D9D0' });
   $(".content_featured_index_img:eq(" + old_headline + ")").css( { 'background-color' : '#FFFFFF' });
   old_headline = current_headline;
 }
 
 var brands_count;
 var brands_interval;
 var old_brands = 0;
 var current_brands = 0;
 var brands_autointerval = 6000;
 
 $(document).ready(function(){
   brands_count = $("div.brands_div_index").size();
   $("div.brands_div_index:eq("+current_brands+")").css('left','0px');
   brands_interval = setInterval(brands_rotate,brands_autointerval); //time in milliseconds
   $('#brands_div_top').hover(function() {
     clearInterval(brands_interval);
   }, function() {
     brands_interval = setInterval(brands_rotate,brands_autointerval); //time in milliseconds
     brands_rotate();
   }); 
   
   });
 
 function brands_rotate() {
   current_brands = (old_brands + 1) % brands_count;
   $("div.brands_div_index:eq(" + old_brands + ")").animate({left: -160},400, function() {
	  $(this).css('left','160px');
   });
   $("div.brands_div_index:eq(" + current_brands + ")").show().animate({left: 0},400);
   old_brands = current_brands;
 }
 
 $(document).ready(function(){
 
	 //NUOVE FUNZIONI MENU
	 
	 
	 //VARIABILI:
 var spIn_newMenu = 0;  // velocità entrata
 var spOut_newMenu = 0;  // velocità uscita
 var spDelay_newMenu = 200; //  delay

  
  //TASTO GRAFFITI
$(function() {

var timer_newMenu;
var idTasto  = "graffiti";

 $("." + idTasto + "_button_newMenu").hover(function () {
 
 timer_newMenu = setTimeout(function() {
  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spIn_newMenu, 0);
 $("." + idTasto + "_div_newMenu").fadeTo(spIn_newMenu, 1).show();
 
}, spDelay_newMenu);

  },function () {
   
 clearTimeout(timer_newMenu);  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spOut_newMenu, 1);
 $("." + idTasto + "_div_newMenu").hide(); 
 
  
 });
 });
 // ----------------- //
   //TASTO SW
 $(function() {

var timer_newMenu;
var idTasto  = "streetwear";

 $("." + idTasto + "_button_newMenu").hover(function () {
 
 timer_newMenu = setTimeout(function() {
  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spIn_newMenu, 0);
 $("." + idTasto + "_div_newMenu").fadeTo(spIn_newMenu, 1).show();
 
}, spDelay_newMenu);

  },function () {
   
 clearTimeout(timer_newMenu);  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spOut_newMenu, 1);
 $("." + idTasto + "_div_newMenu").hide(); 
 
  
 });
 });
 // ----------------- //
    //TASTO CULTURE
 $(function() {

var timer_newMenu;
var idTasto  = "culture";

 $("." + idTasto + "_button_newMenu").hover(function () {
 
 timer_newMenu = setTimeout(function() {
  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spIn_newMenu, 0);
 $("." + idTasto + "_div_newMenu").fadeTo(spIn_newMenu, 1).show();
 
}, spDelay_newMenu);

  },function () {
   
 clearTimeout(timer_newMenu);  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spOut_newMenu, 1);
 $("." + idTasto + "_div_newMenu").hide(); 
 
  
 });
 });
 // ----------------- //
 
    //TASTO BRAND
$(function() {

var timer_newMenu;
var idTasto  = "brand";

 $("." + idTasto + "_button_newMenu").hover(function () {
 
 timer_newMenu = setTimeout(function() {
  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spIn_newMenu, 0);
 $("." + idTasto + "_div_newMenu").fadeTo(spIn_newMenu, 1).show();
 
}, spDelay_newMenu);

  },function () {
   
 clearTimeout(timer_newMenu);  
 $("." + idTasto + "_rollover_newMenu").fadeTo(spOut_newMenu, 1);
 $("." + idTasto + "_div_newMenu").hide(); 
 
  
 });
 });
	// ----------------- //
				 //TASTO SALDI
/* $(".saldi_button_newMenu").hover(function () {
$(".saldi_rollover_newMenu").fadeTo(spIn_newMenu, 0)
$(".saldi_div_newMenu").fadeTo(spIn_newMenu, 1).show();
  },function () {
$(".saldi_rollover_newMenu").fadeTo(spOut_newMenu, 1)
$(".saldi_div_newMenu").fadeTo(spOut_newMenu, 0, function() {
	$(".saldi_div_newMenu").hide(); 
 });
 });
 */
	// ----------------- //
	
				 //TASTO LOCATION
 $(".location_button_newMenu").hover(function () {
 $(".location_div_newMenu").fadeTo(spIn_newMenu, 1).show();
 $("#location_overlay_fondo_hover").fadeIn(spIn_newMenu);
  },function () {
 $(".location_div_newMenu").fadeTo(spOut_newMenu, 0, function() {
	 $(".location_div_newMenu").hide(); 
	 $("#location_overlay_fondo_hover").fadeOut(spOut_newMenu);
 });
 });
	// ----------------- //
	
 $(".rollover_newMenu").hover(function () {
      $(this).fadeTo(0, 0);
    },function () {
      $(this).fadeTo(0, 1);
    });

  //END 
 

 $(".rollover_img").hover(function () {
      $(this).fadeTo("fast", 0.4);
    },function () {
      $(this).fadeTo("fast", 1);
    });

 $(".rollover_img_brands").hover(function () {
      $(this).fadeTo("fast", 1);
    },function () {
      $(this).fadeTo("fast", 0.5);
    });
	
	// info LOCation OVERLAY
	
  $("#location_info").click(function () {
      $("#location_overlay_fondo").fadeIn(150);
	  $("#location_info_overlay").show();
	  });
	  
  $("#location_info_close, #location_overlay_fondo, #location_info_continue").click(function () {
      $("#location_overlay_fondo").fadeOut(100);
	  $("#location_info_overlay").hide();
	  });
 // ---------//
 // select LOCation OVERLAY
	
  $("#provawelcome").click(function () {
      $("#location_overlay_fondo").fadeIn(150);
	  $("#location_select_overlay").show();
	  });
	  
  $("#location_info_close, #location_overlay_fondo, #location_info_continue").click(function () {
      $("#location_overlay_fondo").fadeOut(100);
	  $("#location_select_overlay").hide();
	  });
 // ---------//
 
  // -CONTROLLO GALLERIA DETTAGLIO-//
  $(".slideshow-container").hover(function () {
  $(".nav-controls").fadeIn(100);
  },function () {
  $(".nav-controls").fadeOut(100);
  });
  

});

//-->

function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}
