
var flag=false; 
function DrawImage(ImgD,awidth,aheight){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= awidth/aheight){ 
   if(image.width>awidth){
    ImgD.width=awidth; 
    ImgD.height=(image.height*aheight)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   }
   /*ImgD.alt="bigpic"  */
  } 
  else{ 
   if(image.height>aheight){
    ImgD.height=aheight; 
    ImgD.width=(image.width*awidth)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
    /*ImgD.alt="bigpic"  */ 
  } 
}
}

function key(){ 
if(event.shiftKey){
window.close();}
//ֹshift
if(event.altKey){
window.close();}
//ֹalt
if(event.ctrlKey){
window.close();}
//ֹctrl
return false;}
//document.onkeydown=key;
if (window.Event)
document.captureEvents(Event.MOUSEUP);
//swordmaple javascript article.
//from www.jx165.com
function nocontextmenu(){
event.cancelBubble = true
event.returnValue = false;
return false;}
function norightclick(e){
if (window.Event){
if (e.which == 2 || e.which == 3)
return false;}
else
if (event.button == 2 || event.button == 3){
event.cancelBubble = true
event.returnValue = false;
return false;}
}
//ֹҼ
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
//--

//Disable select-text script (IE4+, NS6+)- By Small
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
							
