///////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////
function updateIFrame(height) {
	var iframe = document.getElementById('myiframe');
	//iframe.setAttribute('height', height );
	document.getElementById('myiframe').height = height + 'px';
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////
function GetURL(){

	var iframe = document.getElementById('myiframe');
	var iFrameURL = iframe.src;

	var myQuery = new QueryString();
	myQuery.read();
	rExp = /showitem=1/gi;
	if(myQuery.getStatus()){
		var sHtml = "";
		var aQueryData = myQuery.getAll();
		for(var n in aQueryData){
		sHtml += "&" + n + "=" + aQueryData[n];
		results = sHtml.search(rExp);
		}
		if (results > -1) {
			iFrameURL = iFrameURL.toLowerCase();
			iFrameURL = iFrameURL.replace("showroom_find.aspx","showroom_viewdetail.aspx");
			iFrameURL = iFrameURL + sHtml;
			iframe.src = iFrameURL;
		}
	}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////
var oldHeight = 111;
function watchFrame(){
	var iframe = document.getElementById('myiframe');
	var myURL = window.location.href;
	var newHeight = 500;	
	start = myURL.search('#');
	end = myURL.search('XXX');
	newHeight = myURL.substring(start+1,end);
	
	if (newHeight !== '' && newHeight !== oldHeight){
		document.getElementById('myiframe').height  = newHeight + 'px';
		oldHeight = newHeight;
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////
