//Demo created by CodeHouse.com. It may be modified/used freely

FRAMESET_TEMPLATE =
'<html>\
<head>\
<title></title>\
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\
</head>\
<frameset rows="125,*" border="0">\
  <frame name="topFrame" src="savtop.htm" scrolling="no" noresize>\
  <frameset cols="128,*" border="0">\
  	<frame name="leftFrame" src="savleftservices.htm" scrolling="no" noresize>\
  	<frame name="contentFrame" src="__CONTENT_TOP_FRAME_URL__">\
  </frameset>\
</frameset>\
</html>';


PARENTED_FLAG = "parented";

var params = location.search;
if (params.indexOf(PARENTED_FLAG) == -1)	// the parented flag has not been found
{
	if( params.length == 0 )
	{
		var contentFrameUrl = location.href + "?" + PARENTED_FLAG;
	}
	else
	{
		var contentFrameUrl = location.href + "&" + PARENTED_FLAG;
	}
	
	var framesetHtml = FRAMESET_TEMPLATE.
			replace(/__CONTENT_TOP_FRAME_URL__/, contentFrameUrl);

	document.write(framesetHtml);
	document.close();
}
else
{
   parent.document.title = parent.contentFrame.document.title;
}
