﻿// JScript File

 var CurrentSmallImage = '';
          
        
        function ShowProductEditPopUp(strProductID){
            CurrentSmallImage = 'asdf';
            var popupURL = 'EditProductPopUp.aspx?ProductID=' + strProductID;
            showPopWin(popupURL, 400, 300, null);
        }
        function ShowVideoEditPopUp(strBCMediaID){
            CurrentSmallImage = 'asdf';
            var popupURL = 'EditVideoPopUp.aspx?BCMediaID=' + strBCMediaID;
            showPopWin(popupURL, 400, 300, null);
        }
        
        function ShowEmailPopUp(strProductID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = 'SendEmailPopUp.aspx?ProductID=' + strProductID;
                    showPopWin(popupURL, 400, 300, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
           function ShowIsSheDimeCommentPopUp(strProductID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = 'AddCommentPopUp.aspx?ProductID=' + strProductID;
                    showPopWin(popupURL, 400, 300, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
          
          function ShowUrbanBlogPopUp(strProductID){
             if(pageCompletelyLoaded){
                try{
                    var popupURL = 'EditUrbanBlogListPopUp.aspx?BlogListID=' + strProductID;
                    showPopWin(popupURL, 400, 500, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
          
          function ShowNewUrbanBlogPopUp(){
             if(pageCompletelyLoaded){
                try{
                    var popupURL = 'NewUrbanBlogListPopUp.aspx';
                    showPopWin(popupURL, 400, 300, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
          
          function ShowPopUpEditSuperlative(strProductID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = 'EditSuperlativePopUp.aspx?ProductID=' + strProductID;
                    showPopWin(popupURL, 400, 300, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
          
         function SendMatchUpPopUp(strMatchUpID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = 'SendMatchUpPopUp.aspx?MatchUpID=' + strMatchUpID;
                    showPopWin(popupURL, 400, 300, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
          
          
           function ShowMatchUpResultsPopUp(strMatchUpID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = 'MatchUpResultsPopUp.aspx?MatchUpID=' + strMatchUpID;
                    showPopWin(popupURL, 325, 250, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
        
        
        function ShowCellPopUp(strProductID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = 'SendCellPopUp.aspx?ProductID=' + strProductID;
                    showPopWin(popupURL, 400, 120, null);
               }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
        }
          
        function ShowProductInsertPopUp(strSmallImage, strLargeImage, strProductName){
             if(pageCompletelyLoaded){
                try{
                    CurrentSmallImage = strSmallImage;
                    var popupURL = 'InsertProductPopUp.aspx?SmallImageURL=' + strSmallImage+'&LargeImageURL='+ strLargeImage +'&ProductName='+ strProductName;
                    showPopWin(popupURL, 400, 300, null);
               }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
          }
          
         function ShowSendSuperlativePopUp(strSuperlativeID, strSuperlativeItemID){
            if(pageCompletelyLoaded){
                try{
                    var popupURL = '../SendSuperlativePopUp.aspx?SuperlativeID=' + strSuperlativeID;
                    showPopWin(popupURL, 400, 300, null);
                }catch(err){
                    alert(err.description);
                }
            }else{
                alert("Page not fully loaded. Gimme a sec...");
            }
         }
         
         function HandleProductClose(strSmallImage){
            hidePopWin(false);
            if(strSmallImage != ''){
                __doPostBack('', strSmallImage);
                CurrentSmallImage = '';
             }
         }
