
function mail(name, domain, style) {
  document.write('<a h'+'ref="'+'mai'+ 'lto:'+name+'@'+domain+'" style="'+style+'">'+name+'@'+domain+'</a>');
}
function mail_img(name, domain, src, width, Height) {
  document.write('<a h'+'ref="'+'mai'+ 'lto:'+name+'@'+domain+'"><img src="'+src+'" height="'+Height+'" width="'+width+'" alt="'+name+'@'+domain+'" /></a>');
}


$(document).ready(function(){
	$.ImageBox.init(
		{
			loaderSRC: '/images/pl/imagebox/loader.gif',
			closeHTML: 'Закрыть',
			textImage			: 'Фотография',
			textImageFrom		: 'из'
		}
	);


	$('.nicefont').sifr({path: '../../images/pl/_swf/', font: 'dolores_cyrillic_regular'});


	function sld(s_header,s_block) {
	$(s_block).hide();
    $(s_header).click(function () {
     if ($(s_block).is(":hidden")) {
        $(s_block).show("slow");
        $(s_header).text('Свернуть параграф');
		
      } else {
        $(s_block).slideUp();
		$(s_header).text('Развернуть параграф');
      }
    });
  }
	sld("a.show_room","div.div_room");
	sld("a.show_room2","div.div_room2");
	sld("a.show_room3","div.div_room3");
	sld("a.show_room4","div.div_room4");
	sld("a.show_room5","div.div_room5");
	
	$('div.selector').children('a').click(function() {
		var path = $(this).attr('href');
		$('div.bigborder').children('img').attr('src',path);
		$('.act').removeClass('act');
		$(this).addClass('act');
		return false;
	});
	
	

		$("#have_order").validate();

});



function obj(id)
{
	if( document.getElementById(id) )
	   return document.getElementById(id);
	else
	   return false;
}

function goo(id)
{
	 if(document.getElementById('training'))
	 {
		 var gg = document.getElementById('training');
		 gg = gg.getElementsByTagName('div');
		 for (i = 0; i < gg.length; i++) 
		 {
			 if(gg[i].className=='sleep')
			 {
				 gg[i].style.display="none";
				 if(gg[i].id == id)
					gg[i].style.display="block";
			 }
		 }
		 if(document.getElementById('b_'+id))
	 	 {
			 var bb = document.getElementById('buttons');
			 bb = bb.getElementsByTagName('div');
			 for (i = 0; i < bb.length; i++) 
			 {
				 bb[i].className="";
				 if(bb[i].id == 'b_'+id)
					bb[i].className="act";
			 }
		 }
		 document.body.focus();
	 }
}



