function ShowPhoto(URL, W, H)
    {
        ScreenW = window.screen.width;
        ScreenH = window.screen.height;
        Left    = Number((ScreenW - W) / 2);
        Top     = Number((ScreenH - H) / 2);
        if(W > ScreenW || H > ScreenH){
            Wnd = open('', '_blank', 'width='+ W +', height='+ H +', left=0, top=0, fullscreen=no, '+
            'location=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes, status=no');
        }
        else{
            Wnd = open('', '_blank', 'width='+ W +', height='+ H +', left='+ Left +', top='+ Top +', fullscreen=no, '+
            'location=no, menubar=no, toolbar=no, resizable=no, scrollbars=no, status=no');
        }
        Wnd.document.write('<HTML><HEAD><TITLE>Предварительный просмотр</TITLE>');
        Wnd.document.write('<STYLE>BODY {padding: 0px; margin: 0px;}</STYLE></HEAD>');
        Wnd.document.write('<BODY><IMG src="'+ URL +'" ondrag=\"return false;\" oncontextmenu=\"return false;\"></BODY></HTML>');
    }
function popup(url, w, h)
{
        window.open(url, 'popup', "width="+w+", height="+h+", status=no,toolbar=no,menubar=no,location=no,resizable=yes, scrollbars=yes");
}



function confirmDelete(id, ask, url) { //confirm order delete
                temp = window.confirm(ask);
                if (temp) { //delete
                        window.location=url+id;
                };
};

function LeftMnu(id, act){
	var cont = document.getElementById('lnk_'+id) ? document.getElementById('lnk_'+id) : document.all['lnk_'+id];
	if(act == 1){		cont.parentNode.className = 'menu_container3';
	}
	else{		cont.parentNode.className = 'menu_container';
	}
}

function TopMnu(id, act){
	var TP = document.getElementById('tlnk_'+id) ? document.getElementById('tlnk_'+id) : document.all['tlnk_'+id];
	//alert(TP.parentNode.parentNode.tagName);
	if(act == 1){
		TP.parentNode.parentNode.className = 't_menu2';
	}
	else{
		TP.parentNode.parentNode.className = 't_menu';
	}
}

function SelectATM(){
	if(ATM == 0){return;}
	var ATP = document.getElementById('menu_'+ATM) ? document.getElementById('menu_'+ATM) : document.all['menu_'+ATM];
	if(ATP){
		ATP.className = 't_menu2';
	}
}


