function initPage( page ){
	if( page == 'indexLTS' ){
		getHiddenTopic();
	}
	storedTempId = "";
	storedSelectedId = "";
	checkTimeout();
}
function getHiddenTopic(){
	defaultTopic = 'userguide';
	if( getQueryVariable('showMe') != null ){
		defaultTopic = getQueryVariable('showMe');
	}
	storedTopicId = defaultTopic;
	if( document.getElementById( "curTopic" ) ){
		ht = document.getElementById( "curTopic" ).value;
		if( ht != null && ht != "" ){
			if( ht != -1 ){
				showMe( ht );
			}
		}
		else{
			showMe( defaultTopic );
		}
	}
	else{
		showMe( defaultTopic );
	}
}
function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  return null;
}

function showMe( id ){
	// define content and tab show/hide classes
	tabShow = "selected";
	tabHide = "";
	contentShow = "portfolioDiv portfolioDivActive";
	contentHide = "portfolioDiv";
	
	// hide active content and tab
	document.getElementById( "content_" + storedTopicId ).className = contentHide;
	document.getElementById( "tab_" + storedTopicId ).className = tabHide;
	
	// show active content and tab
	document.getElementById( "content_" + id ).className = contentShow;
	document.getElementById( "tab_" + id ).className = tabShow;
	
	// set variables for retrieval
	document.getElementById( "curTopic" ).value = id;
	storedTopicId = id;
}

