﻿///<reference name="CLUI_Bilesenleri.SayfaKonumlayiciOrjinal.js" assembly="CLUI_Bilesenleri"/>
window.TelerikYardimci = { Versiyon: '1.0' }; ///<summary>Telerik ile ilgili yardım Jscript nesnesi</summary>
var TY = window.TelerikYardimci;
TY = { RadWindowBul: function() {///<summary>Aktif  radWindow'u getirir.</summary>
    var oWindow = null;
    if (window.radWindow)
        oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
    else if ((window.frameElement) && (window.frameElement.radWindow))
        oWindow = window.frameElement.radWindow; //IE (and Moz az well)
    return oWindow;
} //WindowBul-Son
    //-----------------------------------------------------------
   , RadWindowKapat: function(argYenile, argAnah, argGuid) {///<summary>Aktif  radWindow'u getirir.</summary>
       var returnObject = { 'Yenile': argYenile, 'Anah': argAnah, 'Guid': argGuid };
       var rw = window.TY.RadWindowBul();
       if (rw && rw.Close) {
           if (argYenile) {
               rw.Close(returnObject);
           }
           else {
               rw.Close('');
           }
       }
       else { }
   } //WindowKapat-Son
   , GridAjax: function(refGrid, ajaxArgument) {   ///<summary>RadGrid için Ajax Yapar.</summary>
       if (typeof (refGrid) != 'undefined') {
           if (refGrid.AjaxRequest && refGrid.UniqueID) {
               try { refGrid.AjaxRequest(refGrid.UniqueID, ajaxArgument); } catch (e) { }
           }
       }
   } //GridAax-son
   , GridSeciliDeger: function(refGrid, refKey) { ///<summary>RadGrid için seçili satırın anahtar değerini döndürür</summary><returns>String</returns>
       if (typeof (refGrid) != 'undefined') {
           if (refGrid.MasterTableView) {
               if (refGrid.MasterTableView.SelectedRows) {
                   if (refGrid.MasterTableView.SelectedRows.length > 0 && refGrid.MasterTableView.SelectedRows[0].KeyValues) {
                       if (refGrid.MasterTableView.SelectedRows[0].KeyValues[refKey])
                           return refGrid.MasterTableView.SelectedRows[0].KeyValues[refKey];
                   }
               }
           }
       }
       return null;
   } //GridSeciliDeger-son
   , GridAramaYap: function(refGrid, aranacak) {///<summary>RadGridde arama yapar</summary>
       if (typeof (refGrid) != 'undefined') {
           this.GridAjax(refGrid, 'Arama:' + aranacak);
       }
   } //GridAramaYap-son
}//TY-Son

window.Boy=  function() {///<summary>Geçerli pencere için ekran boyunu verir</summary><returns type="Number">Geçerli ekranın boyunun pixel değeri.Eğer hata oluşursa -1 döner.</returns>
        var windowHeight = -1;
        try {
            if (typeof (window.innerHeight) == 'number') {
                windowHeight = window.innerHeight;
            }
            else {
                if (document.documentElement && document.documentElement.clientHeight) {
                    windowHeight = document.documentElement.clientHeight;
                }
                else {
                    if (document.body && document.body.clientHeight) {
                        windowHeight = document.body.clientHeight;
                    }
                }
            }
        } catch (e) {  }

        return windowHeight;
    } //end Boys
    window.En = function() {///<summary>Geçerli pencere için ekran enini  verir</summary><returns type="Number">Geçerli ekranın eninin pixel değeri.Eğer hata oluşursa -1 döner.</returns>
         var windowWidth = -1;
         try {
             if (typeof (window.innerWidth) == 'number') {
                 windowWidth = window.innerWidth;
             }
             else {
                 if (document.documentElement && document.documentElement.clientWidth) {
                     windowWidth = document.documentElement.clientWidth;
                 }
                 else {
                     if (document.body && document.body.clientWidth) {
                         windowWidth = document.body.clientWidth;
                     }
                 }
             }
         } catch (e) { }
         return windowWidth;
     }//end En
