var oldDisplay=[];
var loadedlink=0;
function hideobject(object_name) {
	if (document.getElementById(object_name)) {
		oldDisplay[object_name]=document.getElementById(object_name).style.display;
		document.getElementById(object_name).style.display='none';
	}
}

function showobject(object_name) {
	if (document.getElementById(object_name)) {
		if (!oldDisplay[object_name])
			oldDisplay[object_name]='inline';
		document.getElementById(object_name).style.display=oldDisplay[object_name];
	}
}

function sm(link,id) {
	if (link!=loadedlink) {
		$(".menuover").addClass('menuhalf');
		$("#contentcell").load(link+'&loadpage','',function() {
			$(".smg").removeClass('menuover');
			$(".smg").removeClass('menuhalf');$("#sml"+id).addClass('menuover')
			pageTracker._trackPageview("/atlas/"+link);
		} );
		
	}
	loadedlink=link;
}
function checkHeight() {
	var right_h=$("#sisu").height();
	var left_h=$("#sidemenu-inner").height();
	if (left_h<150)
		left_h=150;
	if (right_h<left_h) {
		//alert('suurem');
		$("#sisu").height(left_h);
	}
}
function openCorner() {
	$("#peelcontainer").css("width","780px");
	$("#peelcorner").css("marginLeft","0px");
}
function closeCorner() {
	$("#peelcontainer").css("width","122px");
	$("#peelcorner").css("marginLeft","-658px");
}
function checkHeightModule() {
	if ($("#module_inner").height()<200)
	$("#module_inner").height(200);
}
function isDropdown() {
	if ($("#elementtype").val()=='Rippvalik')
		$(".enterOptions").show();
	else
		$(".enterOptions").hide();
}
