﻿function ShowCatalogSimplified3(CatalogOID, SupplierID, ticket, OtherURLParameters) {
    ShowCatalog3(CatalogOID, SupplierID, ticket, "ViewCatalog.aspx?Left=1:amp:Right=-1:amp:CatalogOID=" + CatalogOID, OtherURLParameters);

}

function ShowCatalog3(CatalogOID, SupplierID, Password, ShowPage, OtherURLParameters) {
    var intWidth = screen.width;
    var width = 970;
    var height = 626;
    if (intWidth > 1500) {
        width = 1415;
        height = 944;
    }

    if (intWidth < 1024) {
        width = 748;
        height = 512;
    }

    //var useragent = navigator.userAgent.toLowerCase();
    //if (useragent.indexOf("safari") != -1) {
    //    width = 320;
    //    height = 500;
    //}


    var property = "top=0, left=0, resizable=1, width=" + width + ", height=" + height;
    //alert(property);
    var wincatalog = window.open("CatalogView.aspx?CatalogOID=" + CatalogOID + "&SupplierID=" + SupplierID + OtherURLParameters + "&ShowPage=" + ShowPage + "&Password=" + Password + "&Rand=" + Math.random(), 'CatalogViews', property);
    //	var wincatalog = window.open("OpenPage.aspx?CatalogOID=" + CatalogOID + "&SupplierID=168664&ShowPage=" + ShowPage + "&Password=" + Password, 'ActiveMerchandiser', property);
    wincatalog.focus();
}

function ShowSearchResult2(CatalogOID, SupplierID, Password, SearchCriteria, OtherURLParameters) {
    var intWidth = screen.width;
    var intWidth = screen.width;
    var width = 970;
    var height = 626;
    if (intWidth > 1500) {
        width = 1415;
        height = 944;
    }

    if (intWidth < 1024) {
        width = 748;
        height = 512;
    }

    var strSubDir = "";
    var property = "top=0, left=0, resizable=1, width=" + width + ", height=" + height;
    var wincatalog = window.open("CatalogView.aspx?CatalogOID=" + CatalogOID + "&SupplierID=" + SupplierID + OtherURLParameters + "&Password=" + Password + "&SearchCriteria=" + SearchCriteria + "&Rand=" + Math.random(), 'CatalogViewsSearch', property);
    wincatalog.focus();

}
