// JavaScript Document

function loadFlash(flashWidth,flashHeight,flashName)
{
	AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0',
										'width',flashWidth,
										'height',flashHeight,
										'align','middle',
										'src',flashName,
										'quality','high',
										'bgcolor','#fffff',
										'name','foo',
										'allowscriptaccess','always',
										'wmode','transparent',
										'pluginspage','http://www.macromedia.com/go/getflashplayer',
										'movie',flashName);
	
}

function updateClock()
{
  var currentTime = new Date ( );

  var currentHours = currentTime.getHours ( );
  var currentMinutes = currentTime.getMinutes ( );
  var currentSeconds = currentTime.getSeconds ( );

  // Pad the minutes and seconds with leading zeros, if required
  currentHours = ( currentHours< 10 ? "0" : "" ) + currentHours;
  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
  currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

  // Choose either "AM" or "PM" as appropriate
  var timeOfDay = ( currentHours < 12 ) ? "am" : "pm";

  // Convert the hours component to 12-hour format if needed
  //currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

  // Convert an hours component of "0" to "12"
  currentHours = ( currentHours == 0 ) ? 12 : currentHours;

  // Compose the string for display
  var currentTimeString = currentHours + ":" + currentMinutes;

  // Update the time display
  document.getElementById("clockValue").firstChild.nodeValue = currentTimeString;
}


function setDisplayMap(which)
{
	if(which==1)
	{
		newSrc="http://wikimapia.org/#lat=35.8889458&lon=14.4983697&z=17&l=0&ifr=1&m=h"
	}
	else
	{
		newSrc="http://wikimapia.org/#lat=35.8893065&lon=14.4981819&z=18&l=0&ifr=1&m=b"
	}
	document.getElementById("displayMap1").innerHTML="<iframe id=\"mapFrame\" src=\"" + newSrc + "\" width=\"653\" height=\"340\" frameborder=\"0\"></iframe>";
	
	return false;
}

function setLang(which)
{
	if(which==1)
	{
		$("#lang2").hide();
		$("#lang1").show();
	}
	else
	{
		$("#lang1").hide();
		$("#lang2").show();
	}
}