// JavaScript Document
// This javascript is used for  dynamically change the ifame height.
// No scrollbar is display in iframe
// used for singe frame, multiple frame (child and parent) and only parent frame



/*
// This function basically used for changing the iframe height dynamically
// used when two frame is defined. i.e parent and child
// it is called by child function to change both parent and child frame height

// @para- f- object of child frame
// @para- parentframe - contain name of Parentframe
*/

function resizeChildFrame(f,parentframe) {
f.style.height = f.contentWindow.document.body.scrollHeight + "px";

if(parentframe!="")
parent.document.getElementById(parentframe).style.height = window.parent.frames[0].document.body.scrollHeight + "px";

}


/*
// This function basically used for changing the iframe height dynamically
// used when two or single frame is defined. i.e (parent and child) or only parent
// it is called by parent function to change parent frame height

// @para- f- object of Parentframe
*/

function resizeParentFrame(f) {
//alert(window.frames[0].document.body.scrollHeight);
f.style.height='150px';
f.style.height = window.frames[0].document.body.scrollHeight + "px";
//f.style.width = window.frames[0].document.body.scrollWidth + "px";
//f.style.height="500px";
}

function FixedParentFrame(f) {
//alert(window.frames[0].document.body.scrollHeight);
//f.style.width='150px';
var height;

if(window.frames[0].document.body.scrollHeight<600)
height=600;
else
height=window.frames[0].document.body.scrollHeight;

f.style.height = height + "px";
f.style.width = window.frames[0].document.body.scrollWidth + "px";
//f.style.height="500px";
}


/*
// This function basically used for changing the iframe height specified in parameter
// used when two or single frame is defined. i.e (parent and child) or only parent
// it is called by parent function to change parent frame height

// @para- f- object of Parentframe
// @para- size- size of Parentframe

*/
function FixedFrameSize(f,size)	{
//alert(size);
parent.document.getElementById(f).style.height = size + "px";
}

function SetFrameSize(parentframe)	{
parent.document.getElementById(parentframe).style.height = window.parent.frames[0].document.body.scrollHeight + "px";	
}