	

	function hidePopin(in_divid)
	{


        $("#" + in_divid).fadeOut(300, function(){

                $("#popin_coverDiv").fadeOut(300, function(){
		            if(document.getElementById(in_divid) != null)
		            {
			            document.body.removeChild(document.getElementById(in_divid));
		            }
		            $(".flash_content").show();
                });
        });
		
	}
	
	
	var l_popinDiv
	
	function showCover(in_width, in_height, in_divid)
	{
		var l_coverDiv = document.getElementById("popin_coverDiv")
		//$(".flash_content").hide();
		if(l_coverDiv == null)
		{
			l_coverDiv = document.createElement("DIV");
			l_coverDiv.id = "popin_coverDiv";
			document.body.appendChild(l_coverDiv);
			l_coverDiv.style.height = $(document).height() + "px";
			l_coverDiv.style.width = $(document).width() + "px";
			l_coverDiv.style.zIndex = 1000;
			$("#popin_coverDiv").css("opacity", ".85");
		}


        $("#popin_coverDiv").fadeIn(300, function(){});
        
        l_popinDiv = document.getElementById(in_divid)
	    if(l_popinDiv == null) l_popinDiv = document.createElement("DIV");
	    
		l_popinDiv.id = in_divid
		l_popinDiv.style.display = "none";
		l_popinDiv.style.zIndex = 1001;
		$(l_popinDiv).css("position", "absolute");
		$(l_popinDiv).css("margin", "0 auto");
        $(l_popinDiv).css("height", in_height + "px");
        $(l_popinDiv).css("width", in_width + "px");

		document.body.appendChild(l_popinDiv);
	}
	
	function showPopinAjax(in_page, in_width, in_height, in_divid)
	{
	    showCover(in_width, in_height, in_divid);
			$("#" + in_divid).load(in_page, function(){
			  $(this).css({left: (document.body.scrollWidth / 2) - (in_width / 2)});
        
                var popinTop = mouseY - $(this).height() / 2;
                
                
                if(popinTop + $(this).height() > $(document).height())
                {
                    popinTop = ($(document).height() - 20) - $(this).height();    
                }
                
                if(popinTop < 20)
                {
                    popinTop = 20;
                }
                popinTop = 20;
                
                
                $(this).css("top", popinTop + "px");

			  
			  
              $(this).fadeIn(300);
              loadEffects();

			});
	}
	
	function showPopin(in_page, in_width, in_height, in_divid)
	{
            showCover(in_width, in_height, in_divid);
            var popinTop = mouseY - in_height / 2;
            
            
            if(popinTop + in_height > $(document).height())
            {
                popinTop = ($(document).height() - 20) - in_height;  
            }
            
            if(popinTop <= 0) popinTop = 20;
            
			$(l_popinDiv).append('<iframe id="idFrame" src="' + in_page + '" width="100%" height="100%" allowtransparency="true" frameborder="0" scrolling="no"></iframe>');
			$(l_popinDiv).css({top: popinTop, left: (document.body.scrollWidth / 2) - (in_width / 2)});
			
            $("#idFrame".document).ready(function(){
                $(l_popinDiv).fadeIn(300);
            });

	}
	