// JavaScript Document

var currentTech = 1;
var currentSection = 1;

function startupTech() {	

	if (pararr["tech"]) {
		var parnum = pararr["tech"];		
		/*var el = ged("tech_" + parnum);
		if (el) {
			el.style.display = "";	
		}*/
		parnum = pararr["tech"];
		//tech_1_section_1_link		
		if (parnum > 0) {
			changeTechnicalSection(ged("tech_" + currentTech + "_section_" + parnum + "_link"));
		}
	}
}

/*
function changeTech(technum) { 
	
	var oldel = ged("tech_" + currentTech + "_section_" + currentSection + "_link")
	if (oldel) {
		oldel.className = "tech_nohref";
	}
	var sect = ged("tech_" + currentTech + "_section_" + currentSection);
	if (sect) {
		sect.style.display = "none";
	}
	
	var parnum = pararr["tech"];		
	var el = ged("tech_" + parnum);
	el.style.display = "none";	
	
	var el = ged("tech_" + technum);
	el.style.display = "";	
	currentTech = technum;
	pararr["tech"] = technum;
	
	currentSection = 1;	
}
*/

function showMainTechnical() {
	
	var oldel = ged("tech_" + currentTech + "_section_" + currentSection + "_link")
	if (oldel) {
		oldel.className = "subpage_menu_title";	
	}
	var sect = ged("tech_" + currentTech + "_section_" + currentSection);
	if (sect) {
		sect.style.display = "none";
	}
	
	if (ged("main_image_div_" + currentTech)) {
		//ged("subpage_text_" + currentTech).style.display = "";
		ged("main_image_div_" + currentTech).style.display = "";
	}	
}

function changeTechnicalSection(el) {
	//		  0   1     2   3  4
	//el has tech_1_section_1_link
	//find tech_1_section_1
	
	if (ged("main_image_div_" + currentTech)) {
		//ged("subpage_text_" + currentTech).style.display = "none";
		ged("main_image_div_" + currentTech).style.display = "none";		
	}
	
	//alert ("tech_" + currentTech + "_section_" + currentSection + "_link");
		
	var oldel = ged("tech_" + currentTech + "_section_" + currentSection + "_link")
	if (oldel) {
		oldel.className = "subpage_menu_title";
	}
	
	var sect = ged("tech_" + currentTech + "_section_" + currentSection);
	if (sect) {
		sect.style.display = "none";
	}
	
	/*ged("main_right_1").style.display = "";	
	ged("main_right_2").style.display = "";*/
	
	var id = el.id;
	var tmparr = id.split("_");
	currentSection = tmparr[3];	
	//alert (currentTech + " " + currentSection);
	
	var sect = ged("tech_" + currentTech + "_section_" + currentSection);	
	sect.style.display = "";
		
	el.className = "subpage_menu_title_sel";
}

function unselectTechnicalSection(el) {	
}


function unHighlightSection(el) {
	el.style.textDecoration = "";		
}

function highlightSection(el) {
	el.onmouseout = function(){unHighlightSection(el)};		
	el.style.textDecoration = "underline";	
}