﻿var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Yükleniyor..."});

function sayfayiYukle(pHangiSayfa)
{	
	Ext.Ajax.request({
	    url:'JsonDondur.aspx', //php function that saves the data
	  	params:{pSayfa:pHangiSayfa},
	  	success: function(result, request)
        {
	  		var res = new Object();
          	res = Ext.util.JSON.decode(result.responseText);
          	if (res[0].success == true)
          	{
        	  	Ext.MessageBox.show({
                 	title: 'BASARILI',
                 	msg: res.failmsg,
                 	buttons: Ext.MessageBox.OK,
                 	icon: Ext.MessageBox. INFO                  
             	});
          	}
          	else
          	{
        	  	Ext.MessageBox.show({
                  	title: 'BASARISIZ!',
                  	msg: res.failmsg,
                  	buttons: Ext.MessageBox.OK,
                  	icon: Ext.MessageBox.ERROR
              	});
          	}
        }        
	});        
} 

function adreseGit(pAdres)
{
	Ext.getDom('ifrmIcerik').src = pAdres ;
	// Ext.getCmp('content-panel').load(pAdres);
}

function tumunuDegistir(strAsil, strAranan, strDegisecek) 
{
    while (strAsil.indexOf(strAranan) != -1)
    {
        strAsil = strAsil.replace(strAranan, strDegisecek) ;
    }
    return strAsil ;
}//function tumunuDegistir(strAsil, strAranan, strDegisecek) 

function replaceAll(text, strA, strB)
{
    return text.replace(new RegExp(strA, "g"), strB);    
}
