	function resize_iframe(frameObj) {

	try {
	 document.domain = "lut.fi";
	}
 	catch(e) { }

      	try 
        {	
	     var oFrame	= document.getElementById("iframe_id");

             if(navigator.userAgent.indexOf("MSIE")!=-1)
             {
		var oBody = document.getElementById("iframe_id").contentWindow.document.body;
		oFrame.style.height = oBody.scrollHeight + 20;
	     }
	
             if(navigator.userAgent.indexOf("Firefox")!=-1)
             {
		oFrame.parentNode.style.height="auto";
		//oFrame.height = oFrame.contentDocument.documentElement.offsetHeight + 20;
		oFrame.height = oFrame.contentDocument.height + 5;
		oFrame.style.overflow = 'hidden';
             }

	     if (window.opera)
	     {
		 oFrame.height = 0;
		 oFrame.style.overflow = 'hidden';
		 oFrame.scrolling='no';
		 oFrame.style.display="block";
		//	var oBody = oFrame.contentWindow.document.body;
		//oFrame.style.height = oBody.scrollHeight + 20;	 
		//alert(oFrame.contentDocument.offsetHeight);
		//alert(oFrame.contentWindow.document.body.scrollHeight);
		setTimeout("resize_opera()",100);
		setTimeout("resize_fix()",200);
		//oFrame.height = oFrame.contentWindow.document.body.scrollHeight; 
             }

	}
	catch(e) { }	

	}

	function resize_fix()
	{
		var oFrame	= document.getElementById("iframe_id");
	        oFrame.width = 530;
		if (oFrame.height == 0) oFrame.height = 600;	
	}

	function resize_opera() 
	{
		var oFrame	= document.getElementById("iframe_id");
		oFrame.style.display="block";
		oFrame.contentWindow.document.body.style.width = 510;
		var fixer = 10;
		if (oFrame.contentWindow.document.body.scrollHeight > 2000) fixer = 60;
		oFrame.height = oFrame.contentWindow.document.body.scrollHeight + fixer; 	
	}


	function launchPicker()
	{
		var url=location.protocol + "//" + location.hostname + ":101" ;
		var callback=function(arr)
		{
			if(arr==null || arr==undefined)
			return;
			var code=arr[0];
			var site=arr[1];
			var list=arr[2];
			var x=document.getElementById("sendToBrowse").previousSibling; <!-- this will need to change if you change the layout -->
			var y=x.previousSibling; <!-- this will need to change if you change the layout -->
			x.value = site + (site == '/' ? '' : '/') + list;
			y.value = code;
		}
		LaunchPickerTreeDialog("Select URL","","","","/",null,"","","/_layouts/images/Copy.gif", 0, callback );
	}
	function clickButton(e, buttonid){ 
	      var evt = e ? e : window.event;
	      var bt = document.getElementById(buttonid);
	      if (bt){ 
	          if (evt.keyCode == 13){ 
	                bt.click(); 
	                return false; 
	          } 
	      } 
	}
	var tld_ = new Array()
	var topDom_ = 13;
	var m_ = "mailto:";
	var a_ = "@";
	var d_ = ".";
	
	function fake(name, dom, tl, params)
	{
		var s = e(name,dom,tl);
		document.write('<a href="'+m_+s+params+'">'+s+'</a>');
	}
	function e(name, dom, tl)
	{
		var s = name+a_;
		if (tl!=-2)
		{
			s+= dom;
			if (tl>=0)
				s+= d_+tld_[tl];
		}
		else
			s+= swapper(dom);
		return s;
	}
	function swapper(d)
	{
		var s = "";
		for (var i=0; i<d.length; i+=2)
			if (i+1==d.length)
				s+= d.charAt(i)
			else
				s+= d.charAt(i+1)+d.charAt(i);
		return s.replace(/\?/g,'.');
	}