var glImg = "";
		var glImgId;
		var preloadFlag = false;
		
		function newImage(arg) {
			if (document.images) {
				rslt = new Image();
				rslt.src = arg;
				return rslt;
			}
		}
		
		function changeImages() {
			if (document.images && (preloadFlag == true)) {
				for (var i=0; i<changeImages.arguments.length; i+=2) {
				//alert(document[changeImages.arguments[i]].name + "# " + glImgId);
					if (glImgId) {
						if (document[changeImages.arguments[i]].name != glImgId.name) document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
					} else  {
						document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
					}
				}
			}
		}
		
		function setGlobal(id,img) {
			if (glImgId && glImgId != id) glImgId.src = glImg;
			glImg = img;
			glImgId = id;
		}


function pop(title, width, height, filename)
{
	thefile=filename;
	var w = 620, h = 620;

	if (document.all || document.layers) {
	w = screen.availWidth;
	h = screen.availHeight;
	}

	var leftPos = (w-width)/2, topPos = (h-height)/2;
	
	popbox=window.open(thefile,title,"toolbar=no,scrollbars=no,resizable=no,directories=no,menubar=no,width="+width+",height="+height+",top=" + topPos + ",left=" + leftPos);
	if(popbox !=null)
	{
		if (popbox.opener==null)
		{
			popbox.opener=self;
		}
	}
}

function pop_mit(title, width, height, filename)
{
	thefile=filename;
	var w = 620, h = 660;

	if (document.all || document.layers) {
	w = screen.availWidth;
	h = screen.availHeight;
	}

	var leftPos = (w-width)/2, topPos = (h-height)/2;
	
	popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,status=yes,resizable=yes,directories=no,menubar=no,width="+width+",height="+height+",top=" + topPos + ",left=" + leftPos);
	if(popbox !=null)
	{
		if (popbox.opener==null)
		{
			popbox.opener=self;
		}
	}
}


function escclose() {
	if (event.keyCode == 27) {
	self.close()
	}
}




