focus();


function OpenBrWindow(theURL,winName,features)
{
	var new_window = window.open(theURL,winName,features);
	new_window.focus();
}


function openw(url,wname,x,y)
{
	wwregw=window.open(url,wname,'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width='+x+',height='+y+',resizable=no');
	top.window.wwregw.focus();
};

function popadd(item_id)
{
	openw('/order.html?act=popadd&id='+item_id,'Голосовать',630,270);
};

function fstadd(item_id)
{
	openw('/order.html?act=fstadd&count=1&id='+item_id,'Добавить',630,270);
};


			function initialize(val){
				currentImg = val;
				prevImg = val;
				eval("document.getElementById('img"+val+"').className = 'imgOn'");
				document.getElementById("totals").innerHTML = (currentImg+1) + "/" + arrBIG.length;
				location.href = '#' + val;
			}

			function showImg(val){
				eval("document.getElementById('img"+prevImg+"').className = 'imgOff'");
				document.getElementById("img").innerHTML = "<br><br><br>Loading......"
				document.getElementById("img").innerHTML = "<img src=" + arrBIG[val] + " border='0'>"
				eval("document.getElementById('img"+val+"').className = 'imgOn'");
				currentImg = val;
				prevImg = val;
				document.getElementById("totals").innerHTML = (currentImg+1) + "/" + arrBIG.length;
				location.href = '#' + val;
			}

			function nextImg(){
				currentImg++;
				if (currentImg >= arrBIG.length)
					currentImg = 0; //currentImg --;
				showImg(currentImg);
			}
			function previousImg(){
				currentImg--;
				if (currentImg < 0)
					currentImg = arrBIG.length - 1;  //currentImg = 0;
				showImg(currentImg);
			}
			function imgOn(img){
				img.className="imgOn";
			}
			function lastImg(){
				currentImg = arrBIG.length-1;
				showImg(currentImg);
			}
			function firstImg(){
				currentImg = 0;
				showImg(currentImg);
			}



function disableclick(e) {
    if (document.all) {
        if (event.button==2||event.button==3) {
            if (event.srcElement.tagName=="IMG"){
                alert(clickmessage);
                return false;
            }
        }
    }
    else if (document.layers) {
        if (e.which == 3) {
            alert(clickmessage);
            return false;
        }
    }
    else if (document.getElementById){
        if (e.which==3&&e.target.tagName=="IMG"){
            alert(clickmessage)
            return false
        }
    }
}