function closePopup(DivAdi)
 {
    
	 document.getElementById("divMsg-" + DivAdi).style.display="none";    
        objDiv = document.getElementById("divg");
        objDiv.style.display = "none"; 
        return false;
 }
 
  function showPopupVideo(DivAdi)
 {
     try
     {  
         
         objDiv = document.getElementById("divg");
            objDiv.style.display = "block"; 
			document.getElementById("divMsg-" + DivAdi).style.display = "block";
			
			
			
			var Boyut = 0 ;
			Boyut = ((document.documentElement.scrollTop) - (document.documentElement.clientHeight));
			
			var cikar = 0;
			//cikar = ((document.documentElement.clientHeight) - (parseInt(document.getElementById("divMsg-" + DivAdi).style.height,10)+50)); 
			cikar = ((document.documentElement.clientHeight) - (390)); 
			
			//cikar = (parseInt(document.documentElement.clientHeight,10) - parseInt(300,10)); 

			
			
			document.getElementById("divMsg-" + DivAdi).style.top = ((document.documentElement.scrollTop) + (cikar / 2)) + "px";
			objDiv.style.width = document.body.offsetWidth+"px";
            objDiv.style.height= document.body.offsetHeight+"px"; 
			
                  
     }
     catch(e)
     {
         alert(e);
     }
     return false   
 }
 
 function showPopup(DivAdi,Uid,Nick,Lnk_Mesaj,Sayfa)
 {
     try
     {  
         
         objDiv = document.getElementById("divg");
            objDiv.style.display = "block"; 
			document.getElementById("divMsg-" + DivAdi).style.display = "block";
			
			sndUserCheck_MesajGonderType(Sayfa,Nick,Uid,Lnk_Mesaj)
			
			var Boyut = 0 ;
			Boyut = ((document.documentElement.scrollTop) - (document.documentElement.clientHeight));
			
			var cikar = 0;
			//cikar = ((document.documentElement.clientHeight) - (parseInt(document.getElementById("divMsg-" + DivAdi).style.height,10)+50)); 
			cikar = ((document.documentElement.clientHeight) - (390)); 
			
			//cikar = (parseInt(document.documentElement.clientHeight,10) - parseInt(300,10)); 

			
			
			document.getElementById("divMsg-" + DivAdi).style.top = ((document.documentElement.scrollTop) + (cikar / 2)) + "px";
			objDiv.style.width = document.body.offsetWidth+"px";
            objDiv.style.height= document.body.offsetHeight+"px"; 
			
			
			if (Uid == 0){
			document.getElementById("Data_Uid").value = 0;
			}else{
			document.getElementById("Data_Uid").value = Uid ;
			document.getElementById("Data_Nick").value = Nick ;
			document.getElementById("Link_Mesaj").value = Lnk_Mesaj;
			
			}
			
			      
                  
     }
     catch(e)
     {
         alert(e);
     }
     return false   
 }
  function showPopupEn(DivAdi,Uid)
 {
     try
     {  
         
         objDiv = document.getElementById("divg");
            objDiv.style.display = "block"; 
			document.getElementById("divMsg-" + DivAdi).style.display = "block";
			
			var Boyut = 0 ;
			Boyut = ((document.documentElement.scrollTop) - (document.documentElement.clientHeight));
			
			var cikar = 0;
			//cikar = ((document.documentElement.clientHeight) - (parseInt(document.getElementById("divMsg-" + DivAdi).style.height,10)+50)); 
			cikar = ((document.documentElement.clientHeight) - (390)); 
			
			//cikar = (parseInt(document.documentElement.clientHeight,10) - parseInt(300,10)); 

			
			
			document.getElementById("divMsg-" + DivAdi).style.top = ((document.documentElement.scrollTop) + (cikar / 2)) + "px";
			objDiv.style.width = document.body.offsetWidth+"px";
            objDiv.style.height= document.body.offsetHeight+"px"; 
			
			      
                  
     }
     catch(e)
     {
         alert(e);
     }
     return false   
 }

function createRequestObject_MesajGonderType() 
{ 
var ro_MesajGonderType; 
  var browser_MesajGonderType = navigator.appName; 
  if(browser_MesajGonderType == "Microsoft Internet Explorer") { 
       ro_MesajGonderType = new ActiveXObject("Microsoft.XMLHTTP"); 
  } else { 
    ro_MesajGonderType = new XMLHttpRequest(); 
  } 
  return ro_MesajGonderType; 
} 

var http_MesajGonderType = createRequestObject_MesajGonderType(); 
function sndReq_MesajGonderType(action) 
{ 
     http_MesajGonderType.open("get", "/02/subModalType.asp"); 
  http_MesajGonderType.onreadystatechange = handleResponse_MesajGonderType; 
  http_MesajGonderType.send(null); 
} 

function handleResponse_MesajGonderType() 
{ 
     if(http_MesajGonderType.readyState == 2)
	 {
		 document.getElementById('Mesaj_Durum').innerHTML='<div align="center" style="margin-top:70px; margin-bottom:30px;"><img src="/Images/loading.gif" width="66" height="66" /></div><div align="center">Yükleniyor</div>';
	 }
	 if(http_MesajGonderType.readyState == 3)
	 {
		document.getElementById('Mesaj_Durum').innerHTML='<div align="center" style="margin-top:70px; margin-bottom:30px;"><img src="/Images/loading.gif" width="66" height="66" /></div><div align="center">Yükleniyor</div>';
	 }	 
	 if(http_MesajGonderType.readyState == 4) { 
	 
    var response_MesajGonderType = http_MesajGonderType.responseText; 

    var update_MesajGonderType = new Array(); 

    if(response_MesajGonderType.indexOf('|' != -1)) 
	{ 
         update_MesajGonderType = response_MesajGonderType.split("|"); 
		 var text_MesajGonderType = "<div style='z-index:999'>"+update_MesajGonderType[1]+"</div>";
         document.getElementById(update_MesajGonderType[0]).innerHTML = text_MesajGonderType; 
    } else {
	}
  } 	 
} 
function sndUserCheck_MesajGonderType(MsgType,Data_Nick,Data_Uid,Link_Mesaj) 
{
//alert(Uid + "aa" + MsgType);
document.getElementById('Mesaj_Durum').innerHTML='<div align="center" style="margin-top:70px; margin-bottom:30px;"><img src="/Images/loading.gif" width="66" height="66" /></div><div align="center">Yükleniyor</div>';

http_MesajGonderType.open("get", "/02/subModalType.asp?MsgType=" + MsgType +"&Data_Nick=" + Data_Nick +"&Data_Uid="+ Data_Uid +"&Link_Mesaj="+ Link_Mesaj ); 
http_MesajGonderType.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 
http_MesajGonderType.onreadystatechange = handleResponse_MesajGonderType; 
http_MesajGonderType.send(null); 
return true;

}
