$(function() {
	document.getElementById('frame').onload = resizeIframe;
	window.onresize = resizeIframe;
	
	$(".nav_line > a").click(function() {
		$(".nav_line a").removeClass("active");
		$(".nav_line a").addClass("inactive");
		$(this).addClass("active");
		$(this).removeClass("inactive");
		$("#drop").slideDown("slow");

		id1 = this.id;
		id2 = id1.replace("link_","sec_");
		$(".sec").hide();
		$("#"+id2).show();
		$("#line").hide("slow");
		return false;
	})
	
	$("#drop a").click(function() {
		$("#drop").slideUp("slow");
		$("#line").show("slow");
	})
	
	$("#close_bar").click(function() {
		$("#page").hide("fast");
		if (ie) {
			var height = document.getElementById("body").clientHeight;
		} else {
			var height = document.documentElement.clientHeight;
		}
		document.getElementById('frame').style.height = height+"px"; 
	})
})

function resizeIframe() {
	if (ie) {
		var height = document.getElementById("body").clientHeight;
	} else {
	    var height = document.documentElement.clientHeight;
	}
    height -= document.getElementById('frame').offsetTop;
    document.getElementById('frame').style.height = height +"px"; 
};
