<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
<title>ToolTitle</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<link rel="StyleSheet" href="../css/Style.css" type="text/css">
|
<style>
|
html, body {
|
overflow:hidden;
|
}
|
table .s8 td, table .s8 td input,table .s8 td select{
|
background-color:#151515;
|
color:white;
|
}
|
</style>
|
</head>
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()">
|
<!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > -->
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
<tr class="s8">
|
<td >
|
<table class="PropertiesSheet" cellspacing="0" cellpadding="2" >
|
<tr class="s8">
|
<td colspan="2">
|
<tr class='TableOtherLine'>
|
<td class="s8b">
|
<label for="createAs" class="i18n">Text70</label>
|
</td>
|
<td align="left">
|
<select id="createAs" >
|
<option class="i18n" value="Group">Text71</option>
|
<option class="i18n" value="Layer">Text72</option>
|
<option class="i18n" value="LayerStreaming" selected=selected>Text73</option>
|
</select>
|
</td>
|
</tr>
|
<tr >
|
<td class="s8b i18n">
|
Text4
|
</td>
|
<td align="left">
|
<select id="Pole" size="1" style="z-index: 1;" onchange="PoleChanged()">
|
<option value="1" class="i18n">Text5</option>
|
<option value="2" class="i18n">Text6</option>
|
<option value="3" class="i18n">Text7</option>
|
<option value="4" class="i18n">Text28</option>
|
<option value="5" class="i18n">Text29</option>
|
<option value="6" class="i18n">Text30</option>
|
</select>
|
<img id="PoleImage" src="../img/pole1.gif" align="absmiddle">
|
</td>
|
</tr>
|
<tr class='TableOtherLine'>
|
<td align="top" class="s8b i18n">
|
Text1
|
</td>
|
<td align="left">
|
<select id="Method" size="1" onchange="TypeChanged()" style="z-index: 1;">
|
<option value="fixdistance" class="i18n">Text2</option>
|
<option value="waypoint" class="i18n">Text3 </option>
|
</select>
|
</td>
|
</tr>
|
</td>
|
</tr>
|
<tr>
|
<td class="s8b ">
|
<span id="DistanceText" class="i18n">Text8</span>
|
</td>
|
<td align="left">
|
<input id="distance" type="text" value="60" size="7" onchange="CheckNumberEx(distance,60,0.01,999999)">
|
<span id="DistanceText2"></span>
|
</td>
|
</tr>
|
<tr class='TableOtherLine'>
|
<td align="top" class="s8b i18n">
|
Text9
|
</td>
|
<td align="left">
|
<input id="Segments" type="text" onchange="CheckNumberEx(Segments,7,1,9999)"
|
value="6" size="7">
|
</td>
|
</tr>
|
<tr class="s8">
|
<td align="top" class="s8b i18n">
|
Text10
|
</td>
|
<td align="left">
|
<input id="Depth" type="text" value="3" size="7" onchange="CheckNumberEx(Depth,3,0.01,999999)">
|
<span class="i18n">Text23</span>
|
</td>
|
</tr>
|
<tr class='TableOtherLine'>
|
<td class="s8b">
|
<span class="i18n">Text32</span>
|
</td>
|
<td align="left">
|
<input id="visibilityDistance" type="text" value="5000" size="7">
|
<span id="Span2" class="i18n">Text23</span>
|
</td>
|
</tr>
|
<tr >
|
<td align="top" class="s8b i18n">
|
Text11
|
</td>
|
<td align="left">
|
<input id="color" class="jscolor ColorButton2" value="ab2567"/>
|
</td>
|
</tr>
|
</table>
|
<tr class="s8">
|
<td colspan="2" align="center" class="ToolButtonsArea">
|
<button id="lineButton" class="MenuButton" onclick="CreateObjects(1);" title="跟随线"><img src="../img/polyline.png" /></button>
|
</td>
|
</tr>
|
</table>
|
<object id="SGWorld" classid="CLSID:3a4f9197-65a8-11d5-85c1-0001023952c1">
|
</object>
|
|
<script language="javascript" src="../tooljs/ToolsCommon65.js"></script>
|
|
<script language="JavaScript">
|
|
//** this is a global variables for the polyline/polygon drawings
|
var gPolyObj;
|
var gPolyMethod;
|
var gPolygonText = SGLang.i18n("Text35");
|
var gPolylineText = SGLang.i18n("Text36");
|
var gDrawPolyClick = null;
|
var gEndDrawPoly = DrawPoly;
|
//**
|
|
var PolesLayer, LinesLayer;
|
var Line1Array = [];
|
var Line2Array = [];
|
var Line3Array = [];
|
var gLineIndex;
|
|
var gFoundLine = false;
|
var bInEdit;
|
var bFirstTime;
|
var LeftOver;
|
var bDontAskme;
|
var currentLine;
|
|
|
var ModelName;
|
var NumObjects;
|
|
var gPrevPolePosition;
|
var TowerTopLine;
|
var TowerBottomLine;
|
var TowerMiddleLine;
|
var PoleScale;
|
var ThirdLine;
|
|
//--------------
|
// Init
|
function Init() {
|
gDrawPolyAltitudeType = 3; // draw lines and polygon as absolute lines
|
if (GetParamValue("inSG", "") == "1") {
|
$("#TopAreaTD").attr("height", "57");
|
$("#TitleTD").attr("align", "left");
|
$("#CloseHelpTd").attr("display", "none");
|
}
|
|
TypeChanged();
|
|
gLineIndex = 0;
|
TowerTopLine = 8;
|
TowerBottomLine = 7;
|
TowerMiddleLine = 9;
|
PoleScale = 0.04;
|
ThirdLine = false;
|
|
PoleChanged();
|
Reset(1, 0);
|
|
}
|
//------------------
|
// Reset
|
//------------------
|
function Reset(FirstTime, FromMouseInputMode) {
|
|
try {
|
if (gPolyObj != null)
|
SGWorld.Creator.DeleteObject(gPolyObj.ID);
|
} catch (e) { }
|
|
if (PolesLayer != null)
|
{
|
PolesLayer.Save();
|
LinesLayer.Save();
|
}
|
gPolyObj = null;
|
GroupID = null;
|
PolesLayer = null;
|
LinesLayer = null;
|
gLineIndex = 0;
|
Line1Array = [];
|
Line2Array = [];
|
Line3Array = [];
|
|
LeftOver = 0;
|
NumObjects = 1;
|
bDontAskme = false;
|
currentLine = 0;
|
|
$("#lineButton").removeClass("MenuButtonHighlight");
|
$("#areaButton").removeClass("MenuButtonHighlight");
|
$("#groupButton").removeClass("MenuButtonHighlight");
|
$("#clipboardButton").removeClass("MenuButtonHighlight");
|
|
SGWorld.ProjectTree.EnableRedraw(1);
|
SGWorld.Window.HideMessageBarText();
|
|
if (bInEdit) {
|
SGWorld.DetachEvent("OnLButtonDown", DrawPolyLButtonDown);
|
SGWorld.DetachEvent("OnRButtonUp", DrawPolyRButtonUp);
|
SGWorld.DetachEvent("OnFrame", DrawPolyOnFrame);
|
SGWorld.DetachEvent("OnInputModeChanged", DrawPolyInputModeChanged);
|
}
|
bInEdit = false;
|
|
if (FirstTime != 1 && FromMouseInputMode == 0)
|
SGWorld.Window.SetInputMode(0);
|
}
|
|
//--------------
|
// CreateObjects
|
//--------------
|
function CreateObjects(method) {
|
if (!bInEdit) {
|
bInEdit = true;
|
SGWorld.AttachEvent("OnLButtonDown", DrawPolyLButtonDown);
|
SGWorld.AttachEvent("OnRButtonUp", DrawPolyRButtonUp);
|
SGWorld.AttachEvent("OnFrame", DrawPolyOnFrame);
|
SGWorld.AttachEvent("OnInputModeChanged", DrawPolyInputModeChanged);
|
|
|
gPolyMethod = method;
|
SGWorld.Window.SetInputMode(1,"",true);
|
SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text16"));
|
$(event.srcElement).addClass("MenuButtonHighlight");
|
|
}
|
else {
|
DrawPolyRButtonUp(0, 0, 0, 0);
|
}
|
}
|
//-----------
|
// SelectGroupObjects
|
function SelectGroupObjects() {
|
var node = SGWorld.ProjectTree.GetNextItem("", 10);
|
if (node == 0 || !(SGWorld.ProjectTree.IsGroup(node) || SGWorld.ProjectTree.IsLayer(node))) {
|
alert(SGLang.i18n("Text24"));
|
return;
|
}
|
$(event.srcElement).addClass("MenuButtonHighlight");
|
SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19"));
|
gFoundLine = false;
|
searchGeometries2(node, DrawPoly);
|
if (!gFoundLine)
|
alert(SGLang.i18n("Text75"));
|
Reset(0, 0);
|
}
|
//-----------
|
// SelectClipboardObjects
|
function SelectClipboardObjects() {
|
|
$(event.srcElement).addClass("MenuButtonHighlight");
|
SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19"), -1);
|
gFoundLine = false;
|
searchGeometriesClipboard(DrawPoly);
|
if (!gFoundLine)
|
alert(SGLang.i18n("Text76"));
|
Reset(0, 0);
|
}
|
|
//-------------
|
// DrawPoly
|
function DrawPoly(geometry, type, altitudeType) {
|
if (type != 1)
|
return true;
|
SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text19"));
|
SGWorld.ProjectTree.EnableRedraw(0);
|
|
var ret = true;
|
if (type == 1)
|
var ret = DrawPowerLines(geometry, altitudeType);
|
|
return ret;
|
}
|
//----
|
// DrawPowerLines
|
function DrawPowerLines(polylineGeometry, altitudeType) {
|
|
var distance = validateNumber($("#distance").attr("value"));
|
LeftOver = 0;
|
//navon added this
|
|
//altitudeType = 3;
|
//currWaypoint.Altitude = wpi.Position.Altitude;
|
//
|
gFoundLine = true;
|
var totlaDistance = 0;
|
for (var k = 1; k < polylineGeometry.Points.count; k++) // calculate total distance
|
{
|
// var lastCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k - 1).X, polylineGeometry.Points.Item(k - 1).Y, polylineGeometry.Points.Item(k - 1).Z);
|
// var currCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k).X, polylineGeometry.Points.Item(k).Y, polylineGeometry.Points.Item(k).Z);
|
|
var lastCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k - 1).X, polylineGeometry.Points.Item(k - 1).Y, 0);
|
var currCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(k).X, polylineGeometry.Points.Item(k).Y, 0);
|
|
totlaDistance += lastCoord.DistanceTo(currCoord);
|
}
|
CreateTheObjects = true;
|
if (!bDontAskme && (totlaDistance / distance) > 2000)
|
CreateTheObjects = confirm(SGLang.i18n("Text25") + NumBreaks + SGLang.i18n("Text26"));
|
if (CreateTheObjects) {
|
|
bDontAskme = true;
|
if ($("#createAs").val() == "Group")
|
{
|
if (GroupID == null)
|
{
|
GroupID = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text13"), "");
|
}
|
}
|
else
|
{
|
if(PolesLayer == null)
|
{
|
var postfix = new Date().getTime();
|
var group = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text13"), "");
|
PolesLayer = SGWorld.Creator.CreateNewFeatureLayer(SGLang.i18n("Text27"), LayerGeometryType.LGT_POINT, "FileName=poles" + postfix + ".shp;TEPlugName=OGR;", group);
|
PolesLayer.Streaming = $("#createAs").val() == "LayerStreaming";
|
PolesLayer.Refresh();
|
PolesLayer.DataSourceInfo.Attributes.CreateAttribute("Yaw", AttributeTypeCode.AT_DOUBLE, 0, 30);
|
PolesLayer.DataSourceInfo.Attributes.CreateAttribute("Pitch", AttributeTypeCode.AT_DOUBLE, 0, 30);
|
PolesLayer.DataSourceInfo.Attributes.CreateAttribute("Roll", AttributeTypeCode.AT_DOUBLE, 0, 30);
|
PolesLayer.Visibility.MaxVisibilityDistance = $("#visibilityDistance").attr("value");
|
// style the feature group
|
PolesLayer.FeatureGroups.Point.DisplayAs = ObjectTypeCode.OT_MODEL;
|
var xplurl = abspath().substr(0, abspath().indexOf('tool'));
|
PolesLayer.FeatureGroups.Point.SetProperty("File Name", xplurl + "/img/" + ModelName);
|
PolesLayer.FeatureGroups.Point.SetProperty("Scale X", PoleScale);
|
PolesLayer.FeatureGroups.Point.SetProperty("Scale Y", PoleScale);
|
PolesLayer.FeatureGroups.Point.SetProperty("Scale Z", PoleScale);
|
PolesLayer.FeatureGroups.Point.SetProperty("Yaw", "[Yaw]");
|
PolesLayer.FeatureGroups.Point.SetProperty("Roll", "[Roll]");
|
PolesLayer.FeatureGroups.Point.SetProperty("Pitch", "[Pitch]");
|
PolesLayer.FeatureGroups.Point.SetProperty("Altitude Method", 1);
|
|
|
|
LinesLayer = SGWorld.Creator.CreateNewFeatureLayer(SGLang.i18n("Text17"), LayerGeometryType.LGT_POLYLINE, "FileName=lines" + postfix + ".shp;TEPlugName=OGR;", group);
|
LinesLayer.Streaming = $("#createAs").val() == "LayerStreaming";
|
LinesLayer.Refresh();
|
LinesLayer.FeatureGroups.Polyline.SetProperty("Line Color", "#" + $("#color").val());
|
LinesLayer.Visibility.MaxVisibilityDistance = $("#visibilityDistance").attr("value");
|
LinesLayer.FeatureGroups.Polyline.SetProperty("Altitude Method", 1);
|
|
|
}
|
}
|
currentLine++;
|
SGWorld.Window.ShowMessageBarText(SGLang.i18n("Text22") + currentLine, -1);
|
|
var firstSegment = true;
|
for (var i = 1; i < polylineGeometry.Points.count; i++) // Finds Min && Max values;
|
{
|
var lastCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(i - 1).X, polylineGeometry.Points.Item(i - 1).Y, 0);
|
var currCoord = SGWorld.Creator.CreatePosition(polylineGeometry.Points.Item(i).X, polylineGeometry.Points.Item(i).Y, 0);
|
|
lastCoord.yaw = lastCoord.AimTo(currCoord).yaw;
|
currCoord.yaw = currCoord.AimTo(lastCoord).yaw;
|
|
if (i == 1)
|
{
|
if (AddPole(false, lastCoord) == false)
|
return false;
|
}
|
if ($("#Method").attr("value") == "waypoint") // Every waypoint
|
{
|
if (AddPole(true, currCoord) == false)
|
return false;
|
}
|
else { // Fixed distance between poles
|
lastCoord = lastCoord.MoveToward(currCoord, -LeftOver);
|
var SegmentLength = lastCoord.DistanceTo(currCoord);
|
var NumBreaks = Math.floor(SegmentLength / distance);
|
LeftOver = SegmentLength - (NumBreaks * $("#distance").attr("value"));
|
|
for (var j = 0; j < NumBreaks; j++) {
|
var poleCoord = lastCoord.MoveToward(currCoord, distance);
|
if (AddPole(true, poleCoord) == false) // **** need to handle last point
|
return false;
|
lastCoord = lastCoord.MoveToward(currCoord, distance);
|
}
|
firstSegment = false;
|
}
|
}
|
if ($("#createAs").val() == "Group") // create lines in group mode.
|
{
|
CreateLines();
|
}
|
}
|
|
return true;
|
}
|
//---------
|
// AddPole
|
function AddPole(drawLines, currWaypoint) {
|
|
currWaypoint.Altitude = 0;
|
currWaypoint.Pitch = 0;
|
|
//GetGroundHeight to set to models
|
var wpi = SGWorld.Terrain.GetGroundHeightInfo(currWaypoint.X, currWaypoint.Y, 1, true);
|
currWaypoint.Altitude = wpi.Position.Altitude;
|
currWaypoint.AltitudeType = 3;
|
//
|
|
if ($("#createAs").val() == "Group")
|
{
|
var xplurl = abspath().substr(0, abspath().indexOf('tool'));
|
var TEObj = SGWorld.creator.CreateModel(currWaypoint, xplurl + "/img/" + ModelName, PoleScale, 0, GroupID, SGLang.i18n("Text27"));
|
TEObj.Visibility.MaxVisibilityDistance = $("#visibilityDistance").attr("value");
|
}
|
else
|
{
|
PolesLayer.FeatureGroups.Point.CreateFeature([currWaypoint.X, currWaypoint.Y, currWaypoint.Altitude], currWaypoint.Yaw + ";" + currWaypoint.Pitch + ";" + currWaypoint.Roll);
|
}
|
|
if (drawLines) // add the line segments
|
{
|
var sectionDistance = gPrevPolePosition.DistanceTo(currWaypoint);
|
var numSegments = parseFloat($("#Segments").attr("value"));
|
var Maxdh = validateNumber($("#Depth").attr("value"));
|
var segmentDistance = sectionDistance / numSegments;
|
|
// I wanted to use absolute altitudes for the lines but it requires using getGround Height from the DB and can take forwaver when working with large layers)
|
// var prevAltitudeAbs = SGWorld.Terrain.GetGroundHeightInfo (gPrevPolePosition.X, gPrevPolePosition.Y, 2 , false);
|
// var currAltitudeAbs = SGWorld.Terrain.GetGroundHeightInfo (currWaypoint.X, currWaypoint.Y, 2 , false);
|
|
//prevPosAbs.ChangeAltitudeType (
|
|
for (var i = 0; i <= numSegments; i++) {
|
|
AddLineWaypoint(gPrevPolePosition, Math.sin((3.14159265 / numSegments * i)) * Maxdh);
|
gPrevPolePosition = gPrevPolePosition.MoveToward(currWaypoint, segmentDistance);
|
}
|
// when in feature mode, create lines after adding pole. This way line is split to segments and can be streamed.
|
if ($("#createAs").val() != "Group")
|
{
|
CreateLines();
|
}
|
}
|
gPrevPolePosition = currWaypoint.Copy();
|
}
|
//--------------
|
function AddLineWaypoint(waypoint, deltaLatitude) {
|
Line1Array[gLineIndex * 3] = waypoint.x;
|
Line1Array[gLineIndex * 3 + 1] = waypoint.y;
|
/// Line1Array[gLineIndex * 3 + 2] = waypoint.altitude + TowerBottomLine - deltaLatitude;
|
Line1Array[gLineIndex * 3 + 2] = TowerBottomLine - deltaLatitude + waypoint.Altitude;
|
Line2Array[gLineIndex * 3] = waypoint.x;
|
Line2Array[gLineIndex * 3 + 1] = waypoint.y;
|
/// Line2Array[gLineIndex * 3 + 2] = waypoint.altitude + TowerTopLine - deltaLatitude;
|
Line2Array[gLineIndex * 3 + 2] = TowerTopLine - deltaLatitude + waypoint.Altitude;
|
if (ThirdLine == true) {
|
Line3Array[gLineIndex * 3] = waypoint.x;
|
Line3Array[gLineIndex * 3 + 1] = waypoint.y;
|
/// Line3Array[gLineIndex * 3 + 2] = waypoint.altitude + TowerMiddleLine - deltaLatitude;
|
Line3Array[gLineIndex * 3 + 2] = TowerMiddleLine - deltaLatitude + waypoint.Altitude;
|
}
|
gLineIndex++;
|
}
|
//--------------------
|
// CreateLines
|
function CreateLines()
|
{
|
if ($("#createAs").val() == "Group")
|
{
|
var lineColor = SGWorld.Creator.CreateColor();
|
lineColor.FromHTMLColor("#" + $("#color").val());
|
var Line1 = SGWorld.Creator.createPolyline(SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(Line1Array), lineColor, 3, GroupID, SGLang.i18n("Text17"));
|
Line1.Visibility.MaxVisibilityDistance = $("#visibilityDistance").attr("value");
|
var Line2 = SGWorld.Creator.createPolyline(SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(Line2Array), lineColor, 3, GroupID, SGLang.i18n("Text17") + 2);
|
Line2.Visibility.MaxVisibilityDistance = $("#visibilityDistance").attr("value");
|
|
if (ThirdLine == true)
|
{
|
var Line3 = SGWorld.Creator.createPolyline(SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(Line3Array), lineColor, 3, GroupID, SGLang.i18n("Text17") + 3);
|
Line3.Visibility.MaxVisibilityDistance = $("#visibilityDistance").attr("value");
|
}
|
}
|
else
|
{
|
LinesLayer.FeatureGroups.Polyline.CreateFeature(Line1Array);
|
LinesLayer.FeatureGroups.Polyline.CreateFeature(Line2Array);
|
if (ThirdLine == true)
|
{
|
LinesLayer.FeatureGroups.Polyline.CreateFeature(Line3Array);
|
}
|
}
|
gLineIndex = 0;
|
Line1Array = [];
|
Line2Array = [];
|
Line3Array = [];
|
}
|
|
//-----------------
|
// TypeChanged
|
function TypeChanged() {
|
if ($("#Method").attr("value") == "waypoint") {
|
//$("#DistanceText").html (SGLang.i18n('Text8'));
|
$("#DistanceText2").html(" ");
|
$("#distance").attr('disabled','disabled');
|
$("#distance").attr("value", " ");
|
}
|
if ($("#Method").attr("value") == "fixdistance") {
|
//$("#DistanceText").html (SGLang.i18n('Text8'));
|
$("#DistanceText2").html (SGLang.i18n('Text23'));
|
$("#distance").attr('disabled', '');
|
$("#distance").attr("value", "60");
|
}
|
}
|
//---------------
|
// PoleChanged
|
function PoleChanged() {
|
if ($("#Pole").attr("value") == "1") {
|
$("#PoleImage").attr("src", "../img/Pole1.gif");
|
ModelName = "Pole1.x";
|
PoleScale = 0.05;
|
TowerBottomLine = 9;
|
TowerTopLine = 10.2;
|
ThirdLine = false;
|
}
|
if ($("#Pole").attr("value") == "2") {
|
$("#PoleImage").attr("src", "../img/Pwrlin.gif");
|
ModelName = "Pwrlin.xpc";
|
PoleScale = 0.07;
|
TowerBottomLine = 18.7;
|
TowerTopLine = 23;
|
TowerMiddleLine = 20.8;
|
ThirdLine = true;
|
}
|
if ($("#Pole").attr("value") == "3") {
|
$("#PoleImage").attr("src", "../img/Pwrlinbig.gif");
|
ModelName = "Pwrlinbig.x";
|
PoleScale = 1;
|
TowerBottomLine = 20;
|
TowerTopLine = 28.4;
|
TowerMiddleLine = 24.4;
|
ThirdLine = true;
|
}
|
if ($("#Pole").attr("value") == "4") {
|
$("#PoleImage").attr("src", "../img/pole4.gif");
|
ModelName = "pole4.xpl";
|
PoleScale = 1;
|
TowerBottomLine = 11.7;
|
TowerTopLine = 18.0;
|
TowerMiddleLine = 14.8;
|
ThirdLine = true;
|
}
|
if ($("#Pole").attr("value") == "5") {
|
$("#PoleImage").attr("src", "../img/pole5.gif");
|
ModelName = "pole5.xpl";
|
PoleScale = 1;
|
TowerBottomLine = 10.0;
|
TowerTopLine = 10.8;
|
TowerMiddleLine = 0;
|
ThirdLine = false;
|
}
|
if ($("#Pole").attr("value") == "6") {
|
$("#PoleImage").attr("src", "../img/pole6.gif");
|
ModelName = "pole6.xpl";
|
PoleScale = 1;
|
TowerBottomLine = 16.0;
|
TowerTopLine = 17;
|
TowerMiddleLine = 0;
|
ThirdLine = false;
|
}
|
}
|
//--------------
|
// CheckNumberEx
|
function CheckNumberEx(field, defVal, MinNum, MaxNum) {
|
try {
|
field.value = validateNumber(field.value);
|
|
if (field.value < MinNum)
|
field.value = MinNum;
|
if (field.value > MaxNum)
|
field.value = MaxNum;
|
}
|
catch (e) { field.value = defVal }
|
}
|
|
|
</script>
|
|
</body>
|
</html>
|