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+='<a id="desc" align="center">  </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="http://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>';
         str+='1 мб';

      str+='<br>';
         str+='Для просмотра необходимо ';
         str+='<a href="http://www.devalvr.com/instalacion/plugin/install.html" target=_blank title="Установить плагин, необходимый для просмотра панорам">установить плагин</a>';
 str+='<br>';        
 str+='Удерживая левую кнопку мыши, осмотреться по сторонам. ';

 str+='<br>';   
 str+='Зум - шифт, правая кнопка мыши или колесико. Также можно ';        
 str+='<br>';   
        str+='&nbsp;&nbsp;&nbsp;&nbsp;';
        str+='<a href="javascript:Fullscreen();"  title="FullSreen">Развернуть панораму на полный экран</a> ';

str+='<br>';

str+=' <a href="http://www.impaga.ru">www.impaga.ru</a> ';

    document.write(str);
    SetDesc();  
}

