﻿function s_displayDiv(divname) {
    document.getElementById(divname).style.display = 'block';
}

function s_hideDiv(divname) {
    document.getElementById(divname).style.display = 'none';
}



function addToCalendar() {
    var obj = document.getElementById('grayDiv');
    obj.style.position = 'absolute';
    obj.style.width = '100%';
    obj.style.height = '100%';
    obj.style.top = '0px';
    obj.style.left = '0px';
    obj.style.backgroundColor = '#DFDFDF';
    obj.style.zIndex = '20000';
    obj.style.opacity = '0.4';
    obj.style.filter = 'alpha(opacity = 40)';
    obj.style.display = 'block';

    obj = document.getElementById('myDiv');

    obj.style.display = 'block';
    
    var th = ((screen.availHeight - 100) / 2) ;
    var tw = ((screen.availWidth - 200) / 2);
    obj.style.top = th + "px";
    obj.style.left = tw + "px";

}
function hideCalendar() {

    var obj = document.getElementById('grayDiv');
    obj.style.display = 'none';

    obj = document.getElementById('myDiv');
    obj.style.display = 'none';

}
function addItemToCalendar(bp,nesneTipi, nesneId,tarih) {
    //document.forms[0].action = bp + 'Ascilar/Takvimim.aspx?op=add&t=' + nesneTipi + '&id=' + nesneId + '&tarih=' + document.getElementById(tarih).value
    //document.forms[0].submit();

    document.location.href = bp + 'Ascilar/Takvimim.aspx?op=add&t=' + nesneTipi + '&id=' + nesneId + '&tarih=' + document.getElementById(tarih).value

    //alert(bp);
    //alert(nesneTipi);
    //alert(nesneId);
   // alert (document.getElementById (tarih).value   )
  
}
