﻿// eser  Sayfası için

  //tam ektan penceresi
  
   function gercek_resmi_koy()
    {
        var val = document.getElementById('ctl00_CPL1_tam_boyut_yolu').value;
        if (val.length > 10)
        {
            document.getElementById('ctl00_CPL1_eserIMG_gercek').src = val;
        }
    }
  
  function _pencere_boyutu()
  {  
  
      
    var brX = (document.documentElement.clientWidth) - 10;
    var brY = (document.documentElement.clientHeight) - 10;
    
    var sX = brX;
    var sY = brY;
  
    var iX = parseInt(document.getElementById('ctl00_CPL1_grcX').value) +30;
    var iY = parseInt(document.getElementById('ctl00_CPL1_grcY').value) +30;
    
    if (iX)
    {
       if ((iX>35)&&(iX < brX))
       {
         sX = iX
       }
    }
    if (iY)
    {
       if ((iY > 35)&&(iY < brY))
       {
         sY = iY
       }
    }
    document.getElementById('ctl00_CPL1_fullPanel').style.width = sX + "px";
    document.getElementById('ctl00_CPL1_fullPanel').style.height = sY + "px";
    document.getElementById('img_Div').style.height = parseInt(parseInt(sY) - 30) + "px";
    document.getElementById('ctl00_CPL1_fullPanel').style.display = '';
    
  }
  
  function _viewFull()
  {
  
   if (_user_browser_.indexOf("MSIE") >= 0)
   {
       window.document.body.scroll="no";
   }
   else
   {
        document.body.style.height = "500px";
        document.body.style.overflow = "hidden";
   }
   
   gercek_resmi_koy();

   _pencere_boyutu();
   
   $find('ctl00_CPL1_MPE').show();
   
 
   
  
  }
  
  function _closeFull()
  {
  
   if (_user_browser_.indexOf("MSIE") >= 0)
   {
       window.document.body.scroll="yes";
   }
   else
  {
   document.body.style.height = "";
   document.body.style.overflow = "";
  
  }
   
   $find('ctl00_CPL1_MPE').hide();
  
   
   
  }
  
  
  
  // favorileyenler
  
  function __OpenFavz()
  {
    $find('ctl00_CPL1_mdl_favzz').show();
  }
  function __CloseFavz()
  {
    $find('ctl00_CPL1_mdl_favzz').hide();
  }
  
  
  
  
function getFlashHere(obj)
{
if (obj)
{
function getY(oElement)
{
    var iReturnValue = 0;
    while( oElement != null ) 
    {
        iReturnValue += oElement.offsetTop;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
}
function getX(oElement)
{
    var iReturnValue = 0;
    while( oElement != null ) 
    {
        iReturnValue += oElement.offsetLeft;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
}
  
        var obW = obj.clientWidth;
        var obH = obj.clientHeight;
        var obY = getY(obj);
        var obX = getX(obj);
        document.getElementById("ctl00_CPL1_fullFla").style.width = obW + "px";
        document.getElementById("ctl00_CPL1_fullFla").style.height = obH + "px";
        document.getElementById("ctl00_CPL1_fullFla").style.top = obY + "px";
        document.getElementById("ctl00_CPL1_fullFla").style.left = obX + "px";

}      
}