// JavaScript Document for The Golden Boot by Ilya Titov, April 2008
var active = "null";
var counter = 1;
var t;
var t2;
function startGlobal(){
	//
}
/*  window.onload = function() {
     if (document.getElementById) {
       document.getElementById('mens').onmouseover = function() {catOpt('mens');}
       document.getElementById('mens').onmouseout = function() {catOptOut('mens');}
	   document.getElementById('mens').onclick = function() {goto('mens');}
     }
   }*/
var delay = 12000;

function catOpt(id){
	if (active == "null"){
		document.getElementById(id).className = "catHover";
	}else if ( active != id) {
		document.getElementById(active).className = "catImg";
		document.getElementById(id).className = "catHover";
	}else {
		document.getElementById(id).className = "catHover";
	}
	
		clearTimeout(t);
		switch (id)
		{
			case 'mens':
			counter = 1;
			break;
			case 'ladies':
			counter = 2;
			break;
			case 'kids':
			counter = 3;
			break;
			case 'accessories':
			counter = 4;
			break;
			case 'accessories_mens':
			counter = 4;
			break;
			case 'accessories_ladies':
			counter = 4;
			break;
		}
		delay = 20000;
	
	//
	var tmp;
	switch (id)
		{
			case 'mens':
			tmp = "/mens/";
			break;
			case 'ladies':
			tmp = "/ladies/";
			break;
			case 'kids':
			tmp = "/kids/";
			break;
			case 'accessories':
			tmp = "/accessories/";
			break;
			case 'accessories_ladies':
			tmp = "/accessories/";
			break;
			case 'accessories_mens':
			tmp = "/accessories/";
			break;
		}

	clearTimeout(t2);
	//
}

function catOptOut(id){
	document.getElementById(id).className = "catImg";
	if (id == "myfirstshoe"){document.getElementById(id).className = "catBg";}
}

function activateMenu(path) {
	//add dots
	tmp = document.getElementById('menuactive').innerHTML 
	tmp = tmp.slice(tmp.indexOf('>')+1, tmp.lastIndexOf('<'));
	document.getElementById('menuactive').innerHTML = "<img src='"+path+"elements/mr.gif' id='mrl' alt='' />" + tmp + "<img src='"+path+"elements/mr.gif' id='mrr' alt='' />";
	
}
function activateSubMenu(path) {
	//add dots
	tmp = document.getElementById('menuactive').innerHTML 
	document.getElementById('menuactive').innerHTML = "<img src='"+path+"elements/mr.gif' id='mrl' alt='' />" + tmp + "<img src='"+path+"elements/mr.gif' id='mrr' alt='' />";
	
}
function gotolink(id){
var tmp;
	switch (id)
		{
			case 'mens':
			tmp = "http://store.thegoldenboot.co.uk/store/department/3/MENS/";
			break;
			case 'ladies':
			tmp = "http://store.thegoldenboot.co.uk/store/department/1/LADIES../";
			break;
			case 'kids':
			tmp = "/kids/";
			break;
			case 'accessories':
			tmp = "http://store.thegoldenboot.co.uk/store/department/4/HANDBAGS-BRIEFCASES/";
			break;
			case 'accessories_mens':
			tmp = "http://store.thegoldenboot.co.uk/store/department/45/MENS-ACCESSORIES/";
			break;
			case 'accessories_ladies':
			tmp = "http://store.thegoldenboot.co.uk/store/department/6/LADIES-ACCESSORIES/";
			break;
		}
	location.href = tmp;	
}
