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
|
//Generic Display code
//Updated 11/9/00 - updated outline3()
var L_COLLAPSE_TEXT="Hide All";
var L_EXPAND_TEXT="Show All";
function ExpandAll()
{
// Expand all
var iSpan
var iSpanSource
var oSpan
var sCaption
var sAction
var sImage
// Determine the action, and the picture to replace
sCaption=document.all("ExpandAll").innerHTML;
if (sCaption==L_EXPAND_TEXT)
{
sAction="expanded";
sImage="bluedrop.gif"
document.all("picHeader").src="collapsetri.gif";
document.all("ExpandAll").innerHTML=L_COLLAPSE_TEXT;
}
else
{
sAction="collapsed";
sImage="blueup.gif"
document.all("picHeader").src="expandtri.gif";
document.all("ExpandAll").innerHTML=L_EXPAND_TEXT;
}
// Execute the action for all expand SPANs
for (iSpan=0; iSpan < document.all.tags("DIV").length; iSpan++)
{
oSpan=document.all.tags("DIV").item(iSpan);
iSpanSource=oSpan.sourceIndex;
if (oSpan.id=="ExpCol")
{
document.all.tags("DIV").item(iSpan).className=sAction;
if(document.all(iSpanSource-1).tagName=="IMG" && document.all(iSpanSource-2).tagName!="IMG")
{
document.all(iSpanSource-1).src=sImage;
}
else if(document.all(iSpanSource-2).tagName=="IMG")
{
document.all(iSpanSource-2).src=sImage
}
}
// Handle the Q tag added late for Loc
if (document.all(iSpanSource-1).tagName=="Q")
{
document.all(iSpanSource-2).src=sImage;
}
}
// Change the text and the picture of the main caller
document.all("ExpandAll").className="DropDown";
// Now we do the inline defs
var cLinks = document.all.tags("A");
var iNumLinks = cLinks.length;
for (var i=0;i<iNumLinks;i++)
{
cLink=document.all.tags("A").item(i);
switch (sAction)
{
case 'expanded':
if (cLink.className=="glossary" && cLink.getAttribute("State")!="On")
{
cLinks[i].click();
}
else if (cLink.className=="HidePopUp")
{
cLinks[i].click();
}
break;
case 'collapsed':
if (cLink.className=="glossary" && cLink.getAttribute("State")=="On")
{
cLinks[i].click();
}
else if (cLink.className=="HidePopUp")
{
cLinks[i].click();
}
break;
}
}
}
function Outline2()
{
window.event.returnValue=0
//Expand or collapse if a list item is clicked.
var open = event.srcElement;
//Verify that the tag which was clicked was either the
//trigger tag or nested within a trigger tag.
var el = checkParent(open,"A");
if(null != el)
{
var incr=0;
var elmPos = 0;
var parentSpan;
var fBreak
//Get the position of the element which was clicked
elemPos = window.event.srcElement.sourceIndex;
//Search for a SPAN tag
for (parentSpan = window.event.srcElement.parentElement;
parentSpan!=null;
parentSpan = parentSpan.parentElement)
{
//test if already at a span tag
if (parentSpan.tagName=="DIV")
{
//alert("Parent Element is a SPAN");
incr=1;
break;
}
//Test if the tag clicked was in a body tag or in any of the possible kinds of lists
//we perform this test because nested lists require special handling
if (parentSpan.tagName=="BODY" || parentSpan.tagName=="UL" || parentSpan.tagName=="OL"|| parentSpan.tagName=="P")
{
//Determine where the span to be expanded is.
for (incr=1; (elemPos+incr) < document.all.length; incr++)
{
//verify we are at an expandable Div tag
if(document.all(elemPos+incr).tagName=="DIV" &&
(document.all(elemPos+incr).className=="expanded" ||
document.all(elemPos+incr).className=="collapsed"))
{
fBreak=1;
break;
}
//If the next tag following the list item (li) is another
//list item(li) return in order to prevent accidentally opening
//the next span in the list
else if(document.all(elemPos+incr).tagName=="LI")
{
return;
}
}
}
//determine if we need to break out of the while loop (kind of a kludge since theres no goto in javascript)
if(fBreak==1)
{
break;
}
}
}
else
{
//Alert("Return!");
return;
}
//Now that we've identified the span, expand or collapse it
if(document.all(elemPos+incr).className=="collapsed")
{
document.all(elemPos+incr).className="expanded"
document.all(elemPos+1).src="bluedrop.gif";
if(open.tagName=="IMG"){open.src="bluedrop.gif";}
if(open.tagName=="B")
{
if(open.parentElement.all.tags("IMG").length != 0)
{open.parentElement.all.tags("IMG").item(0).src="bluedrop.gif";}
}
}
else if(document.all(elemPos+incr).className=="expanded")
{
document.all(elemPos+incr).className="collapsed"
document.all(elemPos+1).src="blueup.gif";
if(open.tagName=="IMG"){open.src="blueup.gif";}
if(open.tagName=="B")
{
if(open.parentElement.all.tags("IMG").length != 0)
{open.parentElement.all.tags("IMG").item(0).src="blueup.gif";}
}
}
else
{
return;
}
event.cancelBubble = true;
// open.scrollIntoView(true);
}
function Outline3()
{
window.event.returnValue=0
//Expand or collapse if a list item is clicked.
var open = event.srcElement;
//Verify that the tag which was clicked was either the
//trigger tag or nested within a trigger tag.
var el = checkParent(open,"A");
if(null != el)
{
var incr=0;
var elmPos = 0;
var parentSpan;
var fBreak
//Get the position of the element which was clicked
elemPos = window.event.srcElement.sourceIndex;
//Search for a SPAN tag
for (parentSpan = window.event.srcElement.parentElement;
parentSpan!=null;
parentSpan = parentSpan.parentElement)
{
//test if already at a span tag
if (parentSpan.tagName=="DIV")
{
//alert("Parent Element is a SPAN");
//incr=1;
//break;
}
//Test if the tag clicked was in a body tag or in any of the possible kinds of lists
//we perform this test because nested lists require special handling
if (parentSpan.tagName=="BODY" || parentSpan.tagName=="UL" || parentSpan.tagName=="OL"|| parentSpan.tagName=="P")
{
//Determine where the span to be expanded is.
for (incr=1; (elemPos+incr) < document.all.length; incr++)
{
//verify we are at an expandable Div tag
if(document.all(elemPos+incr).tagName=="DIV" &&
(document.all(elemPos+incr).className=="expanded" ||
document.all(elemPos+incr).className=="collapsed"))
{
fBreak=1;
break;
}
//If the next tag following the list item (li) is another
//list item(li) return in order to prevent accidentally opening
//the next span in the list
else if(document.all(elemPos+incr).tagName=="LI")
{
return;
}
}
}
//determine if we need to break out of the while loop (kind of a kludge since theres no goto in javascript)
if(fBreak==1)
{
break;
}
}
}
else
{
Alert("Return!");
return;
}
//Now that we've identified the span, expand or collapse it
//Now that we've identified the span, expand or collapse it
if(document.all(elemPos+incr).className=="collapsed")
{
document.all(elemPos+incr).className="expanded"
document.all(elemPos+1).src="bluedrop.gif";
if(open.tagName=="IMG"){open.src="bluedrop.gif";}
if(open.tagName=="B")
{
if(open.parentElement.all.tags("IMG").length != 0)
{open.parentElement.all.tags("IMG").item(0).src="bluedrop.gif";}
}
}
else if(document.all(elemPos+incr).className=="expanded")
{
document.all(elemPos+incr).className="collapsed"
document.all(elemPos+1).src="blueup.gif";
if(open.tagName=="IMG"){open.src="blueup.gif";}
if(open.tagName=="B")
{
if(open.parentElement.all.tags("IMG").length != 0)
{open.parentElement.all.tags("IMG").item(0).src="blueup.gif";}
}
}
else
{
return;
}
event.cancelBubble = true;
// open.scrollIntoView(true);
}
function checkParent(src,dest)
{
//Search for a specific parent of the current element.
while(src !=null)
{
if(src.tagName == dest)
{
return src;
}
src = src.parentElement;
}
return null;
}
//This function displays content from different source HTML files
function showPopup(filename, theSpan){
//Get the position of the element which was clicked
elemPos = window.event.srcElement.sourceIndex;
theIFRAME.location.replace(filename);
tempSpan = theSpan
window.setTimeout("showPopup2(tempSpan,elemPos)", 800)
}
function showPopup2(theSpan, elemPos){
//var elemPos=0;
//Get the position of the element which was clicked
//elemPos = window.event.srcElement.sourceIndex;
defSpan = document.all(theSpan);
if (defSpan && document.readyState == "complete" && theIFRAME.document.readyState == "complete"){
if (defSpan.style.display == "none"){
theIFRAME.document.all.tags("H1").item(0).outerHTML="";
if(theIFRAME.document.all.tags("P").item("ExpandAllLine") != null) {theIFRAME.document.all.tags("P").item("ExpandAllLine").outerHTML="";}
///defSpan.innerHTML = theIFRAME.document.all.glosdef.innerHTML;
defSpan.innerHTML = theIFRAME.document.body.innerHTML;
defSpan.style.display = "";
defSpan.parentElement.style.display = "";
document.all(elemPos+1).src="bluedrop.gif";
document.all(elemPos).src="bluedrop.gif";
}
else{
defSpan.style.display = "none";
defSpan.parentElement.style.display = "none";
document.all(elemPos+1).src="blueup.gif";
//if(oSource.tagName=="IMG"){open.src="blueup.gif";}
}
}
}
//Swapping images
function MM_swapImgRestore() { //v2.0
if (document.MM_swapImgData != null)
for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}
function MM_swapImage() { //v2.0
var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
(objStr.indexOf('document.all[') ==0 && document.all ==null))
objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
obj = eval(objStr);
if (obj != null) {
swapArray[j++] = obj;
swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
obj.src = MM_swapImage.arguments[i+2];
} }
document.MM_swapImgData = swapArray; //used for restore
}
|