// headlines setup start 
	// 覧覧覧覧覧覧覧覧 Configurable parameters 覧覧覧覧覧覧覧覧
	var scrollDiv 	   = "scrollSubCont"
	var scrollerheight = "160"						// height (pixels)
	var scrollerspeed  = 4							// scroll speed (larger is faster 1-10)
	var hlPause = [2500,2500,2500,2500,2500]		// pause between headlines
	// 覧覧覧覧覧覧覧覧 End of configurable parameters 覧覧覧覧覧覧覧覧
	
	var hlCount = 0									// count headlines from DIV tags
	var hlWhich = 0									// start using this headline
	var hlArray = []								// store headlines into an array
	var userPause = 0;								// user initiated pause

	var colDivs  = [];								// find columns for height matching
	var colMaxHt = 0; 								// initialize maximum height value
	
	var copyspeed=scrollerspeed
	var actualheight=''
	var cross_scroller
	var lefttime
	//
	// initilize headline array and start scroll onLoad
	//
	function pageSetup() {
		cross_scroller=document.getElementById(scrollDiv)					// set var for where to target scrolling headlines
		divs=document.getElementsByTagName('div');			         		// get all <div> elements in the document

		for(var i=0;i<divs.length;i++){										// capture relevant <div> elements
			d=divs[i];

			// capture headline content
			if(/\bheadline\b/.test(divs[i].className)) hlArray[hlArray.length] = d.innerHTML;

			// capture scroller column for height matching (req unique height offset)
			else if(/\bcolumnScroll\b/.test(divs[i].className)) colScroll = d;

			// capture column for height matching
			else if(/\batGlanceBox\b/.test(divs[i].className)) {
				colDivs[colDivs.length]=d;
				
				if      (d.offsetHeight)      divHeight=d.offsetHeight;		// determine height for columns
				else if (d.style.pixelHeight) divHeight=d.style.pixelHeight;
				colMaxHt=Math.max(colMaxHt,divHeight);						// calculate maximum height
				}
			}
		// assign maximum height value to all columns
		for(var i=0;i<colDivs.length;i++) {	colDivs[i].style.height=colMaxHt+"px"; }
		//alert(colScroll.offsetTop)
		colScrollHt = (colMaxHt - colScroll.offsetTop + 160);
		colScroll.style.height=colScrollHt + "px"
		scrollerheight = colScrollHt

		hlWhich = hlArray.length											// initial populate will rollover to 0
		if (hlArray.length > 1) populate();										// initialize div and scroll
		else if (hlArray.length > 0) cross_scroller.innerHTML = hlArray[0];		// show the only header and DO NOT SCROLL
		}

	// switch headline content and trigger scroll recursions
	//		- delay (programmed) or pause (user hover) as required
	//
	function populate(delay){
		if      (delay) 	   wait = setTimeout("populate()",hlPause[hlWhich]);	// delay between headlines
		else if (userPause==1) wait = setTimeout("populate()",250);					// user paused (recursive)
		else {
			clearInterval(lefttime)											// cancel scroll recursions
			hlWhich = (hlWhich+1 >= hlArray.length)?0:hlWhich+1;			// point to next headline
			cross_scroller.style.top=parseInt(scrollerheight)+8+"px"		// set headline top below viewer height
			cross_scroller.innerHTML = hlArray[hlWhich]						// populate viewer
			actualheight=cross_scroller.offsetHeight						// set actual height
			lefttime=setInterval("scrollscroller()",10)						// start scroll recursions
			}
		}

	// recursive scroll function - stop when headline tops off 
	//
	function scrollscroller(){
		if (parseInt(cross_scroller.style.top)>(actualheight*(-1)+8)) 	cross_scroller.style.top=parseInt(cross_scroller.style.top)-copyspeed+"px";
		else 															cross_scroller.style.top=parseInt(scrollerheight)+8+"px";
		if (parseInt(cross_scroller.style.top)<=0) {
			clearInterval(lefttime)											// cancel scroll recursions
			populate(true);													// trigger delay & next headline
			}			
		}
// headlines setup end

// 
// Function to build Menus and body content
//
/*
// create program sub menu 
	var pgarr = "pg";	
	var altm = "alt";

	function doPrgMenuList() {
	
		for (var i=0; i<pgmArr.length; i++) {
			hdr = document.getElementById('hdrdiv'+i);
			hdr.innerHTML = pgmArr[i][0];
				for (var k=0; k<pgmArr[i][1].length; k++) {
					menitem = document.getElementById('itemdiv'+i);
					menitem.innerHTML += "<div id='"+k+"menuitem"+i+"' class='menuitem' onClick='gourl("+i+","+k+",pgarr);' onmouseout='ieItemHover("+i+","+k+",1);' onmouseover='gotooltip("+i+","+k+"); ieItemHover("+i+","+k+",0);'>"+pgmArr[i][1][k][0]+"</div>\n";
				}
			}
		}
// create program menu end
	
// create other sub menus
			function divMenu(num) {
			for (var i=0; i<num; i++) {
				document.write("<div class='menuContainer' id='menu"+i+"Container'>\n");
				document.write("<div class='menu' id='menu"+i+"Content'>\n");
				document.write("<div class='menuInsert'>\n");
				document.write("<div>\n");
				document.write("<div class='winbox'>\n");
				document.write("<div>\n");
				document.write("<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n");
				document.write("<tr>\n");
				document.write("<td valign='top' width='45%'>\n");
				document.write("<div id='altDiv"+i+"'></div>\n");
				document.write("</td>\n");
				document.write("</tr>\n");
				document.write("</table>\n");
				document.write("</div>\n");
				document.write("</div>\n");
				document.write("</div>\n");
				document.write("</div>\n");
				document.write("</div>\n");
				document.write("</div>\n");
			}
		}
		

	function doAltMenuList() {
		for (var i=0; i<altMenuArr.length; i++) {
			althdr = document.getElementById('altDiv'+i);
				for (var k=0; k<altMenuArr[i][1].length; k++) {
					althdr.innerHTML += "<div id='"+k+"altmenuitem"+i+"' class='menuitem' onClick='gourl("+i+","+k+",altm);' onmouseout='ieItemHover("+i+","+k+",3);' onmouseover='ieItemHover("+i+","+k+",2);'>"+altMenuArr[i][1][k][0]+"</div>\n";
				}
			}
		}
	*/
// create other sub menus ends
	
	/* //javascript menu goto URL when clicked
	function gourl(hdr,item,myarray){
		if (myarray == "pg") {
			location.href = pgmArr[hdr][1][item][1];
			}
		else if (myarray == "alt") {
			location.href = altMenuArr[hdr][1][item][1];
		}
	}
	
	
	// display Tip popup onmouseover
	function gotooltip(hdr,item) {
		brief = pgmArr[hdr][1][item][2];
			Tip(brief, BALLOON, true, ABOVE, true, WIDTH, 360, FADEIN, 600, FADEOUT, 600);
		}
	
// direct menu pick body content
	function altmenu(cat,arr,title) {
		if (arr == "alt") {
			document.write("<div class='arrbody'><h2>"+title+"</h2>");
			for (var k=0; k<altMenuArr[cat][1].length; k++) {
				document.write("<div class='arrhead' onClick='gourl("+cat+","+k+",altm);' style='cursor: pointer;'>"+altMenuArr[cat][1][k][0]+"</div>");
				document.write("<div style='margin-bottom: 8px;'>"+altMenuArr[cat][1][k][2]+"</div>\n");
			}
			document.write("</div>");
		}
		else {
		document.write("<div class='arrbody'><h2>"+title+"</h2>");
			for (var i=0; i<pgmArr.length; i++) {
				document.write("<div class='prghead'>"+pgmArr[i][0]+"</div>");
					for (var k=0; k<pgmArr[i][1].length; k++) {
						document.write("<div class='arrhead' onClick='gourl("+i+","+k+",pgarr);' style='cursor: pointer;'>"+pgmArr[i][1][k][0]+"</div>");
						document.write("<div style='margin-bottom: 8px;'>"+pgmArr[i][1][k][2]+"</div>\n");
						}
				}
				document.write("</div>");
			}
		}
	
	
// direct menu pick body content end

 // optional contact build
	function contactbody() {
	var flip = 0;
	
	document.write("<table cellpadding='0' cellspacing='20' border='0' align='left' style='margin-left:20px;'>");
	for (i=0; i<contactArr.length; i++) {
			if (i==flip) { 
							document.write("<tr valign='top'>");
							flip=flip+2; 
						 }
			document.write("<td style='width:250px;'><strong>"+contactArr[i][0]+"</strong>");
			for (k=0; k<contactArr[i][1].length; k++) {
				document.write("<br>"+contactArr[i][1][k]);				
			}
			document.write("</td>");
			if (i==flip+1) { document.write("</tr>"); }
		}
		document.write("</table>");
	}
	
*/
	function iehover(div,stat) {
		d=document.getElementById(div);
			if (stat == 0) {
				d.style.color ="#D4CC9E";
			}
		else {
			d.style.color ="#ffffff";
		}
		
	}

// function below has bee modified to handle ie6 hover event
	function ieItemHover(id,hdr,stat) {
		d=document.getElementById(hdr+"menuitem"+id);
		q=document.getElementById(hdr+"altmenuitem"+id);
			if (stat == 0) {
				d.style.color = "#000000";
				d.style.background = "#0574AF";
			}
		else if (stat == 1) {
			d.style.color = "#ffffff";
			d.style.background = "#104a8d";
		}
		else if (stat == 2) {
				q.style.color = "#000000";
				q.style.background = "#0574AF";
		}
		else if (stat == 3) {
			q.style.color = "#ffffff";
			q.style.background = "#104a8d";
		}
		else {}
	}
	
// populate the link window on left
	function popLinkWin(num,cat) {
	var myhtml = "";
	/* var gocat = "";
	var files = "/files/"; */
	var area = document.getElementById("lnWin");
	area.innerHTML = "";
	/* if (cat == 0) {	gocat = "1,3"; } else if (cat == 1) { gocat = "1,5"; } else if (cat == 2) { gocat = "1,4"; } */
			myhtml = "<table cellpadding='0' cellspacing='0' border='0'><tr><td colspan='2' style='width:230px;background: #1A3375;'><div class='toplinkwin' align='center'>Related Items</div> \n";
			myhtml += "	</td> \n";
			myhtml += "	<td valign='top' class='shdwmidrt'><img src='images/linkwintoprt.png' width='8' height='8' alt='' align='top'></td> \n";
			myhtml += "</tr><tr><td colspan='2' style='width:230px;background: #832C2C;'><div class='bottomlinkwin' align='left'> \n";
			myhtml += "<div class='windowlink'>Research Areas</div>";
			
		/*	myhtml += "<div class='windowlink' onClick='gourl("+gocat+",altm)'>"+pgmArr[cat][0]+"</div>"; */
		myhtml += "<hr>";
			myhtml += "<div class='windowlink'>White Papers</div>";
		myhtml += "<hr>";
			myhtml += "<div class='windowlink'>Programs</div>";
		myhtml += "<hr>";
			myhtml += "<div class='windowlink'>Products</div>";
		myhtml += "<hr>";
			myhtml += "<div class='windowlink'>References</div>";
			/*			for (m=0; m<pgmArr[cat][1][num][3].length; m++) {
							myhtml += "<div class='windowlink' onClick='getwhitepaper("+cat+","+num+","+m+")'>"+pgmArr[cat][1][num][3][m]+"</div> \n";
				}
			myhtml += "<hr>";
					for (d=0; d<pgmArr[cat][1][num][4].length; d++) {
							myhtml += "<div class='windowlink'>"+pgmArr[cat][1][num][4][d]+"</div> \n";
				} */
				myhtml += "</div></td><td class='shdwmidrt'></td></tr><tr><td colspan='2' style='background: url(images/linkwinbtmmid.png) repeat-x; height: 8px;' align='left'><img src='images/linkwinbtmlt.png' width='8' height='8' alt=''  style='vertical-align: top;'></td><td class='shdwbtmrt'></td></tr></table> \n";
			area.innerHTML = myhtml;
		}

	function popExpertiseList() {
		document.write("<div id='listbox' class='yellwbox' width='100%'>");
		document.write("<div style='float: right;'>");
		document.write("<div class='hidebox' onClick='hidelist()' title='Click to hide List'></div>");
		document.write("</div>");
		document.write("<div>");
			for (i=0; i<expertiseArr.length; i++) {
			document.write("<ul><li>"+expertiseArr[i]+"</li></ul> \n");
			}
			document.write("</div>");
		document.write("</div>");
	}
	
	function getwhitepaper(cat,num,m) {
		location.href="/files/"+pgmArr[cat][1][num][3][m];
	}
	
	function hidelist() {
		div = document.getElementById("listbox");
		div.style.display = "none";
	}

// 覧覧覧覧覧覧覧覧   Breadcrumb parameters   覧覧覧覧覧覧覧覧
	var myroot = "Product Data Engineering";
	var path = "/";
// 覧覧覧覧覧覧覧覧  End Parameters  覧覧覧覧覧覧覧覧 

function breadcrumbs(bpath,bname) {
	var div = document.getElementById("crumy");
	
}

//
// format value as currency
//
	function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num)) num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10) cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3));
	return (((sign)?'':'-') + '$' + num + '.' + cents);
	}

//
// email to a given name (protects from email harvesting)
//
var subject = "Logworld%20Inquiry"
function emailto(name,domain) {
	domain = (domain ? domain : "scra.org");		// default doamin
	address = name + "@" + domain
	document.writeln("<a class='email' href='mailto:" + address + "?subject=" + subject + "'>" + address + "</a>");
	}