function ClickReturn (noret) {
	var cb=checkBrowser();
	if (!noret) {
		if (!cb.opera)	return true;
	} 
	return false;
}

function openFS(n){
/*
	if(haveqt) loadPanoWin(n);
	else alert('No Quicktime is detected.');
*/
// we'll not detect QT
	var w = screen.width ? screen.width * 0.9 : 800;
	var h = screen.height ? screen.height * 0.8 : 550;
	openWindow(home+'/fullscreen.html?id='+n,w,h,'panowin',true);
}	

function openWindow(urlX,wX,hX,winX,toolbarsX,modalX) {
	var cb=checkBrowser();
	url=urlX?urlX:home+'/fullscreen.html';
	var win=winX?winX:'win';
	var w=wX?wX:1024;
	var h=hX?hX:768;
	var toolbars=toolbarsX?true:false;
	var modal=modalX?true:false;
	var ow = (w>=screen.width)?(screen.width-10):w;
	var oh = (h>=screen.height)?(screen.height-56):h;
	var centerW=(screen.width-w)/2;
	var centerH=(screen.height-h)/2;
	LeftPosition = (screen.width)?((centerW<0)?0:centerW):0;
	TopPosition = (screen.height)?((centerH<0)?0:centerH):0;
	var location='0';
	var status='0';
	var menubar='0';
	var scrollbars='0';
	var resizable='0';
	var scrolling='no';
	var noresize='noresize';
	ow = (modal && window.showModalDialog)?ow+6:ow;
	oh = (modal && window.showModalDialog)?oh+24:oh;
	if ((w>=screen.width) || (h>=screen.height)) {
		scrollbars = '1';
		scrolling='yes';
		ow = (ow<(screen.width-10))?(ow+14):ow;
		oh = (oh<(screen.height-56))?(oh+14):oh;
	}
	if (toolbars) {
		location='0';
		status='1';
		menubar='0';
		scrollbars='1';
		resizable='1';
		scrolling='yes';
		noresize='';
		TopPosition=0;
	}
	if (cb.opera && !toolbars) {
		popupWindow = window.open('',win,'toolbar=0,location='+location+',directories=0,status='+status+',menubar='+menubar+',width='+(ow+2)+',height='+(oh+2));
		popupWindow.document.writeln('<html><head><title>.:: Panoramas viewer by Ebeling Data OY &copy; ::.</title></head>');
		popupWindow.document.writeln('<frameset rows="1*,'+oh+',1*" cols="1*,'+ow+',1*" frameborder="0" border="0" framespacing="0">');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="main"  src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling='+scrolling+' frameborder="0" '+noresize+'>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="'+home+'/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('</frameset>');
		popupWindow.document.writeln('</html>');
		popupWindow.document.close(); 
		popupWindow.main.location=url;
		if(popupWindow.window.focus){popupWindow.window.focus();}
	} else if (modal && window.showModalDialog) {
		popupWindow = window.showModalDialog(url,"return false;","dialogHeight: "+oh+"px; dialogWidth: "+ow+"px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No; scroll: "+toolbars+";");
	} else {
		popupWindow = window.open(url,win,'toolbar=0,location='+location+',directories=0,status='+status+',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',width='+ow+',height='+oh+',top='+TopPosition+',left='+LeftPosition);
		if(popupWindow.window.focus){popupWindow.window.focus();}
	}
}

