
function setMenuActive(oObject){
	oObject.className='active';
}

function setMenuDefault(oObject){
	oObject.className='default';
}

function goTo(oObject){
	document.location.href = ''+oObject.id+'.html';
}

var i = 0;

function setPicture(par_id){
	//document.getElementById(""+par_id+"").style.backgroundImage='url('+afbeeldingen[i]+')';
	document.getElementById(""+par_id+"").src = ''+afbeeldingen[i]+'';
	i++;
	if (i == afbeeldingen.length){
		i = 0
	}		
}

function show(maat){
	setPicture('id_p1_'+maat+'');
	$("#id_p1_"+maat+"").fadeTo(2000, 1.0, function(){
		setTimeout("hide("+maat+")", 3000);
 		return true;
	});
}

function hide(maat){
	setPicture('id_p2_'+maat+'');
	$("#id_p1_"+maat+"").fadeTo(2000, 0.0, function(){
		setTimeout("show("+maat+")", 3000);
		return true;
	});
}

var afbeeldingen = new Array()
function rotateHome(){
	afbeeldingen[0] = 'media/home/pand.jpg';
	afbeeldingen[1] = 'media/home/pand1.jpg';
	afbeeldingen[2] = 'media/home/pand2.jpg';	
	show('358');
	
	//test1('358');
}

function rotateDamesmode(){
	afbeeldingen[0] = 'media/damesmode/damesmode1.jpg';
	afbeeldingen[1] = 'media/damesmode/damesmode2.jpg';
	afbeeldingen[2] = 'media/damesmode/damesmode3.jpg';
	//afbeeldingen[3] = 'media/damesmode/damesmode4.jpg';
	//afbeeldingen[4] = 'media/damesmode/damesmode5.jpg';
	//afbeeldingen[5] = 'media/damesmode/damesmode6.jpg';
	show('234');
}

function rotateDamesschoenen(){
	afbeeldingen[0] = 'media/damesschoenen/damesschoenen1.jpg';
	afbeeldingen[1] = 'media/damesschoenen/damesschoenen2.jpg';
	//afbeeldingen[2] = 'media/damesschoenen/damesschoenen3.jpg';
	//afbeeldingen[3] = 'media/damesschoenen/damesschoenen4.jpg';
	//afbeeldingen[4] = 'media/damesschoenen/damesschoenen5.jpg';
	show('234');
}

function rotateHerenschoenen(){
	afbeeldingen[0] = 'media/herenschoenen/herenschoenen1.jpg';
	afbeeldingen[1] = 'media/herenschoenen/herenschoenen2.jpg';
	//afbeeldingen[2] = 'media/herenschoenen/herenschoenen3.jpg';
	//afbeeldingen[3] = 'media/herenschoenen/herenschoenen4.jpg';
	//afbeeldingen[4] = 'media/herenschoenen/herenschoenen5.jpg';
	show('234');
}




function setLogoActive(){
	this.className = 'logos_active';
}

function setLogoDefault(){
	this.className = 'logos_default';
}

function goToSite(){
	var id = this.id;
	var url;
	var sPath = window.location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);

	if (sPage == "damesmode.html"){
			if (id == "l_1"){
				url = "http://www.marccain.com/";
			}
			else if (id == "l_2"){
				url = "http://www.burberry.com/Home.aspx";	
			}
			else if (id == "l_3"){
				url = "http://www.ernyvanreijmersdal.nl/";	
			}
			else if (id == "l_4"){
					url = "http://www.valentino.com/";	
				}				
			else if (id == "l_5"){
					url = "http://www.escada.com/";	
			}				
			else if (id == "l_6"){
				url = "http://www.cambioamerica.com/";	
			}
			else if (id == "l_7"){
					url = "http://www.zucchero.de/";	
			}
	}
	
	if (sPage == "damesschoenen.html"){
			if (id == "l_1"){
				url = "http://www.prada.com/";
			}
			else if (id == "l_2"){
				url = "http://www.tods.com/";
			}
			else if (id == "l_3"){
				url = "http://www.burberry.com/Home.aspx";
			}
			else if (id == "l_4"){
				url = "http://www.robertobotticelli.com/";
			}				
			else if (id == "l_5"){
				url = "http://www.hogancatalog.com/";
			}
			else if (id == "l_6"){
				url = "http://www.dyva.it/";
			}
			else if (id == "l_7"){
				url = "http://www.peterkaiser.nl/";
			}
			else if (id == "l_8"){
				url = "http://www.ksshoes.de/index_e.htm";
			}

	}
	

	if (sPage == "herenschoenen.html"){
			if (id == "l_1"){
				url = "http://www.santonishoes.com/";
			}
			else if (id == "l_2"){
				url = "http://www.prada.com/";	
			}
			else if (id == "l_3_1"){
				url = "http://www.tods.com/";
			}
			else if (id == "l_3_2"){
				url = "http://www.crockettandjones.co.uk/";
			}		
			else if (id == "l_4"){
				url = "http://www.robertobotticelli.com/";
			}				
			else if (id == "l_5_1"){
				url = "http://www.aldobrue.it/";
			}
			else if (id == "l_5_2"){
				url = "http://www.hogancatalog.com/";
			}						
			else if (id == "l_6"){
				url = "http://www.lidomarinozzi.com/";
			}
			else if (id == "l_7"){
				url = "http://www.vanbommel.nl/";
			}
	}

	//window.location.href = url;					
	window.open(url);
	//alert(url);
}

function init(){
	var logo_container = document.getElementById('logos');
	var logos = logo_container.getElementsByTagName('div');
	var test = '';
   	for (var i = 0; i < logos.length; i++) {
		
		if (logos[i].className == 'container'){
			//alert('test');
		}
		else{
			test = ""+test+" - "+logos[i].id+"";
			
			logos[i].onmouseover = setLogoActive;
			logos[i].onmouseout = setLogoDefault;
			logos[i].onclick = goToSite;
		}
   	}
//	alert(test);
	
}







