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) {
		flag_de_tocho = newImage("images/flag_de_tocho.gif");
		flag_ru_tocho = newImage("images/flag_ru_tocho.gif");

		preloadFlag = true;
	}
}

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);


function setPointer(theCells, thePointerColor, theNormalBgColor, theVisitColor) {

    var currentColor = null;
    var newColor     = null;
    
    currentColor = theCells.style.backgroundColor;
    
    if ( currentColor.toLowerCase() == theVisitColor.toLowerCase()) {
    newColor     = theVisitColor ;
    } else if ( currentColor.toLowerCase() == thePointerColor.toLowerCase() ) {
    newColor     = theNormalBgColor ;
    } else {
    newColor     = thePointerColor ;
    }
    theCells.style.backgroundColor = newColor;

    return true;
} // end of the 'setPointer()' function
