var ImageWindow = null;
function ShowImage(URL, Width, Height, Name){
	URL = URL.replace(/&/ig, '%26');
        var prop_string='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=50,left=400,width=' + Width + ',height=' + Height;
        if(this.ImageWindow){
            if(this.ImageWindow.closed){
		var urlstring = '/Service/ShowImage.php?URL=' + URL + '&Title=' + Name;
                this.ImageWindow = window.open(urlstring, '', prop_string);
            }else{
                this.ImageWindow.document.write('<CENTER><B>Загрузка нового изображения...</B></CENTER>');
		var HeightNew = eval(Height) + 30;
                this.ImageWindow.resizeTo(Width, HeightNew);
                this.ImageWindow.location='/Service/ShowImage.php?URL=' + URL + '&Title=' + Name;
                this.ImageWindow.focus();
            }
        }else{
	    this.ImageWindow = window.open('/Service/ShowImage.php?URL=' + URL + '&Title=' + Name, '', prop_string);
        }
}

