	var FFextraHeight = 0;
	if(window.navigator.userAgent.indexOf("Firefox")>=1)
	{
	 FFextraHeight = 16;
	}
	function ReSizeiFrame(iframe)
	{
		 if(iframe && !window.opera)
		 {
			  iframe.style.display = "block";
				  if(iframe.contentDocument && iframe.contentDocument.body.offsetHeight)
				  {
				 
				    iframe.height = iframe.contentDocument.body.offsetHeight + FFextraHeight;
				    
				  }
				  else if (iframe.Document && iframe.Document.body.scrollHeight)
				  {
				
				    iframe.height = iframe.Document.body.scrollHeight;
				    
				  }
		 }
	}
 
	function favor(docId){
	if(confirm('是否添加到收藏夹?')){
		var url='/myfavorite.do';
	   	var paras='method=addMyFavorites&docId='+docId;
		new Ajax.Request(url,{method:'post',parameters:paras,onSuccess:function(request){
				var msg=request.responseText;
				if(msg==-1){
					alert("对不起您还没有登录尊贵客户，请登录后再使用此功能");
					window.top.location='/index/login.jsp';
				}else
					alert(msg);
		
		},onFailure:function(){alert('网络异常')}});
	 
	 	}
	 }
	
