	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('網路異常')}});
	 
	 	}
	 }
	