﻿
function SetSizeDropDown(ctrlId, tValue)
{
eval('SelectObject = document.getElementById(\'' + ctrlId + '\');');
    for(index = 0; index < SelectObject.length; index++) {
        if(SelectObject[index].value == tValue)
            SelectObject.selectedIndex = index;
    }
}

function SetDropDownIndex(ctrlId, ctrlId2) {
    eval('SelectObject = document.getElementById(\'' + ctrlId + '\');');
    eval('SelectObjectSetTo = document.getElementById(\'' + ctrlId2 + '\');');
    SelectObject.selectedIndex = SelectObjectSetTo.selectedIndex;
}

function CopyInput(checkBox, first, second, clearFields)
{
    eval('CheckBox = document.getElementById(\'' + checkBox + '\');');
    eval('FirstBox = document.getElementById(\'' + first + '\');');
    eval('SecondBox = document.getElementById(\'' + second + '\');');
    
    if( CheckBox.checked )
    { SecondBox.value = FirstBox.value; }
    
    if( clearFields )
    { 
        if( !CheckBox.checked )
        { SecondBox.value = ''; }
    }
}

function pageLoad(sender, args)
{
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ShowAfterCartBox);
}

function ShowAfterCartBox() {
    /*eval('divElBlackout = document.getElementById(\'divBlackOutScreen\');');
    divElBlackout.style.display = 'block';*/
    
    eval('divEl = document.getElementById(\'divPostAddOptions\');');
    divEl.style.display = 'block';
}

function HideAfterCartBox(goHref) {
    /*eval('divElBlackout = document.getElementById(\'divBlackOutScreen\');');
    divElBlackout.style.display = 'none';*/

    eval('divEl = document.getElementById(\'divPostAddOptions\');');
    divEl.style.display = 'none';

    if (goHref != 'null')
    { location.href = goHref; }
}

