function ImgLink(name,w,h)
{
var w=200;
var h=200;
newimg=window.open("","Image","Width="+w+", Height="+h+", Toolbar=0, Status=0, Menubar=0, Scrollbars=0, Resizable=1, left=300, top=100");
newimg.document.open();
newimg.document.write('<html><body topmargin=0 leftmargin=0 onload="FitPic();"><script language="javascript">var arrTemp=self.location.href.split("?"); var picUrl = (arrTemp.length>0)?arrTemp[1]:""; var NS = (navigator.appName=="Netscape")?true:false; function FitPic() {iWidth = (NS)?window.innerWidth:document.body.clientWidth;        iHeight = (NS)?window.innerHeight:document.body.clientHeight;        iWidth = document.images[0].width - iWidth;        iHeight = document.images[0].height - iHeight;        window.resizeBy(iWidth, iHeight);        self.focus();      }; </script><a href="javascript: window.close();"><img src='+name+' border="0" alt="Закрыть окно"></a></body>');
newimg.document.close();
}

function initSpoilers(context)
{
	var context = context || 'body';
	$('div.sp-head-wrap', $(context)).click(function(){
		$(this).find('div.sp-head').toggleClass('unfolded');
		$(this).next('div.sp-body').slideToggle('fast');
	});
}

function show(obj) {
if (document.getElementById(obj).style.display == 'none')
document.getElementById(obj).style.display = 'block';
}

function hide(obj) {
if (document.getElementById(obj).style.display == 'block')
document.getElementById(obj).style.display = 'none';
}
