
// JavaScript

function chimg(filename,target){
	document.images[target].src = filename;
}

function preloadimg(){
	var ploadimg;
	var preimages;
	preimages = new Array();
	ploadimg = new Array();
	for(i = 0; i < preimages.length; i++){
		ploadimg[i] = new Image();
		ploadimg[i].src =  preimages[i];
	}
}


// Acquire Display Size
var screen_width = screen.width;
var screen_height = screen.height;

//
var taskbarHeight = 30;

// 
function popupWindow( uri, windowName, popupWidth, popupHeight, needScroll )
{
	//
	scrollbar = (!needScroll) ? needScroll = "no" : needScroll = "yes";

	//
	leftPosition = ( screen_width - popupWidth ) / 2;
	topPosition = ( screen_height - popupHeight) / 2;
	topPosition = topPosition - taskbarHeight;

	window.open( 
					uri,
					windowName,
					'toolbar=no,'+
					'location=no,'+
					'directories=no,'+
					'statu=no,'+
					'menubar=no,'+
					'scrollbars='+ scrollbar +','+
					'resizable=no,'+
					'width='+ popupWidth +','+
					'height='+ popupHeight +','+
					'fullscreen=no,'+
					'left='+ leftPosition +','+
					'top='+ topPosition
				);
}
