// JavaScript Document

function activeTab (tabId) {
	// inactivate all tabs
	document.getElementById('tab1').className = 'tabInactive';
	document.getElementById('tab2').className = 'tabInactive';
	document.getElementById('tab3').className = 'tabInactive';
	document.getElementById('tab4').className = 'tabInactive';
	document.getElementById('tab5').className = 'tabInactive';
	
	//set active tab
	document.getElementById(tabId).className = 'tabActive';
}

function showBox (id) {
	// hide all boxes
	document.getElementById('box1').className = 'boxHide';
	document.getElementById('box2').className = 'boxHide';
	document.getElementById('box3').className = 'boxHide';
	document.getElementById('box4').className = 'boxHide';
	
	//show selected box
	document.getElementById(id).className = 'boxShow';
	//document.getElementById(id2).style.backgroundColor = '#336633';
}

function boxOver (headerId, boxId) {
	if (document.getElementById(boxId).className != 'boxShow') {
		document.getElementById(headerId).style.backgroundColor = '#72b872';
	} // end if
} // end function boxOver

function writeswf(theswf){
document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="528" height="396">');
document.write ('<param name=movie value='+theswf+'>');
document.write ('<param name=quality value=high>');
document.write ('<param name=bgcolor value=#336633>');
document.write ('<embed src='+theswf+' quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="528" height="396">'); 
document.write ('</embed> </object>');
}

function getItem(id)
{
var itm = false;
if(document.getElementById)
itm = document.getElementById(id);
else if(document.all)
itm = document.all[id];
else if(document.layers)
itm = document.layers[id];

return itm;
}

function toggleAll(dowhat)
{
var tags = document.getElementsByTagName('tbody');
if(!tags)
return false;

for(var i = 0; i < tags.length; i++)
{
if(tags[i].className == 'collapse_obj')
{
if(dowhat == 'collapse')
tags[i].style.display = 'none';
else
tags[i].style.display = '';
}
}

var labels = document.getElementsByTagName('span');
if(!labels)
return false;

for(var i = 0; i < labels.length; i++)
{
if(labels[i].id=='title')
swapArrow(labels[i])
}
return false;
}

function toggleItem(id, tableName)
{
swapArrow(tableName);

itm = getItem(id);

if(!itm)
return false;

if(itm.style.display == 'none')
itm.style.display = '';
else
itm.style.display = 'none';

return false;
}

function swapArrow(tableName){

if (tableName.innerHTML.substring(0,1) == '-')
		tableName.innerHTML = '+'+tableName.innerHTML.substring(1)
	else
		tableName.innerHTML = '-'+tableName.innerHTML.substring(1)
}

function popUp(URL) {
	window.open(URL, 'namehere', 'scrollbars=no,status=no,width=550,height=523,top=100,left=100');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0 
   window.open(theURL,winName,features);
}
