﻿/*
Search Screen Handlers
Copyright 2009: Emblem Software LLC
This notice must stay intact
*/

function showAdvanced() {
    var advanced = document.getElementById("advancedSearch");
    var span1 = document.getElementById("advancedTag");
    if (span1.innerHTML == "show advanced") {
        advanced.style.display = 'block';
        span1.innerHTML = "hide advanced";
    }
    else {
        advanced.style.display = 'none';
        span1.innerHTML = "show advanced";
    }

}

function showReport(imageID) {

    uxReport.SetContentUrl("/Popups/ReportImage.aspx?ImageID=" + imageID);
    uxReport.SetHeaderText("Report Image");
    uxReport.Show();

    return false;
}

function showFavorite(imageID) {

    uxReport.SetContentUrl("/Popups/AddFavorite.aspx?ImageID=" + imageID);
    uxReport.SetHeaderText("Add To Favorites");
    uxReport.Show();
    return false;
}

function showLightbox(imageID) {

    uxReport.SetContentUrl("/Popups/AddLightboxImage.aspx?ImageID=" + imageID);
    uxReport.SetHeaderText("Add To Lightbox");
    uxReport.Show();
    return false;
}

function showNewLightbox() {

    uxReport.SetContentUrl("/Popups/AddLightbox.aspx");
    uxReport.SetHeaderText("Add New Lightbox");
    uxReport.Show();
    return false;
}

function showEmail(imageID) {

    uxReport.SetContentUrl("/Popups/EmailImage.aspx?ImageID=" + imageID);
    uxReport.SetHeaderText("Email Image");
    uxReport.Show();
    return false;
}

function showAgencyPricing(agencyID, downloads) {

    uxReport.SetContentUrl("/Popups/AgencyPricing.aspx?a=" + agencyID + "&d=" + downloads);
    uxReport.SetHeaderText("Agency Pricing");
    uxReport.Show();
    return false;
}
