﻿$('document').ready(function() {

// SABİTLER ----------------------------------------------
$.ajax({
type: "POST",
url: "OSYSService.asmx/SektorListesiAl",
data: "{'DilKodu': 'TR', 'SektorId': '9', 'KullaniciTipiId': ''}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function(msg3) {
AjaxSucceeded3(msg3);
},
error: function(msg3){AjaxFailed3(msg3);}
});
function AjaxSucceeded3(result3) {
var GelenVeriOF = (typeof result3.d) == 'string' ? eval('(' + result3.d + ')') : result3.d;
var sabitTablo = '';
if (GelenVeriOF != null) {
if (GelenVeriOF.length > 0) {
for (var i = 0; i < GelenVeriOF.length; i++) {
//alert(GelenVeriOF[i]['FirmaAdi']);
//alert(GelenVeriOF[i]['KullaniciDosyaLink'].replace('../', ''));
sabitTablo += '<tr style="height: 70px;"><td width="202"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center"><a href="';
sabitTablo += 'firma.aspx?fno=' + GelenVeriOF[i]['UserId'] + '&kgno=13"><img height="70" src="';
sabitTablo += GelenVeriOF[i]['KullaniciDosyaLink'].replace('../', '');
sabitTablo += '" alt="';
sabitTablo += GelenVeriOF[i]['FirmaAdi'];
sabitTablo += '" title="';
sabitTablo += GelenVeriOF[i]['FirmaAdi'];
sabitTablo += '" border="0"></a></td></tr></table></td></tr><tr style="height: 7px;"><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center"><img id="Picture18" height="7" width="202" src="images/ayrac-onerdiklerimiz.png" border="0"></td></tr></table></td></tr>';
}
$('#sabitTablo').html(sabitTablo);
//alert(sabitTablo);
}
}
}
function AjaxFailed3(result) {
//alert(result.status + ' ' + result.statusText);
}
// SABİTLER ----------------------------------------------

// HAREKETLİLER ----------------------------------------------
$.ajax({
type: "POST",
url: "OSYSService.asmx/SektorListesiAl",
data: "{'DilKodu': 'TR', 'SektorId': '10', 'KullaniciTipiId': ''}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function(msg4) {
AjaxSucceeded4(msg4);
},
error: function(msg4){AjaxFailed4(msg4);}
});
function AjaxSucceeded4(result4) {
var GelenVeriOF = (typeof result4.d) == 'string' ? eval('(' + result4.d + ')') : result4.d;
var hareketliTablo = '';
if (GelenVeriOF != null) {
if (GelenVeriOF.length > 0) {
for (var i = 0; i < GelenVeriOF.length; i++) {
//alert(GelenVeriOF[i]['FirmaAdi']);
//alert(GelenVeriOF[i]['KullaniciDosyaLink'].replace('../', ''));
hareketliTablo += '<li><table border="0" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="195"><table id="Table12" border="0" cellspacing="0" cellpadding="0" width="47" style="height: 30px;"><tr style="height: 70px;"><td width="195"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center"><a href="firma.aspx?fno=' + GelenVeriOF[i]['UserId'] + '&kgno=13"><img height="70" src="';
hareketliTablo += GelenVeriOF[i]['KullaniciDosyaLink'].replace('../', '');
hareketliTablo += '" alt="';
hareketliTablo += GelenVeriOF[i]['FirmaAdi'];
hareketliTablo += '" title="';
hareketliTablo += GelenVeriOF[i]['FirmaAdi'];
hareketliTablo += '" border="0"></a></td></tr></table></td></tr><tr style="height: 9px;"><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center"><img id="Picture36" height="9" width="188" src="images/ayrac-onerdiklerimiz-std.png" border="0"></td></tr></table></td></tr></table></td></tr></table></li>';
}
$('#listticker').html(hareketliTablo);
// Listticker efekti ---------
var first = 0;
var speedLT = 2000;
var pause = 5000;
function removeFirst() {
first = $('ul#listticker li:first').html();
$('ul#listticker li:first').slideUp('slow', function() { $(this).remove(); });
addLast(first);
}
function addLast(first) {
last = '<li style="display:none">' + first + '</li>';
$('ul#listticker').append(last)
$('ul#listticker li:last').show();
}
interval = setInterval(removeFirst, pause);
// Listticker efekti ---------
}
}
}
function AjaxFailed4(result) {
//alert(result.status + ' ' + result.statusText);
}
// HAREKETLİLER ----------------------------------------------
});
