// JavaScript Document

function slideshow(hidediv,showdiv)
{
	change(hidediv,showdiv);
	nextdiv = getnextdiv(showdiv);
	setTimeout("slideshow('"+showdiv+"','"+nextdiv+"')",5000);
}
function change(hidediv,showdiv)
{
	var hdv = document.getElementById(hidediv);
	var sdv = document.getElementById(showdiv);
	hdv.style.display = "none";
	sdv.style.display = "block";
}

function getnextdiv(currentdiv)
{
	var i=currentdiv.substring(2);
	i = parseInt(i);
	if(i != 10)
	{
		i = i+1;
	}
	else
	{
		i = 1;
	}
	var divid = "dv"+i;
	return divid;
}

function display()
{
	if (seconds>=60)
	{
		seconds=0;
		minutes+=1;
	}
	else
	{
		seconds+=1;
	}
	document.d.d2.value=minutes+"."+seconds;
	setTimeout("display()",1000);
}

function initMarquee(marId){
	if(document.getElementById(marId)){
		if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 3)){		
		   document.getElementById(marId).scrollAmount=document.getElementById(marId).clientWidth;
		 }
		 else{
		   document.getElementById(marId).scrollAmount=amount;
		 }		 
	}
}
 function startMarquee(marId){
    var marObj = document.getElementById(marId);
    marObj.scrollA
    marObj.start(); mount = amount;
    clearTimeout(timer);  
    stoped = true;
    marObj.onscroll=function(){scrolling(this);};
}
 function scrollMarquee(marObj, waitTime){	
	if(!stoped && marObj.scrollLeft <= marObj.clientWidth){
	   marObj.stop();	     
	   timer = setTimeout("startMarquee('"+marObj.id+"')", waitTime);
	}
}
function scrolling(marObj){	 
	marObj.stop();
	marObj.scrollAmount = amount;
	marObj.start();
}

function showmostread()
{
    
   document.getElementById('no_of_views').style.display='';
   document.getElementById('posted_on').style.display='none';
   document.getElementById('mostread_title_row').style.display='';
   document.getElementById('latest_title_row').style.display='none';
}
function showlatest()
{
   document.getElementById('no_of_views').style.display='none';
   document.getElementById('posted_on').style.display='';
   document.getElementById('mostread_title_row').style.display='none';
   document.getElementById('latest_title_row').style.display='';
}

function showmenu()
{
	if(document.getElementById('Layer3').style.display=='none')
	{
		document.getElementById('Layer3').style.display=''; 
	}
	else
	{
		document.getElementById('Layer3').style.display='none'; 
	}
}
function hidemenu()
{
	document.getElementById('Layer3').style.display='none';
}