
if (document.all && !document.getElementById) {
    document.getElementById = function(id) {
         return document.all[id];
    }
}

function showPic(picName) {
   var mp = document.getElementById("mainpic");
   mp.style.backgroundImage = "url(images/" + picName + ".jpg)";
}

function hilite(aID, atype, mode) {/*
   var obj = document.getElementById(aID + atype);
	if (mode) {
	  if (atype == "pica") {
	    obj.style.backgroundPositionX = "-220px";
	  } else {
	  obj.style.backgroundPositionY = "-21px";
	  }
	}
	else {
	  if (atype == "pica") {
	    obj.style.backgroundPositionX = "0";
	  } else {
	    obj.style.backgroundPositionY = "0";
	  }
	}
*/}

function hilite2(aID, mode) {
   //var obj1 = document.getElementById(aID + 'pica');
   var obj2 = document.getElementById(aID + 'laba');
	if (mode) {
	  //obj1.style.backgroundPositionX = "-220px";
	  obj2.style.backgroundPositionY = "-21px";
	}
	else {
	  //obj1.style.backgroundPositionX = "0";
	  obj2.style.backgroundPositionY = "0";
	}
}

function showMenu2(mid) {
   var obj = document.getElementById(mid);
	obj.style.visibility = "visible";
}

function hideMenu2(mid) {
   var obj = document.getElementById(mid);
	obj.style.visibility = "hidden";
}

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") != -1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}
function rewindmovie() {
  //if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).Rewind();
  //}
}
function playmovie() {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).Play();
  }
}
function stopmovie() {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).StopPlay();
  }
}
function gotoFrame(theFrame) {
  //if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).GotoFrame(theFrame);
  //}
}
function stopmovieWhenLoaded() {
  if (movieIsLoaded(thisMovie(movieName))) {
    stopmovie();
	 setTimeout("rewindmovie()",100);
	 var obj = document.getElementById("vidcontrol");
	 obj.style.visibility = "visible";
  }
  else {
    setTimeout("stopmovieWhenLoaded()",100);
  }
}

//--------------- Address unscrambler (anti-spambot) ----------------
var prefixC = new Array(58,111,116,108,105,97,109);
var mainC = new Array(116,114,97,32,114,101,104,116,97,101,108,32,121,114,101,108,108,97,71,32,74,74,61,116,99,101,106,98,117,115,63,109,111,99,46,121,114,101,108,108,97,71,74,74,64,110,104,111,106);
var cardC = new Array(41,46,117,111,121,32,116,99,97,116,110,111,99,32,108,108,105,119,32,110,104,111,74,32,46,101,114,105,117,113,101,114,32,117,111,121,32,115,107,99,97,112,32,121,110,97,109,32,119,111,104,32,100,101,116,97,99,105,100,110,105,32,101,115,97,101,108,80,40,61,121,100,111,98,38,114,101,100,114,111,32,100,114,97,99,116,115,111,80,61,116,99,101,106,98,117,115,63,109,111,99,46,121,114,101,108,108,97,103,106,106,64,110,104,111,106);
var bellaC = new Array(109,111,99,46,121,114,101,108,108,97,103,106,106,64,97,108,108,101,98);
var johnC = new Array(109,111,99,46,121,114,101,108,108,97,71,74,74,64,110,104,111,106);

function unscramble(arr) {
   var s = "";
   var n = arr.length;
	for (i = n-1; i >= 0; i--) {
	   s = s + String.fromCharCode(arr[i]);
   } 
	return(s);
}

function setAdds()
{
setMainAdd();
setCardAdd();
}

function setMainAdd()
{
   var prefix = unscramble(prefixC);
   var mainAddr = unscramble(mainC);

	obj = document.getElementById("mainLink");
	obj.href = prefix + mainAddr;
}

function setCardAdd()
{
   var prefix = unscramble(prefixC);
   var cardAddr = unscramble(cardC);

	obj = document.getElementById("cardLink");
	obj.href = prefix + cardAddr;
}

function setJohnAdd()
{
   var prefix = unscramble(prefixC);
   var johnAddr = unscramble(johnC);

	obj = document.getElementById("johnLink");
	obj.href = prefix + johnAddr;
}

function setBellaAdd()
{
   var prefix = unscramble(prefixC);
   var bellaAddr = unscramble(bellaC);

	obj = document.getElementById("bellaLink");
	obj.href = prefix + bellaAddr;
	obj = document.getElementById("bellaText");
	obj.innerHTML = bellaAddr;
}

