var ua = navigator.userAgent.toLowerCase();
var isOpera = (ua.indexOf('opera')  > -1);
var isIE = (!isOpera && ua.indexOf('msie') > -1);

function getDocumentHeight() {
  return Math.max(document.compatMode != 'CSS1Compat' ? document.body.scrollHeight : document.documentElement.scrollHeight, getViewportHeight());
}

function resize(){
	if(document.getElementById('content').offsetHeight>530)
	{
		var x = (document.getElementById('content').offsetHeight-530)/89;
		x = (x+1)*89;
//		alert(x);
		document.getElementById('bkgline').style.height=x.toString() + 'px';
		document.getElementById('footer').style.marginTop=x.toString() + 'px';
	}
}

function open_img(title,img, width, height)
{
	myWindow=window.open("","","width="+width+", height="+height+", status=no, left=300, top=300 ");
	str  = '<html><head><title>'+title+'</title></head><body style="margin:0"><a href="" onclick="window.close()" title="Нажмите чтобы закрыть окно"><img src="'+img+'" border="0" alt="Нажмите чтобы закрыть окно"></a></body></html>';
    myWindow.document.write(str);
}
