	
function getElementsByClassName(node, classname)
	{
		var a = [];
		var re = new RegExp('\\b' + classname + '\\b');
		var els = node.getElementsByTagName("*");
		for(var i=0,j=els.length; i<j; i++)
			if(re.test(els[i].className))a.push(els[i]);
		return a;
	}


// Used for alternating/highlighting tables  
// when the page loads it sees how each table is tagged and then gives
// it the appropriate highlighting/alternating colors...
// for example: 
// 			table class='tableLines' id='tableShade' = alternating tr colors
//			table class='tableLines' id='tableHighlight' = mouseover highlighting of trs
//			table class='tableLines' id='' = no tr colors, no highlighting
//			table class='tableAllLines' id='tableShade' = alternating tr colors
//			table class='tableAllLines' id='tableHighlight' = mouseover highlighting of trs
function alternate()
{
		// ALL TABLES W/ CLASS tableLines ----------------------
		tables = getElementsByClassName(document, 'tableLines');
		for(i = 0; i<tables.length; i++)
		{
		// sets array of all trs within tables with className tableLines
		trs = tables[i].getElementsByTagName('tr');
			// CLASS = tableLines ---- ID = 'tableShade'
			if(tables[i].id == 'tableShade')
			{
				for(k = 0; k < trs.length; k++)
				{
					if(k != 0) {
						if((k%2) == 0)
						{
							trs[k].className = "even";
						} 
						else 
						{
							trs[k].className = "odd";
						}
					}
				}
			} 
			// CLASS = tableLines ---- ID = 'tableHighlight'
			else if(tables[i].id == 'tableHighlight')
			{
				for(k = 0; k < trs.length; k++)
				{
					if(k != 0) {
						trs[k].onmouseover = function()
						{
							this.className = "even";
						}
						trs[k].onmouseout = function()
						{
							this.className = "odd";
						}
					}
				}
			}
		}
		
		// ALL TABLES W/ CLASS tableAllLines ----------------------
		tableAlls = getElementsByClassName(document, 'tableAllLines');
		for(l = 0; l<tableAlls.length; l++)
		{
			// sets array of all trs within tables with className = 'tableAllLines'
			trsAll = tableAlls[l].getElementsByTagName('tr');
			// CLASS = tableAllLines ---- ID = 'tableShade'
			if(tableAlls[l].id == 'tableShade')
			{
				for(m = 0; m < trsAll.length; m++)
				{
					if(m != 0) {
						if((m%2) == 0)
						{
							trsAll[m].className = "even";
						} 
						else 
						{
							trsAll[m].className = "odd";
						}
					}
				}
			}
			// CLASS = tableAllLines ---- ID = 'tableHighlight'
			else if(tableAlls[l].id == 'tableHighlight')
			{
				for(m = 0; m < trsAll.length; m++)
				{
					if(m != 0) {
						trsAll[m].onmouseover = function()
						{
							this.className = "even";
						}
						trsAll[m].onmouseout = function()
						{
							this.className = "odd";
						}
					}
				}
			}
		}
}	

	
//<iframe style="visibility: hidden" height="1" width="1" src="[~~ESTUDIO_SERVICE~~]serviceName=search&contentID=0" application="yes"></iframe>	
	
	
	
<!--//--><![CDATA[//><!--
//if (window.attachEvent) window.attachEvent("onload", init);
window.onload = init;
window.onresize = resize;
//if (window.attachEvent) window.attachEvent("onresize", resize);

function resize() {
	changeHeight();
}

/*SIMILAR TO getElementById()*/
function getElementsByClassName(node, classname){
	var a = [];
	var re = new RegExp('\\b' + classname + '\\b');
	var els = node.getElementsByTagName("*");
	for(var i=0,j=els.length; i<j; i++)
		if(re.test(els[i].className))a.push(els[i]);
	return a;}
	
LINEHEIGHT = 25;
IFRAMEWIDTH = 168 + 'px';

LINEHEIGHT_C = 16;
IFRAMEWIDTH_C = 122 + 'px';

sfHover = function() {
	if (document.getElementById("nav") == undefined)
		return;
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			if(this.parentNode.id == 'nav') 
			{
				numLIs = this.getElementsByTagName('li').length;
				// LINEHEIGHT includes the border-bottom of each li
				// However, the last li does not have a border, we need to subtract 1
				// 
				// this.getElementsByTagName('iframe')[0].style.height = (LINEHEIGHT * numLIs - 1) + 'px';
				// this.getElementsByTagName('iframe')[0].style.width = IFRAMEWIDTH;
				// this.getElementsByTagName('iframe')[0].style.display = 'block';
			}
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			
			if(this.parentNode.id == 'nav') {
				// this.getElementsByTagName('iframe')[0].style.display = 'none';
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", ieInit);

	sfHover2 = function(test) {
		var sfEls = test.getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
				if(this.parentNode.className == 'nav') 
				{
					numLIs = this.getElementsByTagName('li').length;
					this.getElementsByTagName('iframe')[0].style.height = (LINEHEIGHT_C * numLIs) + 'px';
					this.getElementsByTagName('iframe')[0].style.width = IFRAMEWIDTH_C;
					this.getElementsByTagName('iframe')[0].style.display = 'block';
				}
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				
				if(this.parentNode.className == 'nav') {
					this.getElementsByTagName('iframe')[0].style.display = 'none';
				}
			}
		}
	}
	
	// IE spefic onload functions
	function ieInit() {
		sfHover();
		temp = getElementsByClassName(document, 'nav');
			for(var i=0; i<temp.length; i++){
				sfHover2(temp[i]);
			}
	}
	
	function init() {
		try { checkHeight(); }		catch(e) { }
		try { alternate();    }     catch(e) { }
		try { userTextSize(); }     catch(e) { }
		/* Tab initialization */
			allTabs = getElementsByClassName(document, 'anchors');
			for(k=0; k < allTabs.length; k++) {
				if(allTabs[k].id) {
					$.tabs(allTabs[k].parentNode.id, parseInt(allTabs[k].id));
				} else {
					$.tabs(allTabs[k].parentNode.id);
				}
			}

	}
	
	// Toggles Font-Size and Line-Height on content pages.
	function changeLabel(toggle){
		if(document.getElementById("puText")){
			// Number of <li> tags in the document, as well as an array containing references
			var LI_length = document.getElementById("columnWide").getElementsByTagName("li").length;
			var LI_arr = document.getElementById("columnWide").getElementsByTagName("li");
			
			// Number of <p> tags in the document, with an array of references
			var P_length = document.getElementById("columnWide").getElementsByTagName("p").length;
			var P_arr = document.getElementById("columnWide").getElementsByTagName("p");
			
			// Toggles the Text Size Icon and resizes text
			if(toggle == 'large'){
				document.getElementById("puText").className = "iconTextEnlarge";
				document.getElementById("puText").innerHTML = "smaller type";
				document.getElementById("puText").href = "javascript:changeLabel('small');";
				document.getElementById("columnWide").style.fontSize = "120%"; // "110%" MODIFIED
				// Change all <li>s lineHeight to greater percentage
					for(k = 0; k < LI_length; k++){ 
						LI_arr[k].style.lineHeight = "150%" 
					}
				// Change all <p>s lineHeight to greater percentage
					for(j = 0; j < P_length; j++){ 
						P_arr[j].style.lineHeight = "150%" 
					}
				createCookie('textSize', 'large');
				} 
			else {
				document.getElementById("puText").className = "iconTextEnlarge";
				document.getElementById("puText").innerHTML = "larger type";
				document.getElementById("puText").href = "javascript:changeLabel('large');";
				document.getElementById("columnWide").style.fontSize = "";
				// Change all <li>s back to default lineHeight
					for(k = 0; k < LI_length; k++){ 
						LI_arr[k].style.lineHeight = ""; 
					}
				// Change all <p>s back to default lineHeight
					for(j = 0; j < P_length; j++){ 
						P_arr[j].style.lineHeight = ""; 
					}
					createCookie('textSize', 'small');
				}
		}
	}
	
	// Toggles Font-Size and Line-Height on content pages for CHINESE.
	function changeLabelCH(toggle, baseurl){
		if(document.getElementById("puText")){
			// Number of <li> tags in the document, as well as an array containing references
			var LI_length = document.getElementById("columnWide").getElementsByTagName("li").length;
			var LI_arr = document.getElementById("columnWide").getElementsByTagName("li");
			
			// Number of <p> tags in the document, with an array of references
			var P_length = document.getElementById("columnWide").getElementsByTagName("p").length;
			var P_arr = document.getElementById("columnWide").getElementsByTagName("p");
			
			// Toggles the Text Size Icon and resizes text
			if(toggle == 'large'){
				document.getElementById("puText").className = "iconTextEnlarge";
				document.getElementById("puText").innerHTML = "<img src='" + baseurl + "images/toggle_smaller.gif' width='49' height='16' border='0' align='absmiddle' />";
				document.getElementById("puText").href = "javascript:changeLabelCH('small', '" + baseurl + "');";
				document.getElementById("columnWide").style.fontSize = "120%"; // "110%" MODIFIED
				// Change all <li>s lineHeight to greater percentage
					for(k = 0; k < LI_length; k++){ 
						LI_arr[k].style.lineHeight = "150%" 
					}
				// Change all <p>s lineHeight to greater percentage
					for(j = 0; j < P_length; j++){ 
						P_arr[j].style.lineHeight = "150%" 
					}
				createCookie('textSize', 'large');
				} 
			else {
				document.getElementById("puText").className = "iconTextEnlarge";
				document.getElementById("puText").innerHTML = " <img src='" + baseurl + "images/toggle_larger.gif' width='49' height='16' border='0' align='absmiddle' />";
				document.getElementById("puText").href = "javascript:changeLabelCH('large', '" + baseurl + "');";
				document.getElementById("columnWide").style.fontSize = "";
				// Change all <li>s back to default lineHeight
					for(k = 0; k < LI_length; k++){ 
						LI_arr[k].style.lineHeight = ""; 
					}
				// Change all <p>s back to default lineHeight
					for(j = 0; j < P_length; j++){ 
						P_arr[j].style.lineHeight = ""; 
					}
					createCookie('textSize', 'small');
				}
		}
	}
	
	
// Used to set a cookie with the user's font-size preference
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	//alert('Cookie\n' + name + '\ncreated with a value ' + value);
}

// Returns the cookie value
function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

// Used onLoad to set document text size
function userTextSize(){
	size = readCookie('textSize'); 
	changeLabel(size);
}




/* resize margin-bottom for main */

var orig_margin = 10;
var body_height;
function checkHeight(layout)
{
	body_height = document.body.clientHeight;
	changeHeight(layout);
}

function changeHeight(layout)
{
	browser_height = document.documentElement.clientHeight;
	diff = browser_height - body_height;
	
	el = document.getElementById("right");
	

	switch (layout) {
		case 1:
			if (diff > 0) {
				new_margin = orig_margin + diff;
			}
			else {
				new_margin = 10;
			}
			el.style.margin = "0  auto " + new_margin + "px auto";
			break;
		case 2:
			if (diff > 0) {
				new_margin = 10 + diff;
				el.style.padding = "0  0 " + new_margin + "px 0";
			}
			else {
				el.style.padding = "0 0 10px 0";
			}
			break
			
		case 3:
			if (diff > 0) {
				el.style.padding = "0  0 " + diff + "px 0";
			}
			else {
				el.style.padding = "0 0 0 0";
			}
	}
	
} 

	function getElementsByClassName(node, classname)
	{
		var a = [];
		var re = new RegExp('\\b' + classname + '\\b');
		var els = node.getElementsByTagName("*");
		for(var i=0,j=els.length; i<j; i++)
			if(re.test(els[i].className))a.push(els[i]);
		return a;
	}


/* resize margin-bottom for disclaimer */

var orig_margin = 10;
var body_height;
function checkHeight(disclaimer)
{
	body_height = document.body.clientHeight;
	changeHeight(disclaimer);
}

function changeHeight(disclaimer)
{
	browser_height = document.documentElement.clientHeight;
	diff = browser_height - body_height;
	
	el = document.getElementById("disclaimerHeight");
	

	switch (disclaimer) {
		case 1:
			if (diff > 0) {
				new_margin = orig_margin + diff;
			}
			else {
				new_margin = 10;
			}
			el.style.margin = "0  auto " + new_margin + "px auto";
			break;
		case 2:
			if (diff > 0) {
				new_margin = 10 + diff;
				el.style.padding = "0  0 " + new_margin + "px 0";
			}
			else {
				el.style.padding = "0 0 10px 0";
			}
			break
			
		case 3:
			if (diff > 0) {
				el.style.padding = "0  0 " + diff + "px 0";
			}
			else {
				el.style.padding = "0 0 0 0";
			}
	}
	window.onresize = function (evt) {
	changeHeight(3);
	};
	
} 

	function getElementsByClassName(node, classname)
	{
		var a = [];
		var re = new RegExp('\\b' + classname + '\\b');
		var els = node.getElementsByTagName("*");
		for(var i=0,j=els.length; i<j; i++)
			if(re.test(els[i].className))a.push(els[i]);
		return a;
	}



/* popup */

function openPop (page) 
{
	var winW = 350;
	var winH = 350;
	var winX = (parseInt(screen.availWidth - winW) / 2);
	var winY = (parseInt(screen.availHeight - winH) / 2);
	window.open(page, 'disclaimerWin', 'width=' + winW + ',height=' + winH + ',toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,top=' + winY + ',left=' + winX);
}


function openWin(strServer) 
{ 
	
	
	var strReturn ; 
	var strUrl = strServer + "printpreview.aspx?url=" + location.href;
	var prtContent = document.getElementById("pageLayout"); 

	var html = prtContent.innerHTML;
	html =html.substring(html.indexOf("<!--mainContent STARTS-->"),html.indexOf("<!--mainContent ENDS-->"))
	
	html = html.replace("href=\"mailto:","HMAILTO"); 	
	html = html.replace("href=\"Javascript:","HJS");
	
	html = html.replace("href=\"","href = '#' target= '_self'" );
	
	html = html.replace("HMAILTO","href=\"mailto:"); 	
	
	html = html.replace("HJS","href=\"Javascript:");
	html = html.replace("href=\"Javascript:formsubmit()","href = '#' target= '_self'");
	
	var footer = "<div id='footerWrapper'><div id='footer'></div></div>";
	
	var WinPrint = window.open('',null,'left=80, top=80, height=500, width= 780, status=yes, resizable= yes, scrollbars= yes, toolbar= yes,location= no, menubar= yes');
	WinPrint.document.write('<html><head><link href="'+ strServer +'common/BLKinternetStyles.css" rel="stylesheet" type="text/css" /></head><body onload="checkHeight(3)" onresize="changeHeight(3)"><div id="printPreview"><img src="'+ strServer +'images/blk_logo_print.gif" width="270" height="36" alt="" /></div>' + html + footer +"</body></html>");
	
	return; 
	
}

// Photo Gallery
<!--
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
 
 // Remove comment to show Description on the Page
 
 //if (whichpic.title) {
 //  document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
 // } else {
 //  document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
 // }
 return false;
 } else {
  return false;
 }
}
//-->

