/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var currentPosLeft = 0;
var currentPosTop = 0;

function OpenConfirmDialog( Button, Content, ToDo, Bottom, Right, ShowCancelButton, ShowOKButton  ) {
    
    document.getElementById('SCConfirmDialog').style.width = screen.width + 'px';
    document.getElementById('SCConfirmDialog').style.height = document.body.clientHeight + 'px';
    
    currentPosLeft = window.pageXOffset;
    currentPosTop = window.pageYOffset;
    window.scrollTo( 0, 0);
    
    
    //document.body.style.overflow = 'hidden';
    
    document.getElementById('SCConfirmMiddle').innerHTML = Content;
    document.getElementById('SCConfirmButton').src = Button;
    document.getElementById('SCConfirmDo').onclick = function() {eval(ToDo);};
    
    document.getElementById('SCConfirmDialog').style.display = 'block';
    
    if (arguments.length <= 3) Bottom = '';
    if ( Bottom != '' ) {
        document.getElementById('SCConfirmBottom').style.display = 'block';
        document.getElementById('SCConfirmBottom2').innerHTML = Bottom;
    } else {
        document.getElementById('SCConfirmBottom').style.display = 'none';
    }
    
    
    
    if (arguments.length <= 4) Right = '';
    document.getElementById('SCConfirmRight').innerHTML = Right;
    
    if (arguments.length <= 5) ShowCancelButton = true;
    if (!ShowCancelButton)
        document.getElementById('SCConfirmCancelButton').style.display = 'none';
    else
        document.getElementById('SCConfirmCancelButton').style.display = 'inline-block';
    
     if (arguments.length <= 6) ShowOKButton = true;
    if (!ShowOKButton)
        document.getElementById('SCConfirmDo').style.display = 'none'
    else
         document.getElementById('SCConfirmDo').style.display = 'inline-block'
}

function CloseConfirmDialog() {
    document.getElementById('SCConfirmDialog').style.display = 'none';
    document.body.style.overflow = 'auto';
    window.scrollTo( currentPosLeft, currentPosTop);
}





