// document.oncontextmenu=new Function("event.returnValue=false;"); 
//防止使用右鍵，連 Firefox 都不行
function clickIE4(){
 if (event.button==2)
 {
 	return false;
 }//end if
}//end func 
function clickNS4(e){
 if (document.layers||document.getElementById&&!document.all){
 	if (e.which==2||e.which==3){
 		return false;
 	}//end if
 }//end if
}//end 
function OnDeny(){
	if(event.ctrlKey||event.keyCode==78&&event.ctrlKey||event.altKey||event.altKey && event.keyCode==115){
	
		return false;
	}//end if
}
if (document.layers){
 document.captureEvents(Event.MOUSEDOWN);
 document.onmousedown=clickNS4;
 document.onkeydown=OnDeny();
}else if (document.all&&!document.getElementById){
 document.onmousedown=clickIE4;
 document.onkeydown=OnDeny();
}//end if
document.oncontextmenu=new Function("return false");
//document.onmousemove=new Function("event.returnValue=false;"); 
document.onmousemove=new Function("return false;"); 

function resizeCover( img , ida) {
  ida.style.width = img.width;
  ida.style.height = img.height;
}

//function init(){
	//變數myLogo為一圖片，並設定src為版權字樣圖片路徑
	//var myLogo = new Image();
//	myLogo.src = "";
	//變數myBack為一圖片，並設定src為1x1透明圖路徑
	//var myBack = new Image();
	//myBack.src = "/blog/images/Transparent.gif";
	//變數allPic用來儲存網頁中所有圖片的數量
	//var allPic = document.images.length;
	//for(var i=0;i<allPic;i++){
		//判斷圖片中的ispic屬性值是否為true
		//if(document.images[i].ispic){
			//變數logoTop為myLogo的top值 = 要偽裝圖片的offsetTop+(要偽裝圖片的高-版權字樣圖片的高)
				//var logoTop = document.images[i].offsetTop + (document.images[i].height- myLogo.height);
			//變數logoTop為myLogo的left值 = 要偽裝圖片的offsetLeft+(要偽裝圖片的寬-版權字樣圖片的寬)
			//var logoLeft = document.images[i].offsetLeft + (document.images[i].width- myLogo.width);
			//變數backWidth為myBack的寬 = 要偽裝圖片的寬
			//var backWidth = document.images[i].width;
			//變數backWidth為myBack的高 = 要偽裝圖片的高
			//var backHeight = document.images[i].height;
			//變數backWidth為myBack的top值 = 要偽裝圖片的top值
			//var backTop = document.images[i].offsetTop;
			//變數backWidth為myBack的left值 = 要偽裝圖片的left值
			//var backLeft = document.images[i].offsetLeft;
			//把myLogo加到網頁中，並設定其位置
			//document.body.appendChild(document.createElement("<img src='"+myLogo.src+"' style='position:absolute;top:"+logoTop+";left:"+logoLeft+";'>"));
			//把myback加到網頁中，並設定其位置
			//document.body.appendChild(document.createElement("<img src='"+myBack.src+"' border=2 style='position:absolute;width:"+backWidth+";height:"+backHeight+";top:"+backTop+";left:"+backLeft+";'>"));
		//}
//	}
//}
//Body載入完後執行init()函式
//document.body.onload = init;