
//function AdjustColumnsHeight() {
//    // get a reference to the three DIVS that make up the columns
//    var mainCol = window.document.getElementById('leftColBox');
//    var rightCol = window.document.getElementById('rightCol');
//    //alert(mainCol);
//    // calculate the max height
//    if (mainCol != null) {
//        var hCenterCol = mainCol.offsetHeight;
//        if (rightCol != null) {
//			var hRightCol = rightCol.offsetHeight;
//		} else {
//			var hRightCol = 100;
//		}
//        var maxHeight = Math.max(hCenterCol, hRightCol);
//        // set the height of all 3 DIVS to the max height
//        mainCol.style.height = (maxHeight + 20) + 'px';
//        if (rightCol != null) {
//			rightCol.style.height = (maxHeight + 20) + 'px';
//    }
//    else {
//        rightCol.style.height = "0";
//    }} 
//    // Show the footer
//    window.document.getElementById('mainFooter').style.visibility = 'inherit';
//}
//window.onload = function() { AdjustColumnsHeight(); }


function GenOverlay() {
    // generate overlay and append to body
    $('<div id="processing-overlay"/>').css({
        position: 'fixed',
        top: 0,
        left: 0,
        width: '100%',
        height: $(window).height() + 'px',
        opacity: .7,
        background: 'white url("/images/processing.gif") no-repeat center'
    }).appendTo('body');
}

function smartColumns() { //Create a function that calculates the smart columns
    //Reset column size to a 100% once view port has been adjusted
    $("ul.column").css({ 'width': "100%" });

    var colWrap = $("ul.column").width(); //Get the width of row
    var colNum = Math.floor(colWrap / 220); //Find how many columns of 200px can fit per row / then round it down to a whole number
    var colFixed = Math.floor(colWrap / colNum); //Get the width of the row and divide it by the number of columns it can fit / then round it down to a whole number. This value will be the exact width of the re-adjusted column

    $("ul.column").css({ 'width': colWrap }); //Set exact width of row in pixels instead of using % - Prevents cross-browser bugs that appear in certain view port resolutions.
    $("ul.column li").css({ 'width': colFixed }); //Set exact width of the re-adjusted column	
}

function clearDefault(el) {
    if (el.defaultValue == el.value) el.value = ""
}

function startupWC(username, password, eventid, filename, brand, displayname, displaylocation, lang, web) {
    var baseUrl = "http://apps.ams1.auctionsolutions.com/vsrlogin/index.php?username=" + username + "&password=" + password + "&eventid=" + eventid + "&filename=" + filename + "&brand=" + brand + "&displayname=" + displayname + "&displaylocation=" + displaylocation + "&lang=" + lang + "&web=" + web;
    window.open(baseUrl, "_blank", "status=0, toolbar=0, menubar=0, resizable=0, width=1035, height=690");
}



function startupFC(username, password, eventid, filename, brand, displayname, displaylocation, lang, web, redirect) {
    var master_files = ["StacksMaster"];
    var popup_window;
    window.open("http://apps.ams1.auctionsolutions.com/stackslogin/index.php?eventid=" + eventid + "&displayname=" + displayname + "&displaylocation=Tampa&filename=" + master_files[0] + "&username=" + username + "&password=" + password + "&brand=" + brand + "&redirect=yes", "_blank", "status=0");
}
    
	