var SonAnket

function AnketOyla(AnketID,SecenekID,Sonraki) {
	SonAnket = AnketID
	$.ajax({
		type: "POST",
		cache: false,
		url: "anket_oyla.asp?AnketID="+AnketID,
		data: "SecenekID="+SecenekID,
		success: function(html){
			$.ajax({
				type: "GET",
				cache: false,
				url: "anketsonuc.asp",
				data: "AnketID="+AnketID+"&Sonraki="+Sonraki,
				success: function(html){
					$("#Anket"+AnketID).html(html);
					tb_init('a.thickboxanket');
				}
			});
		}
	});
}

function AnketDegistir() {
	$.ajax({
		type: "GET",
		cache: false,
		url: "anketsonuc.asp",
		data: "Random=e",
		success: function(html){
			$("#Anket"+SonAnket).html(html);
			tb_init('a.thickboxanket');
		}
	});
}

function TagSil(FotoID,TagID) {
	$.ajax({
		type: "GET",
		cache: false,
		url: "fotograflarim_not.asp",
		data: "FotografID="+FotoID+"&cmd=notsil2&a=e&NotID="+TagID,
		success: function(html){
			if (html=="OKEY") {$('#Foto'+FotoID).hide('slow;')}
		}
	});
}

function HaberGetir(ProfilID) {
	$.ajax({
		type: "GET",
		cache: false,
		url: "profil_haberler.asp?ProfilID="+ProfilID,
		beforeSend : function(html) {
			$("#HaberAlan").html("<div align=\"center\" style=\"padding-top:90px;padding-bottom:90px;\">Veriler yükleniyor...</div>")
		},
		success: function(html){
			$("#HaberAlan").html(html)
			tb_init('a.thickbox');
		}
	});
}

function TumOrganizasyonlar(ProfilID) {
	$.ajax({
		type: "GET",
		cache: false,
		url: "profil_tumorganizasyonlar.asp",
		data: "ProfilID="+ProfilID,
		success: function(html){
			$("#TumOrganizasyonlar").html(html);
		}
	});
}

function ProfilDahaFazlaHaber(ProfilID,SonHaber) {

	rnd = Math.floor(Math.random() * 1000000)
	$.ajax({
		type: "GET",
		cache: false,
		url: "profil_haberler.asp?ProfilID="+ProfilID+"&SonHaber="+SonHaber+"&rnd="+rnd,
		beforeSend : function(html) {
			$("#haberYukleniyor").html("yükleniyor...")
		},
		success: function(html){
			$("#haberYukleniyor").remove();
			$("#HaberAlan").html(document.getElementById("HaberAlan").innerHTML+html);
			tb_init('a.'+rnd);
		}
	});
}

function HaberGizle(VeriID) {
	$.ajax({
		type: "GET",
		cache: false,
		url: "profil_habersil.asp",
		data: "VeriID="+VeriID,
		success: function(html){
			if (html=="OKEY") {
				$("#Haber"+VeriID).hide("slow");
			}
		}
	});
}

function HakkindaDuzenle() {
	$.ajax({
		type: "GET",
		cache: false,
		url: "profil_duzenle.asp",
		data: "cmd=hd",
		success: function(html){
			$("#HakkindaIcerik").html(html);
		}
	});
}


function HakkindaDegistir() {
	$.ajax({
		type: "POST",
		cache: false,
		url: "profil_duzenle.asp?cmd=kaydet&e=hakkinda",
		data: "Hakkinda="+escape($("#Bilgi").val()),
		success: function(html){
			$("#HakkindaIcerik").html(html);
		}
	});
	return false;
}


function OyVer(FotografID,UyeID,Oy) {
	$.ajax({
		type: "POST",
		cache: false,
		url: "profil_oyver2.asp",
		data: "FotografID="+FotografID+"&Oy="+Oy+"&UyeID="+UyeID,
		success: function(html){
			window.location.reload();
		}
	});
	return false;
}