//点击查看更多
function showmorecontent(id){

	if($('#'+id).html()=='查看更多'){
		$('#'+id).html('收缩');
		$('#course_cont').css('overflow','auto');
		
	}else{
		$('#'+id).html('查看更多');
		$('#course_cont').scrollTop(0);
		$('#course_cont').css('overflow','');
		
	}
}

//顶踩
function support(type,id){
	var gourl = "support.php?action=down&type="+type+'&id='+id;
	$.ajax({
	   type: "POST",
	   url: gourl,
	   data: "",
	   success: function(msg){
		   if(msg==1){
			   $('#'+type).html(($('#'+type).html()*1)+1);
				alert('操作成功,感谢您的参与!');
			}else{
				alert('操作失败,请重试');
			}
	   }
	}); 	
}

function SetIframe(iframe){

	var height = $(  window.frames[$("#"+iframe).attr('name')].document.body  ).height();
	if( height < $("#"+iframe).attr('height') ){
		$("#"+iframe).attr('height',$("#"+iframe).attr('height')  );
	}else{
		$("#"+iframe).attr('height',height+30 );

	}
}
