$(document).ready(function(){
	$(window).scroll(function(){
	var top1=parseInt(document.body.scrollTop)?	parseInt(document.body.scrollTop):parseInt(document.documentElement.scrollTop);				  
		var top=top1+210;
		$("#divQQClose").css("top",top+300+"px");
		$("#divQQ").css("top",top+"px");
	});
	
	$("#bigtosmall").click(function(){
		$("#divQQ").animate({right:0,width:0},500,function(){
			$("#divQQ").hide();
			$("#divQQClose").show();
		 });
	});
	
	$("#smalltobig").click(function(){
	   $("#divQQClose").hide();
	   $("#divQQ").show();
	   $("#divQQ").animate({right:5,width:110},500);
	});
	
	
});

function stop(){
return false;
}
document.oncontextmenu=stop;
//加入收藏夹方法
 function addBookmark() {
                     var url=parent.location.href;
					 var title=document.title;
                     if (window.sidebar) {
                            window.sidebar.addPanel(title, url,"");
                     } else if( document.all ) {
                     window.external.AddFavorite( url, title);
                     } else if( window.opera && window.print ) {
                     return true;
                     }
       }
 var flag=false; 
function DrawImage(ImgD,width,height)
{ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0)
 { 
  flag=true; 
  if(image.width/image.height>= 1)
  { 
   if(image.width>width)
   {
    ImgD.width=width; 
    ImgD.height=(image.height*width)/image.width; 
   }
   else
   { 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt="点击查看大图片"; 
  } 
  else{ 
   if(image.height>height)
   {
    ImgD.height=height; 
    ImgD.width=(image.width*height)/image.height; 
   }
   else
   { 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt="点击查看大图片"; 
  } 
 }
}

