/*
    FILE:          : Expand.js
    DESCRIPTION    : Defines  functions used for expanding
                     and collapsing of the Index section.
    DATE           : 27August 2008
    AUTHOR         : Preeti
    CHANGE CONTROL :
*/

function exp_coll(ind) {	

 s = document.getElementById("sp_" + ind);
 i = document.getElementById("im_" + ind);
 l = document.getElementById("li_" + ind);
 
	if (ind != "")
	{
		if(  (s.className == 'wbSide') && (s.style.display == 'none') ) {		
			  s.style.display = 'block';
			  getObject("li_"+ind).className="selected";
			  classString="selected";
		}else if( (s.className == 'wbSide') && (s.style.display == 'block')){
			 s.style.display = 'none';
			getObject("li_"+ind).className="link";
			 classString="link";			
		}
	}
		
}


function getObject(objectId) {
	if (document.all && !document.getElementById) {
		return document.all(objectId);
	} else {
		return document.getElementById(objectId);
	}
}

function showIndexOutline(section,indexUrl)
{

	location.href = indexUrl+"&sc="+section;	
	return false;
}


function expandindex(querystring) {	
	var sc= "";
	if (querystring.indexOf("&sc") != -1) {
		   sc = querystring.substring(querystring.indexOf("&sc")+ 4); 
	} 	
	exp_coll(sc);
}