//图片变换颜色========================
function picover(obj){
   obj.style.filter="";
}
function picout(obj){
   obj.style.filter="gray";
}
//结束================================

function alertmsg(msg){
    alert("系统提醒您^_^ \n\n"+msg+"");
}

function checkgoto(str){
   if (document.all.page.value==""){
      alertmsg("请输入页码!");
	  document.all.page.focus();
	  return(false);
   }
   if (isNaN(document.all.page.value)){
      alertmsg("页码只能是数值!");
	  document.all.page.value="";
	  document.all.page.focus();
	  return(false);
   }
}

function openpage(url,width,height){
    left=(screen.width-width)/2;
	top2=(screen.height-height)/2-30;
    window.open(url,"","scrollbars=yes,left="+left+",top="+top2+",height="+height+",width="+width);
}


function swf(name,width,height,transparent){
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'>");
    document.write("<param name='movie' value='"+name+"'>");
    document.write("<param name='quality' value='high'>");
    document.write("<param name='menu' value='false'>");
    if(transparent==1) document.write("<param name='wmode' value='transparent'>");
    document.write("<embed src='"+name+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed>");
    document.write("</object>");
}

function DrawImage(ImgD,w,h){
   xwidth=w;
   xheight=h;
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= xwidth/xheight){
     if(image.width>xwidth){  
     ImgD.width=xwidth;
     ImgD.height=(image.height*xwidth)/image.width;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    else{
     if(image.height>xheight){  
     ImgD.height=xheight;
     ImgD.width=(image.width*xheight)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    }
}