if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	window.onload = fnLoadPngs;
}

function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt!=null && Number(rslt[1])>=5.0);
	var img = document.images;
	for (var i = img.length - 1; i>=0; i--) {
		if (itsAllGood && img[i].src.match(/\.png$/i)) {
			var src = img[i].src;
			img[i].style.width = img[i].width + "px";
			img[i].style.height = img[i].height + "px";
			img[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
			img[i].src = "images/1pix.gif";
		}
	}
}

	function blockUpdate()
	{
 	 var d = document;
	 d.getElementById('gallery_block_pre').style.width = (d.getElementById('slider_inn').offsetWidth - 20 ) + 'px';
	}
         
	var i=0;
	var scroll_break=1;

	function scroll_up(){
		if (i>=10)
			i=i-10;
		else if (i<10 && i>=0)
			i=0;
		document.getElementById('gallery_block_pre').scrollLeft=i;
		if (scroll_break)
			setTimeout('scroll_up();', 100);
		else
			scroll_break=1;
	}

	function scroll_down(){
		var scroll=document.getElementById('gallery_block_pre').scrollLeft;
		if ((i-5)<=scroll)
			i=i+10;
		else if ((i-5)>scroll)
			i=scroll;
		document.getElementById('gallery_block_pre').scrollLeft=i;
		if (scroll_break)
			setTimeout('scroll_down();', 100);
		else
			scroll_break=1;
	}

	function scroll_breaker(){
		scroll_break=0;
	}         
	
	function getElementPosition(elemId)
	{
	
		var elem = elemId;
		
		var w = elem.offsetWidth;
		var h = elem.offsetHeight;
		
		var l = 0;
		var t = 0;
		
		while (elem)
		{
			l += elem.offsetLeft;
			t += elem.offsetTop;
			elem = elem.offsetParent;
		}
	
		return {"left":l, "top":t, "width": w, "height":h};
	}
	
	function showSubMenu(id,cur_td)
	{
     if (document.getElementById('submenu_'+id)!=null)
	 {
	  var sel_a = getElementPosition(document.getElementById('cell_'+id));
	  document.getElementById('submenu_'+id).style.top = (sel_a.top + 26)+'px';
	  document.getElementById('submenu_'+id).style.left = (sel_a.left)+'px';
	  document.getElementById('submenu_'+id).style.display = 'block';
	 }
	 cur_td.className = 'item item_h';
	}
	
	function hideSubMenu(id,cur_td)
	{
     if (document.getElementById('submenu_'+id)!=null)
	 {
	  document.getElementById('submenu_'+id).style.display = 'none';
	 }
	 cur_td.className = 'item';
	}
	
	function photo600(path){
	hWnd = window.open("big_img.html", "gor", "menubar=0,resizable=0,status=0,tollbar=0,scrollbars=0,directories=0,location=0,alwaysLowered=0,width=600,height=450");

	hWnd.document.open();
	hWnd.document.writeln( "<html>" );
	hWnd.document.writeln( "<head><title>Холодная эстетика - Проекты</title>" );
	hWnd.document.writeln("</head>");
	hWnd.document.writeln("</head>");
	hWnd.document.writeln( "<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0'>" );
	hWnd.document.writeln( "<img src='objects/"+path+"_b.jpg' alt='' width='600' height='450' border='0'>" );
	hWnd.document.writeln( "</body>" );
	hWnd.document.writeln( "</html>" );
	hWnd.document.close();
	hWnd.focus();
        }
	
	function photo450(path){
	hWnd = window.open("big_img.html", "vert", "menubar=0,resizable=0,status=0,tollbar=0,scrollbars=0,width=450,height=600");

	hWnd.document.open();
	hWnd.document.writeln( "<html>" );
	hWnd.document.writeln( "<head><title>Холодная эстетика - Проекты</title>" );
	hWnd.document.writeln("</head>");
	hWnd.document.writeln( "<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0'> ");
	hWnd.document.writeln( "<img src='objects/"+path+"_b.jpg' alt='' width='450' height='600' border='0'>" );
	hWnd.document.writeln( "</body>" );
	hWnd.document.writeln( "</html>" );
	hWnd.document.close();
	hWnd.focus();
        }
	function photow(path, w, h){

hWnd = window.open("about:blank", "", "menubar=0,resizable=0,status=0,tollbar=0,scrollbars=0,width="+w+",height="+h+"");

hWnd.document.open();
hWnd.document.writeln( "<html>" );
hWnd.document.writeln( "<head><title>Холодная эстетика - Конструкции</title></head>" );
hWnd.document.writeln( "<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>" );
hWnd.document.writeln( "<img src='objects/"+path+"_b.jpg' alt='' width='"+w+"' height='"+h+"' border='0'>" );
hWnd.document.writeln( "</body>" );
hWnd.document.writeln( "</html>" );
hWnd.document.close();

       }
	   
	function photo(path, w, h){

hWnd = window.open("about:blank", "", "menubar=0,resizable=0,status=0,tollbar=0,scrollbars=0,width="+w+",height="+h+"");

hWnd.document.open();
hWnd.document.writeln( "<html>" );
hWnd.document.writeln( "<head><title>Холодная эстетика - Конструкции</title></head>" );
hWnd.document.writeln( "<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>" );
hWnd.document.writeln( "<img src='const/"+path+"_b.jpg' alt='' width='"+w+"' height='"+h+"' border='0'>" );
hWnd.document.writeln( "</body>" );
hWnd.document.writeln( "</html>" );
hWnd.document.close();

       }

	function map(){

hWnd = window.open("about:blank", "", "menubar=0,resizable=0,status=0,tollbar=0,scrollbars=0,width=809,height=591");

hWnd.document.open();
hWnd.document.writeln( "<html>" );
hWnd.document.writeln( "<head><title>Холодная эстетика - Схема проезда</title></head>" );
hWnd.document.writeln( "<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>" );
hWnd.document.writeln( "<img src='../images/map.gif' width='809' height='591'>" );
hWnd.document.writeln( "</body>" );
hWnd.document.writeln( "</html>" );
hWnd.document.close();

       }	  