﻿iframeDoc = function(iObj){ 
	var doc = null;
	if(iObj.contentDocument)
		return iObj.contentDocument;
	else if(iObj.contentWindow)
		return iObj.contentWindow.document;
	else if(iObj.document)
		return iObj.document;
}

function iframeheight(a,b){
var minHeight = 700;
if (a==b) {
		ShopList = document.getElementsByName('ShopList')[0];
		Content = document.getElementsByName('Content')[0];
		SLDoc = iframeDoc(ShopList);
		CDoc = iframeDoc(Content);

		ContentHeight=CDoc.body.scrollHeight;
		ShopListHeight=SLDoc.body.scrollHeight;

		if (ContentHeight == ShopListHeight) {
			return false;
		} else {
			if (ContentHeight > ShopListHeight) {
              if(ContentHeight<minHeight)
                ContentHeight = minHeight;
              document.getElementsByName('Content')[0].height = ContentHeight+50;
              document.getElementsByName('ShopList')[0].height = ContentHeight+50;
			} else {
              if(ShopListHeight<minHeight)
                ShopListHeight = minHeight;
              document.getElementsByName('ShopList')[0].height = ShopListHeight+50;
              document.getElementsByName('Content')[0].height = ShopListHeight+50;
			}
		}
	}
}

