
$(document).ready(function() {
//    $(document).bind("contextmenu", function(e) {
//        return false;
//    });


});

//var Photos;
function SliderPhoto() {

    alert("2");
    //        $(document).ready(function() {
    $("#oSlide2").oSlide({
        'mouseOverStopSlide': true,
        'enableCaptions': true,
        'enableNavigationBar': true,
        'enableNavigationControls': false,
        'divFadeColorBackround': "oSlideFadeColorBackround2",
        images: Photos, 		// an array containing all data to the images
        'sleep': 6000, 		// time in ms, how long is the image displayed befor changing
        'fade_time': 500, 		// speed of the
        'debug': false

    });

    // var firtsSlide = $("#oSlide2").data('JsObj');

    /*$("#oSlide2Button").click(function(){
    firtsSlide.SlideToImg(2);  // starts counting on 0
    });
 
				$("#oSlide2ButtonNext").click(function(){
    firtsSlide.SlideNext();
    });
    $("#oSlide2ButtonPrew").click(function(){
    firtsSlide.SlidePrew();
    });*/
    // });

}




function HideLoading() {
    $find('mpLoading').hide();
}

function ShowLoading() {
                
        $find('mpLoading').show();

    }

    function SearchPostBack() {
        document.getElementById("googleSearchFrame").contentWindow.submitform();
    }


function clearText(field) {
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}


function showDate() {
    // Define days of the week.
    // Define months of the year.
    var month = new Array(12);
    month[1] = 'Ocak';
    month[2] = 'Şubat';
    month[3] = 'Mart';
    month[4] = 'Nisan';
    month[5] = 'Mayıs';
    month[6] = 'Haziran';
    month[7] = 'Temmuz';
    month[8] = 'Ağustos';
    month[9] = 'Eylül';
    month[10] = 'Ekim';
    month[11] = 'Kasım';
    month[12] = 'Aralık';
    // Get the date right now.
    var today = new Date();
    yr_st = " 19";
    yr = today.getYear();
    if (yr > 99) {
        yr_st = " ";
        if (yr < 2000) yr += 1900;
    }
    return today.getDate() + ' ' + month[today.getMonth() + 1] + ' ' + yr;
}
//  -->

function setShowDate(id) {
    $("#" + id).text(showDate());
}

function MediaFileBrowser(categoryId, id, type) {
    $("#divDocumentView").html('<iframe id="modalIframeId" width="690px" height="420px" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto" />').dialog("open");
    $("#modalIframeId").attr("src", "http://www.tekderistanbul.org/YonetimKuruluHakkinda.aspx?categoryId=" + categoryId + "&ControlID=" + id + "&type=" + type);
    $('#divDocumentView').modal();

}

function MediaFileBrowser2(categoryId, id, type) {
    $("#divDocumentView").html('<iframe id="modalIframeId" width="100%" height="100%" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto" />').dialog("open");
    $("#modalIframeId").attr("src", "http://www.tekderistanbul.org/YonetimKuruluHakkinda.aspx?categoryId=" + categoryId + "&ControlID=" + id + "&type=" + type);

    var $dialog = $("#divDocumentView").dialog({
        closeOnEscape: true,
        autoOpen: false,
        title: '',
        modal: true,
        width: 650,
        height: 450,
        buttons: {
            Kapat: function() {
                $(this).dialog("close");
            }
        }
    });

    $dialog.dialog('open');
    if (id == "2")
        $dialog.dialog('close');
    window.event.returnValue = false;
    return false;
}


function textNumeric(e) {
    var unicode = e.charCode ? e.charCode : e.keyCode;
    if (unicode == 8 || unicode == 9 || (unicode >= 48 && unicode <= 57)) {
        return true;
    }
    else {
        return false;
    }
}


