function setIllustration(){
var html = document.documentElement;
var illustrate = document.getElementById('illustrate');
var illustrateCenter = document.getElementById('icenter');
//var padding = (html.clientWidth - 1003)/2;
if(illustrate){
if(html.clientWidth >= 1122){
//window.alert(html.clientWidth - 957);
if(illustrate.offsetWidth < 1300){
illustrate.style.width = html.clientWidth;
illustrate.style.left = 0;
illustrateCenter.style.width = html.clientWidth - 1121 + 'px';
}else{
illustrate.style.left = (html.clientWidth - 1300)/2+'px';
illustrate.style.width = '1300px';
illustrateCenter.style.width = '179px';
}
}else{
illustrateCenter.style.width = '1px';
//window.alert('Ширина окна: '+html.clientWidth+', Центральная часть: '+illustrateCenter.style.width);
illustrate.style.width = '1122px';

}
//window.alert(illustrateCenter.style.width);
}
}

// Dean Edwards/Matthias Miller/John Resig

function init() {
    // выходим, если функция уже выполнялась
    if (arguments.callee.done) return;

    // устанавливаем флаг, чтобы функция не исполнялась дважды
    arguments.callee.done = true;

    // что-нибудь делаем
	setIllustration();
};

/* для Mozilla/Firefox/Opera 9 */
if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", init, false);
}

/* для Internet Explorer */
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=\"__ie_onload\" defer=\"defer\" src=\"javascript:void(0)\"><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
    if (this.readyState == "complete") {
	init(); // вызываем обработчик для onload
    }
};
/*@end @*/

/* для Safari */
if (/WebKit/i.test(navigator.userAgent)) { // условие для Safari
    var _timer = setInterval(function() {
	if (/loaded|complete/.test(document.readyState)) {
	    clearInterval(_timer);
	    init(); // вызываем обработчик для onload
	}
    }, 10);
}

/* для остальных браузеров */
window.onload = init;
window.onresize = setIllustration;