﻿var map1active = false;
function ShowYaMap1()
{
		$('#YMapsID').toggle();
		if (!map1active)
		{
	        var map = new YMaps.Map(document.getElementById("YMapsID"));
		    map.setCenter(new YMaps.GeoPoint(37.41167,55.838415), 15, YMaps.MapType.MAP);
			map.addControl(new YMaps.Zoom());
	        map.addControl(new YMaps.ToolBar());
		    map.addControl(new YMaps.TypeControl());        

			var placemark1 = new YMaps.Placemark(new YMaps.GeoPoint(37.408489,55.836554), {style: "wizard#lbmPoint", balloonOptions: {maxWidth: 300}});
	        map.addOverlay(placemark1);
		    placemark1.setIconContent("ООО&nbsp;«КЦ&nbsp;Старопетровское»");
			placemark1.openBalloon('<div style="text-align:center"><b>ООО «КЦ&nbsp;Старопетровское»</b><br />Москва,&nbsp;ул.&nbsp;Василия&nbsp;Петушкова,&nbsp;д.&nbsp;8</div>');
		}
		map1active = true;

		return false;
}
var map2active = false;
function ShowYaMap2()
{
		$('#YMapsID2').toggle();
		if (!map2active)
		{
	        var map2 = new YMaps.Map(document.getElementById("YMapsID2"));
		    map2.setCenter(new YMaps.GeoPoint(37.583895,55.672021), 15, YMaps.MapType.MAP);
			map2.addControl(new YMaps.Zoom());
	        map2.addControl(new YMaps.ToolBar());
		    map2.addControl(new YMaps.TypeControl());        

			var placemark2 = new YMaps.Placemark(new YMaps.GeoPoint(37.583895,55.672021), {style: "wizard#lbmPoint", balloonOptions: {maxWidth: 400}});
	        map2.addOverlay(placemark2);
		    placemark2.setIconContent("ООО&nbsp;«КЦ&nbsp;Старопетровское»");
			placemark2.openBalloon('<div style="text-align:center"><b>ООО «КЦ&nbsp;Старопетровское»</b><br /><nobr>Экспострой&nbsp;на&nbsp;Нахимовском,&nbsp;Москва,&nbsp;Нахимовский&nbsp;пр-т,&nbsp;д.24,</nobr><br/>Павильон&nbsp;№3&nbsp;Сектор&nbsp;Б,&nbsp;1-й&nbsp;этаж,&nbsp;место&nbsp;№412</div>');
		}
		map2active = true;

		return false;
}

//jQuery.noConflict();

window.onload=documentLoaded;
function documentLoaded(){
    
}

/*
$(function() {
    $('.roundbox').rbox();
    $('.content a').linkExternal();
    $('.content a[title], .content abbr[title], .content acronym[title], .content dfn[title]').linkTooltip();
    $('.autoclear').autoClear();

    $('.content img').each(function(n, o){
    	var float = $(o).css('float');
    	if (float == 'left') { $(o).addClass('alignImageLeft'); }
    	else if (float == 'right') { $(o).addClass('alignImageRight'); }
    });

    $('.tooltip span')
    	.css('border-radius', '5px')	
    	.css('-moz-border-radius', '5px')	
    	.css('-webkit-border-radius', '5px');	
    
    $(document).formsWidthNormalize();
    if (isIE(6)) { $(document).pngFix(); }
	
$("a[href$=jpg]").live('click',function(){return hs.expand(this);});
$("a[href$=gif]").live('click',function(){return hs.expand(this);});
$("a[href$=png]").live('click',function(){return hs.expand(this);});
$("a[href$=jpeg]").live('click',function(){return hs.expand(this);});

$('.decore').find('tr td:first').addClass('first');
$('.decore').find('tr:first').addClass('first');

	$('.top_menu > .span').mouseenter(function(){
     sub=$(this).find('.sub_menu')
     if (sub.is('.sub_menu')){        

      $(this).addClass('hover');
      sub.css('left',$(this).position().left).slideDown('fast');
     }
	}).mouseleave(function(){
     sub=$(this).find('.sub_menu')
	   if (sub.is('.sub_menu')){

     $(this).removeClass('hover');
      sub.slideUp('fast');
     }
	});             
  
	$('div.special .aleft').click(function(){
		el=$('div.special .item:last');
		el.animate({left:'283'},500,function(){el.prependTo(el.parent()).css('left','0px')});
	});
	
	$('div.special .aright').click(function(){
		el=$('div.special .item:first');
		el.css('left','283px').appendTo(el.parent()).animate({left:'0'},500);
    
	});

});
*/
