	function resize()
	{
        // get these values after the document has been fully opulated
        var browser_type=navigator.appName
        var browser_version=parseInt(navigator.appVersion)
        var resize = false;
         //Width
        var displayWidth = window.top.document.body.offsetWidth;
        var actualWidth = document.body.scrollWidth;
        var displayWidth = window.top.document.body.offsetWidth;
        
        if (actualWidth > displayWidth) 
        {
            resize = true;
            displayWidth = actualWidth+20;
        }
        var widthOffset = 6;
        
        //Height
        var displayHeight = window.top.document.body.offsetHeight;
        var actualHeight = document.body.scrollHeight;
        if (actualHeight > displayHeight) 
        {
            resize = true;
            displayHeight = actualHeight+25; // +25 for the title bar
        }
        var heightOffset = 6;
        if (document.all)
        { // IE 
            heightOffset += 55;
        }
        else
        {
            widthOffset  += 0;
            heightOffset += 60;
        }
        // make sure we do not resize bigger than the screen resolution
        if (displayWidth+widthOffset > window.screen.width)
            displayWidth = window.screen.width;
            
        if (displayHeight+heightOffset > window.screen.height)
            displayHeight = window.screen.height;
        
        resizeTo(displayWidth+widthOffset, displayHeight+heightOffset);   
        window.moveTo((window.screen.availWidth-displayWidth)/2,(window.screen.availHeight-displayHeight)/2);
	}
	
	function resizeThickBox()
	{
	    
	    $(document).ready(function(){
          // Using multiple unit types within one animation.
          
          var w = document.documentElement.scrollWidth;
          var frame = parent.document.getElementById("TB_iframeContent");
          if (document.all)
          { // IE 
             h = document.body.scrollHeight + 20;
             w = document.body.scrollWidth;
          }
          else
          { // FF 
             if(document.getElementById("infoTekstPopup") != null)
             {
                h = document.getElementById("infoTekstPopup").offsetHeight + 50;
             }
             else
             {
                if(document.getElementById("thickboxForm")!=null)
                {
                    h = document.getElementById("thickboxForm").offsetHeight + 30;
                }
                else
                {
                    $('form').attr("id","infoTekstPopup");
                    h = document.getElementById("infoTekstPopup").offsetHeight + 50;
                }
             }
            
             w = document.body.scrollWidth;
          } 
          
          var TBwindow = parent.document.getElementById("TB_window");
          
          $(frame).animate(
            {
                height: h+"px"
            }, 300 )
        });
	}
	
	
