var w=700;var h=485;



function oyun(o){var urlem=location.href.split('/')[2];
document.write('<div id="prgrss" align="center"></div>');
var theObj=new Object();
theObj.src=o;
htm=GetFlashHtml(theObj);
var viewDiv=document.getElementById("prgrss");
viewDiv.innerHTML=htm;setInterval("refreshProgress()",40)}





function GetFlashHtml( flashObj )
{

	
	
	var str=" <object id=\"mov\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "+ 
									" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" "+ 
									" width=\""+w +"\" height=\""+h+"\">" +
  						"<param name=\"movie\" value=\""+flashObj.src+"\" />" +
						"<PARAM NAME=\"scale\" VALUE=\"exactfit\">" +
						"<PARAM NAME=\"swLiveConnect\" VALUE=\"false\">" +	
						
  						"<param name=\"play\" value=\"true\"/>"+
 							"<param name=\"quality\" value=\"high\" />"+
  						"<embed name=\"mov\" src=\""+flashObj.src+"\""+ 
  						     "  quality=\"high\" scale=\"exactfit\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"" + 
							 "swLiveConnect=\"false\"" +
  						     "   type=\"application/x-shockwave-flash\" width=\""+w+"\" height=\""+h+"\">" +
  						     "</embed>"+
						"</object>" ;
						
					

	return str;
}








function refreshProgress(){
var hy=1;var gt=1;
var oyun_progress=document.getElementById("oyun_progress");
var movie=getFlashMovieObject("mov");
var game_progress=document.getElementById("game_progress");
var oyunlar=document.getElementById("oyunlar");
var advert=document.getElementById("advert");


if(movie.PercentLoaded()<100){

oyun_progress.innerHTML="% "+movie.PercentLoaded()+" &nbsp;  "}

else{

if(movie.PercentLoaded()==100){};

oyun_progress.innerHTML="";
if(hy==1){
oyunlar.style.position="";
oyunlar.style.visibility="visible";
advert.style.position="absolute";
advert.style.visibility="hidden";
advert.style.display="none";
hy++}};

game_progress.style.width=(movie.PercentLoaded()*2)+"px"}









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

  } 
}	
