function sizeIFrames(FTopFrame,FCartIndex,FMainIndex,FCartWidth,FMainWidth,FTopHeight,FBottomHeight,FLeftWidth,FRightWidth,FCornerTop,FPersistFrame,FPersistIndex,FProductIndex,FPersistWidth,FIteration)
{
userBrowser = browserName();
if (FIteration == 1)
	resetIFrames(FTopFrame,FCartWidth,FMainWidth,FTopHeight,FBottomHeight,FLeftWidth,FRightWidth,FCornerTop,FPersistFrame,FPersistWidth,true);

try
{
	cartFrame = FTopFrame.document.getElementById("NexternalCart");
	mainFrame = FTopFrame.document.getElementById("NexternalMain");
	topHTML = FTopFrame.document.getElementById("TopHTML");
	bottomHTML = FTopFrame.document.getElementById("BottomHTML");
	leftHTML = FTopFrame.document.getElementById("LeftHTML");
	rightHTML = FTopFrame.document.getElementById("RightHTML");
	cartTop = FTopFrame.document.getElementById("CartTop");
	mainTop = FTopFrame.document.getElementById("MainTop");
	leftTop = FTopFrame.document.getElementById("LeftTop");
	rightTop = FTopFrame.document.getElementById("RightTop");
	mainTable = FTopFrame.document.getElementById("MainTable");
	cartCell = FTopFrame.document.getElementById("CartFrame");
	mainCell = FTopFrame.document.getElementById("MainFrame");
}
catch(err)
{
	return;
}

if (userBrowser != "Opera")
{
	mainTable.height = "";
	mainTable.width = "";
}

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	try
	{
		persistFrame = FPersistFrame.document.getElementById("NexternalPersist");
		productFrame = FPersistFrame.document.getElementById("NexternalProduct");
		persistTable = FPersistFrame.document.getElementById("PersistTable");
		persistCell = FPersistFrame.document.getElementById("PersistFrame");
		productCell = FPersistFrame.document.getElementById("ProductFrame");
	}
	catch(err)
	{
		return;
	}
	if (userBrowser != "Opera")
	{
		persistTable.height = "";
		persistTable.width = "";
	}
}

if (cartFrame.contentDocument)
{
	if (userBrowser == "Safari" && FIteration > 1)
	{
		windowHeight = FTopFrame.innerHeight;
		windowWidth = FTopFrame.innerWidth;
	}
	else if (FIteration == 1)
	{
		windowHeight = FTopFrame.innerHeight-19;
		windowWidth = FTopFrame.innerWidth-19;
	}
	else
	{
		windowHeight = FTopFrame.document.body.clientHeight;
		windowWidth = FTopFrame.document.body.clientWidth;
	}
}
else
{
	if (FTopFrame.document.documentElement && FTopFrame.document.documentElement.clientHeight)
	{
		windowHeight = FTopFrame.document.documentElement.clientHeight;
		windowWidth = FTopFrame.document.documentElement.clientWidth;
	}
	else
	{
		windowHeight = FTopFrame.document.body.clientHeight;
		windowWidth = FTopFrame.document.body.clientWidth;
	}
}
totalHeight = 0;
totalWidth = 0;

if (topHTML == null)
{
	topHeight = 0;
	topWidth = 0;
}
else
{
	topDefaultHeight = topHTML.scrollHeight;
	topHeight = determineWidthHeight(FTopHeight,windowHeight,topDefaultHeight);
	topHTML.height = topHeight;
	totalHeight += topHeight;
	topWidth = topHTML.scrollWidth;
}

if (bottomHTML == null)
{
	bottomHeight = 0;
	bottomWidth = 0;
}
else
{
	bottomDefaultHeight = bottomHTML.scrollHeight;
	bottomHeight = determineWidthHeight(FBottomHeight,windowHeight,bottomDefaultHeight);
	bottomHTML.height = bottomHeight;
	totalHeight += bottomHeight;
	bottomWidth = bottomHTML.scrollWidth;
}

if (leftHTML == null)
{
	leftWidth = 0;
	leftHeight = 0;
}
else
{
	leftDefaultWidth = leftHTML.scrollWidth;
	leftWidth = determineWidthHeight(FLeftWidth,windowWidth,leftDefaultWidth);
	leftTop.width = leftWidth;
	leftHTML.width = leftWidth;
	totalWidth += leftWidth;
	leftHeight = leftHTML.scrollHeight;
}

if (rightHTML == null)
{
	rightWidth = 0;
	rightHeight = 0;
}
else
{
	rightDefaultWidth = rightHTML.scrollWidth;
	rightWidth = determineWidthHeight(FRightWidth,windowWidth,rightDefaultWidth);
	rightTop.width = rightWidth;
	rightHTML.width = rightWidth;
	totalWidth += rightWidth;
	rightHeight = rightHTML.scrollHeight;
}

topBottomMaxWidth = Math.max(topWidth,bottomWidth);
if (topBottomMaxWidth < windowWidth+19 || userBrowser == "Firefox" || userBrowser == "Netscape" || userBrowser == "Safari")
	topBottomMaxWidth -= 19;
leftRightMaxHeight = Math.max(leftHeight,rightHeight);
if (leftRightMaxHeight < windowHeight+19 || userBrowser == "Firefox" || userBrowser == "Netscape" || userBrowser == "Safari")
	leftRightMaxHeight -= 19;

if (FCornerTop)
{
	remainingHeight = windowHeight;
	remainingWidth = Math.max(windowWidth,topBottomMaxWidth);
}
else
{
	remainingHeight = Math.max(windowHeight,leftRightMaxHeight);
	remainingWidth = windowWidth;
}
remainingHeight -= (topHeight+bottomHeight);
remainingWidth -= (leftWidth+rightWidth);

if (cartFrame.contentDocument)
{
	if ((userBrowser == "Safari" || userBrowser == "Firefox" || userBrowser == "Netscape") && FIteration == 1 && FMainWidth == "" && !FCornerTop && topHeight+bottomHeight > 0)
	{
		cartDefaultWidth = determineWidthHeight(FCartWidth,windowWidth,0);
		mainDefaultWidth = remainingWidth - cartDefaultWidth;
	}
	else
	{
		cartDefaultWidth = cartFrame.contentDocument.body.scrollWidth;
		mainDefaultWidth = Math.max(mainFrame.contentDocument.body.scrollWidth,mainFrame.contentDocument.body.offsetWidth)+1;
	}
}
else
{
	if (cartFrame.Document)
	{
		try
		{
			cartDefaultWidth = cartFrame.Document.body.scrollWidth;
			mainDefaultWidth = mainFrame.Document.body.scrollWidth;
		}
		catch(err)
		{
			return;
		}
	}
	else
	{
		cartDefaultWidth = FTopFrame.frames[FCartIndex].document.body.offsetWidth;
		mainDefaultWidth = FTopFrame.frames[FMainIndex].document.body.offsetWidth;
	}
}
cartWidth = determineWidthHeight(FCartWidth,windowWidth,cartDefaultWidth);
cartTop.width = cartWidth;
cartCell.width = cartWidth;
remainingWidth -= cartWidth;
totalWidth += cartWidth;

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	if (persistFrame.contentDocument)
	{
		persistDefaultWidth = Math.max(persistFrame.contentDocument.body.scrollWidth,persistFrame.contentDocument.body.offsetWidth);
		productDefaultWidth = Math.max(productFrame.contentDocument.body.scrollWidth,productFrame.contentDocument.body.offsetWidth);
	}
	else
	{
		if (persistFrame.Document)
		{
			persistDefaultWidth = persistFrame.Document.body.scrollWidth;
			productDefaultWidth = productFrame.Document.body.scrollWidth;
		}
		else
		{
			persistDefaultWidth = FPersistFrame.frames[FPersistIndex].document.body.offsetWidth;
			productDefaultWidth = FPersistFrame.frames[FProductIndex].document.body.offsetWidth;
		}
	}

	persistWidth = determineWidthHeight(FPersistWidth,windowWidth,persistDefaultWidth);
	persistCell.width = persistWidth;
	remainingWidth -= persistWidth;
	totalWidth += persistWidth;

	if (FMainWidth == "")
	{
		productWidth = Math.max(productDefaultWidth,remainingWidth);
		if (!FCornerTop)
			productWidth = Math.max(productWidth,topBottomMaxWidth-cartWidth-persistWidth);
	}
	else
	{
		if (FMainWidth.indexOf("%") == -1)
			tempProductWidth = FMainWidth - persistWidth;
		else
			tempProductWidth = (FMainWidth*windowWidth/100) - persistWidth;
		tempProductWidth = tempProductWidth.toString();
		productWidth = determineWidthHeight(tempProductWidth,windowWidth,productDefaultWidth);
	}
	productCell.width = productWidth;
	totalWidth += productWidth;

	mainWidth = persistWidth + productWidth;
	mainTop.width = mainWidth;
	mainCell.width = mainWidth;
}
else
{
	tempMainWidth = determineWidthHeight(FMainWidth,windowWidth,mainDefaultWidth);
	if (FMainWidth == "")
	{
		mainWidth = Math.max(tempMainWidth,remainingWidth);
		if (!FCornerTop)
			mainWidth = Math.max(mainWidth,topBottomMaxWidth-cartWidth);
	}
	else if (userBrowser == "Firefox" || userBrowser == "Netscape" || userBrowser == "Safari")
		mainWidth = tempMainWidth-1;
	else
		mainWidth = tempMainWidth;
	mainTop.width = mainWidth;
	mainCell.width = mainWidth;
	totalWidth += mainWidth;
}

if (cartFrame.contentDocument)
{
	cartDefaultHeight = cartFrame.contentDocument.body.scrollHeight;
	mainDefaultHeight = mainFrame.contentDocument.body.scrollHeight;
}
else
{
	if (cartFrame.Document)
	{
		cartDefaultHeight = cartFrame.Document.body.scrollHeight;
		mainDefaultHeight = mainFrame.Document.body.scrollHeight;
	}
	else
	{
		cartDefaultHeight = FTopFrame.frames[FCartIndex].document.body.offsetHeight;
		mainDefaultHeight = FTopFrame.frames[FMainIndex].document.body.offsetHeight;
	}
}

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	if (persistFrame.contentDocument)
	{
		if (userBrowser == "Safari" && FIteration == 1 && FMainWidth == "")
		{
			persistDefaultHeight = remainingHeight;
			productDefaultHeight = remainingHeight;
			if (Math.max(persistFrame.contentDocument.body.offsetHeight,productFrame.contentDocument.body.offsetHeight) <= remainingHeight)
				cartDefaultHeight = remainingHeight;
		}
		else
		{
			persistDefaultHeight = persistFrame.contentDocument.body.scrollHeight;
			productDefaultHeight = productFrame.contentDocument.body.scrollHeight;
		}
	}
	else
	{
		if (persistFrame.Document)
		{
			persistDefaultHeight = persistFrame.Document.body.scrollHeight;
			productDefaultHeight = productFrame.Document.body.scrollHeight;
		}
		else
		{
			persistDefaultHeight = FPersistFrame.frames[FPersistIndex].document.body.offsetHeight;
			productDefaultHeight = FPersistFrame.frames[FProductIndex].document.body.offsetHeight;
		}
	}
	mainDefaultHeight = Math.max(persistDefaultHeight,productDefaultHeight);
}

storeDefaultHeight = Math.max(cartDefaultHeight,mainDefaultHeight);
storeHeight = Math.max(storeDefaultHeight,remainingHeight);
if (FCornerTop)
	storeHeight = Math.max(storeHeight,leftRightMaxHeight);
cartCell.height = storeHeight;
mainCell.height = storeHeight;
if (FPersistFrame.document && FPersistFrame.frames[0])
{
	persistCell.height = storeHeight;
	productCell.height = storeHeight;
}
totalHeight += storeHeight;

cartFrame.style.overflow = "hidden";
mainFrame.style.overflow = "hidden";
FTopFrame.document.body.style.height = totalHeight;
if (userBrowser == "IE")
{
	FTopFrame.document.body.style.width = totalWidth;
	FTopFrame.document.body.style.overflow = "auto";
}
else
	FTopFrame.document.body.style.width = Math.max(totalWidth,windowWidth);
mainTable.style.tableLayout = "fixed";

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	persistFrame.style.overflow = "hidden";
	productFrame.style.overflow = "hidden";
	FPersistFrame.document.body.style.height = storeHeight;
	FPersistFrame.document.body.style.width = mainWidth;
	persistTable.style.tableLayout = "fixed";
}
FTopFrame.scroll(0,0);
}

function resetIFrames(FTopFrame,FCartWidth,FMainWidth,FTopHeight,FBottomHeight,FLeftWidth,FRightWidth,FCornerTop,FPersistFrame,FPersistWidth,FScrollTogether)
{
userBrowser = browserName();
if (userBrowser == "Netscape" && parseInt(navigator.appVersion) == 6)
	isNetscape6 = true;
else 
	isNetscape6 = false;

try
{
	cartFrame = FTopFrame.document.getElementById("NexternalCart");
	mainFrame = FTopFrame.document.getElementById("NexternalMain");
	topHTML = FTopFrame.document.getElementById("TopHTML");
	bottomHTML = FTopFrame.document.getElementById("BottomHTML");
	leftHTML = FTopFrame.document.getElementById("LeftHTML");
	rightHTML = FTopFrame.document.getElementById("RightHTML");
	cartTop = FTopFrame.document.getElementById("CartTop");
	mainTop = FTopFrame.document.getElementById("MainTop");
	leftTop = FTopFrame.document.getElementById("LeftTop");
	rightTop = FTopFrame.document.getElementById("RightTop");
	mainTable = FTopFrame.document.getElementById("MainTable");
	cartCell = FTopFrame.document.getElementById("CartFrame");
	mainCell = FTopFrame.document.getElementById("MainFrame");
}
catch(err)
{
	return;
}

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	try
	{
		persistFrame = FPersistFrame.document.getElementById("NexternalPersist");
		productFrame = FPersistFrame.document.getElementById("NexternalProduct");
		persistTable = FPersistFrame.document.getElementById("PersistTable");
		persistCell = FPersistFrame.document.getElementById("PersistFrame");
		productCell = FPersistFrame.document.getElementById("ProductFrame");
	}
	catch(err)
	{
		return;
	}
	persistTable.height = "100%";
	persistTable.width = "100%";
}

if (cartFrame.contentDocument)
{
	if (FScrollTogether && userBrowser == "Safari")
	{
		windowHeight = FTopFrame.innerHeight-19;
		windowWidth = FTopFrame.innerWidth-19;
	}
	else
	{
		windowHeight = FTopFrame.innerHeight;
		windowWidth = FTopFrame.innerWidth;
	}
}
else
{
	if (FTopFrame.document.documentElement && FTopFrame.document.documentElement.clientHeight)
	{
		windowHeight = FTopFrame.document.documentElement.clientHeight;
		windowWidth = FTopFrame.document.documentElement.clientWidth;
	}
	else
	{
		windowHeight = FTopFrame.document.body.clientHeight;
		windowWidth = FTopFrame.document.body.clientWidth;
	}
}

if (topHTML == null)
{
	topHeight = 0;
	topWidth = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && !FCornerTop && FScrollTogether)
	{
		topHeight = determineWidthHeight(FTopHeight,windowHeight,0);
		topWidth = 0;
	}
	else
	{
		topDefaultHeight = topHTML.scrollHeight;
		topHeight = determineWidthHeight(FTopHeight,windowHeight,topDefaultHeight);
		topWidth = topHTML.scrollWidth;
	}
	topHTML.height = topHeight;
}

if (bottomHTML == null)
{
	bottomHeight = 0;
	bottomWidth = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && !FCornerTop && FScrollTogether)
	{
		bottomHeight = determineWidthHeight(FBottomHeight,windowHeight,0);
		bottomWidth = 0;

	}
	else
	{
		bottomDefaultHeight = bottomHTML.scrollHeight;
		bottomHeight = determineWidthHeight(FBottomHeight,windowHeight,bottomDefaultHeight);
		bottomWidth = bottomHTML.scrollWidth;
	}
	bottomHTML.height = bottomHeight;
}

if (leftHTML == null)
{
	leftWidth = 0;
	leftHeight = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && FScrollTogether)
	{
		leftWidth = determineWidthHeight(FLeftWidth,windowWidth,0);
		leftHeight = 0;
	}
	else
	{
		leftDefaultWidth = leftHTML.scrollWidth;
		leftWidth = determineWidthHeight(FLeftWidth,windowWidth,leftDefaultWidth);
		leftHeight = leftHTML.scrollHeight;
	}
	leftTop.width = leftWidth;
	leftHTML.width = leftWidth;
}

if (rightHTML == null)
{
	rightWidth = 0;
	rightHeight = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && FScrollTogether)
	{
		rightWidth = determineWidthHeight(FRightWidth,windowWidth,0);
		rightHeight = 0;
	}
	else
	{
		rightDefaultWidth = rightHTML.scrollWidth;
		rightWidth = determineWidthHeight(FRightWidth,windowWidth,rightDefaultWidth);
		rightHeight = rightHTML.scrollHeight;
	}
	rightTop.width = rightWidth;
	rightHTML.width = rightWidth;
}

topBottomMaxWidth = Math.max(topWidth,bottomWidth);
leftRightMaxHeight = Math.max(leftHeight,rightHeight);
if (FCornerTop)
{
	remainingHeight = windowHeight;
	remainingWidth = Math.max(windowWidth,topBottomMaxWidth);
}
else
{
	remainingHeight = Math.max(windowHeight,leftRightMaxHeight);
	remainingWidth = windowWidth;
}
remainingHeight -= (topHeight+bottomHeight);
remainingWidth -= (leftWidth+rightWidth);

cartWidth = determineWidthHeight(FCartWidth,windowWidth,0);
cartTop.width = cartWidth;
cartCell.width = cartWidth;
remainingWidth -= cartWidth;

if (FMainWidth == "")
{
	if (FCornerTop)
		mainWidth = remainingWidth;
	else
		mainWidth = Math.max(remainingWidth,topBottomMaxWidth-cartWidth);
}
else
	mainWidth = determineWidthHeight(FMainWidth,windowWidth,0);
mainTop.width = mainWidth;
mainCell.width = mainWidth;

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	persistWidth = determineWidthHeight(FPersistWidth,windowWidth,0);
	persistCell.width = persistWidth;
	remainingWidth = mainWidth - persistWidth;

	productWidth = remainingWidth;
	productCell.width = productWidth;
}

if (FCornerTop)
	storeHeight = Math.max(remainingHeight,leftRightMaxHeight);
else
	storeHeight = remainingHeight;
storeHeight = Math.max(storeHeight,1);
cartCell.height = storeHeight;
mainCell.height = storeHeight;
if (isNetscape6)
{
	cartFrame.style.height = storeHeight;
	mainFrame.style.height = storeHeight;
}
if (FPersistFrame.document && FPersistFrame.frames[0])
{
	persistCell.height = storeHeight;
	productCell.height = storeHeight;
	if (isNetscape6)
	{
		persistFrame.style.height = storeHeight;
		productFrame.style.height = storeHeight;
	}
}

cartFrame.style.overflow = "visible";
mainFrame.style.overflow = "visible";
FTopFrame.document.body.style.height = Math.max(windowHeight,storeHeight);
FTopFrame.document.body.style.width = Math.max(windowWidth,cartWidth+mainWidth);
if (FScrollTogether && userBrowser == "IE")
	FTopFrame.document.body.style.overflow = "hidden";
else
	FTopFrame.document.body.style.overflow = "auto";
mainTable.style.tableLayout = "auto";

if (FPersistFrame.document && FPersistFrame.frames[0])
{
	persistFrame.style.overflow = "visible";
	productFrame.style.overflow = "visible";
	FPersistFrame.document.body.style.height = storeHeight;
	FPersistFrame.document.body.style.width = mainWidth;
	persistTable.style.tableLayout = "auto";
}
}

function sizeIFramesFull(FTopFrame,FCartWidth,FMainWidth,FTopHeight,FBottomHeight,FLeftWidth,FRightWidth,FCornerTop,FScroll)
{
userBrowser = browserName();
try
{
	mainFrame = FTopFrame.document.getElementById("NexternalMain");
	topHTML = FTopFrame.document.getElementById("TopHTML");
	bottomHTML = FTopFrame.document.getElementById("BottomHTML");
	leftHTML = FTopFrame.document.getElementById("LeftHTML");
	rightHTML = FTopFrame.document.getElementById("RightHTML");
	mainTop = FTopFrame.document.getElementById("MainTop");
	leftTop = FTopFrame.document.getElementById("LeftTop");
	rightTop = FTopFrame.document.getElementById("RightTop");
	mainTable = FTopFrame.document.getElementById("MainTable");
	mainCell = FTopFrame.document.getElementById("MainFrame");
}
catch(err)
{
	return;
}

if (userBrowser != "Opera")
{
	mainTable.height = "";
	mainTable.width = "";
}

if (mainFrame.contentDocument)
{
	windowHeight = FTopFrame.innerHeight-19;
	windowWidth = FTopFrame.innerWidth-19;
}
else
{
	if (FTopFrame.document.documentElement && FTopFrame.document.documentElement.clientHeight)
	{
		windowHeight = FTopFrame.document.documentElement.clientHeight;
		windowWidth = FTopFrame.document.documentElement.clientWidth;
	}
	else
	{
		windowHeight = FTopFrame.document.body.clientHeight;
		windowWidth = FTopFrame.document.body.clientWidth;
	}
}
totalHeight = 0;
totalWidth = 0;

if (topHTML == null)
{
	topHeight = 0;
	topWidth = 0;
}
else
{
	topDefaultHeight = topHTML.scrollHeight;
	topHeight = determineWidthHeight(FTopHeight,windowHeight,topDefaultHeight);
	topHTML.height = topHeight;
	totalHeight += topHeight;
	topWidth = topHTML.scrollWidth;
}

if (bottomHTML == null)
{
	bottomHeight = 0;
	bottomWidth = 0;
}
else
{
	bottomDefaultHeight = bottomHTML.scrollHeight;
	bottomHeight = determineWidthHeight(FBottomHeight,windowHeight,bottomDefaultHeight);
	bottomHTML.height = bottomHeight;
	totalHeight += bottomHeight;
	bottomWidth = bottomHTML.scrollWidth;
}

if (leftHTML == null)
{
	leftWidth = 0;
	leftHeight = 0;
}
else
{
	leftDefaultWidth = leftHTML.scrollWidth;
	leftWidth = determineWidthHeight(FLeftWidth,windowWidth,leftDefaultWidth);
	leftTop.width = leftWidth;
	leftHTML.width = leftWidth;
	totalWidth += leftWidth;
	leftHeight = leftHTML.scrollHeight;
}

if (rightHTML == null)
{
	rightWidth = 0;
	rightHeight = 0;
}
else
{
	rightDefaultWidth = rightHTML.scrollWidth;
	rightWidth = determineWidthHeight(FRightWidth,windowWidth,rightDefaultWidth);
	rightTop.width = rightWidth;
	rightHTML.width = rightWidth;
	totalWidth += rightWidth;
	rightHeight = rightHTML.scrollHeight;
}

topBottomMaxWidth = Math.max(topWidth,bottomWidth);
if (topBottomMaxWidth < windowWidth+19)
	topBottomMaxWidth -= 19;
leftRightMaxHeight = Math.max(leftHeight,rightHeight);
if (leftRightMaxHeight < windowHeight+19)
	leftRightMaxHeight -= 19;

if (FCornerTop)
{
	remainingHeight = windowHeight;
	remainingWidth = Math.max(windowWidth,topBottomMaxWidth);
}
else
{
	remainingHeight = Math.max(windowHeight,leftRightMaxHeight);
	remainingWidth = windowWidth;
}
remainingHeight -= (topHeight+bottomHeight);
remainingWidth -= (leftWidth+rightWidth);

if (mainFrame.contentDocument)
{
	if ((userBrowser == "Safari" || userBrowser == "Firefox" || userBrowser == "Netscape") && FMainWidth == "" && !FCornerTop && topHeight+bottomHeight > 0)
		mainDefaultWidth = remainingWidth;
	else
		mainDefaultWidth = Math.max(mainFrame.contentDocument.body.scrollWidth,mainFrame.contentDocument.body.offsetWidth)+1;
}
else
{
	if (mainFrame.Document)
		mainDefaultWidth = mainFrame.Document.body.scrollWidth;
	else
		mainDefaultWidth = FTopFrame.frames[0].document.body.offsetWidth;
}

if (FCornerTop)
	tempMainWidth = mainDefaultWidth;
else
	tempMainWidth = Math.max(mainDefaultWidth,topBottomMaxWidth);
if (FMainWidth == "")
	mainWidth = Math.max(tempMainWidth,remainingWidth);
else
{
	cartWidth = determineWidthHeight(FCartWidth,windowWidth,0);
	calcMainWidth = determineWidthHeight(FMainWidth,windowWidth,0);
	mainWidth = Math.max(tempMainWidth,cartWidth+calcMainWidth);
}
mainTop.width = mainWidth;
mainCell.width = mainWidth;
totalWidth += mainWidth;

if (mainFrame.contentDocument)
	mainDefaultHeight = mainFrame.contentDocument.body.scrollHeight;
else
{
	if (mainFrame.Document)
		mainDefaultHeight = mainFrame.Document.body.scrollHeight;
	else
		mainDefaultHeight = FTopFrame.frames[0].document.body.offsetHeight;
}

storeHeight = Math.max(mainDefaultHeight,remainingHeight);
if (FCornerTop)
	storeHeight = Math.max(storeHeight,leftRightMaxHeight);
mainCell.height = storeHeight;
totalHeight += storeHeight;

mainFrame.style.overflow = "hidden";
FTopFrame.document.body.style.height = totalHeight;
if (userBrowser == "IE")
	FTopFrame.document.body.style.overflow = "auto";
if (totalWidth > windowWidth)
	FTopFrame.document.body.style.width = totalWidth;
mainTable.style.tableLayout = "fixed";
if (FScroll)
	FTopFrame.scroll(0,0);
else
{
	try
	{
		FTopFrame.scroll(topXScrolling,topYScrolling);
	}
	catch(err)
	{
	}
}
}

function resetIFramesFull(FTopFrame,FCartWidth,FMainWidth,FTopHeight,FBottomHeight,FLeftWidth,FRightWidth,FCornerTop,FScrollTogether)
{
userBrowser = browserName();
if (userBrowser == "Netscape" && parseInt(navigator.appVersion) == 6)
	isNetscape6 = true;
else 
	isNetscape6 = false;

topXScrolling = FTopFrame.scrollX;
topYScrolling = FTopFrame.scrollY;

try
{
	mainFrame = FTopFrame.document.getElementById("NexternalMain");
	topHTML = FTopFrame.document.getElementById("TopHTML");
	bottomHTML = FTopFrame.document.getElementById("BottomHTML");
	leftHTML = FTopFrame.document.getElementById("LeftHTML");
	rightHTML = FTopFrame.document.getElementById("RightHTML");
	mainTop = FTopFrame.document.getElementById("MainTop");
	leftTop = FTopFrame.document.getElementById("LeftTop");
	rightTop = FTopFrame.document.getElementById("RightTop");
	mainTable = FTopFrame.document.getElementById("MainTable");
	mainCell = FTopFrame.document.getElementById("MainFrame");
}
catch(err)
{
	return;
}

if (mainFrame.contentDocument)
{
	if (FScrollTogether && userBrowser == "Safari")
	{
		windowHeight = FTopFrame.innerHeight-19;
		windowWidth = FTopFrame.innerWidth-19;
	}
	else
	{
		windowHeight = FTopFrame.innerHeight;
		windowWidth = FTopFrame.innerWidth;
	}
}
else
{
	if (FTopFrame.document.documentElement && FTopFrame.document.documentElement.clientHeight)
	{
		windowHeight = FTopFrame.document.documentElement.clientHeight;
		windowWidth = FTopFrame.document.documentElement.clientWidth;
	}
	else
	{
		windowHeight = FTopFrame.document.body.clientHeight;
		windowWidth = FTopFrame.document.body.clientWidth;
	}
}

if (topHTML == null)
{
	topHeight = 0;
	topWidth = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && !FCornerTop && FScrollTogether)
	{
		topHeight = determineWidthHeight(FTopHeight,windowHeight,0);
		topWidth = 0;
	}
	else
	{
		topDefaultHeight = topHTML.scrollHeight;
		topHeight = determineWidthHeight(FTopHeight,windowHeight,topDefaultHeight);
		topWidth = topHTML.scrollWidth;
	}
	topHTML.height = topHeight;
}

if (bottomHTML == null)
{
	bottomHeight = 0;
	bottomWidth = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && !FCornerTop && FScrollTogether)
	{
		bottomHeight = determineWidthHeight(FBottomHeight,windowHeight,0);
		bottomWidth = 0;

	}
	else
	{
		bottomDefaultHeight = bottomHTML.scrollHeight;
		bottomHeight = determineWidthHeight(FBottomHeight,windowHeight,bottomDefaultHeight);
		bottomWidth = bottomHTML.scrollWidth;
	}
	bottomHTML.height = bottomHeight;
}

if (leftHTML == null)
{
	leftWidth = 0;
	leftHeight = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && FScrollTogether)
	{
		leftWidth = determineWidthHeight(FLeftWidth,windowWidth,0);
		leftHeight = 0;
	}
	else
	{
		leftDefaultWidth = leftHTML.scrollWidth;
		leftWidth = determineWidthHeight(FLeftWidth,windowWidth,leftDefaultWidth);
		leftHeight = leftHTML.scrollHeight;
	}
	leftTop.width = leftWidth;
	leftHTML.width = leftWidth;
}

if (rightHTML == null)
{
	rightWidth = 0;
	rightHeight = 0;
}
else
{
	if ((userBrowser == "Firefox" || userBrowser == "Netscape") && FScrollTogether)
	{
		rightWidth = determineWidthHeight(FRightWidth,windowWidth,0);
		rightHeight = 0;
	}
	else
	{
		rightDefaultWidth = rightHTML.scrollWidth;
		rightWidth = determineWidthHeight(FRightWidth,windowWidth,rightDefaultWidth);
		rightHeight = rightHTML.scrollHeight;
	}
	rightTop.width = rightWidth;
	rightHTML.width = rightWidth;
}

topBottomMaxWidth = Math.max(topWidth,bottomWidth);
leftRightMaxHeight = Math.max(leftHeight,rightHeight);
if (FCornerTop)
{
	remainingHeight = windowHeight;
	remainingWidth = Math.max(windowWidth,topBottomMaxWidth);
}
else
{
	remainingHeight = Math.max(windowHeight,leftRightMaxHeight);
	remainingWidth = windowWidth;
}
remainingHeight -= (topHeight+bottomHeight);
remainingWidth -= (leftWidth+rightWidth);

if (FMainWidth == "")
	mainWidth = remainingWidth;
else
{
	cartWidth = determineWidthHeight(FCartWidth,windowWidth,0);
	calcMainWidth = determineWidthHeight(FMainWidth,windowWidth,0);
	mainWidth = cartWidth+calcMainWidth;
}
mainTop.width = mainWidth;
mainCell.width = mainWidth;

storeHeight = remainingHeight;
mainCell.height = storeHeight;
if (isNetscape6)
	mainFrame.style.height = storeHeight;

mainFrame.style.overflow = "visible";
FTopFrame.document.body.style.height = Math.max(windowHeight,storeHeight);
FTopFrame.document.body.style.width = Math.max(windowWidth,mainWidth);
if (FScrollTogether && userBrowser == "IE")
	FTopFrame.document.body.style.overflow = "hidden";
else
	FTopFrame.document.body.style.overflow = "auto";
mainTable.style.tableLayout = "auto";
}

function determineWidthHeight(FInput,FTotal,FDefault)
{
if (FInput == "")
	return FDefault;
else if (FInput.indexOf("%") == -1)
	return Math.max(parseInt(FInput),FDefault);
else
	return Math.max(parseInt(parseFloat(FInput)*FTotal/100),FDefault);
}