<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="test.css"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="en">
<head>
	<title xmlns="http://www.w3.org/1999/xhtml">XHTML2 iframe test</title>
	<link rel="stylesheet" href="xhtml2.css" type="text/css" />
<script type="text/javascript" xmlns="http://www.w3.org/1999/xhtml">
//<![CDATA[
	function loadframes() {
		try {
			uri = location.href.split('src')[1].replace(/\(/g,'').replace(/\)/g,'').split(',');
			for (i=0; i<uri.length; i++) {
				try {
					uriVal = uri[i].split('=');
					var el = document.getElementById(uriVal[0]);
					var attr = el.getAttribute('src') ? 'src' : 'data';
					//div
					if (attr=='data') {
						/*bd = document.getElementsByTagName('body')[0];
						bd.removeChild(el);
						var newEl = document.createElement('object');
						newEl.setAttribute('type','text/html');
						newEl.setAttribute('xmlns','http://www.w3.org/1999/xhtml');
						newEl.setAttribute('role','navigation');
						newEl.setAttribute(attr,uriVal[1]);
						bd.appendChild(newEl);*/
					}
					else el.setAttribute(attr,uriVal[1]);
					el.location.href = "http://www.who.is";
				}
				catch (e) {
					//alert(e.description);
				}
			}		
		}
		catch (err) {}
	}
	window.onload = function() {
		//location.reload();
		loadframes();
	}
//]]>
</script>
</head>
<body> 
	<object id="f1" role="navigation" type="text/html" data="#" xmlns="http://www.w3.org/1999/xhtml"/>
	<iframe id="f2" role="main" src="#" width="450" height="400" frameborder="0" xmlns="http://www.w3.org/1999/xhtml"/>
	<iframe id="f3" role="main" src="#" width="450" height="400" frameborder="0" xmlns="http://www.w3.org/1999/xhtml"/>
</body>
</html>
