var g_sDocumentWindowID ='documentwindow';

var g_shiSliderRightID = 'shiSliderRightID';
var g_shiSliderRightColumnID = 'marginalMoveBarID';
var g_iActualColumnRightWidth = 260;
var g_iMinColumnRightWidth = 144;
var g_iMaxColumnRightWidth = 500;
var g_iCloseColumnRightWidth = 40;
var g_sCookieFieldNameColumnRight = 'shiColumnRightWidth';

var g_shiSliderLeftID = 'shiSliderLeftID';
var g_shiSliderLeftColumnID = 'sliderMoveBarLeft';
var g_iActualColumnLeftWidth = 260;
var g_iMinColumnLeftWidth = 160;
var g_iMaxColumnLeftWidth = 600;
var g_iCloseColumnLeftWidth = 30;
var g_sActiveElementLeftId = 'outlookActiveElementId';
var g_sCloseElementLeftId = 'outlookCloseElementId';
var g_sCookieFieldNameColumnLeft = 'shiColumnLeftWidth';

var g_bMinimizeColumnLeft  = 'true';
var g_bMinimizeColumnRight = 'true';

var drag_obj = null;
var mousePositionX = 0;
var s_w = 5;

/** Configuration of Slider 
* The following functions are set the attributes of cssClasses and divs
**/
function setCSSClassesForLeftSlider(areaWidth)
{
    cssRule('.outlookToolbarWidthOuter','width',(areaWidth)+"px");
    cssRule('.outlookToolbarWidth','width',(areaWidth-4)+"px");
}

function setCSSClassesForRightSlider(areaWidth)
{
    if(g_iActualColumnRightWidth==0){
        cssRule(".marginalAreaWidth","width", (areaWidth) +"px");
        //cssRule(".contextArea","width", (areaWidth) + "px");
        cssRule(".marginalAreaWidthOuter","width", areaWidth +"px");
        cssRule(".marginalMasterTable","width", areaWidth +"px");
    }else{
        cssRule(".marginalAreaWidth","width", (areaWidth-8) +"px");
        cssRule(".contextArea","width", (areaWidth-8) + "px");
        cssRule(".marginalAreaWidthOuter","width", areaWidth +"px");
        cssRule(".marginalMasterTable","width", areaWidth +"px");
        cssRule(".marginalScrollDiv","width", (areaWidth-7) +"px");
        cssRule(".marginalScrollWidth","width", (areaWidth-12) +"px");
    }
}

function setSHISliderDisplayOpenRight()
{
    if (document.getElementById('marginalMasterTableID') != null)
	document.getElementById('marginalMasterTableID').style.display= "block";//"inline";
    if (document.getElementById('marginalMoveBarHiddenID') != null)
	document.getElementById('marginalMoveBarHiddenID').style.display = "none";
    if (document.getElementById('marginalMoveBarID') != null)
	document.getElementById('marginalMoveBarID').style.display = "block";//"inline";
}
function setSHISliderDisplayCloseRight()
{
    if(g_iActualColumnRightWidth==0){
        document.getElementById('marginalMoveBarID').style.display = "none";
        document.getElementById('marginalMoveBarHiddenID').style.display = "none";
        document.getElementById('marginalMasterTableID').style.display= "none";
    }else{
        document.getElementById('marginalMoveBarID').style.display = "none";
        document.getElementById('marginalMoveBarHiddenID').style.display = "block";
        document.getElementById('marginalMasterTableID').style.display= "none";
    }
}
function setSHISliderDisplayOpenLeft()
{
    document.getElementById(g_sCloseElementLeftId).style.display = 'none';
    document.getElementById(g_sActiveElementLeftId).style.display = "block";//'inline';
}
function setSHISliderDisplayCloseLeft()
{
    document.getElementById(g_sCloseElementLeftId).style.display = 'block';
    document.getElementById(g_sActiveElementLeftId).style.display = 'none';        
}

function initateSliderElements(){
    insertSlidersIntoHTML();
    initiateLeftSlider();
}

