var isIE = false;
if(navigator.appName.indexOf('Microsoft') !=-1 ) {
	isIE = true;
}

function getdom(objid) {
	return (document.getElementById(objid));
}

function expandbox (elemid) {
	 getdom(elemid).style.display = (getdom(elemid).style.display=='none') ? 'block': 'none';
}

function showtab(tval) {
	
	for(x=1; x<4; x++ ) {
		getdom('tabbtn'+x).className = 'tab toff';
		getdom('tabcontent'+x).style.display = 'none';
	}
	getdom('tabbtn'+tval).className = 'tab ton';
	getdom('tabcontent'+tval).style.display = 'block';
}

function changeCat(tval) {
	var k = getdom('sfiles');
	removeAllOptions(k);
	if (!support_subcats[tval]) {
		return;
	}
	if (tval == 0) {
		inode = document.createElement('option');
		k.appendChild(inode);
		inode.value=0;
		inode.text = 'Select a download';
	} else {
		for(var i = 0; i< support_subcats[tval].length; ++i) {
			inode = document.createElement('option');
			k.appendChild(inode);
			inode.value = support_subcats[tval][i][0];
			inode.text = support_subcats[tval][i][1];
		}
	}
}

function removeAllOptions(tobj) {
	if(tobj.childNodes.length ) {
		while(tobj.childNodes.length) {
			tobj.removeChild(tobj.firstChild);
		}
	}
}
