/*
     Javascripting by Piero Ciarfaglia [ ZeNOID ] (2004)
*/ 

// action for the search button
function searchsubmit() {
	document.forms['searchform'].submit();
}

// looks for the download cookie
function download(doc) {
	this.location.href = (document.cookie == "")? "documentation_form.htm" : "pdf/"+doc;
}

function demotour(tour) {
	this.location.href = "producttour_form.htm";
}

// shows and hides submenus
function showhide(id) {
	if (document.getElementById) {	
		current = (document.getElementById(id).style.display == 'inline') ? 'none' : 'inline';
		document.getElementById(id).style.display = current;
	}
	else if (document.all) {
		current = (document.all[id].style.display == 'inline') ? 'none' : 'inline'
		document.all[id].style.display = current;
	}
}

// switches layers with info details
function showinfo(which, total) {
	if (document.getElementById) {
		for (x = 0; x<=total; x++) {
			document.getElementById('info'+x).style.display = 'none';
		}
		document.getElementById('info'+which).style.display = 'block';
	}
	else if (document.all) {
		for (x = 0; x<=total; x++) {
			document.all['info'+x].style.display = 'none';
		}
		document.all['info'+which].style.display = 'block';
	}
}


//language selection
function jumpMenu(targ,selObj,restore){ //v3.0
var fullPath=targ;
var lead_slashes = fullPath.indexOf('//');
var domain_start = lead_slashes + 2;
var without_resource = fullPath.substring(domain_start, fullPath.length);
var fullPath_array=without_resource.split('/');
var newPath;
directory=selObj.options[selObj.selectedIndex].value;
newPath = 'http://' + fullPath_array[0] + '/' + directory;
for (i = 2; i < fullPath_array.length; i++) {
	newPath = newPath + '/' + fullPath_array[i];
}

eval("parent.location='"+newPath+"'");
if (restore) selObj.selectedIndex=0;
}