﻿function viewPano(sfwSrc)
{
	swfDiv = document.createElement('div');
	swfDiv.setAttribute('id', 'swfDivId');
	var visibleHeight = document.body.clientHeight;
	var visibleWidth = document.body.clientWidth;
	var h = 480;
	var w = 640;
	
	//swfDiv.setAttribute('style', 'position: fixed; width: '+ (w - 30) +'px; height: ' + (h - 30) + 'px; top: 15px; left: 15px; zoom: 1;');
	document.body.appendChild(swfDiv);
	swfDiv.innerHTML = "<div id='div_closeSWFpano'><a id='closeSWFpano'  href='#'><img src='/common/img/off/fancybox/fancy_closebox.png'></a></div><div id='flashReplacement'></div>";
	$('#closeSWFpano').click(function(){
		document.body.removeChild( document.getElementById('swfDivId') );
	});
	swfDiv.style.position='fixed';
	var left = ((visibleWidth - w)/2);
	var top = ((visibleHeight - h)/2);
	swfDiv.style.left= (left>0 ? left : 0) + 'px';//'10px';
	swfDiv.style.top= (top>15 ? top : 15)+ 'px';//'10px';
	var swfObj = swfobject.createSWF({data : sfwSrc, width: w, height: h }, {allowFullscreen: true}, 'flashReplacement');
}
