// JavaScript Document

function www(url) {
	var element = document.getElementById('dynamic');
	element.innerHTML = '\
<iframe scrolling="no" id="www" src="'+url+'" style="-webkit-box-shadow: 0px 0px 10px #000; opacity: 0.0; background-color: #000; border: 1px solid #fff; position: absolute; top: '+((window.innerHeight - 600) / 2)+'px; left: '+((window.innerWidth - 1080) / 2)+'px; width: 1080px; height: 600px;">\
</iframe>\
	';
	
	element.style.height = window.innerHeight + 'px';
	element.style.display = 'block';
	element.style.opacity = 1.0;
	
	var transition = new CWTransition(SineCurve, 2500, function (percentage) {
																 document.getElementById('www').style.opacity = percentage;
																 
																 document.getElementById('www').style.top = Math.floor(((window.innerHeight - 600) / 2) * percentage - (600 * (1-percentage))) + "px";
																 });
	
	document.getElementById('www').onload = transition.start();
	element.onclick = function () {
		document.getElementById('dynamic').style.display = 'none';
		document.getElementById('dynamic').style.opacity = 1.0;
		
		window.onresize = null;
		
		
	};
	
	window.onresize = function () {
		var element = document.getElementById('dynamic');
		element.style.height = window.innerHeight + 'px';
		
		var element = document.getElementById('www');
		element.style.top = ((window.innerHeight - 600) / 2) + "px";
		element.style.left = ((window.innerWidth - 1080) / 2) + "px";
	};
	
}