﻿
//function hideEmptyAds() {
//    $('div.ad-wrapper').each(function(element) {
//        if (element.innerHTML.indexOf('empty.gif') > -1) {
//            element.style.display = 'none';
//        }
//    });
//}

//function showAds() {
//    var OAS_check = false;

//    $('div.ad-wrapper').each(function(i) {
//        if (this.style.display == 'none') {
//            // If ad content has been added to the DOM
//            if (this.innerHTML.indexOf('src') > -1) {
//                if (this.innerHTML.indexOf('empty.gif') == -1) {
//                    this.style.display = 'block';
//                }
//            } else {
//                OAS_check = true;
//            }
//        }
//    });

//    // Continue to poll only if one or more positions weren't loaded
//    if (OAS_check) {
//        setTimeout('showAds()', 3000);
//    }
//}

//$(document).ready(function() {
//    showAds();
//});

/* ad serving */
function expandSuperLinerContainer(superLinerIndex) {
    if ($(".adContainer_" + superLinerIndex)) {
        $(".adContainer_" + superLinerIndex).show()
    }
}

function PopUpImage(imageUrl) {
    var url = imageUrl;
    var windowName = "_moreDetails";
    var windowFeatures = '';
    var windowWidth = 795; // Image display width + padding
    var windowHeight = 740; // Image display height + padding

    windowFeatures = "width=" + windowWidth + ",height=" + windowHeight + ",scrollbars=1,location=0,toolbar=0,menubar=0";
    window.open(url, windowName, windowFeatures);
}

