    function show_notify_OOS(category_id, product_id, sku_id){
        initialise_oos();
        if (category_id == 'AVCATID') {
            $('notify_OOS_iframe').src ='/templates/includes/popups/notify_OOS.tmpl?CATEGORY_ID='+oos_cat_id+'&PRODUCT_ID='+oos_prod_id+'&SKU_ID='+oos_sku_id ;
        }
        else {
            $('notify_OOS_iframe').src ='/templates/includes/popups/notify_OOS.tmpl?CATEGORY_ID='+category_id+'&PRODUCT_ID='+product_id+'&SKU_ID='+sku_id;
        }
        Effect.Center('notify_OOS_popup');
        Effect.toggle('notify_OOS_popup','appear',{duration: 0.4});        
    }
     
    function hide_notify_OOS(){
        Effect.toggle('notify_OOS_popup','appear',{duration: 0.2});
        $('notify_OOS_iframe').src='/templates/includes/popups/notify_OOS_wait.tmpl';
    }
    
    function initialise_oos(){
        if (!$('notify_OOS_popup')){
        
            var html = "<div id='notify_OOS_popup' style='display: none;'>"+
                       "     <div id='close_button' style='position:absolute; top:2px; right:5px;'>"+
                       "         <a href='javascript:hide_notify_OOS()'>"+
                       "             <img src='/images/popups/notify_OOS/close_btn.gif' width='17' height='16' border='0' alt='close' />"+
                       "         </a>"+
                       "     </div>"+
                       "     <iframe id='notify_OOS_iframe' src='#' frameborder='no' scrollable='no' style='width:376px; height:186px;'></iframe>"+
                       " </div>";
            
            new Insertion.Top($('dummy_container'), html);
        }
    }
    
    function show_coming_soon(category_id){
        initialise_coming_soon();
        $('coming_soon_iframe').src ='/templates/includes/popups/coming_soon.tmpl?CATEGORY_ID='+category_id;
        Effect.Center('coming_soon_popup');
        Effect.toggle('coming_soon_popup','appear',{duration: 0.4});        
    }
    
        
    function hide_coming_soon(){
        Effect.toggle('coming_soon_popup','appear',{duration: 0.2});
        $('coming_soon_iframe').src='/templates/includes/popups/coming_soon_wait.tmpl';
    }
    
    function initialise_coming_soon(){
        if (!$('coming_soon_popup')){
        
            var html = "<div id='coming_soon_popup' style='display: none;'>"+
                       "     <div id='close_button' style='position:absolute; top:2px; right:2px;'>"+
                       "         <a href='javascript:hide_coming_soon()'>"+
                       "             <img src='/images/popups/coming_soon/close_btn.gif' width='17' height='16' border='0' alt='close' />"+
                       "         </a>"+
                       "     </div>"+
                       "     <iframe id='coming_soon_iframe' src='#' frameborder='no' scrollable='no' style='width:374px; height:184;'></iframe>"+
                       " </div>";
            
            new Insertion.Top($('dummy_container'), html);
        }
    }
    

    Effect.Center = function(element)
    {
        try
        {
            element = $(element);
        }
        catch(e)
        {
            return;
        }
    
        var my_width  = 0;
        var my_height = 0;
    
        if ( typeof( window.innerWidth ) == 'number' )
        {
    
            my_width  = window.innerWidth;
            my_height = window.innerHeight;
        }
        else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
        {
    
            my_width  = document.documentElement.clientWidth;
            my_height = document.documentElement.clientHeight;
        }
        else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
        {
    
            my_width  = document.body.clientWidth;
            my_height = document.body.clientHeight;
        }
    
        element.style.position = 'absolute';
        element.style.zIndex   = 10001;
    
        var scrollY = 0;
    
        if ( document.documentElement && document.documentElement.scrollTop )
        {
            scrollY = document.documentElement.scrollTop;
        }
        else if ( document.body && document.body.scrollTop )
        {
            scrollY = document.body.scrollTop;
        }
        else if ( window.pageYOffset )
        {
            scrollY = window.pageYOffset;
        }
        else if ( window.scrollY )
        {
            scrollY = window.scrollY;
        }
    
        var elementDimensions = Element.getDimensions(element);
        var setX = (( my_width  - elementDimensions.width  ) / 2);
        var setY = (( my_height - elementDimensions.height ) / 2 + scrollY);
       
        //Warning - Position to be deprecated in Prototype 1.6 and replaced by Element
        if ($('dummy_container')){
            setX = setX - Position.cumulativeOffset($('dummy_container'))[0];
            setY = setY - Position.cumulativeOffset($('dummy_container'))[1];
        }
    
        setX = ( setX < 0 ) ? 0 : setX;
        setY = ( setY < 0 ) ? 0 : setY;
    
        element.style.left = setX + "px";
        element.style.top  = setY + "px";
    }

