$(document).ready(function() {
    var digerHaberTab=0;
    function tbody(){
        $('ul.tabgroup li#tab0').addClass('Selected');
        bb=$("div#tabcontent11").find(".tab").size();
        for(i=1;i<bb;i++) {
            $('div#tabcontent11 #tab'+i).hide();
        }
    }
    tbody();
    $('ul.tabgroup li').click(function() {
        $('ul.tabgroup li').removeClass('Selected');
        $(this).addClass('Selected');

        tabid=$(this).attr("id");
        for(i=0;i<$("div#tabcontent11").find(".tab").size();i++) {
            $('div#tabcontent11 #tab'+i).hide();
        }
        $('div#tabcontent11 #'+tabid).toggle();
    }, function() {
        $(this).removeClass('Selected');
    });  
	if($.cookie('bursaspor.org.open')==null){
		var date = new Date();
		date.setTime(date.getTime() + (1 * 24 * 60 * 60 * 1000));
		$.cookie('bursaspor.org.open', 'ok', { path: '/', expires: date });
		window.open("http://www.bursaspor.org/","borg","");
		//$.cookie(COOKIE_NAME, null, options);delete
	}

	
	
});

function ackapa(divn){
    $(divn).css({
        "display":($(divn).css("display")=="none" ? "block" : "none")
    });
}

function checkMaxLength(obj) {
	var maxLength = obj.getAttribute('maxlength');
	if (obj.value.length > maxLength)obj.value=obj.value.substring(0,255);
    $('#chcMaxlength').text(maxLength-obj.value.length);
}


function addBookmark() {
    if (document.all)window.external.addfavorite(window.location, window.document.title);
    else window.sidebar.addPanel(window.document.title, window.location, "");
}
function form_cevap(page,param,fnk){
    $.ajax({
        url:page,
        type: 'post',
        data: param,
        cache: false,
        dataType: 'script',
        success: function(msg){
            if(msj[0])window.location=window.location;
            else fnk(msj);
        }
    });
}
function getHtml(page,param,fnk){
    $.ajax({
        url:page,
        type: 'post',
        data: param,
        cache: false,
        dataType: 'html',
        success: function(msj){
            fnk(msj);
        }
    });
}

function modal_ac(page){
    $('#ModalContent').html("<div id='simlemodal_loader'></div>");
    $('#ModalContent').modal({
        position: [25,"25%"]
    });
    $.ajax({
        url:page,
        type: 'post',
        cache: false,
        dataType: 'html',
        success: function(msg){
            $('#ModalContent').html(msg);
        }
    });
}
function gizle(id){
	var divObject=document.getElementById(id);
	divObject.style.display="none";
	divObject=document.getElementById(id+"_");
	divObject.style.display="none";
}
function goster(id){
	var divObject=document.getElementById(id);
	divObject.style.display="block";
	divObject=document.getElementById(id+"_");
	divObject.style.display="block";
}	
function displayMyDiv(divID,baslik,adet)
{
	for(x=0; x<adet; x++)gizle(baslik+x);
	goster(divID);
}

