function resizeChildFrame(h) {
	var child = "childframe";
	if (arguments.length > 1) child = arguments[1];
	try{
	g=document.getElementById(child)
	if(g!=null && document.getElementById(g.id) != null) {
	g.style.display = 'block';
	g.style.height = h + "px";
	//alert("From child "+g.style.height)
    }
//	resizeCall4Child();
	}
	catch(err){/*alert(err)*/}
}

function resizeFrame(f) {
	try{
	if(f!=null && document.getElementById(f.id) != null) {
	f.style.height = f.contentWindow.document.body.scrollHeight + "px";
	//alert("From parent "+f.style.height)
    }
	}
	catch(err){/*alert(err)*/}
}

function resizeCall4Parent()
{
	try{
		resizeFrame(document.getElementById('childframe'))
	}
	catch(err){/*alert(err)*/}
}

function resizeCall4Child()
{
	var minheight = 0;
	if (arguments.length > 0) minheight = arguments[0];

	try{
//		if (parent.document.location.href != window.document.location.href) {
		//alert("height "+document.body.clientHeight);
		if(navigator.userAgent.indexOf('Chrome')>0)
		{
			parent.resizeChildFrame(Math.max(document.body.clientHeight,minheight), self.name)
		}
		else
		{
			parent.resizeChildFrame(Math.max(document.body.scrollHeight,minheight), self.name)
		}	
//		}
	}
	catch(err){/*alert(err)*/}
}
