
function copyrightAlert() {
  if(copyrightAlertMsg) alert(copyrightAlertMsg); 
  return false;
}
var copyrightAlertMsg = "Copyright© Changuk Sohn. All rights reserved.\n\nTel : 1.613.583.5808";

//function click() {
//  if ((event.button==2) || (event.button==3)) {
//     alert('Copyright© Changuk Sohn. All rights reserved.\n\nTel : 1.613.583.5808');
//  }
//}
//document.onmousedown=click;

<!-- hide this script from old browsers

// This script opens a new browser window and writes
// HTML to display an image with a title and caption

function show_photo( pFileName, pTitle, pCaption) {

// specify window parameters
  photoWin = window.open( "", "photo", "width=600,height=450,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");

// wrote content to window
  photoWin.document.write('<html><head><title>' + pTitle + '</title></head>');	
  photoWin.document.write('<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor=#ffffff>');
  photoWin.document.write('<center>');
  photoWin.document.write(pCaption + '<br>');
  photoWin.document.write('<img src="' + pFileName + '">');
  photoWin.document.write('</body></html>');
  photoWin.document.close();	
	
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();
}
// done hiding from old browsers -->


var Init;
var H;
var W;
var tmpH;
var tmpW;
var Opacity = 100;
var GrayScale = 0;
var FH = 0;
var FV = 0;
var Inverse = 0;
var Command;

function closeWindows() {
	var message = 'test';
        var bool = window.confirm(message); 
        if (bool) { 
                location.href="http://www.nbhs.net/";
        } else {
                self.close();
        }
}

function warning_open()
{
     window.open('./warning.phtml','warning','width=550,height=480,resizable=no,scrollbars=no'); 
}
function action()
{
	Command = 'alpha(opacity=100, style=3, finishopacity=' + Opacity +') ';
	Command += (GrayScale == 1 ? 'gray ':'');
	Command += (FH == 1 ? 'FlipH ' : '');
	Command += (FV == 1 ? 'FlipV ' : '');
	Command += (Inverse == 1 ? 'Invert' : '');
	return Command;
}

function clearEffect()
{	
	Opacity = 100;
	GrayScale = 0;
	FH = 0;
	FV = 0;
	Inverse = 0;
	Command = "";	
	imgObj.style.filter = action();
	reSize(100);
}

function imgblur()
{
	imgObj.className = "blurDefault";
}	

function imgtrans()
{
	imgObj.className = "blendTransDefault";
}	

function increaseOpacity()
{	
	if (Opacity >= 100) Opacity = 100;
	else Opacity += 10;
	imgObj.style.filter = action();
}

function decreaseOpacity()
{	
	if (Opacity <= 0) Opacity = 0;
	else Opacity -= 10;	
	imgObj.style.filter = action();

}

function gray()
{
	if (GrayScale == 1) GrayScale = 0;
	else GrayScale = 1;
	imgObj.style.filter = action();	
}

function vertical()
{
	if (FV == 1) FV = 0;
	else FV = 1;
	imgObj.style.filter = action();	
}

function horizontal()
{
	if (FH == 1) FH = 0;
	else FH = 1;
	imgObj.style.filter = action();	
}


function invert()
{
	if (Inverse == 1) Inverse = 0;
	else Inverse = 1;
	imgObj.style.filter = action();	
}

function getSize()
{
	W = document.imgObj.width;
	H = document.imgObj.height;
	document.imgObj.width = W / 2;
	document.imgObj.height = H / 2;
}

function initialize()
{
	if (Init != 1)
	{
		W = document.imgObj.width;
		H = document.imgObj.height;
		tmpW = W;
		tmpH = H;
		Init = 1;
	}
	
}
	
function reSize(num)
{
	initialize();
	if (num > 0)
	{
		tmpW = W * (num / 100);	
		tmpH = H * (num / 100);
	}
	else if (num == -1)
	{
		if (tmpW > 0 && tmpH >0)
		{
			tmpW += tmpW * 0.1;
			tmpH += tmpH * 0.1;
		}	
			
	}
	
	else if (num == -2)
	{
		if (tmpW > 0 && tmpH >0)
		{
			tmpW -= tmpW * 0.1;
			tmpH -= tmpH * 0.1;
		}	
	}
	else
	{
		//don't excute
	}
	
	document.imgObj.width = tmpW;
	document.imgObj.height = tmpH;
}
