	var myShowcase = new Array();

	function manageShowcase(selectedThumb) {
		if(selectedThumb!="NO") {
			var index = selectedThumb;
		} else {
			var index = Math.floor(Math.random()*3);
			setTimeout("manageShowcase('NO')", 3600);
		}
		var i=0;
		document.getElementById("largeShowcaseDiv").innerHTML = myShowcase[index];
		while(i <3) {
			document.getElementById("showcase_"+i).style.background = "";
			i++;
		}
		document.getElementById("showcase_"+index).style.background = "#000000";
	}






function ajax_confirm_delete(id)
{


 	if( confirm('هل انت متأكد من حذف اللعبة؟') )
 	{

 	$("#favloding").show();
 	$("#favloding b").html('جارى الحذف وتحميل المفضلة');

      $("#favloding").hide();
      $("#myfavgames").load("ajax.php?action=my_favorites&act=del&andshow=true&id="+id);

 	}
}


function ajax_confirm_delete_site(id)
{


 	if( confirm('هل تريد بالفعل حذف الموقع؟ ') )
 	{

 	$("#favloding").show();
 	$("#favloding b").html('جارى الحذف وتحميل المفضلة');

      $("#favloding").hide();
      $("#myfavsites").load("ajax.php?action=my_favorites_sites&act=del&andshow=true&id="+id);

 	}
}



function ajax_load_fav_games()
{

      $("#favloding").hide();
      $("#myfavgames").load("ajax.php?action=my_favorites");

}

function ajax_load_fav_sites()
{

      $("#favloding").hide();
      $("#myfavsites").load("ajax.php?action=my_favorites_sites");

}






function add_game_2_my_fav(el , gameid)
{


$('#'+el).load("ajax.php?action=my_favorites&act=add&gameid="+gameid).show();

}



/* functions */


function add2fav(){
    if (document.all){
    window.external.AddFavorite(location.href, document.title);
    }else if (window.sidebar){
    window.sidebar.addPanel(document.title, location.href, "");
    }
}


function show(name)
{
	if ( document.getElementById(name).style.display == "none" )
		document.getElementById(name).style.display = "";
	else
		document.getElementById(name).style.display = "none";

}
function view(name)
{
	document.getElementById(name).style.display = "";
}
function hidden(name)
{
	document.getElementById(name).style.display = "none";
}

