currentTRS = 1;

function showTRS(num)
{
		
        document.getElementById('trs_numbers').style.background = "url(/images/numbers_" + num + ".gif) no-repeat";

	
	//alert() ;
	
	for(i=0 ; i< 500000 ; i++ ) 
	{
		//
	}
	
	
	
        id = "trs_" + num;
		var obj = document.getElementById(id);
		if(obj)
         	obj.style.visibility = "visible";


        for(i = 1; i <= 10; i++)
        {
                if(i != num)
                {
                        id = "trs_" + i;
						obj = document.getElementById(id);
						if(obj)
                        	document.getElementById(id).style.visibility = "hidden";
                }
        }

        currentTRS = num;
}

function showTRSPrev()
{
        if(currentTRS == 1)
        {
                num = 10;
        }
        else
        {
                num = currentTRS - 1;
        }
        showTRS(num);
}

function showTRSNext()
{
        if(currentTRS == 10)
        {
                num = 1;
        }
        else
        {
                num = currentTRS + 1;
        }
        showTRS(num);
}

startList = function()
{
        if (document.all && document.getElementById)
        {
                navRoot = document.getElementById("navUL");
                for (i=0; i<navRoot.childNodes.length; i++)
                {
                        node = navRoot.childNodes[i];
                        if (node.nodeName=="LI")
                        {
                                node.onmouseover=function()
                                {
                                        this.className += " over";
                                }
                                node.onmouseout=function()
                                {
                                        this.className = this.className.replace(" over", "");
                                }
                        }
                }
        }
}
window.onload=startList;



function viewcard(pid)
{
	window.location = "/celebs/starcard.php?celeb_id=" + pid; 
}

function viewcomments(pid)
{
	
	 url = "/starcenter/comments.php?celeb_id=" + pid  
	 var win=window.open(url,"_new","status=1,toolbar=1,location=1,menubar=1,directories=1,scrollbars=1");
}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

