//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

///////////////////////////////////////////////////////////////

function popImage(imageURL) {

var imageTitle = document.title;

// Set the horizontal and vertical position for the popup
PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth  = 500;
defaultHeight = 500;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}

var optNN='resizable=yes,scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='resizable=yes,scrollbars=yes,width=150,height=100,left='+PositionX+',top='+PositionY;

//if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
else { imgWin=window.open('about:blank','',optNN);
	}
with (imgWin.document){
writeln('<html><head>');
writeln('<title>Loading...</title><style>body{margin:0px;}</style>');
//writeln('<s' + 'cript language="JavaScript" type="text/Ja' + 'vaScript" src="/anticopy.js"></' + 'script>');
writeln('<s' + 'cript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width)+20;');
writeln('height=100-(document.body.clientHeight-document.images[0].height)+40;');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');     
writeln('window.innerWidth=document.images["Amber"].width+20;');
writeln('window.innerHeight=document.images["Amber"].height+40;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('<' + '/script>');
writeln('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
writeln('</head><body bgcolor="white" onload="reSizeToImage();doTitle();self.focus()">')
writeln('<div align="center"><img name="Amber" src='+imageURL+' style="display:block"></div>');
writeln('<p align="center" style="font-size:11pt;"><a href="javascript:window.close();">'+'關閉視窗'+'</a></p>');
writeln('</'+'body></'+'html>');
close();		
}
}