function pdfDoc(){
pdfSelect = document.pdfForm.pdfMenu.selectedIndex;
window.open(document.pdfForm.pdfMenu.options[pdfSelect].value);
}

function procDoc(){
prdocSelect = document.prdocForm.prdocMenu.selectedIndex;
location=(document.prdocForm.prdocMenu.options[prdocSelect].value);
}


this.randomtip = function(){
	var length = $("#mainvisual li").length;
	var ran = Math.floor(Math.random()*length) + 1;
	$("#mainvisual li:nth-child(" + ran + ")").show();
};

$(document).ready(function(){	
	randomtip();
});


function showthis(obj) {
   if(!obj) return false;
   if(document.getElementById) {
		document.getElementById("tel1").style.display = "none";
		document.getElementById("tel2").style.display = "none";
		document.getElementById("tel3").style.display = "none";
		document.getElementById(obj).style.display = "block";
   } else {
      return false;
   }
}
function showthiss(obj) {
   if(!obj) return false;
   if(document.getElementById) {
		document.getElementById("tel1s").style.display = "none";
		document.getElementById("tel2s").style.display = "none";
		document.getElementById("tel3s").style.display = "none";
		document.getElementById(obj).style.display = "block";
   } else {
      return false;
   }
}



$(function() {
	/** FLYOUT MENU FOR IE 6 (suckerfish technique) **/
	$("#flyout.ie6 #main-nav > li").hover(function() {
		$(this).addClass("sfhover");
	}, function() {
		$(this).removeClass("sfhover");
	});

	/** INFORMATION LAYER FOR IE 6 & 7 **/
	$(".ie6 .info-layer, .ie7 .info-layer").hover(function() {
		// alternative solution because there can be overlay bugs (especially near forms)
		var pos = $(this).offset();
		$(".info-layer-container", this).clone().addClass("cloned").appendTo("body").css({
			left: pos.left + 24,
			top: pos.top
		});
	}, function() {
		$(".info-layer-container.cloned").remove();
	});

	/** SOME MODIFICATIONS FOR iOS **/
	if (navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod') {
		// no fixed height for news module (because it won't be scrollable)
		$(".module-news ul").css("height", "auto");
		// no fixed position for bottom links (because they will not be positioned as wanted)
		$("#bottom-links").css("position", "static");
	}

	/** FLAPS **/
	$(".flap").each(function() {
		$(this).not(".flap-open").find(".flap-body", this).hide();
		$(".flap-header", this).css("cursor", "pointer").click(function() {
			var flap$ = $(this).closest(".flap");
			if ($(".flap-body", flap$).is(":visible")) {
				flap$.removeClass("flap-open").find(".flap-body").slideUp();
			} else {
				flap$.addClass("flap-open").find(".flap-body").slideDown();
			}
			return false;
}).mouseover(function(){
		$(this).addClass("over");
	}).mouseout(function(){
		$(this).removeClass("over");	
			
		});
	});

});

function load_file(divName,fileURL) {
	$("#"+divName).load(fileURL);
}

//fontsizeほか
document.write('<script type="text/javascript" src="/common/js/jquery.cookie.js"></script>');
document.write('<script type="text/javascript" src="/common/js/sizechange.js"></script>');


//table
$(document).ready(function(){
  $("table").each(function(){
    jQuery(this).find("tr:odd").addClass("odd");
  });
});


$(function(){
$("#trlight").css("background","#fae053");
});

