
/*** Temporary text filler function. Remove when deploying template. ***/
/*
var gibberish=["This is just some filler text", "Welcome to Dynamic Drive CSS Library", "Demo content nothing to read here"]
function filltext(words){
for (var i=0; i<words; i++)
document.write(gibberish[Math.floor(Math.random()*3)]+" ")
}
*/

function OpenClose(menuelements)
{
	var code;
	var ElementList = menuelements.split(",");
	for(x = 0; ; x++)
		{
		if(ElementList[x] == null)
			break;
		code = "if(document.getElementById('";
		code += ElementList[x];
		code += "').style.display == '') document.getElementById('";
		code += ElementList[x];
		code += "').style.display = 'block'; else document.getElementById('";
		code += ElementList[x];
		code += "').style.display = '';";
		eval(code);
		}
	// List of all submenu items
	ItemList = "Forum1,Forum2,Rules,";
	ItemList = ItemList + "Tutorial,Tutorial8051,Math16,LCD1,Iset,";
	ItemList = ItemList + "SBC,Video,TCPIP,CDROM,Disassembler,";
	ItemList = ItemList + "Contact,AboutUs,Legal,Privacy,Advertising";


	menuelements = "," + menuelements + ",";
	var HideList = ItemList.split(",");
	for(x = 0; ; x++)
		{
		if(HideList[x] == null)
			break;
		hold = "," + HideList[x] + ",";
		if(menuelements.indexOf(hold) == -1)
			{
			code = "if(document.getElementById('";
			code += HideList[x];
			code += "').style.display != '') ";
			code += "document.getElementById('";
			code += HideList[x];
			code += "').style.display = '';";
			// alert (code);

			eval(code);

			}
		}


	return(false);
}

function showPop(id)
{
	document.getElementById(id).style.visibility = "visible";
}
function hidePop(id)
{
	document.getElementById(id).style.visibility = "hidden";
	return false;
}

function ShowUserProfile(userID)
	{
	var HTMLPage = "/profile.php?USERID="+userID;
	var WindowName = "profile";
	var WindowOptions = "width=450,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
	profileWindow = window.open(HTMLPage, WindowName, WindowOptions);
	profileWindow.focus();
	return false;
	}

function ExecuteLinkInParent(link)
{
	opener.location.href = link;
	self.close();
}






