
function MyEl(mod){

	ShowLoading('');
	
	$.post(dle_root + "engine/ajax/glop.php", { skin: dle_skin, mod: mod}, function(data){

		HideLoading('');

		$("#mobilim").html(data);

	});
}





function doTX( n_id ){

	ShowLoading('Təşəkkür əlavə olunur');
	
	$.get(dle_root + "engine/ajax/thanks_s.php", { news_id: n_id, allow_thanks: 1}, function(data){

		HideLoading('');

		$("#thk"+n_id).html(data);

	});
}









function ForumLast(mod)
{
var ajax = new dle_ajax();
ajax.onShow ('');
var varsString = "mod=" + mod;
ajax.setVar("skin", dle_skin);
ajax.setVar("mod", mod);
ajax.requestFile = dle_root + "engine/ajax/flast.php";
ajax.method = 'POST';
ajax.element = 'f-last';
ajax.sendAJAX(varsString);
return false;
};



function ShowComm( n_id, event, paga ){

	ShowLoading('');
	
	$.get(dle_root + "engine/ajax/shcomm.php", { n_id: n_id, action: event, page: paga, skin: dle_skin}, function(data){

		HideLoading('');

		$("#nn"+n_id).html(data);

	});
}

function ajax_cancel_showcomm( n_id )
{

document.getElementById( 'nn'+n_id ).innerHTML = "";

	
	return false;
};



function openYouTube(opener) {
	var returnValue;
	
	// Safari Mobile doesn't have Flash, so we just let the device use the built-in 
	// YouTube viewer.
	if (/(iPhone|iPod|iPad)/.test(navigator.userAgent)) returnValue = true;

	else returnValue = hs.htmlExpand(opener, { 
		objectType: 'swf', 
		objectWidth: 480, 
		objectHeight: 385, 
		transitions: ['fade'],
		width: 480, 
		outlineType: 'rounded-white',
		outlineWhileAnimating: true,
		allowSizeReduction: false,
		// always use this with flash, else the movie will be stopped on close:
		preserveContent: false,
		wrapperClassName: 'draggable-header no-footer',
		swfOptions: { 
			params: { 
				allowfullscreen: 'true' 
			}
		}, 
		maincontentText: 'You need to upgrade your Flash player' 
	});
	
	return returnValue;
} 



function ShowThx( n_id, event ){

ShowLoading('');
	
$.get(dle_root + "engine/ajax/shthx.php", { n_id: n_id, action: event, skin: dle_skin}, 


function(data)
{
HideLoading('');
$("#thx"+n_id).html(data);
}

);

}

function ajax_cancel_showThx( n_id )
{

document.getElementById( 'thx'+n_id ).innerHTML = "";

	
	return false;
};


function Upm( mod, paga ){

	ShowLoading('');
	
	$.get(dle_root + "engine/ajax/unrpm.php", { mod: mod, skin: dle_skin, page: paga}, function(data){

		HideLoading('');

		$("#unpm").html(data);

	});
}



function Rpm( pm_id, event ){

	ShowLoading('');
	
	$.get(dle_root + "engine/ajax/read.php", { pm_id: pm_id, skin: dle_skin, to: event}, function(data){

		HideLoading('');

		$("#ppm"+pm_id).html(data);

	});
}


function Dpm( pm_id, event ){

	
	document.getElementById("dpm"+pm_id).innerHTML = 'Delete: '+pm_id+' <img src="el/ajax/l.gif">';
	
	
	$.get(dle_root + "engine/ajax/read.php", { pm_id: pm_id, skin: dle_skin, to: event}, function(data){

		HideLoading('');

		$("#dpm"+pm_id).html(data);

	});
}



function Rpme( pm_id, event ){

	ShowLoading('');
	
	$.get(dle_root + "engine/ajax/reade.php", { pm_id: pm_id, skin: dle_skin, to: event}, function(data){

		HideLoading('');

		$("#ppme"+pm_id).html(data);

	});
}



function gserts( event, paga ){
	
document.getElementById("sts").innerHTML = '<b><font color=blue>Загрузка готовых, страница: '+paga+'</font></b> <img src="el/ajax/l.gif">';
	
	$.get(dle_root + "engine/ajax/sts.php", { event: event, to: event, skin: dle_skin, page: paga}, function(data){

		HideLoading('');

		$("#sts").html(data);

	});
}



function Pippm( pm_id, event )
{
	
	document.getElementById("pmrep"+pm_id).innerHTML = '<img src="el/ajax/l.gif">';
	

	
	$.get(dle_root + "engine/ajax/read.php", { pm_id: pm_id, to: event, skin: dle_skin}, function(data){

		HideLoading('');

		$("#pmrep"+pm_id).html(data);

	});
}


function resert( event ){


document.getElementById("re"+event).innerHTML = '<img src="el/ajax/l.gif">';

	
	$.get(dle_root + "engine/ajax/ajax_serts.php", { event: event, re: event, skin: dle_skin}, function(data){

		HideLoading('');

		$("#re"+event).html(data);

	});
}



function osert( sid, imei ){

	
	document.getElementById("osert"+sid).innerHTML = '<br><font color=green>Одобрение imei <b>'+imei+'</font></b> <img src="el/ajax/l.gif">';
	
	$.get(dle_root + "engine/ajax/ajax_serts.php", { odobr: sid, id: sid, skin: dle_skin}, function(data){

		HideLoading('');

		$("#osert"+sid).html(data);

	});
}


function gosert( sid ){

	
	document.getElementById("gosert"+sid).innerHTML = '<font color=green>Приготовление...</font></b> <img src="el/ajax/l.gif">';
	
	$.get(dle_root + "engine/ajax/ajax_serts.php", { gotov: sid, id: sid, skin: dle_skin}, function(data){

		HideLoading('');

		$("#gosert"+sid).html(data);

	});
}


function toicq( toname, toicq ){
	
document.getElementById("icqs"+toname).innerHTML = '<font color=green>Loading ICQ...</font></b> <img src="http://mobilim.az/el/ajax/l.gif">';
	
$.get(dle_root + "engine/ajax/fast_profile.php", { icqedit: toicq, toicq: toicq, toname: toname, skin: dle_skin}, function(data){

HideLoading('');

$("#icqs"+toname).html(data);

	});
	
	
};


function icqmm(){

var form = document.getElementById('mm-icq');
	
document.getElementById("icq-results").innerHTML = '<font color=blue>Смена ICQ <b></font></b> <img src="http://mobilim.az/el/ajax/l.gif">';
	
$.post(dle_root + "engine/ajax/fast_profile.php", { toicq: form.toicq.value, name: form.name.value, icqok: form.icqok.value, skin: dle_skin}, function(data){

HideLoading('');

$("#icq-results").html(data);

	});
}



function torank( toname, znak ){
	
document.getElementById("ranks"+toname).innerHTML = '<font color=green>Loading rank...</font></b> <img src="/el/ajax/l.gif">';
	
$.get(dle_root + "engine/ajax/fast_profile.php", { rankedit: znak, toname: toname, skin: dle_skin}, function(data){

HideLoading('');

$("#ranks"+toname).html(data);

	});
	
	
};


function rank_cancel( toname )
{

document.getElementById( 'ranks'+toname ).innerHTML = "";

	
	return false;
};




function rankmm(){

var form = document.getElementById('mm-rank');
	
document.getElementById("rank-results").innerHTML = '<font color=blue>Dərəcə əmsalın dəyişilməsi <b></font></b> <img src="http://mobilim.az/el/ajax/l.gif">';
	
$.post(dle_root + "engine/ajax/fast_profile.php", { torank: form.torank.value, name: form.name.value, rankok: form.rankok.value}, function(data){

HideLoading('');

$("#rank-results").html(data);

	});
}




function pmmm( pid, au ){

var form = document.getElementById('mm-pm');
	
document.getElementById("pmrep"+pid).innerHTML = '<b>' + au + '</b> üçün <font color=blue>cavab göndərilir </font> <img src="http://mobilim.az/el/ajax/l.gif">';
	
$.post(dle_root + "engine/ajax/read.php", { name: form.name.value, subj: form.subj.value, old_c: form.old_c.value, comments: form.comments.value, outboxcopy: form.outboxcopy.value, send: form.send.value }, function(data){

HideLoading('');

$("#pmrep"+pid).html(data);

	});
}







function dsert( sid ){


document.getElementById("delsert"+sid).innerHTML = 'Silinir... <img src="el/ajax/l.gif">';

	
	$.get(dle_root + "engine/ajax/ajax_serts.php", { del: sid, id: sid, skin: dle_skin}, function(data){

		HideLoading('');

		$("#delsert"+sid).html(data);

	});
}





function ajax_cancel_Rpm( pm_id )
{

document.getElementById( 'ppm'+pm_id ).innerHTML = "";

	
	return false;
};


function ajax_cancel_Rpme( pm_id )
{

document.getElementById( 'ppme'+pm_id ).innerHTML = "";

	
	return false;
};



function Pipm( ko )
{
var ajax = new dle_ajax();
ajax.onShow ('');
var varsString = "ko=" + ko;
ajax.setVar("skin", dle_skin);
ajax.setVar("to", ko);
ajax.requestFile = dle_root + "engine/ajax/read.php";
ajax.method = 'POST';
ajax.element = 'pel';
ajax.sendAJAX(varsString);
return false;
};







function ajax_cancel_Pipm( ko )
{

document.getElementById( 'pel' ).innerHTML = "";

	
	return false;
};


    function ajax_fullstory(id) { 
       $('#news-id-' + id).html('Loading Full News - Mobilim.Az &copy; 2010 <br><img src="http://mobilim.az/djavtosh/ajax.gif" style="width:100%; max-width:128px; max-height:15px;">'); 
         
            $.ajax({ 
            type: "POST", 
            url: dle_root + "engine/ajax/sof_fullstory.php", 
            data: "id="+id, 
            success: function(html){ 
            $('#news-id-' + id).html(html); 
            } 
          }); 
        };




function sendimei(){
	var form = document.getElementById('serts-system');
	

	document.getElementById("sert-results").innerHTML = '<font color=blue>Валидация <b></font></b> <img src="http://mobilim.az/el/ajax/l.gif">';
	
	
	$.post(dle_root + "engine/ajax/ajax_serts.php", { imei: form.imei.value, mobile: form.mobile.value, submit_ok: form.submit_ok.value, skin: dle_skin}, function(data){

		HideLoading('');

		$("#sert-results").html(data);

	});
}



function checksert(){
	var form = document.getElementById('serts-check');
	
	ShowLoading('');
	
	$.post(dle_root + "engine/ajax/ajax_serts_check.php", { num: form.num.value, skin: dle_skin, check_ok: form.check_ok.value }, function(data){

		HideLoading('');

		$("#sert-check-results").html(data);

	});
}




function checkmysert(){
	var form = document.getElementById('serts-check');
	
	ShowLoading('');
	
	$.post(dle_root + "engine/ajax/ajax_serts_check.php", { num: form.num.value, skin: dle_skin, check_ok_my: form.check_ok_my.value }, function(data){

		HideLoading('');

		$("#sert-check-results").html(data);

	});
}

