function getBrowserInfo(){var t,v = undefined;if(window.opera) t='Opera';else if(document.all){t = 'IE';var nv = navigator.appVersion;var s = nv.indexOf('MSIE')+5;v = nv.substring(s,s+1);}else if(navigator.appName) t='Netscape';return {type:t,version:v};}
function bookmark(a){var url=window.document.location;var title=window.document.title;var b=getBrowserInfo();if (b.type=='IE' && 7>b.version && b.version>=4) window.external.AddFavorite(url,title); else if (b.type=='Opera') {a.href=url;a.rel="sidebar";a.title=url+','+title;return true;}else if(b.type=="Netscape") window.sidebar.addPanel(title,url,"");else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");return false;}
function setCookie (name, value, expires, path, domain, secure) {document.cookie=name+"="+escape(value)+((expires) ? "; expires=" + expires : "")+((path) ? "; path=" + path : "") +((domain) ? "; domain=" + domain : "")+((secure) ? "; secure" : "");}
function showImage(title,image_src,width,height){var top = Math.floor((screen.height-height)/2);var left = Math.floor((screen.width-width)/2); params = "top="+top+",left="+left+",width="+width+",height="+height+",status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no";popupWin = window.open("","popupWin",params);popupWin.focus();popupWin.document.open();popupWin.document.write("<html><head><title>"+title+"</title></head>");popupWin.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");popupWin.document.write("<img src='"+image_src+"' border='0' name=si></body></html>");popupWin.document.close();}
function doSomething() {
	if(document.body.clientWidth>1100) 
		$(".artnotice").addClass('half'); 
	else	
		$(".artnotice").removeClass('half'); 
	/*if(document.body.clientWidth<1260) 
		$(".adnewsblock").css('width','520px'); 
	else	
		$(".adnewsblock").css('width','780px'); */
	}
$(document).ready(function(){
	doSomething();
	var resizeTimer = null;
	$(window).bind('resize', function() {
		if (resizeTimer) clearTimeout(resizeTimer);
		resizeTimer = setTimeout(doSomething, 100);
		});
	});
