var imageid = "none";
var getnamer = "got it";
var wt = 0;

var delayInterval;

//arrays

var rnavArr = new Array();
rnavArr[0] = "women,5";
rnavArr[1] = "stress,2";
rnavArr[2] = "0,0";
rnavArr[3] = "0,0";
rnavArr[4] = "fitness,3";
rnavArr[5] = "0,0";
rnavArr[6] = "0,0";

function mOver(id,spec)
{
	//alert("images/nav" + spec + "_" + id + "_01.gif");
	document.images[id].src = "images/nav" + spec + "_" + id + "_01.gif";
}

function mOut(id,spec)
{
	//alert("images/nav" + spec + "_" + id + "_00.gif");
	document.images[id].src = "images/nav" + spec + "_" + id + "_00.gif";
}

function playContent(cid,cname,ctitle,sterm,cflash)
{
	sendctitle = ctitle.replace("\'","\\'");
	sendsterm = sterm.replace("\'","\\'");
	playerWin = window.open("content_player.aspx?cid=" + cid + "&cname=" + cname + "&ctitle=" + sendctitle + "&sterm=" + sendsterm + "&cflash=" + cflash,"player","width=350,height=190,resizable=yes,menubar=no,scrollbars=no,toolbars=no");
	//stopIntro("window");
}

function stopIntro(target)
{
	if(target == "opener")
	{
		opener.window.document.myFlash.SetVariable("streamBreak", "1");
	}
	else if(target == "player")
	{
		playerWin.document.myFlash.SetVariable("streamBreak", "1");
	}
	else
	{
		window.document.myFlash.SetVariable("streamBreak", "1");
	}
}

function closePlayer()
{
	playerWin.close();
}

function openReader(cid,sterm)
{
	if(cid != "0")
	{
		//alert("open " + cid + " " + sterm);
		opener.location = "read_content.aspx?cid=" + cid + "&sterm=" + sterm;
	}
}

function setName(id)
{
	imageid = id;
}

function getName()
{
	//alert(imageid);
	getnamer = "some";
}

function stopInter()
{
	clearInterval(delayInterval);
}

function showSubNav(id)
{
	clearInterval(delayInterval);
	delayInterval = setInterval("dispSubNav(" + id + ")",1700);
}

function dispSubNav(id)
{
	clearInterval(delayInterval);
	groupname = rnavArr[id].split(",");
	hideSubNav();
	for(i=0;i<groupname[1];i++)
	{
		document.getElementById('sub_' + groupname[0] + i).style.visibility = 'visible';
		document.getElementById('sub_' + groupname[0] + i).style.position = 'relative';
	}
}

function hideSubNav()
{
	for(i=0;i<rnavArr.length;i++)
	{
		id = rnavArr[i].split(",");
		for(ii=0;ii<id[1];ii++)
		{
			
			document.getElementById('sub_' + id[0] + ii).style.visibility = 'hidden';
			document.getElementById('sub_' + id[0] + ii).style.position = 'absolute';
		}
	}
}



