//<script>
function changeCity(lang)
{
    idcity = document.getElementById("selCity");
    if (lang == '') {
        lang = '/home';
        }
    d = window.location.href = lang + '/index/' + idcity.value;
    
}
function setMode(idmode)
{
   window.document.all.item("operation").value=idmode;
}

function catFolderOpen(obj)
{
    folder = obj.nextSibling;
    if (folder.style.display == "none")
    {
        folder.style.display = "block";
    }
    else
    {
        folder.style.display = "none";
    }
}

function catImageZoom(mode, obj)
{
    if (mode == 1)
    {
        obj.previousSibling.style.display = "block";
    }
    else
    {
        obj.style.display = "none";
    }
}

function selectProductToCompare(obj)
{
    tr = obj.parentElement.parentElement;
    //alert(obj.)
    if (obj.checked)
    {
        tr.className = "compareRowsSelected";
    }
    else
    {
        tr.className = "compareRows";
    }
}

function showCatFilter(obj)
{
    filter = document.getElementById(obj);
    if (filter.style.display == "" || filter.style.display == "none")
    {
        filter.style.display = "block";
    }
    else
    {
        filter.style.display = "none";
    }
}

function showResponse(id,ids,scope)
{
    vsp=window.open("/content/store/popup.asp?shmode=2&id="+id+"&ids="+ids+"&idt="+scope,"show_response","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,width=430,height=350,resizable=no")
}

function addToBasket(id,ids)
{
	var tParam = null;
	var return_param=window.showModalDialog("/content/basket/basketform.asp",tParam,'dialogHeight:70px;dialogWidth:80px;center:1;status:no;help:no;')

	if (return_param!=null)
	{
		if (return_param.ok==1)
		{
			var amount=return_param.retvalue;
			var x, d, t = 'text/plain';
			var u='/content/basket/addtobasket.asp?amount='+amount+'&idi='+id+'&ids='+ids;
			function g(s) {
				x = 0;
				try {
					x = new ActiveXObject(s);
				} catch (s) {
				}
			return x;
			};
			x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest();
			x.overrideMimeType && x.overrideMimeType(t);
			x.open("GET", u, false);
			x.send(null);
			var formElement=document.getElementById('basketinfo');
			formElement.innerHTML= x.responseText;
		}
	}
}

var _currenSeason = null;
var _currentButton = 0;
var _currentButtonIndex = 0;
var _topImages = new Array();
var _imgPath = "/images/topmenu/";
var _advScript = "/content/store/flashData.asp?shmode=1&ids=summer";
var _advertising = null;
var _advertisingFrame = null;

function preloadMenuImages(season)
{
    img1Path = "/images/topmenu/" + season + "/m1a.gif";
    img2Path = "/images/topmenu/" + season + "/m2a.gif";
    img3Path = "/images/topmenu/" + season + "/m3a.gif";
    img4Path = "/images/topmenu/" + season + "/m4a.gif";
}
function showTopAdvertising(obj, image, season, currentSeason)
{
    if (_currenSeason == null)
    {
        obj.firstChild.src = _imgPath + currentSeason + "/m" + image + "a.gif";
        _currenSeason = season;
        _currentButton = obj;
        _currentButtonIndex = image;
        showAdvertising("url");
    }
    else
    {
        if (_currenSeason == season)
        {
            hideAdvertising(currentSeason);
        }
        else
        {
            _currentButton.firstChild.src = _imgPath + currentSeason + "/m" + _currentButtonIndex + ".gif";
            obj.firstChild.src = _imgPath + currentSeason + "/m" + image + "a.gif";
            _currenSeason = season;
            _currentButton = obj;
            _currentButtonIndex = image;
            showAdvertising("url");
        }
    
    }
}

function showAdvertising(url)
{
    if (_advertising == null)
    {
        _advertising = document.getElementById("advertising");
        _advertisingFrame = document.getElementById("advertisingFrame");
    }
    if (_advertising.style.display == "none" || _advertising.style.display == "")
    {
        _advertising.style.display = "block";
        _advertisingFrame.src = _advScript;
    }
}

function hideAdvertising(currentSeason)
{
    _currentButton.firstChild.src = _imgPath + currentSeason + "/m" + _currentButtonIndex + ".gif";
    _currenSeason = null;
    _advertising.style.display = "none";
}
function showResponseBook(e)
{
    target = document.getElementById(e);
    if (target.style.display == "")
    {
        target.style.display = "block";
    }
    else
    {
        target.style.display = "";
    }
}

function openMap(url)
{
    bMap = window.open(url, "map", "height=450,width=600,status=no,toolbar=no,menubar=no,location=no");
    bMap.focus();
}
