function init(){
	
	var co = $('conts');
	var he = co.offsetHeight;
	// alert(he);
	//return;
	if(he > 701){
		var delta = he-701;
		var parts = Math.floor(delta/120);
		co.style.height = (701+(parts+1)*120)+"px";
		co.style.minHeight = (655+(parts+1)*120)+"px";
		// alert(co.style.height);
	}
}

// window.onresize = init;

var is;
var _url;
var _header;

function sepop(url, w, h){
	_url = '/download/i/'+url+'.jpg';
	_header = 'Уралпромоборудование';
	if((w == '')||(h == '')){
		return false;
	}
    if (!is || is.closed) {
	    var left = parseInt((screen.availWidth/2) - (w/2));
	    var top = parseInt((screen.availHeight/2) - (h/2));
	    var windowFeatures = "width=" + w + ",height=" + h + 
	        ",left=" + left + ",top=" + top + 
	        ",screenX=" + left + ",screenY=" + top;
		is = window.open("", "imShow", windowFeatures);
        setTimeout("writeToWindow()", 50);
    } else if (is.focus) {
        is.focus( );
    }
}

function writeToWindow() {
    var newContent = "";
    newContent += "<html><head><title>"+_header+"</title>";
    newContent += "<style>body {border:0 solid; padding:0; margin:0; }</style></head>";
    newContent += "<body>";
    newContent += "<img src='"+_url+"' alt='"+_header+"' width='100%' hspace='0' vspace='0'/>";
    newContent += "</body></html>";
    is.document.write(newContent);
    is.document.close( );
}
