﻿var _popupId = '';
var _closeLinkContainerId = '';


//uncomment if the page that this script is being used on does not already contain this declaration
//$j = jQuery.noConflict();  


function openPopup(popupId, closeLinkContainerId) {
    
    var pageHeight = $j(document).height();  
    var pageWidth = $j(window).width();  
       
    $j('#pageMask').css({'width':pageWidth,'height':pageHeight});  
           
    $j('#pageMask').show();
    $j('#pageMask').fadeTo(0,0.8);
    
    $j(closeLinkContainerId).css('top', 126);
    $j(closeLinkContainerId).show();
       
    $j(popupId).css('top',  122);    
    $j(popupId).show();
     
    _closeLinkContainerId = closeLinkContainerId;
    _popupId = popupId;
       
 }
 
 
 function closePopup() {

	$j(_closeLinkContainerId).hide();
    $j(_popupId).hide();
    $j('#pageMask').hide();
 
 }