function Trans(point)
{
	top.document.DevalPlug.Commands('panorama', point);
}

function Fullscreen()
{
	document.DevalPlug.fullscreen=1;	
}


function SaveView()
{
	document.DevalPlug.Commands("saveview","TourImage.bmp"); 
}


function OpenQT()
{
   //window.open('p01.mov', 'Виртуальный тур', 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, width=760, height=550');
   window.open('p01.mov', 'popDialog', 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, width=760,height=550');
}

function OpenJava()
{
   window.open('p01.mov', 'popDialog', 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, width=760,height=550');
	
/*
var str='<applet height="257" archive="http://tasc.ru/ptviewer.jar" width="370" code="ptviewer.class" name="ptviewer" mayscript="true"> ';
	str+='<param name="file" value="p01.jpg"> ';
	str+='<param name="panmin" value="-180"> ';
	str+='<param name="panmax" value="180"> ';
	str+='<param name="pan" value="0">';

	str+='</applet>';
	document.write(str);
*/
}

function SetDesc()
{
	document.getElementById("desc").innerHTML='<B>'+document.DevalPlug.GetVariable("description")+'</B>';
	window.status=document.DevalPlug.GetVariable("description");
	setTimeout("SetDesc();", 300);
}

function code(title, tamx, tamy)
{
        var str='<P><FONT SIZE="4"> <B>'+ title+'</B></FONT></P>';

	str+='<iframe name="iframe" src="frame.html" frameborder="0" scrolling="auto" align="top" height="105" width="640"></iframe>';
        str+='<BR>';
	str+='<a id="desc" align="center"> text </a>';
        str+='<BR><BR>';
	str+='<OBJECT id="DevalPlug" style="WIDTH: '+tamx+'; HEIGHT: '+tamy+'" height="'+tamy+'"';
	str+='width="'+tamx+'" classid=clsid:5D2CF9D0-113A-476B-986F-288B54571614 ';
	str+='codeBase="http://www.devalvr.com/instalacion/plugin/devalocx.cab#version=0,4,7,2">';
	str+='<PARAM NAME="src" VALUE="script.txt">';
        str+='<PARAM NAME="plugincolor" VALUE="#ffffff"> ';
        str+='<PARAM NAME="logo" VALUE="logo.bmp"> ';
        str+='<PARAM NAME="logourl" VALUE="www.impaga.ru"> ';
        str+='<PARAM NAME="language" VALUE="Russian">';
        str+='<PARAM NAME="logoalpha" VALUE="60"> ';
        str+='<PARAM NAME="toolsbar" VALUE="0"> ';
        str+='<PARAM NAME="barstrings" VALUE="Исходный масштаб, Увеличить масштаб, Уменьшить масштаб, Полноэкранный режим, Вывести во внешнее окно, Автоматическое вращение, Ручное вращение, О туре, Спрятать/показать меню"> ';
        str+='<PARAM NAME="zoom" VALUE="0.6"> ';
        str+='<PARAM NAME="minzoom" VALUE="0.6"> ';
        str+='<PARAM NAME="maxzoom" VALUE="2"> ';
        str+='<PARAM NAME="velocity" VALUE="2"> ';
        str+='<PARAM NAME="autoplay" VALUE="3"> ';
        str+='<PARAM NAME="screensaver" VALUE="1"> ';
        str+='<PARAM NAME="abouturl" VALUE="panor_about_demo.html"> ';
	str+='<PARAM NAME="filter" VALUE="0"> ';

	str+='<EMBED src="script.txt" TYPE="application/x-devalVRX" ';
        str+='WIDTH='+tamx+' HEIGHT='+tamy+' NAME="DevalPlug" ';
	str+='PLUGINSPAGE="http://www.devalvr.com/instalacion/plugin/install.html" ';
        str+='filter="0" toolsbar="0" ';
        str+='plugincolor="#ffffff" logo="logo.bmp" logourl="www.impaga.ru" logoalpha="60" ';
        str+='barstrings="Исходный масштаб, Увеличить масштаб, Уменьшить масштаб, Полноэкранный режим, Вывести во внешнее окно, Автоматическое вращение, Ручное вращение, О туре, Спрятать/показать меню" ';
        str+='zoom="0.6" minzoom="0.6" maxzoom="2" abouturl="panor_about_demo.html"';
        str+='velocity="2" autoplay="3" screensaver="1" ';
	str+='></EMBED></OBJECT>';

        str+='<BR><IMG SRC="upravlenie_pano.jpg"><BR> ';
        str+='<a href="http://www.devalvr.com/instalacion/plugin/install.html" target=_blank title="Установить плагин, необходимый для просмотра панорам"><img src="plugin.jpg" border="0" align="top"></a> ';
        str+='<IMG SRC="plugin_text.jpg">';
	str+='<a href="javascript:SaveView();"  title="Сохранить текущий вид"><img src="screenshot.jpg" border="0" align="top"></a> ';
        str+='<IMG SRC="screenshot_text.jpg">';
	str+='<a href="javascript:Fullscreen();"  title="Развернуть панораму на полный экран"><img src="fullscreen.jpg" border="0" align="top"></a> ';
        str+='<IMG SRC="fullscreen_text.jpg">';

        str+='<P><FONT SIZE="2"><B> (C) imp 2007 www.impaga.ru </B></FONT></P> ';

	document.write(str);
	SetDesc();	
}





