var http;
var browser = navigator.appName;
var intValueId=0;
var intTypeId=0;
var strDivId='';
if(browser == "Microsoft Internet Explorer"){
	http = new ActiveXObject("Microsoft.XMLHTTP");
}else{
	http = new XMLHttpRequest();
}
function getAjaxValue(ValueId,TypeId,divId){
	//alert(ValueId+'-'+TypeId+'-'+divId);
	//alert('deneme');
	
	//Type
	//1-Eser
	//2-Sanatçı
    strBekle='<table align="center" style="height:200px;" border="0"><tr><td valign="middle" align="center"><marquee direction="right" scrollamount="8" scrolldelay="100" style="border: 1px solid ButtonShadow;background: Black;height: 12px;font-size: 1px;margin: 1px;width: 150px;display: block;overflow: hidden;"><span style="height: 8px;width: 12px;margin: 1px;background: #6B6B67;float: left;font-size: 1px;"></span><span style="height: 8px;width: 12px;margin: 1px;background: #80807B;float: left;font-size: 1px;"></span><span style="height: 8px;width: 12px;margin: 1px;background: #969690;float: left;font-size: 1px;"></span><span style="height: 8px;width: 12px;margin: 1px;background: #ABAAA4;float: left;font-size: 1px;"></span><span style="height: 8px;width: 12px;margin: 1px;background: #C1C0B9;float: left;font-size: 1px;"></span><span style="height: 8px;width: 12px;margin: 1px;background: #D4D0C8;float: left;font-size: 1px;"></span></marquee></td> </tr></table>';
    strBekle='';
	intValueId=ValueId;
	intTypeId=TypeId;
	strDivId=divId;
	//try{parent.frames['icerik'].document.getElementById('tdBody').innerHTML=strBekle;}
	//catch(ex){}
	try{document.getElementById(divId).innerHTML=strBekle;}
	catch(ex){}
	http.open('GET', 'DBMJS.aspx?TYPE=' + TypeId+''+'&ID=' + ValueId + '&uniq='+Math.floor(Math.random() * 1000000));
	http.onreadystatechange = ajaxChangeValue;
	http.send(null);
	
}
function ajaxChangeValue(){
    if(http.readyState == 4){
        if (http.status == 200){
            str=http.responseText;
            try{
                //alert(str);
                //parent.frames['icerik'].document.getElementById('tdBody').innerHTML=str;
                document.getElementById(strDivId).innerHTML=str;
                if(strDivId=='divMuzFotoGaleri2'){
                    CSBfleXcroll('divMuzFotoGaleri');
                }
            }
            catch(ex){
                //parent.frames['icerik'].location.href='home.html';
                //setTimeout('getEserDetay('+intEserId+','+intTypeId+');', 1000);
                setTimeout('getAjaxValue('+intValueId+','+intTypeId+','+strDivId+');', 1000);
            }
            }else{
            //alert('http.status:'+http.status+'\n'+http.responseText);
            }
    }
}


