document.sr=new Array;
document.timer;
function swapImgRestore(){
  document.timer=setTimeout("swapImgRestoreDelayed()",200)
}
function swapImgRestoreDelayed(){
  var i,x,a=document.sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;
}


function swapImage(){
	clearTimeout(document.timer);
	swapImgRestoreDelayed();
	var i,j=0,x,a=swapImage.arguments;
	for(i=0;i<(a.length-1);i+=2){
		if ((x=findObj(a[i]))!=null){
			document.sr[j++]=x; if(!x.oSrc)x.oSrc=x.src; 
			x.src=a[i+1];
		}
	}
}
function findObj(n){
  var p,i,x; d=document;
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n);
  return x;
}

function preloadImages(a){
	var d=document;
	if(d.images){
		if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length;
		for(i=0; i<a.length; i++){d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}
	}
}
function OpenPopup(page,width,height){popup = window.open(page,"","width=" + width + ", height=" + height + ",toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,left=75,top=60");}
function msg(txt){top.status=txt;}
