widgets.htm 15.4 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Information</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"/>
<link href="visio.css" rel="stylesheet">
<script src="keys.js" type="text/javascript" language="javascript"></script>
<script src="find.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
	
	var imgMin = new Image();
	imgMin.src = "minimize.gif";
	
	var imgMax = new Image();
	imgMax.src = "maximize.gif";

	var fileList = parent.g_FileList;
	
	function Widgets()
	{
		this.GoTo = null;
		this.Search = null;
		this.Details = null;
		this.PNZ = null;

		this.divCount = 0;
		
		this.OpenText = "Skjul alle";
		this.OpenAlt = "Skjul alle";
		this.ClosedText = "Utvid alle";
		this.ClosedAlt = "Utvid alle";

		this.Display = "";
		this.Img = imgMin;
		this.Text = this.OpenText;
		this.Alt = this.OpenAlt;
		
		this.ToggleAll = ToggleAll;
		this.ToggleWidget = ToggleWidget;
		this.Add = Add;
	}		

	function Add(div, name)
	{
		tmpStr = "this." + name + " = new Widget(div);"
		eval(tmpStr);
		var thisWidget = eval("this." + name);
	}

	function Widget(div)
	{
		return div;
	}	

	function ToggleAll()
	{
		var OpenCloseFunc = Widget;

		if(this.Display == "")
		{
			this.Display = "none";
			this.Img = imgMax;
			this.Text = this.ClosedText;
			this.Alt = this.ClosedAlt;
			document.getElementById("expparent00").title = this.ClosedAlt;
			OpenCloseFunc = CloseWidget;
		}
		else
		{
			this.Display = "";
			this.Img = imgMin;
			this.Text = this.OpenText;
			this.Alt = this.OpenAlt;
			document.getElementById("expparent00").title = this.OpenAlt;
			OpenCloseFunc = OpenWidget;
		}
		document.getElementById("exp00").src = this.Img.src;	
		document.getElementById("textExp").innerHTML = this.Text;
		document.getElementById("exp00").alt = this.Alt;
	
		if(this.GoTo)
		{
			OpenCloseFunc(this.GoTo)
		}
		if(this.Search)
		{
			OpenCloseFunc(this.Search)
		}
		if(this.Details)
		{
			OpenCloseFunc(this.Details)
		}
		if(this.PNZ)
		{
			OpenCloseFunc(this.PNZ)
		}
	}

	function ToggleNav()
	{
		if(document.getElementById("divCollapsedNav").style.display == "none")
		{
			document.getElementById("divCollapsedNav").style.display = "";
			document.getElementById("divOpenNav").style.display = "none";
			parent.document.getElementById("frmstOuter").cols = "20,*"
			parent.document.getElementById("frmToolbar").noResize = true;
		}
		else
		{
			document.getElementById("divOpenNav").style.display = "";
			document.getElementById("divCollapsedNav").style.display = "none";
			parent.document.getElementById("frmstOuter").cols = "237,*"
			parent.document.getElementById("frmToolbar").noResize = false;
		}
	}
	
	function ToggleWidget(div)
	{
		if(div.style.display == "none")
		{
			OpenWidget(div);
		}
		else
		{
			CloseWidget(div);
		}
	}

	function OpenWidget(div)
	{
		document.getElementById(div.img).src = imgMin.src;
		div.style.display = "";
		document.getElementById(div.img).alt = div.openAlt;
		document.getElementById(div.img + "1").title = div.openAlt;
		document.getElementById(div.img + "2").title = div.openAlt;
	}

	function CloseWidget(div)
	{
		document.getElementById(div.img).src = imgMax.src;
		div.style.display = "none";
		document.getElementById(div.img).alt = div.closedAlt;
		document.getElementById(div.img + "1").title = div.closedAlt;
		document.getElementById(div.img + "2").title = div.closedAlt;
	}

	function load()
	{
		parent.g_WidgetsLoaded = true;

		if (parent.g_LoadingWidgets)
		{
			parent.g_LoadingWidgets = false;
			parent.location.reload();
		}
	}

	function unload()
	{
		parent.g_LoadingWidgets = true;
	}
	
		
	var widgets = new Widgets();

</script>

</head>
<body onload="load();" onunload="unload();" onkeypress="keyHandler(event)">
<div id="divOpenNav" class="nav">

	<table id="tabToc" width="100%" class="navTocColor" style="margin-bottom:1px;" cellspacing="0" cellpadding="0" border="0" height="20" dir=ltr>
	<tr>
	<td width="2"><a href="javascript:ToggleNav();" title="Skjul navigeringsramme" id="linkNavOpen"><img src="toc.gif" alt="Skjul navigeringsramme" width="22" height="17" border="0"></a></td>
	<td><p class="p1"><a href="javascript:ToggleNav();" title="Skjul navigeringsramme" class="a1">Skjul</a></p></td>
	<td align="right"><p class="p1"><a href="javascript:widgets.ToggleAll()" id="textExp" class="a1">Skjul alle</a></p></td>
	<td width="2">
		<div style="padding:2pt,1.5pt,0pt,0pt"><a href="javascript:widgets.ToggleAll()" title="Skjul alle" id="expparent00"><img id="exp00" alt="Skjul alle" src="minimize.gif" width="15" height="15" border="0"></a></div>
	</td>
	</tr>
	</table>
	
	

	
	<div id="divPNZ" class="holder" dir=ltr>
		<table width="100%" cellspacing="0" cellpadding="0" border="0" class="holderTable">
		<tr><td>
			<div class="fillcolor">
				<table width="100%" cellspacing="0" cellpadding="1" border="0" class="fillcolor">
				<tr>
				<td style="padding:3px;"><a id="exp41" title="Skjul Panorer og zoom" href="javascript:widgets.ToggleWidget(hidePNZ);"><p class="label" style="display:inline;">Panorer og zoom</p></a></td>
				<td width="15"><a id="exp42" title="Skjul Panorer og zoom" href="javascript:widgets.ToggleWidget(hidePNZ);"><img id="exp4" alt="Skjul Panorer og zoom" src="minimize.gif" width="15" height="15" border="0"></a></td>
				</tr>
				</table>
			</div>
		</td></tr>
		<tr><td>
			<div id="hidePNZ" style="text-align:right;" class="hiderScroll" openAlt="Skjul Panorer og zoom" closedAlt="Vis Panorer og zoom">
				<table width="220" border="0" cellpadding="0" cellspacing="0">
				<tr>
				<td align="center" valign="middle">
					<iframe title="Vinduet Panorer og zoom" longdesc="Vinduet Panorer og zoom" name="ifrmPNZ" id="ifrmPNZ" src="zoom.htm" width="178" height="178" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" style="border: #cccccc 1px solid;"></iframe>
				</td>
					
				<td>
					<table id="tabScale" width="17" cellspacing="0" cellpadding="0" border="0" onmouseover="tickFocus(event)" onmouseout="tickBlur(event)">
						<tr><td><a href="javascript:tickSelect(100);" title="Zoom side til 100 %"><img src="fullpage.gif" alt="Zoom side til 100 %" border="0"></a></td></tr>
						<tr><td><a href="javascript:ZoomUpDown(1);" title="Zoom inn"><img src="panplus.gif" alt="Zoom inn" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(500);" title="Zoom til 500 %"><img id="t500" src="tick-off.gif" alt="Zoom til 500 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(450);" title="Zoom til 450 %"><img id="t450" src="tick-off.gif" alt="Zoom til 450 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(400);" title="Zoom til 400 %"><img id="t400" src="tick-off.gif" alt="Zoom til 400 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(350);" title="Zoom til 350 %"><img id="t350" src="tick-off.gif" alt="Zoom til 350 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(300);" title="Zoom til 300 %"><img id="t300" src="tick-off.gif" alt="Zoom til 300 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(250);" title="Zoom til 250 %"><img id="t250" src="tick-off.gif" alt="Zoom til 250 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(200);" title="Zoom til 200 %"><img id="t200" src="tick-off.gif" alt="Zoom til 200 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(150);" title="Zoom til 150 %"><img id="t150" src="tick-off.gif" alt="Zoom til 150 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(100);" title="Zoom til 100 %" id="a100"><img id="t100" src="tick-on.gif" alt="Zoom til 100 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(50);" title="Zoom til 50 %"><img id="t50" src="tick-off.gif" alt="Zoom til 50 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:tickSelect(10);" title="Zoom til 10 %"><img id="t10" src="tick-off.gif" alt="Zoom til 10 %" width="17" height="11" border="0"></a></td></tr>
						<tr><td><a href="javascript:ZoomUpDown(-1);" title="Zoom ut"><img src="panminus.gif" alt="Zoom ut" border="0"></a></td></tr>
					</table>
				</td>
				</tr>
				</table>
			</div>			
		</td></tr>
		</table>
		
		<script type="text/javascript" language="javascript">
		    var hidePNZ = document.getElementById("hidePNZ");
			hidePNZ.img = "exp4";
			widgets.Add(hidePNZ, "PNZ");
			widgets.divCount++;

			var zoomLevels = new Array(10, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500);

			var tickOff = new Image();
			tickOff.src = "tick-off.gif";
			
			var tickFoc = new Image();
			tickFoc.src = "tick-foc.gif";
			
			var tickOn = new Image();
			tickOn.src = "tick-on.gif";
				
			function getElem(event)
			{
				// Retrieve the event in IE
				if (!event)
					var event = window.event;
				
				// Reference the element howeaver this browser can
				var elem;
				if (event.target) // For Firefox
					elem = event.target;
				else if (event.srcElement) // For IE
					elem = event.srcElement;
				if (elem.nodeType == 3) // For Safari
					elem = elem.parentNode;
				
				return elem
			}
			function tickFocus(event)
			{
				var elem = getElem(event);
				
				if(elem.state == "off")
					elem.src = tickFoc.src;
			}
			
			function tickBlur(event)
			{
				var elem = getElem(event);
					
				if(elem.state == "off")
					elem.src = tickOff.src;
			}

			function tickSelect(percentZoom)
			{
				if (parent.viewMgr &&
					parent.viewMgr.Zoom)
				{
					changeTick(percentZoom);
					parent.viewMgr.Zoom(percentZoom);					
				}

                var frame = frames[0];
				
				if(frame.zoomRectDiv)
				{
					frame.g_width = parseInt(frame.zoomRectDiv.style.pixelWidth);
					frame.g_height = parseInt(frame.zoomRectDiv.style.pixelHeight);
					frame.g_newLeft = parseInt(frame.zoomRectDiv.style.left);
					frame.g_newTop = parseInt(frame.zoomRectDiv.style.top);
				}
			}

			function changeTick(percentZoom)
			{
				img = document.getElementById("t" + percentZoom);
									
				img.src = tickOn.src;
				
				if(elemScale.tickSelected && elemScale.tickSelected != img)
				{
					elemScale.tickSelected.src = tickOff.src;
				}
				elemScale.tickSelected = img;
			}
			
			function ZoomUpDown(increment)
			{
				if (elemScale.tickSelected)
				{
					var curZoomLevel = elemScale.tickSelected.id.substring (1);
					var newZoomLevelIndex = IndexFromLevel (curZoomLevel * 1.0);
					if (newZoomLevelIndex >= 0)
					{
						var img = document.getElementById("t" + zoomLevels[newZoomLevelIndex + increment]);
						if (img)
						{
							tickSelect(img.id.substring(1));
						}
					}
				}
				else
				{
					tickSelect (100);
				}
			}

			function IndexFromLevel (zoomLevel)
			{
				for (var count = 0; count < zoomLevels.length; count++)
				{
					if (zoomLevels[count] == zoomLevel)
					{
						return count;
					}
				}

				return -1;
			}
			
			elemScale = document.getElementById("tabScale");
		</script>
	</div>

	
	<div id="divDetails" class="holder" dir=ltr>
		<table width="100%" cellspacing="0" cellpadding="0" border="0" class="holderTable">
		<tr><td>
			<div class="fillcolor">
				<table width="100%" cellspacing="0" cellpadding="1" border="0" class="fillcolor">
				<tr>
				<td style="padding:3px;"><a id="exp21" title="Skjul detaljer" href="javascript:widgets.ToggleWidget(hideDetails);"><p class="label" style="display:inline;">Detaljer</p></a></td>
				<td width="15"><a id="exp22" title="Skjul detaljer" href="javascript:widgets.ToggleWidget(hideDetails);"><img id="exp2" alt="Skjul detaljer" src="minimize.gif" width="15" height="15" border="0"></a></td>
				</tr>
				</table>
			</div>
		</td></tr>
		<tr><td>
			<div id="hideDetails" class="hiderScroll" openAlt="Skjul detaljer" closedAlt="Vis detaljer">
				<P class="p2" class="detsPara">Trykk CTRL og klikk en figur i tegningen for å vise detaljene.</P>
			</div>
		</td></tr>
		</table>		
		
		<script type="text/javascript" language="javascript">
		    var hideDetails = document.getElementById("hideDetails");
			hideDetails.img = "exp2";
			widgets.Add(hideDetails, "Details");
			widgets.divCount++;
		</script>
	</div>

	
	<div id="divSearch" class="holder">
		<table width="100%" cellspacing="0" cellpadding="0" border="0" class="holderTable">
		<tr><td>
			<div class="fillcolor" dir=ltr>
				<table width="100%" cellspacing="0" cellpadding="1" border="0" class="fillcolor">
				<tr>
				<td style="padding:3px;"><a id="exp11" title="Skjul søkesider" href="javascript:widgets.ToggleWidget(hideSearch);"><p class="label" style="display:inline;">Søkesider</p></a></td>
				<td width="15"><a id="exp12" title="Skjul søkesider" href="javascript:widgets.ToggleWidget(hideSearch);"><img src="minimize.gif" id="exp1" alt="Skjul søkesider" width="15" height="15" border="0"></a></td>
				</tr>
				</table>
			</div>

		</td></tr>
		<tr><td>	

			<div id="hideSearch" img="exp1" class="hiderScroll" openAlt="Skjul søkesider" closedAlt="Vis søkesider">
								<form name=theForm onsubmit="FindOnClick(); return false;" ID="Form1">
									<table width="100%" cellspacing="0" cellpadding="3" border="0">
									<tr>
									<td width="100%">
										<input class="formText" type="text" name="findString" maxlength="255" size="26" title="Skriv inn tekst for å søke. Trykk Enter for å starte søket.">
									</td>
									<td width="18" class="gobutton">
										<input type="image" src="go.gif" alt="Start søk" width="18" height="18" ID="GoButton" NAME="GoButton">
									</td>
									</tr>
									<tr>
									<td colspan="2" class="p2">
										<a href="javascript:{};" tabindex="0" onclick="TogglePlus(hideAdvSrch,as0);" class="blu1"><img src="plus.gif" alt="Viser/skjuler avanserte søkealternativer" border="0" id="as0">Avansert</a>
											<div id="hideAdvSrch" class="hiderScroll" style="display:none;">
												<b>Søk etter:</b>
												<div id="divS"></div>
											</div>
										<hr width="100%" size="1" color="#cccccc">
										<div id="hideResults" class="hiderScroll" style="display:none;"></div>
									</td>
									</tr>
									</table>
								</form>
			</div>					

		</td></tr>
		</table>
		
		
		<script type="text/javascript" language="javascript">
		    var hideSearch = document.getElementById("hideSearch");
			hideSearch.img = "exp1";
			widgets.Add(hideSearch, "Search");
			widgets.divCount++;
			
			makeAdvancedFindCheckboxes(document.getElementById("divS"));
			
			
			var imgPlus = new Image();
			imgPlus.src = "plus.gif";
	
			var imgMinus = new Image();
			imgMinus.src = "minus.gif";
			
			function TogglePlus(div, img, container)
			{
				if(typeof(img) == "string")	
					img = document.getElementById(img)
				if(typeof(div) == "string")
					div = document.getElementById(div)
					
				widget = widgets.Search;
				if(div && img)
				{
					if(div.style.display == "none")
					{
						div.style.display = "";
						img.src = imgMinus.src;
						div.open = "true";
					}
					else
					{
						div.style.display = "none";
						img.src = imgPlus.src;
						
						div.open = "false";
					}
				}
			}
		</script>
	</div>


</div>

<div id="divCollapsedNav" class="navTocColor" style="display:none;width:100%;height:100%;">
	<a href="javascript:ToggleNav();" title="Vis navigeringsramme" id="linkNavClosed"><img src="toc2.gif" alt="Vis navigeringsramme" border="0"></a>
</div>	


</body>
</html>