
function LoadTrans(ElementID, LoadPage) {
    
    SlideTog(ElementID);   
    
    var loadingCheck = ajaxpage(LoadPage, ElementID)
    
        if (loadingCheck == true) {
        
            SlideTog('ContentWrap');
        
        };

};
    
    function SlideTog(ElementID) {
                                               
        SlideP = document.getElementById(ElementID)       
        CurrentHeight = parseInt(SlideP.style.height)    
        DHeight =  parseInt(SlideP.style.maxHeight)
        Int = 2        
        Steps = 0
                
        if (CurrentHeight >= DHeight) {
            
            EndHeight = 0;     
            PixelChange = (EndHeight-CurrentHeight)/10;
            SlideInc();
            
        };
        
        if (CurrentHeight < DHeight) {
            
            PixelChange = (DHeight-CurrentHeight)/10;
            EndHeight = parseInt(SlideP.style.maxHeight);
            SlideInc();
            
        };

          
        function SlideInc() {
            
            if (Steps == 10) {
                
                SlideP.style.height = EndHeight+'%';
                return
                
            };

                Steps = Steps + 1
                Int = Int + 1;                   
                SlideP.style.height = parseInt(SlideP.style.height)+PixelChange+'%';      
                tSlider = setTimeout(SlideInc, Int);
          
        };
                
    };
 
    
