// JavaScript Document
var move_flag = false;
function headerOpenClose(comm, msie6){
	var h = (msie6 == 6) ? 225 : 425;
	
	//$('#contentShadowDiv').fadeOut(500, function(){
		switch(comm){
			case "open":
				if(msie6==6){
					$("#top_block").show();
				}
				$("#btnServise").attr("src", theme_path+"/images/btn.png").parent().animate({"height": 200}, 1000, function(){
					/*
					if(move_flag == false){
						//move_flag = true;
						setShadows(shadowFlag);
					}
					*/
					if(msie6==6){
						$("#header2Div").css("height", "225px");
					}
				});
				/*
				if(move_flag){				  
					$("#contentDiv").animate({"height": $("#contentDiv").height()-255}, 1000, function(){
						setShadows(shadowFlag);
					});
				}
				*/
				break;
			case "close":
					if(msie6==6){
						$("#header2Div").css("height", "425px");
					}
				$("#btnServise").attr("src", theme_path+"/images/btn.gif").parent().animate({"height": 70}, 1000, function(){
					/*
					if(move_flag == false){
						//move_flag = true;
						setShadows(shadowFlag);
					}
					*/
					if(msie6==6){
						$("#header2Div").css("height", "70px");
						$("#top_block").hide();
					}
				});
				/*
				if(move_flag){				  
					$("#contentDiv").animate({"height": $("#contentDiv").height()+255}, 1000, function(){
						setShadows(shadowFlag);
					});
				}
				*/
				break;
		}
	//});
}

function listSlider(pm, h){
	var old_h = $("#header2Div").height();
	switch(pm){
		case "p":
			$("#header2Div").animate({"height": old_h + (h)}, 1000);
			break;
		case "m":
			$("#header2Div").animate({"height": old_h - (h)}, 1000);
			break;
	}
}

function setShadows(sFlag){
	if(sFlag){
		//var mainDivH = $("#mainDiv").height();
		//var footerDivH = $("#footerDiv").height();
		//var footerMenuH = $("#footerMenu").height();
		//$('#contentShadowDiv').css({position:'absolute', zIndex:'10', top:(mainDivH-footerDivH-footerMenuH-27)}).fadeIn(1000);
	}else{
		//$('#contentShadowDiv').hide();
	}
}

