| 1 | <html> | 
|---|
| 2 |   <head> | 
|---|
| 3 |     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 
|---|
| 4 |     <meta name="標題" content=""/> | 
|---|
| 5 |     <meta name="主旨" content=""/> | 
|---|
| 6 |     <meta name="類別" content=""/> | 
|---|
| 7 |     <meta name="關鍵字" content=""/> | 
|---|
| 8 |     <meta name="描述" content=""/> | 
|---|
| 9 |     <meta name="作者" content=" "/> | 
|---|
| 10 |     <meta name="主管" content=""/> | 
|---|
| 11 |     <meta name="公司" content=""/> | 
|---|
| 12 |  | 
|---|
| 13 |     <title>clonezilla_mode</title> | 
|---|
| 14 |     <script src="clonezilla_mode.files/frameset.js" type="text/jscript" language="jscript"></script> | 
|---|
| 15 |     <script type="text/jscript" language="jscript" > | 
|---|
| 16 |  | 
|---|
| 17 | function FileEntry (pageIndex, pageID, pageName, priImage, secImage)  | 
|---|
| 18 | { | 
|---|
| 19 |   this.PageIndex = pageIndex; | 
|---|
| 20 |   this.PageID   = pageID; | 
|---|
| 21 |   this.PageName = pageName; | 
|---|
| 22 |   this.PriImage = priImage; | 
|---|
| 23 |   this.SecImage = secImage; | 
|---|
| 24 | } | 
|---|
| 25 |  | 
|---|
| 26 | var viewMgr = null; | 
|---|
| 27 |  | 
|---|
| 28 | var g_FileList = new  Array( | 
|---|
| 29 |  new FileEntry (1, 0, "頁-1", "vml_1.htm", "gif_1.htm") | 
|---|
| 30 |  | 
|---|
| 31 | ); | 
|---|
| 32 |  | 
|---|
| 33 | var g_CurPageIndex = 0; | 
|---|
| 34 | var g_ZoomLoaded = false; | 
|---|
| 35 | var g_WidgetsLoaded = false; | 
|---|
| 36 | var g_FileProtocol = "file://"; | 
|---|
| 37 |  | 
|---|
| 38 | var g_HLMenuEntry = "menuEntry"; | 
|---|
| 39 | var g_HLMenuEntryDiv = "menuEntryDiv"; | 
|---|
| 40 |  | 
|---|
| 41 | var g_LoadingWidgets = false; | 
|---|
| 42 |  | 
|---|
| 43 |  | 
|---|
| 44 | function CViewMgr(convertedImgID, highlightDivID) | 
|---|
| 45 | { | 
|---|
| 46 |   this.onResize = null; | 
|---|
| 47 |   this.ApplyZoom = null; | 
|---|
| 48 |   this.ChangingView = false; | 
|---|
| 49 |  | 
|---|
| 50 |   this.put_Location = ViewMgrDefaultFind; | 
|---|
| 51 |   this.Zoom = ViewMgrDefaultResize; | 
|---|
| 52 |   this.PostZoomProcessing = null; | 
|---|
| 53 |   this.setView = null; | 
|---|
| 54 |   this.PostSetViewProcessing = null; | 
|---|
| 55 |   this.viewChanged = null; | 
|---|
| 56 |  | 
|---|
| 57 |   this.SupportsDetails = false; | 
|---|
| 58 |   this.SupportsSearch = false; | 
|---|
| 59 |  | 
|---|
| 60 |   this.visBBoxLeft = 0.0; | 
|---|
| 61 |   this.visBBoxRight = 0.0; | 
|---|
| 62 |   this.visBBoxBottom = 0.0; | 
|---|
| 63 |   this.visBBoxTop = 0.0; | 
|---|
| 64 |  | 
|---|
| 65 |   this.highlightDiv = null; | 
|---|
| 66 |   this.stepWidth = 10; | 
|---|
| 67 |  | 
|---|
| 68 |   this.id = convertedImgID; | 
|---|
| 69 |   this.zoomFactor = -1; | 
|---|
| 70 |   this.zoomLast = -1; | 
|---|
| 71 |   this.origWH = 1; | 
|---|
| 72 |   this.origWidth = 100;  | 
|---|
| 73 |   this.aspectRatio = 1; | 
|---|
| 74 |  | 
|---|
| 75 |   this.docDrawing = null; | 
|---|
| 76 |   var docDrawing = frmDrawing.document; | 
|---|
| 77 |   if(docDrawing) | 
|---|
| 78 |   { | 
|---|
| 79 |     this.docDrawing = docDrawing; | 
|---|
| 80 |     var docEl = docDrawing.all(this.id); | 
|---|
| 81 |     if (docEl) | 
|---|
| 82 |     { | 
|---|
| 83 |       this.s = docEl.style; | 
|---|
| 84 |       this.origWidth = this.s.pixelWidth; | 
|---|
| 85 |       this.origWH = this.s.pixelWidth / this.s.pixelHeight; | 
|---|
| 86 |     } | 
|---|
| 87 |     this.highlightDiv = docDrawing.all(highlightDivID); | 
|---|
| 88 |   } | 
|---|
| 89 |  | 
|---|
| 90 |   this.loadPage = DefPageLoad; | 
|---|
| 91 |   this.getPNZ = null; | 
|---|
| 92 | } | 
|---|
| 93 |  | 
|---|
| 94 | function DefPageLoad (pageIndex) | 
|---|
| 95 | { | 
|---|
| 96 |   if (pageIndex >= 0) | 
|---|
| 97 |   { | 
|---|
| 98 |     var curPath = frmDrawing.location.href; | 
|---|
| 99 |     var fileDelim = curPath.lastIndexOf ('/'); | 
|---|
| 100 |         if (fileDelim == -1) | 
|---|
| 101 |             fileDelim = curPath.lastIndexOf ('\\'); | 
|---|
| 102 |     var newPath = curPath.substring (0, fileDelim + 1); | 
|---|
| 103 |     newPath += g_FileList[pageIndex].PriImage; | 
|---|
| 104 |     frmDrawing.location.href = newPath; | 
|---|
| 105 |  | 
|---|
| 106 |     SetPNZDisplay (pageIndex); | 
|---|
| 107 |   } | 
|---|
| 108 | } | 
|---|
| 109 |  | 
|---|
| 110 | function CurPageUpdate (pageIndex) | 
|---|
| 111 | { | 
|---|
| 112 |   if (pageIndex >= 0) | 
|---|
| 113 |   { | 
|---|
| 114 |     g_CurPageIndex = pageIndex; | 
|---|
| 115 |  | 
|---|
| 116 |     SetCurPageInGoto (pageIndex); | 
|---|
| 117 |  | 
|---|
| 118 |     var divDetails = frmToolbar.document.all("divDetails"); | 
|---|
| 119 |     if (divDetails) | 
|---|
| 120 |     { | 
|---|
| 121 |       var displayStatus = "block"; | 
|---|
| 122 |       if (!viewMgr || !viewMgr.SupportsDetails) | 
|---|
| 123 |       { | 
|---|
| 124 |         displayStatus = "none"; | 
|---|
| 125 |       } | 
|---|
| 126 |  | 
|---|
| 127 |       divDetails.style.display = displayStatus; | 
|---|
| 128 |     } | 
|---|
| 129 |  | 
|---|
| 130 |     var divSearch = frmToolbar.document.all("divSearch"); | 
|---|
| 131 |     if (divSearch) | 
|---|
| 132 |     { | 
|---|
| 133 |       var displayStatus = "block"; | 
|---|
| 134 |       if (!viewMgr || !viewMgr.SupportsSearch) | 
|---|
| 135 |       { | 
|---|
| 136 |         displayStatus = "none"; | 
|---|
| 137 |       } | 
|---|
| 138 |  | 
|---|
| 139 |       divSearch.style.display = displayStatus; | 
|---|
| 140 |     } | 
|---|
| 141 |  | 
|---|
| 142 |     SetPNZDisplay (pageIndex); | 
|---|
| 143 |  | 
|---|
| 144 |     LoadZoom (); | 
|---|
| 145 |   } | 
|---|
| 146 | } | 
|---|
| 147 |  | 
|---|
| 148 | function FramePageLoaded () | 
|---|
| 149 | { | 
|---|
| 150 |   if (isUpLevel && viewMgr == null) | 
|---|
| 151 |   { | 
|---|
| 152 |     var curPath = frmDrawing.location.href; | 
|---|
| 153 |     var fileDelim = curPath.lastIndexOf ('/'); | 
|---|
| 154 |     if (fileDelim >= 0) | 
|---|
| 155 |     { | 
|---|
| 156 |       var fileName = curPath.substring (fileDelim + 1, curPath.length); | 
|---|
| 157 |       var pageIndex = PageIndexFromFileName (fileName); | 
|---|
| 158 |       SetCurPageInGoto (pageIndex); | 
|---|
| 159 |       SetPNZDisplay (pageIndex); | 
|---|
| 160 |     } | 
|---|
| 161 |   } | 
|---|
| 162 | } | 
|---|
| 163 |  | 
|---|
| 164 | function LoadZoom () | 
|---|
| 165 | { | 
|---|
| 166 |   var zoomWidget = frmToolbar.ifrmPNZ; | 
|---|
| 167 |   if (zoomWidget) | 
|---|
| 168 |   { | 
|---|
| 169 |     if (g_ZoomLoaded) | 
|---|
| 170 |     { | 
|---|
| 171 |       zoomWidget.findContent(); | 
|---|
| 172 |       PageLoadedDoCallback (); | 
|---|
| 173 |     } | 
|---|
| 174 |     else | 
|---|
| 175 |     { | 
|---|
| 176 |       window.setTimeout("LoadZoom()", 500); | 
|---|
| 177 |     } | 
|---|
| 178 |   } | 
|---|
| 179 |   else | 
|---|
| 180 |   { | 
|---|
| 181 |     PageLoadedDoCallback (); | 
|---|
| 182 |   } | 
|---|
| 183 | } | 
|---|
| 184 |  | 
|---|
| 185 | function SetCurPageInGoto (pageIndex) | 
|---|
| 186 | { | 
|---|
| 187 |   var gotoPageSelect = frmToolbar.document.all("Select1"); | 
|---|
| 188 |   if (gotoPageSelect != null) | 
|---|
| 189 |   { | 
|---|
| 190 |     gotoPageSelect.value = pageIndex; | 
|---|
| 191 |   } | 
|---|
| 192 | } | 
|---|
| 193 |  | 
|---|
| 194 | function SetPNZDisplay (pageIndex) | 
|---|
| 195 | { | 
|---|
| 196 |   var divPNZ = frmToolbar.document.all("divPNZ"); | 
|---|
| 197 |   if (divPNZ) | 
|---|
| 198 |   { | 
|---|
| 199 |     var displayStatus = "block"; | 
|---|
| 200 |     if (g_FileList[pageIndex].PageID < 0) | 
|---|
| 201 |     { | 
|---|
| 202 |       displayStatus = "none"; | 
|---|
| 203 |     } | 
|---|
| 204 |  | 
|---|
| 205 |     divPNZ.style.display = displayStatus; | 
|---|
| 206 |   } | 
|---|
| 207 | } | 
|---|
| 208 |  | 
|---|
| 209 | function ViewMgrDefaultFind() | 
|---|
| 210 | { | 
|---|
| 211 |   return; | 
|---|
| 212 | } | 
|---|
| 213 |  | 
|---|
| 214 | function ViewMgrDefaultResize(size) | 
|---|
| 215 | { | 
|---|
| 216 |   return; | 
|---|
| 217 | } | 
|---|
| 218 |  | 
|---|
| 219 |  | 
|---|
| 220 |  | 
|---|
| 221 | g_callBackFunctionArray = new Array(); | 
|---|
| 222 | function PageLoadedDoCallback() | 
|---|
| 223 | { | 
|---|
| 224 |   if (g_WidgetsLoaded)   | 
|---|
| 225 |   { | 
|---|
| 226 |     for( var i=0; i < g_callBackFunctionArray.length; i++ ) | 
|---|
| 227 |     { | 
|---|
| 228 |       g_callBackFunctionArray[i](); | 
|---|
| 229 |     } | 
|---|
| 230 |     g_callBackFunctionArray = new Array(); | 
|---|
| 231 |   } | 
|---|
| 232 |   else | 
|---|
| 233 |   { | 
|---|
| 234 |     window.setTimeout("PageLoadedDoCallback()", 500); | 
|---|
| 235 |   } | 
|---|
| 236 | } | 
|---|
| 237 |  | 
|---|
| 238 |  | 
|---|
| 239 | function ParseParams (strRawParams) | 
|---|
| 240 | { | 
|---|
| 241 |   strRawParams = strRawParams.substring(1); | 
|---|
| 242 |  | 
|---|
| 243 |   var arrayParamTokens = strRawParams.split('&'); | 
|---|
| 244 |   for (var count = 0; count < arrayParamTokens.length; count++) | 
|---|
| 245 |   { | 
|---|
| 246 |     arrayParamTokens[count] = unescape(arrayParamTokens[count]); | 
|---|
| 247 |     this[count] = arrayParamTokens[count].substring(0, arrayParamTokens[count].indexOf('=')); | 
|---|
| 248 |     this[this[count]] = arrayParamTokens[count].substring(arrayParamTokens[count].indexOf('=') + 1); | 
|---|
| 249 |   } | 
|---|
| 250 |  | 
|---|
| 251 |   return this; | 
|---|
| 252 | } | 
|---|
| 253 |  | 
|---|
| 254 | var gParams = ParseParams (location.search); | 
|---|
| 255 |  | 
|---|
| 256 | var g_PageParamValue = gParams['page']; | 
|---|
| 257 | if (g_PageParamValue != null &&  | 
|---|
| 258 |   g_PageParamValue.length > 0) | 
|---|
| 259 | { | 
|---|
| 260 |   var pageIndex = PageIndexFromName (g_PageParamValue); | 
|---|
| 261 |   if (pageIndex > 0 && pageIndex < g_FileList.length) | 
|---|
| 262 |   { | 
|---|
| 263 |     g_CurPageIndex = pageIndex; | 
|---|
| 264 |   } | 
|---|
| 265 | } | 
|---|
| 266 | else | 
|---|
| 267 | { | 
|---|
| 268 |   g_PageParamValue = null; | 
|---|
| 269 | } | 
|---|
| 270 |  | 
|---|
| 271 | var g_FirstPageToLoad = g_PageParamValue; | 
|---|
| 272 |  | 
|---|
| 273 | var g_ZoomParamValue = gParams['zoom']; | 
|---|
| 274 | if (g_ZoomParamValue != null && g_ZoomParamValue.length > 0) | 
|---|
| 275 | { | 
|---|
| 276 |   g_ZoomParamValue = 1.0 * g_ZoomParamValue; | 
|---|
| 277 |   if (g_ZoomParamValue >= 10 && g_ZoomParamValue <= 500) | 
|---|
| 278 |   { | 
|---|
| 279 |     g_callBackFunctionArray[g_callBackFunctionArray.length] = function () { if (viewMgr && viewMgr.Zoom) { viewMgr.Zoom(g_ZoomParamValue); } }; | 
|---|
| 280 |   } | 
|---|
| 281 | } | 
|---|
| 282 |  | 
|---|
| 283 | var g_ShapeParamValue = gParams['shape']; | 
|---|
| 284 | if (g_ShapeParamValue != null && g_ShapeParamValue.length > 0) | 
|---|
| 285 | { | 
|---|
| 286 |   if (g_PageParamValue != null && g_PageParamValue.length > 0) | 
|---|
| 287 |   { | 
|---|
| 288 |     g_callBackFunctionArray[g_callBackFunctionArray.length] = function () { var shapeNode = FindShapeXMLByName (g_PageParamValue, g_ShapeParamValue); if (shapeNode) { frmToolbar.TreeSelect (g_FileList[g_CurPageIndex].PageID, shapeNode.attributes.getNamedItem ("ID").text); } }; | 
|---|
| 289 |   } | 
|---|
| 290 |   else | 
|---|
| 291 |   { | 
|---|
| 292 |     g_ShapeParamValue = null; | 
|---|
| 293 |   } | 
|---|
| 294 | } | 
|---|
| 295 |  | 
|---|
| 296 | var g_SearchParamValue = gParams['search']; | 
|---|
| 297 | if (g_SearchParamValue != null && g_SearchParamValue.length > 0) | 
|---|
| 298 | { | 
|---|
| 299 |   g_callBackFunctionArray[g_callBackFunctionArray.length] = function () { if (frmToolbar.theForm) { frmToolbar.theForm.findString.value = g_SearchParamValue; } }; | 
|---|
| 300 |   g_callBackFunctionArray[g_callBackFunctionArray.length] = function () { var goButton = frmToolbar.document.all('GoButton'); if(goButton) { goButton.click(); } }; | 
|---|
| 301 | } | 
|---|
| 302 |  | 
|---|
| 303 |  | 
|---|
| 304 | var strHLTooltipText = "按一下以跟隨超連結。"; | 
|---|
| 305 | var strPropsTooltipText = "Ctrl + 按一下以檢視詳細資料。"; | 
|---|
| 306 |  | 
|---|
| 307 | var strFocusHLTooltipText = "按下 Enter 以追蹤超連結。"; | 
|---|
| 308 | var strFocusPropsTooltipText = "Ctrl + Enter 以檢視詳細資料。"; | 
|---|
| 309 |  | 
|---|
| 310 |  | 
|---|
| 311 | function UpdateTooltip (element, pageID, shapeID) | 
|---|
| 312 | { | 
|---|
| 313 |   if (isUpLevel) | 
|---|
| 314 |   { | 
|---|
| 315 |     var strHL, strProps; | 
|---|
| 316 |    | 
|---|
| 317 |     if(frmDrawing.event.type == "focus") | 
|---|
| 318 |     { | 
|---|
| 319 |       strHL = strFocusHLTooltipText; | 
|---|
| 320 |       strProps = strFocusPropsTooltipText; | 
|---|
| 321 |     } | 
|---|
| 322 |     else | 
|---|
| 323 |     { | 
|---|
| 324 |       strHL = strHLTooltipText; | 
|---|
| 325 |       strProps = strPropsTooltipText; | 
|---|
| 326 |     } | 
|---|
| 327 |  | 
|---|
| 328 |     var strTooltip = ""; | 
|---|
| 329 |     if (element.origTitle) | 
|---|
| 330 |     { | 
|---|
| 331 |       strTooltip = element.origTitle.toString(); | 
|---|
| 332 |     } | 
|---|
| 333 |        | 
|---|
| 334 |     var shapeNode = FindShapeXML (pageID, shapeID); | 
|---|
| 335 |  | 
|---|
| 336 |     if( shapeNode != null ) | 
|---|
| 337 |     { | 
|---|
| 338 |       var propColl = shapeNode.selectNodes ("Prop"); | 
|---|
| 339 |       if (propColl != null && propColl.length > 0) | 
|---|
| 340 |       { | 
|---|
| 341 |         if (strTooltip.length > 0) | 
|---|
| 342 |         { | 
|---|
| 343 |           strTooltip += "\n"; | 
|---|
| 344 |         }  | 
|---|
| 345 |         strTooltip += strProps; | 
|---|
| 346 |       } | 
|---|
| 347 |     } | 
|---|
| 348 |  | 
|---|
| 349 |     var hlObj = GetHLAction (shapeNode, pageID, shapeID); | 
|---|
| 350 |     if (hlObj != null && (hlObj.DoFunction.length > 0 || hlObj.Hyperlink.length > 0)) | 
|---|
| 351 |     { | 
|---|
| 352 |       if (strTooltip.length > 0) | 
|---|
| 353 |       { | 
|---|
| 354 |         strTooltip += "\n"; | 
|---|
| 355 |       }  | 
|---|
| 356 |       strTooltip += strHL; | 
|---|
| 357 |     } | 
|---|
| 358 |  | 
|---|
| 359 |     element.title = strTooltip; | 
|---|
| 360 |     if (element.alt != null) | 
|---|
| 361 |     { | 
|---|
| 362 |       element.alt = strTooltip; | 
|---|
| 363 |     } | 
|---|
| 364 |   } | 
|---|
| 365 | } | 
|---|
| 366 |  | 
|---|
| 367 |  | 
|---|
| 368 | function GetHLAction (shapeNode, pageID, shapeID) | 
|---|
| 369 | { | 
|---|
| 370 |   var hlObj = new HLObj ("", "", "", false); | 
|---|
| 371 |  | 
|---|
| 372 |   if (shapeNode != null) | 
|---|
| 373 |   { | 
|---|
| 374 |     var hlColl = shapeNode.selectNodes ("Scratch/B/SolutionXML/HLURL:Hyperlinks/HLURL:Hyperlink"); | 
|---|
| 375 |  | 
|---|
| 376 |     if (hlColl.length > 1) | 
|---|
| 377 |     { | 
|---|
| 378 |       hlObj.DoFunction = "showMenu(" + pageID + ", " + shapeID + ");" | 
|---|
| 379 |     } | 
|---|
| 380 |     else if (hlColl.length == 1) | 
|---|
| 381 |     { | 
|---|
| 382 |       hlObj = CreateHLObj (hlColl.item(0)); | 
|---|
| 383 |     } | 
|---|
| 384 |   } | 
|---|
| 385 |  | 
|---|
| 386 |   return hlObj; | 
|---|
| 387 | } | 
|---|
| 388 |  | 
|---|
| 389 | function HLObj (strHyperlink, strDoFunction, strDesc, newWindow)  | 
|---|
| 390 | { | 
|---|
| 391 |   this.Hyperlink = strHyperlink; | 
|---|
| 392 |   this.DoFunction = strDoFunction; | 
|---|
| 393 |   this.Desc = strDesc; | 
|---|
| 394 |   this.NewWindow = newWindow; | 
|---|
| 395 | } | 
|---|
| 396 |  | 
|---|
| 397 | function clickMenu() | 
|---|
| 398 | { | 
|---|
| 399 |   var e = window.frmDrawing.event; | 
|---|
| 400 |   var menu = frmDrawing.document.all("menu1") | 
|---|
| 401 |    | 
|---|
| 402 |   if (menu != null && menu.style.display != "none") | 
|---|
| 403 |   { | 
|---|
| 404 |     menu.style.display="none"; | 
|---|
| 405 |  | 
|---|
| 406 |     if (e && e.srcElement && e.srcElement.doFunction != null) | 
|---|
| 407 |     { | 
|---|
| 408 |       eval(e.srcElement.doFunction); | 
|---|
| 409 |     } | 
|---|
| 410 |   } | 
|---|
| 411 | } | 
|---|
| 412 |  | 
|---|
| 413 | function toggleMenuDiv(el, highlight)  | 
|---|
| 414 | { | 
|---|
| 415 |   var divEl = el; | 
|---|
| 416 |   var aEl = null; | 
|---|
| 417 |  | 
|---|
| 418 |   var ID = el.id.substring (g_HLMenuEntryDiv.length, el.id.length) * 1.0; | 
|---|
| 419 |   aEl = divEl.all(g_HLMenuEntry + ID); | 
|---|
| 420 |  | 
|---|
| 421 |   toggleMenu(divEl, aEl, highlight); | 
|---|
| 422 | } | 
|---|
| 423 |  | 
|---|
| 424 | function toggleMenuLink(el, highlight)  | 
|---|
| 425 | { | 
|---|
| 426 |   var divEl = null; | 
|---|
| 427 |   var aEl = el; | 
|---|
| 428 |  | 
|---|
| 429 |   var ID = el.id.substring (g_HLMenuEntry.length, el.id.length) * 1.0; | 
|---|
| 430 |   divEl = frmDrawing.document.all(g_HLMenuEntryDiv + ID); | 
|---|
| 431 |  | 
|---|
| 432 |   toggleMenu(divEl, aEl, highlight); | 
|---|
| 433 | } | 
|---|
| 434 |  | 
|---|
| 435 | function toggleMenu(divEl, aEl, highlight) | 
|---|
| 436 | { | 
|---|
| 437 |   if (highlight) | 
|---|
| 438 |   { | 
|---|
| 439 |     divEl.className="highlightItem"; | 
|---|
| 440 |     aEl.className="highlightItem"; | 
|---|
| 441 |   }  | 
|---|
| 442 |   else  | 
|---|
| 443 |   { | 
|---|
| 444 |     divEl.className="menuItem"; | 
|---|
| 445 |     aEl.className="menuItem"; | 
|---|
| 446 |   } | 
|---|
| 447 | } | 
|---|
| 448 |  | 
|---|
| 449 | function showMenu(pageID, shapeID) | 
|---|
| 450 | { | 
|---|
| 451 |   var shapeXML = FindShapeXML (pageID, shapeID); | 
|---|
| 452 |   if (shapeXML != null) | 
|---|
| 453 |   { | 
|---|
| 454 |     CreateHLMenu (shapeXML); | 
|---|
| 455 |     var menu = frmDrawing.document.all("menu1"); | 
|---|
| 456 |     if (menu != null) | 
|---|
| 457 |     { | 
|---|
| 458 |       menu.style.visibility = "hidden"; | 
|---|
| 459 |       menu.style.display = "inline"; | 
|---|
| 460 |  | 
|---|
| 461 |       var e = window.frmDrawing.event; | 
|---|
| 462 |       var elem = e.srcElement; | 
|---|
| 463 |  | 
|---|
| 464 |       var clientWidth = frmDrawing.document.body.clientWidth; | 
|---|
| 465 |       var clientHeight = frmDrawing.document.body.clientHeight; | 
|---|
| 466 |  | 
|---|
| 467 |       var menuWidth = menu.clientWidth; | 
|---|
| 468 |       var menuHeight = menu.clientHeight; | 
|---|
| 469 |  | 
|---|
| 470 |       var menuLeft = e.x; | 
|---|
| 471 |       var menuTop = e.y; | 
|---|
| 472 |        | 
|---|
| 473 |       var doc = frmDrawing.document; | 
|---|
| 474 |       var img = doc.all("ConvertedImage"); | 
|---|
| 475 |        | 
|---|
| 476 |       if( (menuLeft + doc.body.scrollLeft < elem.offsetLeft) || (menuLeft + doc.body.scrollLeft > elem.offsetLeft + elem.offsetWidth + img.offsetLeft) ) | 
|---|
| 477 |       { | 
|---|
| 478 |         menuLeft = elem.offsetLeft + img.offsetLeft + elem.offsetWidth/2; | 
|---|
| 479 |       } | 
|---|
| 480 |        | 
|---|
| 481 |       if( (menuTop + doc.body.scrollTop < elem.offsetTop) || (menuTop + doc.body.scrollTop > elem.offsetTop + elem.offsetHeight + img.offsetTop) ) | 
|---|
| 482 |       { | 
|---|
| 483 |         menuTop = elem.offsetTop + img.offsetTop + elem.offsetHeight/2; | 
|---|
| 484 |       } | 
|---|
| 485 |  | 
|---|
| 486 |       var scrollBarSize = 20; | 
|---|
| 487 |       if (menuLeft + menuWidth > clientWidth - scrollBarSize) | 
|---|
| 488 |       { | 
|---|
| 489 |         menuLeft = clientWidth - menuWidth - scrollBarSize; | 
|---|
| 490 |       } | 
|---|
| 491 |  | 
|---|
| 492 |       if (menuTop + menuHeight > clientHeight - scrollBarSize) | 
|---|
| 493 |       { | 
|---|
| 494 |         menuTop = clientHeight - menuHeight - scrollBarSize; | 
|---|
| 495 |       } | 
|---|
| 496 |  | 
|---|
| 497 |       menu.style.posLeft = menuLeft + frmDrawing.document.body.scrollLeft; | 
|---|
| 498 |       menu.style.posTop = menuTop + frmDrawing.document.body.scrollTop; | 
|---|
| 499 |       menu.style.visibility = "visible"; | 
|---|
| 500 |  | 
|---|
| 501 |       var firstLink = menu.all(g_HLMenuEntry + "0"); | 
|---|
| 502 |       firstLink.focus (); | 
|---|
| 503 |        | 
|---|
| 504 |       if (e.keyCode == 13) | 
|---|
| 505 |       { | 
|---|
| 506 |         toggleMenuLink(firstLink, true); | 
|---|
| 507 |       } | 
|---|
| 508 |  | 
|---|
| 509 |       e.cancelBubble = true; | 
|---|
| 510 |     } | 
|---|
| 511 |   } | 
|---|
| 512 | } | 
|---|
| 513 |  | 
|---|
| 514 | function MenuKeyDown () | 
|---|
| 515 | { | 
|---|
| 516 |   var e = window.frmDrawing.event; | 
|---|
| 517 |   var el = e.srcElement; | 
|---|
| 518 |  | 
|---|
| 519 |   if (e.keyCode == 27)  // 27 == ESC | 
|---|
| 520 |   { | 
|---|
| 521 |     clickMenu(); | 
|---|
| 522 |     e.cancelBubble = true; | 
|---|
| 523 |     return; | 
|---|
| 524 |   } | 
|---|
| 525 |  | 
|---|
| 526 |   var curSelID = el.id.substring (g_HLMenuEntry.length, el.id.length) * 1.0; | 
|---|
| 527 |   var newSelID = -1; | 
|---|
| 528 |  | 
|---|
| 529 |   if (e.keyCode == 40)  // 40 == down arrow | 
|---|
| 530 |   { | 
|---|
| 531 |     newSelID = curSelID + 1; | 
|---|
| 532 |   } | 
|---|
| 533 |   else if (e.keyCode == 38) // 38 == up arrow | 
|---|
| 534 |   { | 
|---|
| 535 |     newSelID = curSelID - 1; | 
|---|
| 536 |   } | 
|---|
| 537 |  | 
|---|
| 538 |   var newSelEntry = frmDrawing.document.all(g_HLMenuEntry + newSelID); | 
|---|
| 539 |  | 
|---|
| 540 |   if (newSelEntry) | 
|---|
| 541 |   { | 
|---|
| 542 |     newSelEntry.focus(); | 
|---|
| 543 |  | 
|---|
| 544 |     var curSelEntry = frmDrawing.document.all(g_HLMenuEntry + curSelID); | 
|---|
| 545 |     toggleMenuLink (curSelEntry, false); | 
|---|
| 546 |     toggleMenuLink (newSelEntry, true); | 
|---|
| 547 |   } | 
|---|
| 548 |  | 
|---|
| 549 |   e.cancelBubble = true; | 
|---|
| 550 | } | 
|---|
| 551 |  | 
|---|
| 552 | function CreateHLMenu (shapeNode) | 
|---|
| 553 | { | 
|---|
| 554 |   var strHLMenuHTML = ""; | 
|---|
| 555 |  | 
|---|
| 556 |   if (shapeNode != null) | 
|---|
| 557 |   { | 
|---|
| 558 |     var hlColl = shapeNode.selectNodes ("Scratch/B/SolutionXML/HLURL:Hyperlinks/HLURL:Hyperlink"); | 
|---|
| 559 |  | 
|---|
| 560 |     strHLMenuHTML = "<div class='innerhlMenu'>"; | 
|---|
| 561 |  | 
|---|
| 562 |     var hlCount = hlColl.length; | 
|---|
| 563 |     for (var count = 0; count < hlCount; count++) | 
|---|
| 564 |     { | 
|---|
| 565 |       var hlObj = CreateHLObj (hlColl.item(count)); | 
|---|
| 566 |       if (hlObj != null) | 
|---|
| 567 |       { | 
|---|
| 568 |         if (hlObj.Desc.length > 0) | 
|---|
| 569 |         { | 
|---|
| 570 |           strHLMenuHTML += "<div id='" + (g_HLMenuEntryDiv + count) + "' class='menuItem' onmouseover='toggleMenuDiv(this, true)' onmouseout='toggleMenuDiv(this, false)' onclick='" + (g_HLMenuEntry + count) + ".click()'>"; | 
|---|
| 571 |           strHLMenuHTML += "<a href="; | 
|---|
| 572 |  | 
|---|
| 573 |           if (hlObj.DoFunction.length > 0) | 
|---|
| 574 |           { | 
|---|
| 575 |             strHLMenuHTML += "'javascript:" + hlObj.DoFunction + "'"; | 
|---|
| 576 |           } | 
|---|
| 577 |           else | 
|---|
| 578 |           { | 
|---|
| 579 |             var targetVal = "_top"; | 
|---|
| 580 |             if (hlObj.NewWindow) | 
|---|
| 581 |             { | 
|---|
| 582 |               targetVal = "_blank"; | 
|---|
| 583 |             } | 
|---|
| 584 |             strHLMenuHTML += "'" + hlObj.Hyperlink + "' target='" + targetVal + "'"; | 
|---|
| 585 |           } | 
|---|
| 586 |  | 
|---|
| 587 |           strHLMenuHTML += " class='menuItem' id='" + (g_HLMenuEntry + count) + "' onkeydown='parent.MenuKeyDown();' onmouseover='toggleMenuLink(this, true)' onmouseout='toggleMenuLink(this, false)'>"; | 
|---|
| 588 |           strHLMenuHTML += hlObj.Desc + "</a></div>"; | 
|---|
| 589 |         } | 
|---|
| 590 |       } | 
|---|
| 591 |     } | 
|---|
| 592 |      | 
|---|
| 593 |     strHLMenuHTML += "</div>"; | 
|---|
| 594 |   } | 
|---|
| 595 |  | 
|---|
| 596 |   frmDrawing.menu1.innerHTML = strHLMenuHTML; | 
|---|
| 597 | } | 
|---|
| 598 |  | 
|---|
| 599 | function CreateHLObj (hlNode) | 
|---|
| 600 | { | 
|---|
| 601 |   var strAddress = ""; | 
|---|
| 602 |   var hlObj = new HLObj ("", "", "", false); | 
|---|
| 603 |  | 
|---|
| 604 |   if (hlNode != null) | 
|---|
| 605 |   { | 
|---|
| 606 |     var hlAddress = hlNode.selectSingleNode("HLURL:Address/textnode()"); | 
|---|
| 607 |     if (hlAddress != null && hlAddress.text.length > 0) | 
|---|
| 608 |     { | 
|---|
| 609 |       var absoluteURL = hlNode.selectSingleNode("HLURL:AbsoluteURL/textnode()"); | 
|---|
| 610 |       var strAbsURL = absoluteURL.text; | 
|---|
| 611 |       var strAddr = hlAddress.text; | 
|---|
| 612 |  | 
|---|
| 613 |       if (strAbsURL.indexOf (g_FileProtocol) == 0) | 
|---|
| 614 |       { | 
|---|
| 615 |         var strAbsPath = strAbsURL.substring (g_FileProtocol.length, strAbsURL.length); | 
|---|
| 616 |         strAbsPath.toLowerCase (); | 
|---|
| 617 |         strAddr.toLowerCase (); | 
|---|
| 618 |         if (strAbsPath == strAddr) | 
|---|
| 619 |         { | 
|---|
| 620 |           strAddress = strAbsPath; | 
|---|
| 621 |         } | 
|---|
| 622 |         else | 
|---|
| 623 |         { | 
|---|
| 624 |           strAddress = strAddr; | 
|---|
| 625 |            | 
|---|
| 626 |           var hlSubAddress = hlNode.selectSingleNode("HLURL:SubAddress/textnode()"); | 
|---|
| 627 |           if (hlSubAddress != null && hlSubAddress.text.length > 0) | 
|---|
| 628 |           { | 
|---|
| 629 |             strAddress += '#'; | 
|---|
| 630 |             strAddress += hlSubAddress.text; | 
|---|
| 631 |           } | 
|---|
| 632 |  | 
|---|
| 633 |           var hlExtraInfo = hlNode.selectSingleNode("HLURL:ExtraInfo/textnode()"); | 
|---|
| 634 |           if (hlExtraInfo != null && hlExtraInfo.text.length > 0) | 
|---|
| 635 |           { | 
|---|
| 636 |             strAddress += '?'; | 
|---|
| 637 |             strAddress += hlExtraInfo.text; | 
|---|
| 638 |           } | 
|---|
| 639 |         } | 
|---|
| 640 |       } | 
|---|
| 641 |       else | 
|---|
| 642 |       { | 
|---|
| 643 |         strAddress = strAbsURL; | 
|---|
| 644 |       }    | 
|---|
| 645 |  | 
|---|
| 646 |       strAddress = HTMLEscape (strAddress); | 
|---|
| 647 |       hlObj.Hyperlink += strAddress; | 
|---|
| 648 |     } | 
|---|
| 649 |     else | 
|---|
| 650 |     { | 
|---|
| 651 |       hlAddress = hlNode.selectSingleNode("HLURL:SubAddress/textnode()"); | 
|---|
| 652 |       if (hlAddress != null && hlAddress.text.length > 0) | 
|---|
| 653 |       { | 
|---|
| 654 |         strAddress = hlAddress.text; | 
|---|
| 655 |  | 
|---|
| 656 |         var pageShapeSep = strAddress.lastIndexOf ('/'); | 
|---|
| 657 |         if (pageShapeSep > 0) | 
|---|
| 658 |         { | 
|---|
| 659 |           if (PageIndexFromName (strAddress) < 0) | 
|---|
| 660 |           { | 
|---|
| 661 |             strAddress = unescape (strAddress); | 
|---|
| 662 |             if (PageIndexFromName (strAddress) < 0) | 
|---|
| 663 |             { | 
|---|
| 664 |               strAddress = strAddress.substring (0, strAddress.lastIndexOf ('/')); | 
|---|
| 665 |             } | 
|---|
| 666 |           } | 
|---|
| 667 |         } | 
|---|
| 668 |  | 
|---|
| 669 |         var pageIndex = PageIndexFromName (strAddress); | 
|---|
| 670 |  | 
|---|
| 671 |         hlObj.DoFunction = "GoToPage (" + pageIndex + ");"; | 
|---|
| 672 |         strAddress = HTMLEscape (strAddress); | 
|---|
| 673 |         hlObj.Desc = strAddress; | 
|---|
| 674 |       } | 
|---|
| 675 |     } | 
|---|
| 676 |  | 
|---|
| 677 |     hlDesc = hlNode.selectSingleNode("HLURL:Description/textnode()"); | 
|---|
| 678 |     if (hlDesc != null && hlDesc.text.length > 0) | 
|---|
| 679 |     { | 
|---|
| 680 |       hlObj.Desc = HTMLEscape (hlDesc.text); | 
|---|
| 681 |     } | 
|---|
| 682 |     else | 
|---|
| 683 |     { | 
|---|
| 684 |       hlObj.Desc = strAddress; | 
|---|
| 685 |     } | 
|---|
| 686 |    | 
|---|
| 687 |     var hlNewWindow = hlNode.selectSingleNode("HLURL:NewWindow/textnode()"); | 
|---|
| 688 |     if (hlNewWindow != null && hlNewWindow.text.length > 0) | 
|---|
| 689 |     { | 
|---|
| 690 |       hlObj.NewWindow = (hlNewWindow.text == "1"); | 
|---|
| 691 |     }    | 
|---|
| 692 |   } | 
|---|
| 693 |  | 
|---|
| 694 |   return hlObj; | 
|---|
| 695 | } | 
|---|
| 696 |  | 
|---|
| 697 |  | 
|---|
| 698 |     </script> | 
|---|
| 699 |   </head> | 
|---|
| 700 |    | 
|---|
| 701 |   <frameset id="frmstOuter" cols="237,*" title="clonezilla_mode"> | 
|---|
| 702 |     <frame src="clonezilla_mode.files/toolbar.htm" name="frmToolbar" id="frmToolbar" title="此框架包含管理您繪圖的工具。" frameborder="6" bordercolor="#999999" scrolling="no" marginheight="0" marginwidth="0" > | 
|---|
| 703 |     <frame src="clonezilla_mode.files/gif_1.htm" name="frmDrawing" title="此框架包含您繪圖的頁面。" marginheight="10" marginwidth="10" onload="if (parent.isUpLevel) FramePageLoaded()" > | 
|---|
| 704 |  | 
|---|
| 705 |     <noframes> | 
|---|
| 706 |       <body> | 
|---|
| 707 |  | 
|---|
| 708 |         <h1>clonezilla_mode</h1> | 
|---|
| 709 |         <ul> | 
|---|
| 710 |         <li><a href="clonezilla_mode.files/gif_1.htm">頁-1</a></li> | 
|---|
| 711 |  | 
|---|
| 712 |         </ul> | 
|---|
| 713 |       </body> | 
|---|
| 714 |     </noframes> | 
|---|
| 715 |   </frameset> | 
|---|
| 716 |    | 
|---|
| 717 | </html> | 
|---|
| 718 |  | 
|---|