if (document.images) {
   IS = new Array (
      "lh.png", "desc-tl.png", "desc-tr.png", "desc-bl.png", "desc-br.png", "desc-t.png", "desc-b.png", "desc-l.png", "desc-r.png"
   );
   IL = new Array ();
   for (i in IS) {
      IL[i] = new Image ();
      IL[i].src = "/i/" + IS[i];
   }
}

function lOn() {
  $('#logo').css('background-image','url(/i/lh.png)');
}

function lOff() {
  $('#logo').css('background-image','none');
}

function tdOn(t) {
  $('#t'+t+' td:not(.mm)').css('background-image','url(/i/04.png)');
  $('#t'+t+' td.mm a.no').css('color','#000');
}

function tdOff(t) {
  $('#t'+t+' td:not(.mm)').css('background-image','url(/i/03.png)');
  $('#t'+t+' td.mm a.no').css('color','#555');
}

function note(n) {
  if ($('#yn'+n).is(':hidden')) {
    if ($.browser.msie) {
      $('#yn'+n+', #yn'+n+' .cd, #yn'+n+' .ct').show();
    } else {
      $('#yn'+n+' .cd, #yn'+n+' .ct').show();
      $('#yn'+n).fadeIn("fast");
    }
  } else {
    if ($.browser.msie) {
      $('#yn'+n+', #yn'+n+' .cd, #yn'+n+' .ct').hide();
    } else {
      $('#yn'+n).fadeOut("fast");
    }
  }
}

$(document).ready(function(){
	$(window).resize( function() { resize_incb(); } );
	resize_incb();
	$('#fulldesc-back, [label=close]').click(function(){
		descHide();
	});
});

function resize_incb() {
	$('#fulldesc-back').css({top: '0', left: '0', height: document.body.scrollHeight+'px', width: document.body.scrollWidth+'px'});
}

function descShow(n) {
	if ($.browser.msie) {
		$('#fulldesc-back').show();
	} else {
		$('#fulldesc-back').fadeIn("fast");
	}
	$('#fulldesc'+n).css({top: parseInt(document.body.scrollTop)+100}).fadeIn("fast");
}

function descHide() {
	$('.fulldesc:visible').fadeOut("fast");
	if ($.browser.msie) {
		$('#fulldesc-back').hide();
	} else {
		$('#fulldesc-back').fadeOut("fast");
	}
}
function resize_gray() {
	$("td.i").each(function(i){ $(this).find("table.gray").css({height: $(this).height()}).find("td.mm").css({height: "100%"}); });
}

