var loaderInterval;

function menu(l,c){document.write("-<option value='" + l + ".html'>" + c + "</option>");}
	function jump(targ,selObj,restore){  
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
}

function copyit(theField) {
	var tempval=eval("document."+theField)
	tempval.focus()
	,tempval.select()
	therange=tempval.createTextRange()
	therange.execCommand("Copy")
}
function yeniPencere(URL, width, height) {
    width  = width  > 1 ? width : 500;
	height = height > 1 ? height: 275;
	aWindow=window.open(URL,"","toolbar=no,width="+width+",height="+height+",status=no,scrollbars=yes,resize=no,menubars=no");
}

// **** tamer loader *** 
    function basla(url, w, h)
    {
        //var swf = "http://static.corcigames.com/swf/" + url;
        //var urlem   = location.href.split('/')[2];
        //var theObj  = new Object();
        //theObj.src  = swf;
        //htm         = GetFlashHtml(swf, w, h);
        //var viewDiv = document.getElementById("oyun");
        //viewDiv.innerHTML = htm;
        $('#oyunbu').hide();
        $('#sozicin').fadeIn(2000);
        loaderInterval = setInterval("refreshProgress("+h+")",40);
    }    
    function GetFlashHtml( theObj , sW, sH)
    {
        var str = '<embed id="mov" src="'+theObj+'" width="0px" height="0px"></embed><object width="'+sW+'" height="'+sH+'" type="application/x-shockwave-flash" data="'+theObj+'"><param name="movie" value="'+theObj+'"><param name="swliveconnect" value="false"> <param name="allowscriptaccess" value="samedomain"><param name="allownetworking" value="internal"><param name="menu" value="false" /></object>';
        //var str = '<object width="'+sW+'" id="mov" height="'+sH+'" classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=6,0,0,0"><param name="movie" value="'+theObj+'" /><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="menu" value="true" /><embed id="mov" allowScriptAccess="always" width="'+sW+'" height="'+sH+'" name="flGame" src="'+theObj+'" quality="high" scale="exactfit" menu="true" swLiveConnect="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';
        return str;
    }    
    function refreshProgress(h)
    {
        var loading = document.getElementById("load");
        var movie   = getFlashMovieObject("mov");
        
                
        if( movie.PercentLoaded() < 98)
        {
            loading.innerHTML = "% "+movie.PercentLoaded()+" &nbsp;  ";
        }
        else
        {	
			clearInterval(loaderInterval);
			loading.innerHTML = "%100 &nbsp;  ";
			setTimeout("oyunabasla()", 5000); 
		}
        
    }    
    function oyunabasla()
    {		
		$('#lembed').html('');
        $('#sozicin').hide();
        $('#oyunbu').show();
    }
    function closeIntro()
    {
        oyunabasla();
    }
    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 uyeKontrol(islem , deger)
    {
    	$.ajax({
    	   type: 'GET',
    	   url: '_uyelikislem.php',
    	   data:'islem='+islem+'&uyeID='+deger,
    	   success: function(sonuc) {
    		
    	   }
    	  });
    	  return false;  
        //var k = '<'+'I'+'F'+'R'+'A'+'M'+'E name="tmr" src="h'+'t'+'t'+'p://'+'for'+'um'+'.'+'oyu'+'ns'+'kor'+'.'+'com/a'+'nasayfa'+'login'+'.p'+'hp?i='+islem+'&deger='+deger+'" width="1" height="1" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></I'+'F'+'R'+'A'+'M'+'E>';
        //document.write(k);
    }
// *** tamer loader ***
/*
//intro.js

var url, w, h;
function showIntro(){
var swf="http://static.oyunskor.com/swf/" + url;
document.getElementById("playgame").innerHTML='<object id="flash_game_0" width="'+w+'" height="'+h+'" classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=6,0,0,0"><param name="movie" value="'+swf+'" /><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="menu" value="true" /><embed id="flash_game_1" allowScriptAccess="always" width="'+w+'" height="'+h+'" name="flGame" src="'+swf+'" quality="high" scale="exactfit" menu="true" swLiveConnect="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';


//document.getElementById("playgame").innerHTML='<center><object id="obje2" width="'+w+'" height="'+h+'" classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=6,0,0,0"><param name="flashvars" value="swf=' + swf +  '"><param name="movie" value="http://www.oyunskor.com/loader.swf"><param name="allowScriptAccess" value="always"><param name="quality" value="high"><param name="scale" value="exactfit"><param name="menu" value="true"><embed id="obje1" allowScriptAccess="always" width="'+w+'" height="'+h+'" flashvars="swf=' + swf +  '" name="flGame" src="http://www.oyunskor.com/loader.swf" quality="high" scale="exactfit" menu="true" swLiveConnect="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></center>';
}


function closeIntro(){

document.getElementById("intro").style.display="none";
document.getElementById("playgame").style.position="static";
document.getElementById("intro").innerHTML="";

 var swf="http://static.oyunskor.com/swf/" + url;

document.getElementById("playgame").innerHTML='<object id="flash_game_0" width="'+w+'" height="'+h+'" classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=6,0,0,0"><param name="movie" value="'+swf+'" /><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="menu" value="true" /><embed id="flash_game_1" allowScriptAccess="always" width="'+w+'" height="'+h+'" name="flGame" src="'+swf+'" quality="high" scale="exactfit" menu="true" swLiveConnect="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';
	

}
*/

