function resizeFrame(){
	
	var iframe = new Iframe('mainFrame');

	if(iframe.height) {
		//showHeight(iframe.idoc);
		iframe.frame.height = iframe.height;
	}

	var idoc = document.getElementById('mainFrame');
	var container = document.getElementById('container');
	var container2 = document.getElementById('container2');
	
	container.style.scrolling = "yes";

	try {
		var url = frames['mainFrame'].location.href;
		container.style.scrolling = "auto";
		idoc.style.overflow = "auto";

	} catch(e) {
		
		container.style.scrolling = "no";
		idoc.style.height = "500px";
		idoc.style.overflow = "auto";
		
	}


}

function Iframe(id){

	this.frame = document.getElementById(id);

	this.idoc = null;
	this.height = null;

	try {
 		if(this.frame.contentDocument) {
      		// Firefox, Opera  
       			this.idoc = this.frame.contentDocument;
			this.height = this.idoc.documentElement.scrollHeight;
		}
    		else if(this.frame.contentWindow) {
       		// Internet Explorer  
       			this.idoc = this.frame.contentWindow.document;
			this.height = this.idoc.body.scrollHeight;
		}
    		else if(this.frame.document) {  
       		// Others?  
			this.idoc = this.frame.document;
			this.height = this.idoc.body.scrollHeight;
		}


	} catch (e){
	}

	return this;
} 



