var ids;
var srcs;

var lpszACTIVE	= "";

function jkSWAP (lpszID, lpszSTATUS) {
	if (lpszACTIVE != lpszID) {
		if (document.images[lpszID]) {
			document.images[lpszID].src	= 'img/nav_' + lpszID + '_' + lpszSTATUS + '.gif';
		}
	}
}

function jkSWAP2 (lpszID, lpszSTATUS) {
	if (document.images[lpszID]) {
		document.images[lpszID].src	= 'img/' + lpszID + lpszSTATUS + '.gif';
	}
}

function jkACTIVE (lpszACTIVE_ID) {
	jkRESTORE();
	if (document.images[lpszACTIVE_ID]) {
		document.images[lpszACTIVE_ID].src	= 'img/nav_' + lpszACTIVE_ID + '_1.gif';
		lpszACTIVE		= lpszACTIVE_ID;
	}
}

function jkRESTORE() {
	for (var y = 0; y < ids.length; y++) {
		if ((ids[y] != "") && (ids[y] != lpszACTIVE)) {
			document.images[ids[y]].src = srcs[y];
		}
	}
}

function jkSAVE() {
	ids = new Array(document.images.length);
	srcs = new Array(document.images.length);
	for (var x = 0; x < document.images.length; x++) {
		ids[x]	= document.images[x].name;
		srcs[x]	= document.images[x].src;
	}
}

function jkPRELOAD (lpszDUMMY) {
	for (var x = 0; x < jkPRELOAD.arguments.length; x++) {
		var pri	= new Image();
		pri.src	= jkPRELOAD.arguments[x];
	}
}

function centeredpopup (f, w, h, s) {
	l	= (screen.width - w) / 2;
	t	= (screen.height - h) / 2;
	p	= "scrollbars=" + ((s == 1) ? "yes" : "no") + ",width=" + w + ",height=" + h + ",top=" + t + ",left=" + l;
	window.open(f, "petela", p);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

