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) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		img01_over = newImage("/images/shell/lnkCheckout-on.gif");
		img02_over = newImage("/images/shell/lnkBack-on.gif");
		img03_over = newImage("/images/shell/lnkForward-on.gif");		
		img04_over = newImage("/images/shell/lnkQuit-on.gif");
		img05_over = newImage("/images/shell/lnkShopCart-on.gif");				
		imgClose_over = newImage("/images/poopups/closeOn.gif");
		preloadFlag = true;
	}
}

/* javascript for popup window */
function popupWindow(url, title, popup_width,popup_height) 
{
  var screen_width=window.screen.width
  var screen_height=window.screen.height
  var leftCoord=Math.round((screen_width-popup_width)/2);
  var topCoord=Math.round((screen_height-popup_height)/2);     
  
  if( screen.width == 800 && screen.height == 600 ) 
  {
  	topCoord = 0;
	leftCoord = 0;
  }

  popupWin = window.open(url, title, 'location=no,width='+popup_width+',height='+popup_height+',scrollbars=yes,toolbar=no,status=no,top=' + topCoord + ', left=' + leftCoord + ',screenx=' + leftCoord + ',screeny=' + topCoord + ',resizable=yes');
  popupWin.focus();
}//end function windowOpener


/* javascript for popup window */
function popupWindow2(url, title, popup_width,popup_height) 
{
  var screen_width=window.screen.width
  var screen_height=window.screen.height
  var leftCoord=Math.round((screen_width-popup_width)/2);
  var topCoord=Math.round((screen_height-popup_height)/2);     
  
  if( screen.width == 800 && screen.height == 600 ) 
  {
  	topCoord = 0;
	leftCoord = 0;
  }

  popupWin = window.open(url, title, 'location=no,width='+popup_width+',height='+popup_height+',scrollbars=no,toolbar=no,status=no,top=' + topCoord + ', left=' + leftCoord + ',screenx=' + leftCoord + ',screeny=' + topCoord + ',resizable=yes');
  popupWin.focus();
}//end function windowOpener