function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
 
 


function StopFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.StopPlay();
}

function PlayFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.Play();
	//embed.nativeProperty.anotherNativeMethod();
}

function RewindFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.Rewind();
}

function NextFrameFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	// 4 is the index of the property for _currentFrame
	var currentFrame=flashMovie.TGetProperty("/", 4);
	var nextFrame=parseInt(currentFrame);
	if (nextFrame>=10)
		nextFrame=0;
	flashMovie.GotoFrame(nextFrame);		
}


function ZoominFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.Zoom(90);
}

function ZoomoutFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.Zoom(110);
}


function SendDataToFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	flashMovie.SetVariable("/:message", document.controller.Data.value);
}

function ReceiveDataFromFlashMovie()
{
	var flashMovie=getFlashMovieObject("myFlashMovie");
	var message=flashMovie.GetVariable("/:message");
	document.controller.Data.value=message;
}

function flashfix() {
	theObjects = document.getElementsByTagName('object');
	for (var i = 0; i < theObjects.length; i++) {
		theObjects[i].outerHTML = theObjects[i].outerHTML
	}
}


function form(furl,fwid) {window.open(furl,'anket','width=' +fwid+ ',height=600,scrollbars=yes');}

function toggleNews(kac) {
	for (var w=0; w<40; w++) {
		var haber='hb' + w; hbobj=document.getElementById(haber);
		var arrow='ok' + w; okobj=document.getElementById(arrow);
		if (hbobj && w!=kac) {
			hbobj.style.display = 'none';
			okobj.style.display = 'block';
		}
	}
	var haber='hb' + kac; hbobj=document.getElementById(haber);
	var arrow='ok' + kac; okobj=document.getElementById(arrow);
	hbobj.style.display = (hbobj.style.display == 'none' ? 'block' : 'none');
	okobj.style.display = (okobj.style.display == 'none' ? 'block' : 'none');
}


function yasal() {
	var help=window.open('yasal.php', 'yasal', 'width=490,height=270,status=no,toolbar=no,scrollbars=yes,menubar=no,top=50,left=50,resizable=no,location=no');
}

function reklam() {
	var reklam=window.open('reklam1.php', 'reklam', 'width=640,height=600,status=no,toolbar=no,scrollbars=yes,menubar=no,top=0,left=50,resizable=no,location=no');
}

function show(what) {
	var sehir=document.getElementById(what);
	sehir.style.display = (sehir.style.display == 'none' ? 'inline' : 'none');
}



