var screenH = 0;
var screenW = 0;

var footTop = 0;
var size = 0;

var activeDiv = "home";
var page = 1;
var inspiredPage = 1;
var redPage = 1;
var newPage = 1;
var newPage2 = 1;
var newPage3 = 1;
var newPage4 = 1;
var neonPage = 1;
var anyPage = 1;

window.onresize = function (evt) {

 	setElementsSizeAndPosition();
};

function init()
{

  setElementsSizeAndPosition();
  
  var home = $('home').setStyles({
		display:'block',
		opacity: 1
	});
  
  var page_01 = $('page_01').setStyles({
		display:'none',
		opacity: 0
	});
  
	var page_02 = $('page_02').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_02_b = $('page_02_b').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_02_c = $('page_02_c').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_02_d = $('page_02_d').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_02_e = $('page_02_e').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_03 = $('page_03').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_04 = $('page_04').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_04_b = $('page_04_b').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_05 = $('page_05').setStyles({
		display:'none',
		opacity: 0
	});
	
	var page_06 = $('page_06').setStyles({
		display:'none',
		opacity: 0
	});
	
	var shoes_detail = $('shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});

	var shoes_inspired_detail = $('inspired_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var shoes_red_detail = $('red_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var new_shoes_detail = $('new_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var new2_shoes_detail = $('new2_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var new3_shoes_detail = $('new3_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var new4_shoes_detail = $('new4_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var neon_shoes_detail = $('neon_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var any_shoes_detail = $('any_shoes_detail').setStyles({
		display:'none',
		opacity: 0
	});
	
	var blank = $('blank').setStyles({
		display:'none',
		opacity: 0
	});

	//setTimeout("show('about')",500) 
}

var aShoeDescription = new Array();
aShoeDescription[0] = "Modelli";
aShoeDescription[1] = "<b>Gold</b> - raso - tacco 11 cm (disponibile anche 9 cm)";
aShoeDescription[2] = "<b>Violet</b> - camoscio - tacco 11 cm (disponibile anche 9 cm)";
aShoeDescription[3] = "<b>Preview 2010 - France 3</b> - camoscio/vernice - tacco 11 cm (disponibile anche 9 cm)";
aShoeDescription[4] = "<b>France black</b> - pelle/tessuto - tacco 11 cm (disponibile anche 9 cm";
aShoeDescription[5] = "<b>France bordeaux</b> - camoscio/vernice - tacco 11 cm (disponibile anche 9 cm)";
aShoeDescription[6] = "<b>Rome</b> - raso - swarovski - tacco 11 cm (disponibile anche 9 cm)";
aShoeDescription[7] = "<b>Canvas 2</b> - pelle/tessuto - tacco 11 cm (disponibile anche 9 cm)";
aShoeDescription[8] = "<b>Flat canvas</b> - pelle/tessuto - tacco 1 cm";

function showShoesDetail(n)
{

		var divFO = $('page_02');
		var divFI = $('shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		
		var img_01 = $('img_01');
		var img_02 = $('img_02');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);

		var shoeDetailDescription = document.getElementById('shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'shoes_detail';
	
}

function switchShoesDetail(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';

		var img_01 = $('img_01');
		var img_02 = $('img_02');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var shoeDetailDescription = document.getElementById('shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription[n];
		
		page = 1;
		showProductPage(page);
		showNavArrow(page,'nav_prev','nav_next');
}

var aShoeDescription2 = new Array();
aShoeDescription2[0] = "Modelli";
aShoeDescription2[15] = "<b>Primavera/Estate 2011</b>";
aShoeDescription2[29] = "<b>Primavera/Estate 2011</b>";
aShoeDescription2[37] = "<b>Primavera/Estate 2011</b>";
aShoeDescription2[13] = "<b>Primavera/Estate 2011</b>";
aShoeDescription2[12] = "<b>Primavera/Estate 2011</b>";
aShoeDescription2[24] = "<b>Primavera/Estate 2011</b>";

function showNewShoesDetail(n)
{

		var divFO = $('page_02_b');
		var divFI = $('new_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		
		var img_01 = $('img_01_new');
		var img_02 = $('img_02_new');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);

		var shoeDetailDescription = document.getElementById('new_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription2[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'new_shoes_detail';
	
}

function switchNewShoesDetail(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';

		var img_01 = $('img_01_new');
		var img_02 = $('img_02_new');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var shoeDetailDescription = document.getElementById('new_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription2[n];
		
		newPage = 1;
		showNewProductPage(newPage);
		showNavArrow(newPage,'nav_prev_new','nav_next_new');
}

var aShoeDescription3 = new Array();
aShoeDescription3[0] = "Modelli";
aShoeDescription3[20] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[38] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[14] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[26] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[16] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[23] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[25] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[39] = "<b>Primavera/Estate 2011</b>";
aShoeDescription3[21] = "<b>Primavera/Estate 2011</b>";

function showNewShoesDetail2(n)
{

		var divFO = $('page_02_c');
		var divFI = $('new2_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		
		var img_01 = $('img_01_new2');
		var img_02 = $('img_02_new2');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);

		var shoeDetailDescription = document.getElementById('new2_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription3[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'new2_shoes_detail';
	
}

function switchNewShoesDetail2(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';

		var img_01 = $('img_01_new2');
		var img_02 = $('img_02_new2');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var shoeDetailDescription = document.getElementById('new2_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription3[n];
		
		newPage2 = 1;
		showNewProductPage2(newPage2);
		showNavArrow(newPage2,'nav_prev_new2','nav_next_new2');
}



var aShoeDescription4 = new Array();
aShoeDescription4[0] = "Modelli";
aShoeDescription4[18] = "<b>Primavera/Estate 2011</b>";
aShoeDescription4[28] = "<b>Primavera/Estate 2011</b>";
aShoeDescription4[40] = "<b>Primavera/Estate 2011</b>";
aShoeDescription4[41] = "<b>Primavera/Estate 2011</b>";
aShoeDescription4[22] = "<b>Primavera/Estate 2011</b>";
aShoeDescription4[27] = "<b>Primavera/Estate 2011</b>";
aShoeDescription4[19] = "<b>Primavera/Estate 2011</b>";

function showNewShoesDetail3(n)
{

		var divFO = $('page_02_d');
		var divFI = $('new3_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		
		var img_01 = $('img_01_new3');
		var img_02 = $('img_02_new3');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);

		var shoeDetailDescription = document.getElementById('new3_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription4[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'new3_shoes_detail';
	
}

function switchNewShoesDetail3(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';

		var img_01 = $('img_01_new3');
		var img_02 = $('img_02_new3');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var shoeDetailDescription = document.getElementById('new3_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription4[n];
		
		newPage3 = 1;
		showNewProductPage3(newPage3);
		showNavArrow(newPage3,'nav_prev_new3','nav_next_new3');
}


var aShoeDescription5 = new Array();
aShoeDescription5[0] = "Modelli";
aShoeDescription5[44] = "<b>Preview 2012</b>";
aShoeDescription5[45] = "<b>Preview 2012</b>";
aShoeDescription5[46] = "<b>Preview 2012</b>";

function showNewShoesDetail4(n)
{

		var divFO = $('page_02_e');
		var divFI = $('new4_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		
		var img_01 = $('img_01_new4');
		var img_02 = $('img_02_new4');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);

		var shoeDetailDescription = document.getElementById('new4_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription5[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'new4_shoes_detail';
	
}

function switchNewShoesDetail4(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';

		var img_01 = $('img_01_new4');
		var img_02 = $('img_02_new4');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var shoeDetailDescription = document.getElementById('new4_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescription5[n];
		
		newPage4 = 1;
		showNewProductPage4(newPage4);
		showNavArrow(newPage4,'nav_prev_new4','nav_next_new4');
}


var inpiredShoesDescription = new Array();
inpiredShoesDescription[0] = "Modelli a tema";
inpiredShoesDescription[1] = "<b>Modelli a tema</b>: Ispirato al brano &#34;Le Onde&#34; di Ludovico Einaudi";

function showInpiredShoesDetail(n)
{

		var divFO = $('page_02');
		var divFI = $('inspired_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my_inspired'+n+'.jpg)';
		var bg2 = 'url(images/my_inspired'+n+'_b.jpg)';

		var img_01 = $('img_01_inspired');
		var img_02 = $('img_02_inspired');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var inspiredDescription = document.getElementById('inspired_shoes_detail_text');
		inspiredDescription.innerHTML = inpiredShoesDescription[n];
		
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'inspired_shoes_detail';
	
}

function switchInspiredShoesDetail(n)
{

		var bg1 = 'url(images/my_inspired'+n+'.jpg)';
		var bg2 = 'url(images/my_inspired'+n+'_b.jpg)';

		var img_01 = $('img_01_inspired');
		var img_02 = $('img_02_inspired');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var inspiredDescription = document.getElementById('inspired_shoes_detail_text');
		inspiredDescription.innerHTML = inpiredShoesDescription[n];
		
		inspiredPage = 1;
		showInspiredProductPage(inspiredPage);
		showNavArrow(inspiredPage,'nav_prev_inspired','nav_next_inspired');
}

var redShoesDescription = new Array();
redShoesDescription[0] = "Modelli a tema";
redShoesDescription[1] = "<b>Rings</b> - raso - tacco 11 cm (disponibile anche 9 cm)";
redShoesDescription[2] = "<b>Red passion</b> - pelle - tacco 11 cm (disponibile anche 9 cm)";
redShoesDescription[3] = "<b>Red passion</b> - pelle - tacco 11 cm (disponibile anche 9 cm)";
redShoesDescription[4] = "<b>Red passion</b> - pelle - tacco 11 cm (disponibile anche 9 cm)";

function showRedShoesDetail(n)
{

		var divFO = $('page_02');
		var divFI = $('red_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my_red'+n+'.jpg)';
		var bg2 = 'url(images/my_red'+n+'_b.jpg)';

		var img_01 = $('img_01_red');
		var img_02 = $('img_02_red');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var redDescription = document.getElementById('red_shoes_detail_text');
		redDescription.innerHTML = redShoesDescription[n];
		
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'red_shoes_detail';
	
}

function switchRedShoesDetail(n)
{

		var bg1 = 'url(images/my_red'+n+'.jpg)';
		var bg2 = 'url(images/my_red'+n+'_b.jpg)';

		var img_01 = $('img_01_red');
		var img_02 = $('img_02_red');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var redDescription = document.getElementById('red_shoes_detail_text');
		redDescription.innerHTML = redShoesDescription[n];
		
		redPage = 1;
		showRedProductPage(redPage);
		showNavArrow(redPage,'nav_prev_red','nav_next_red');
}

function backToShoesList()
{


		var divFO = $('shoes_detail');
		var divFI = $('page_02').setStyle('display', 'block');

		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
activeDiv = 'page_02';
	
}

function show(selectedDiv)
{
	var divIn = selectedDiv;
	
	if (selectedDiv != activeDiv)
	{
		
	
		var divFO = $(activeDiv);
		var divFI = $('blank').setStyle('display', 'block');

		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		
		setTimeout("fadeIn('"+divIn+"')",1100);

		//activeDiv = selectedDiv;
	}
	
}

function fadeIn(divIn)
{
	var divFO = $('blank');
		var divFI = $(divIn).setStyle('display', 'block');

		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = divIn;
}


function getScreenSize()
{
 if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    screenH = window.innerHeight;
    screenW = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+
    screenH = document.documentElement.clientHeight;
    screenW = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4
    screenH = document.body.clientHeight;
    screenW = document.body.clientWidth;
  }
}

function setElementsSizeAndPosition()
{
	getScreenSize();
	var container = $('container');
  container.setStyle('top', ((screenH/2)-300));
  container.setStyle('left', ((screenW/2)-350));


//	var blank = $('blank');
//	blank.setStyle('height', (screenH-50));
}

function prevClick()
{

 if (page != 1)
 {
 	var id = page -1;
 	showProductPage(id);
 	page = id;
	showNavArrow(id,'nav_prev','nav_next');
 }
 
}

function nextClick()
{

	if (page != 2)
	 {
	 	var id = page +1;
	 	showProductPage(id);
	 	page = id;
		showNavArrow(id,'nav_prev','nav_next');
	 }
}

function showProductPage(id)
{
	var node = "img_0"+id;
	var scrollExample = new Fx.Scroll($('nav_parent_container'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}

function prevClickInspired()
{

 if (inspiredPage != 1)
 {
 	var id = inspiredPage -1;
 	showInspiredProductPage(id);
 	inspiredPage = id;
	showNavArrow(id,'nav_prev_inspired','nav_next_inspired');
 }
 
}

function nextClickInspired()
{

	if (inspiredPage != 2)
	 {
	 	var id = inspiredPage +1;
	 	showInspiredProductPage(id);
	 	inspiredPage = id;
		showNavArrow(id,'nav_prev_inspired','nav_next_inspired');
	 }
}

function showInspiredProductPage(id)
{
	var node = "img_0"+id+"_inspired";
	var scrollExample = new Fx.Scroll($('nav_parent_container_inspired'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}
function prevClickRed()
{

 if (redPage != 1)
 {
 	var id = redPage -1;
 	showRedProductPage(id);
 	redPage = id;
	showNavArrow(id,'nav_prev_red','nav_next_red');
 }
 
}

function nextClickRed()
{

	if (redPage != 4)
	 {
	 	var id = redPage +1;
	 	showRedProductPage(id);
	 	redPage = id;
		showNavArrow(id,'nav_prev_red','nav_next_red');
	 }
}

function showRedProductPage(id)
{
	var node = "img_0"+id+"_red";
	var scrollExample = new Fx.Scroll($('nav_parent_container_red'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}

function prevClickNew()
{

 if (newPage != 1)
 {
 	var id = newPage -1;
 	showNewProductPage(id);
 	newPage = id;
	showNavArrow(id,'nav_prev_new','nav_next_new');
 }
 
}

function nextClickNew()
{

	if (newPage != 6)
	 {
	 	var id = newPage +1;
	 	showNewProductPage(id);
	 	newPage = id;
		showNavArrow(id,'nav_prev_new','nav_next_new');
	 }
}

function showNewProductPage(id)
{
	var node = "img_0"+id+"_new";
	var scrollExample = new Fx.Scroll($('nav_parent_container_new'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}

function prevClickNew2()
{

 if (newPage2 != 1)
 {
 	var id = newPage2 -1;
 	showNewProductPage2(id);
 	newPage2 = id;
	showNavArrow(id,'nav_prev_new2','nav_next_new2');
 }
 
}

function nextClickNew2()
{

	if (newPage2 != 9)
	 {
	 	var id = newPage2 +1;
	 	showNewProductPage2(id);
	 	newPage2 = id;
		showNavArrow(id,'nav_prev_new2','nav_next_new2');
	 }
}

function showNewProductPage2(id)
{
	var node = "img_0"+id+"_new2";
	var scrollExample = new Fx.Scroll($('nav_parent_container_new2'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}


function prevClickNew3()
{

 if (newPage3 != 1)
 {
 	var id = newPage3 -1;
 	showNewProductPage3(id);
 	newPage3 = id;
	showNavArrow(id,'nav_prev_new3','nav_next_new3');
 }
 
}

function nextClickNew3()
{

	if (newPage3 != 7)
	 {
	 	var id = newPage3 +1;
	 	showNewProductPage3(id);
	 	newPage3 = id;
		showNavArrow(id,'nav_prev_new3','nav_next_new3');
	 }
}

function showNewProductPage3(id)
{
	var node = "img_0"+id+"_new3";
	var scrollExample = new Fx.Scroll($('nav_parent_container_new3'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}

function prevClickNew4()
{

 if (newPage4 != 1)
 {
 	var id = newPage4 -1;
 	showNewProductPage4(id);
 	newPage4 = id;
	showNavArrow(id,'nav_prev_new4','nav_next_new4');
 }
 
}

function nextClickNew4()
{

	if (newPage4 != 3)
	 {
	 	var id = newPage4 +1;
	 	showNewProductPage4(id);
	 	newPage4 = id;
		showNavArrow(id,'nav_prev_new4','nav_next_new4');
	 }
}

function showNewProductPage4(id)
{
	var node = "img_0"+id+"_new4";
	var scrollExample = new Fx.Scroll($('nav_parent_container_new4'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}



var flagSubVisibile = 0;
var myInt;

function showSubCollezione(){
	if (flagSubVisibile == 0){
		var sc = $('sub_collezione');
		sc.setStyle('display', 'block');
		var fadeIn = new Fx.Morph(sc, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeIn.start({
			'opacity': [0, 1]
		});
		
		myInt=setInterval('hideSubCollezione()',3000);
	}
}

function hideSubCollezione(){
	if(flagSubVisibile == 0){
		clearInterval(myInt);
		var sc = $('sub_collezione');
		
		var fadeOut = new Fx.Morph(sc, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
			'opacity': [1, 0]
		});
		
		sc.setStyle('display', 'none');
	}	
	
}

var flagSubPressVisibile = 0;
var myIntPress;

function showSubPress(){
	if (flagSubPressVisibile == 0){
		var sc = $('sub_press');
		sc.setStyle('display', 'block');
		var fadeIn = new Fx.Morph(sc, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeIn.start({
			'opacity': [0, 1]
		});
		
		myIntPress=setInterval('hideSubPress()',3000);
	}
}

function hideSubPress(){
	if(flagSubPressVisibile == 0){
		clearInterval(myIntPress);
		var sc = $('sub_press');
		
		var fadeOut = new Fx.Morph(sc, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
			'opacity': [1, 0]
		});
		
		sc.setStyle('display', 'none');
	}	
	
}

function setTo1(){
	flagSubVisibile = 1;
}

function setTo0(){
	flagSubVisibile = 0;
}

function setPressTo1(){
	flagSubPressVisibile = 1;
}

function setPressTo0(){
	flagSubPressVisibile = 0;
}

var aShoeDescriptionNeon = new Array();
aShoeDescriptionNeon[0] = "Modelli";
aShoeDescriptionNeon[30] = "<b>Neon Collection</b>";
aShoeDescriptionNeon[31] = "<b>Neon Collection</b>";
aShoeDescriptionNeon[32] = "<b>Neon Collection</b>";
aShoeDescriptionNeon[33] = "<b>Neon Collection</b>";
aShoeDescriptionNeon[34] = "<b>Neon Collection</b>";
aShoeDescriptionNeon[35] = "<b>Neon Collection</b>";
aShoeDescriptionNeon[36] = "<b>Neon Collection</b>";

function showNeonShoesDetail(n)
{

		var divFO = $('page_03');
		var divFI = $('neon_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		
		var img_01 = $('img_01_neon');
		var img_02 = $('img_02_neon');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);

		var shoeDetailDescription = document.getElementById('neon_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescriptionNeon[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'neon_shoes_detail';
	
}

function switchNeonShoesDetail(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';

		var img_01 = $('img_01_neon');
		var img_02 = $('img_02_neon');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		
		var shoeDetailDescription = document.getElementById('neon_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescriptionNeon[n];
		
		neonPage = 1;
		showNeonProductPage(neonPage);
		showNavArrow(neonPage,'nav_prev_neon','nav_next_neon');
}

function prevClickNeon()
{

 if (neonPage != 1)
 {
 	var id = neonPage -1;
 	showNeonProductPage(id);
 	neonPage = id;
	showNavArrow(id,'nav_prev_neon','nav_next_neon');
 }
 
}

function nextClickNeon()
{

	if (neonPage != 7)
	 {
	 	var id = neonPage +1;
	 	showNeonProductPage(id);
	 	neonPage = id;
		showNavArrow(id,'nav_prev_neon','nav_next_neon');
	 }
}

function showNeonProductPage(id)
{
	var node = "img_0"+id+"_neon";
	var scrollExample = new Fx.Scroll($('nav_parent_container_neon'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}

var aShoeDescriptionAny = new Array();
aShoeDescriptionAny[0] = "Modelli";
aShoeDescriptionAny[42] = "<b>Any Colour You Like Collection</b>";
aShoeDescriptionAny[43] = "<b>Any Colour You Like Collection</b>";

function showAnyShoesDetail(n)
{

		var divFO = $('page_06');
		var divFI = $('any_shoes_detail').setStyle('display', 'block');
		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		var bg3 = 'url(images/my0'+n+'_c.jpg)';
		var bg4 = 'url(images/my0'+n+'_d.jpg)';
		
		var img_01 = $('img_01_any');
		var img_02 = $('img_02_any');
		var img_03 = $('img_03_any');
		var img_04 = $('img_04_any');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		img_03.setStyle('background', bg3);
		img_04.setStyle('background', bg4);

		var shoeDetailDescription = document.getElementById('any_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescriptionAny[n];
		
		var fadeOut = new Fx.Morph(divFO, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});
		var fadeIn = new Fx.Morph(divFI, {duration: '1000', transition: Fx.Transitions.Sine.easeOut});

		fadeOut.start({
    	'opacity': [1, 0]
		});
	
		fadeIn.start({
    	'opacity': [0, 1]
		});
		activeDiv = 'any_shoes_detail';
	
}

function switchAnyShoesDetail(n)
{

		var bg1 = 'url(images/my0'+n+'.jpg)';
		var bg2 = 'url(images/my0'+n+'_b.jpg)';
		var bg3 = 'url(images/my0'+n+'_c.jpg)';
		var bg4 = 'url(images/my0'+n+'_d.jpg)';

		var img_01 = $('img_01_any');
		var img_02 = $('img_02_any');
		var img_03 = $('img_03_any');
		var img_04 = $('img_04_any');
		img_01.setStyle('background', bg1);
		img_02.setStyle('background', bg2);
		img_03.setStyle('background', bg3);
		img_04.setStyle('background', bg4);
		
		var shoeDetailDescription = document.getElementById('any_shoes_detail_text');
		shoeDetailDescription.innerHTML = aShoeDescriptionAny[n];
		
		anyPage = 1;
		showAnyProductPage(anyPage);
		showNavArrowAny(anyPage,'nav_prev_any','nav_next_any');
}

function prevClickAny()
{

 if (anyPage != 1)
 {
 	var id = anyPage -1;
 	showAnyProductPage(id);
 	anyPage = id;
	showNavArrowAny(id,'nav_prev_any','nav_next_any');
 }
 
}

function nextClickAny()
{

	if (neonPage != 4)
	 {
	 	var id = anyPage +1;
	 	showAnyProductPage(id);
	 	anyPage = id;
		showNavArrowAny(id,'nav_prev_any','nav_next_any');
	 }
}

function showAnyProductPage(id)
{
	var node = "img_0"+id+"_any";
	var scrollExample = new Fx.Scroll($('nav_parent_container_any'), {duration: '1000', transition: Fx.Transitions.Back.easeOut});
	scrollExample.toElement(node);

}

function showNavArrowAny(page,prev,next){
	if(page == 1){
		var prevbtn = $(prev).setStyles({
			display:'none',
			opacity: 0
		});
		var nextbtn = $(next).setStyles({
			display:'block',
			opacity: 1
		});
	}else if (page == 2){
		var nextbtn = $(next).setStyles({
			display:'block',
			opacity: 1
		});
		var prevbtn = $(prev).setStyles({
			display:'block',
			opacity: 1
		});
	}else if (page == 3){
		var nextbtn = $(next).setStyles({
			display:'block',
			opacity: 1
		});
		var prevbtn = $(prev).setStyles({
			display:'block',
			opacity: 1
		});
	}else if (page == 4){
		var nextbtn = $(next).setStyles({
			display:'none',
			opacity: 0
		});
		var prevbtn = $(prev).setStyles({
			display:'block',
			opacity: 1
		});
	}
}

function showNavArrow(page,prev,next){
	if(page == 1){
		var prevbtn = $(prev).setStyles({
			display:'none',
			opacity: 0
		});
		var nextbtn = $(next).setStyles({
			display:'block',
			opacity: 1
		});
	}else if (page == 2){
		var nextbtn = $(next).setStyles({
			display:'none',
			opacity: 0
		});
		var prevbtn = $(prev).setStyles({
			display:'block',
			opacity: 1
		});
	}
}
