arkaplan=1;
setInterval(arkaplandegistir, 10000);
bg1 = new Image(); bg1.src = "../images/bg/2.jpg"
bg2 = new Image(); bg2.src = "../images/bg/2.jpg"
bg3 = new Image(); bg3.src = "../images/bg/3.jpg"

function arkaplandegistir(){
	arkaplan++;
	if (arkaplan==4) arkaplan=1
	document.body.style.backgroundImage ='url(../images/bg/'+arkaplan+'.jpg)'
}

function openPlan(){window.open('plan.php','Plan','width=950; height=680')}

function makeFlash(id,w,h,src,wmode,bg,fvar){
	document.writeln('<object id="'+id+'" width="'+w+'" height="'+h+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">');
	document.writeln('<param name="movie" value="'+src+'"><param name="wmode" value="'+wmode+'"><param name="bgcolor" value="'+bg+'"><param name="FlashVars" value="'+fvar+'">');
	document.writeln('<embed name="'+id+'" id="'+id+'" src="'+src+'" width="'+w+'" height="'+h+'" flashvars="'+fvar+'" wmode="'+wmode+'" bgcolor="'+bg+'" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
	document.writeln('</object>');
}


function haberarsiv(){
	new Effect.toggle('haberarsivi', 'blind')
	$('arsivlink').style.display='none'
}


function winHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
 // window.alert( 'Width = ' + myWidth );
 // window.alert( 'Height = ' + myHeight );
	return(myHeight);
}


function ortala(){
	cont=document.getElementById("container");
	var ch=cont.offsetHeight;
	var wh=winHeight();
	var tp=(wh-ch)/2;
	if (tp>0){
		cont.style.marginTop=tp+"px";
	} else {
		cont.style.marginTop="0px";
	}
	//change_background();
}


function setHeight(id)
{
    if (document.getElementById(id) != null)
    {
        var visina = document.getElementById(id).contentWindow.document.body.scrollHeight;
        document.getElementById(id).height= visina;
    }
}

function popUp(URL,yuk,gen) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+gen+",height="+yuk+"');");
}

function popUp2(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL);");
}

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<20; 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');
}




