﻿function Hyper()
{
    if(typeof(vmp)!='undefined')
    {
        try {
            vmp.PostEvent('Hyper',0)
        } catch(e) {}
    }
}

var sHyperView;//< !-- [c) ibob@fr.st -->
//<!-- The line below will set HyperView to use the entire destop -->
sHyperView = '<MTSBaseComponent CoordinateSystem="2" Rect="0 0 0 0" PreserveCamera="0" RestrictMacHyperView="0"/>';
sHyperView += '<MTSAction Name="control_hyperview">';
sHyperView += '<MTSAssignProperty Target="MTSBaseComponent::smod" Value="val"/>';
sHyperView += '<MTSAssignProperty Target="start_hyperview::actv" Value="val2"/>';
sHyperView += '<MTSAssignProperty Target="MTSInstance.close::clps" Value="val3"/>';
sHyperView += '<MTSAssignProperty Target="MTSScene::crsr" Value="MTSCursor::0"/>';
sHyperView += '</MTSAction>';
sHyperView += '<MTSInteractor Name="start_hyperview" IgnoreHandled="0" IgnoreError="1" NeverHandle="1">';
sHyperView += '<Target Name="MTSInstance.Trigger_Instance"/>';
//sHyperView += '<OnEnter Action="MTSAssignProperty" Target="MTSScene::crsr" Value="MTSCursor::MTS_Point"/>';
//sHyperView += '<OnExit Action="MTSAssignProperty" Target="MTSScene::crsr" Value="MTSCursor::0"/>';
//sHyperView += ' <OnClick Action="MTSJavaScript" Target="Hyper()"/>';
sHyperView += '<MTSHandle Event="Hyper" Action="control_hyperview" val="1" val2="0" val3="0"/>';
sHyperView += '</MTSInteractor>';
sHyperView += '<MTSInteractor Name="key_return_from_hyperview">';
sHyperView += '<MTSHandle Event="KeyDown" Action="control_hyperview" val="0" val2="1" val3="1"/>';
sHyperView += '</MTSInteractor>';
sHyperView += '<MTSInteractor Name="return_to_ready">';
sHyperView += '<MTSHandle Event="MTSEventModalEnd" Action="MTSAssignProperty" Target="start_hyperview::actv" Value="1"/>';
sHyperView += '<MTSHandle Event="MTSEventModalEnd" Action="MTSAssignProperty" Target="MTSInstance.close::clps" Value="1"/>';
sHyperView += '</MTSInteractor>';
/*<!-- Preload of the close button texture -->
//sHyperView += '<MTSTextureMap Name="hyper_TEXTURE_0" />';
//<!-- Layer with the button -->
sHyperView += '<MTSInstance Name="close" Collapsed="1">';
sHyperView += '<MTSInstance Name="Layer2D_0">';
sHyperView += '<Transform>';
sHyperView += '<Scale x="0.2" y="0.2" z="0.2"/>';
sHyperView += '</Transform>';
sHyperView += '<LayerData Texture="MTSTexture.hyper_TEXTURE_0" SrcPin="0.000000 0.000000" AnchorWidget="1" AlwaysVisible="1" WidgetLine="0" Shadow="0"/>';
sHyperView += '<OnClick Action="control_hyperview" val="0" val2="1" val3="1"/>';
sHyperView += '<OnEnter Action="MTSAssignProperty" Target="MTSScene::crsr" Value="MTSCursor::MTS_Point"/>';
sHyperView += '<OnExit Action="MTSAssignProperty" Target="MTSScene::crsr" Value="MTSCursor::0"/>';
sHyperView += '</MTSInstance>';
sHyperView += '</MTSInstance>';
//<!-- Loading of the texture from external image file -->
//sHyperView += '<MTSTimeElem Type="MTSImageStream"  Path="http://localhost/3dcc/images/icon_information.jpg" >';
//sHyperView += '<Target Name="MTSTexture.hyper_TEXTURE_0" />';
//sHyperView += '</MTSTimeElem>";';*/