function AddToFavorites()
{
title = "Oyun Skor - Bütün Oyunlar";
url = "http://www.oyunskor.com/";

if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(title, url,"");
} else if( window.external ) { // IE Favorite
window.external.AddFavorite( url, title); }
else if(window.opera && window.print) { // Opera Hotlist
return true; }
}

function setHome() {
	if (document.all)  {
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.oyunskor.com/');
	} else if (window.sidebar) {
		if(window.netscape) {
			try {  
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
			}  
			catch(e) {  
				alert("tarayıcı desteklemiyor..");  
			}
		} 
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage','http://www.oyunskor.com/');
	}
}


function sonucAl(seri, id, tip, yer)
{
	 var ad = $.trim($('input[name="ad"]').val());
	 var yorum = $.trim($('textarea[name="yorum"]').val());
	 if(ad == '')
	 {
		 alert("isim giriniz.");
	} else {
		if(yorum == '')
		{
			alert("yorum yazmadiniz.");
		}
		else
		{
			$('#'+yer).html('<img src="images/load.gif" />');
			 $.ajax({
			   type: 'POST',
			   url: 'islem.php?islem='+tip,
			   data: seri+'&ID='+id,
			   success: function(sonuc) {
				$('#'+yer).html(sonuc).show('slow');
				$('#form').hide();
			   }
			  });
			  return false;
		}
	}
}
  
function getir(nere)
{
	 $('#_pop').html('<img src="images/load.gif" />');
	 $.ajax({
	   type: 'GET',
	   url: 'ajx/'+nere+'.php',
	   data: nere,
	   success: function(sonuc) {
		$('#_pop').html(sonuc).show('slow');
	   }
	  });
	  return false;
}
  
function copyit(theField) {
	var tempval=eval("document."+theField);
	tempval.focus();
	tempval.select();
	therange=tempval.createTextRange();
	therange.execCommand("Copy");
}

function kategorigit(adres) { window.location = adres + '.html'; }
  

function fekle(ID)
{
	$.ajax({
	   type: 'POST',
	   url: 'gerec.php?file='+ID+'&kutu&baslik='+document.title,
	   data: '',
	   success: function(sonuc) {
		alert(sonuc);
	   }
	  });
	  return false;
}

function oGetir(adres, yer, ID)
{
	 $('#'+yer).html('<img src="images/load.gif" />');
	 $.ajax({
	   type: 'POST',
	   url: adres+'.php',
	   data: 'ID='+ID,
	   success: function(sonuc) {
		$('#'+yer).html(sonuc).show('slow');
	   }
	  });
	  return false;
}
    function indir(oyunID, baslik)
    {
        window.location = 'gerec.php?file='+oyunID+'&down=1&s='+baslik;
    }
    
$(document).ready(function(){
	$('.yeniliste2 .alan').mouseover(function() {$(this).addClass('alanh');}).mouseout(function() {$(this).removeClass('alanh');});
	
	$('.yorumlar .tab').click(function(){
		$('.yorumlar .tab').removeClass('aktiftab');
		$(this).addClass('aktiftab');
		$('.yorumlar .tab1s,.yorumlar .tab2s').hide();
		$('.yorumlar .'+$(this).attr('id')).show();
	});
	
	
	$('.oynama .b1').click(function(){
		window.location = location.href;
	});
	
	
	$('.oynama .b6').click(function(){
		if($(this).hasClass('full_screen_ok')) {
			$('.oynama .alan .flash').css('width','728px');
			$('.oynama embed').attr('width','640px').attr('height','480px');
			$('.oynama .yeniler').show();
			$('#reklams').show();
			$(this).removeClass('full_screen_ok');
		} else {
			$('.oynama .yeniler').hide();
			$('.oynama .alan .flash').css('width','890px');
			$('.oynama embed').attr('width','890px').attr('height','520px');
			$('#reklams').hide();
			$(this).addClass('full_screen_ok');
		}
	});
	
	
	$('.oynama .b3').click(function(){window.location='#yorumlar';});
	$('.oynama .b2').click(function(){
		$('.fullekran').show();
	});
	$('.fullekran').click(function(){
		$(this).hide();
	});
	
	
});


function iframe(f, w, h)	{ document.write('<iframe src="' + f + '" width="' + w + '" height="' + h + '" frameborder="0"  scrolling="no"></iframe>');}
function obje(f, w, h) 		{ document.write('<object><param value="'+f+'" name="src"/> <param value="'+f+'" name="sw1"/> <param value="fill" name="swStretchStyle"/> <param value="swSaveEnabled=\'true\' swVolume=\'true\' swRestart=\'true\' swPausePlay=\'true\' swFastForward=\'true\' swContextMenu=\'true\' " name="swRemote"/> <param value="#444444" name="bgColor"/> <embed width="'+w+'" height="'+h+'" pluginspage="http://www.macromedia.com/shockwave/download/" type="application/x-director" swstretchstyle="fill" swremote=" swSaveEnabled=\'true\' swVolume=\'true\' swRestart=\'true\' swPausePlay=\'true\' swFastForward=\'true\' swContextMenu=\'true\' " bgcolor="#444444" sw1="'+f+'" src="'+f+'"/></object> '); }
function swf(swf, w, h)		{ document.write('<object id="mov" codeBase=http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0 classid=CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000 width="' + w + '" height="' + h + '" id="movie" ><param name="movie" value="' + swf +  '"><param name="wmode" value="transparent"> <PARAM NAME="quality" VALUE="high"><PARAM NAME="scale" VALUE="exactfit"><PARAM NAME="menu" VALUE="true"><embed name="mov" src="' + swf +  '" width="' + w + '" height="' + h + '" quality="high"  swLiveConnect="false" scale="exactfit" menu="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>'); }

