function resexpPane() {
	var h = $(window).height();
	$("#sc_expPane").css("height", h - 170 + "px");
}
function resPla() {
	var w = $(window).width();
	var tot = $(window).width() - 248;
	var a = Math.floor((tot / 100) * 60);
	var b = Math.floor((tot / 100) * 40);
	$("#scroll_panel").css("width", a + "px");
	$("#scroll_panel_l").css("width", b + "px");
	var pw = b;
	var ph = Math.floor((pw / 100) * 75);
	$("#embpla").css("width",  pw + "px");
	$("#embpla").css("height",  ph + "px");
}
$(document).ready(function(){
	$("#sc_expPane").mouseover(function(e){
		$("#sc_expPane").addClass("sc_scrl");
	});
	$("#sc_expPane").mouseout(function(e){
		$("#sc_expPane").removeClass("sc_scrl");
	});
	$("#htype").click(function(e){
		if ($("#dtype").hasClass("sb_to")) {
			$("#dtype").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#dtype").removeClass("sb_tc").addClass("sb_to");
		}
	});
	$("#horder").click(function(e){
		if ($("#dorder").hasClass("sb_to")) {
			$("#dorder").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#dorder").removeClass("sb_tc").addClass("sb_to");
		}
	});
	$("#hwhen").click(function(e){
		if ($("#dwhen").hasClass("sb_to")) {
			$("#dwhen").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#dwhen").removeClass("sb_tc").addClass("sb_to");
		}
	});
	resexpPane();
	$(window).resize(resexpPane);
});