// JavaScript Document
/*+ Function to handle roll over tabs +*/

var curSelected = "firstTabBg";

function rollOver(ths)
{  
     // change curson
	document.getElementById(ths).style.cursor="pointer";
	
	if(curSelected != ths)
	{
     // highlight (change Bg) 
	  document.getElementById(ths).className = 'selectedTabBg';
      document.getElementById(curSelected).className = 'normalHoverTabBg';	  
	 
	 // chnage the top arrow 
	 document.getElementById(curSelected+"Arw").className="topAlignImg hideElement";
	 document.getElementById(ths+"Arw").className="topAlignImg showElement";
	 
	 //update the top content
	 document.getElementById(ths+"Box").style.display="inline";
	 document.getElementById(curSelected+"Box").style.display="none";	 
	  	  	  
	  curSelected = ths;	  
	}
}// rollOver function ends 

/*+ Ticker +*/
var ideaTickerValues = new Array();
ideaTickerValues[0]="Gross Merchandise Volume (GMV): $7.2 million! Global Registered Users: 41,000 ";
ideaTickerValues[1]="The very first item sold on eBay was a broken laser pointer for $14.95 in 1995";
ideaTickerValues[2]="eBay expands internationally with sites in the United Kingdom, Germany and Australia.";
var count = 1;

/*+ Function to change the ideas in ticker +*/
function ideaTicker(val)
{
	var ideaTicker = document.getElementById("ideaPostContent");	

	if(val=="next" && count<2)
	 {	
		    count++;	
	  		ideaTicker.innerHTML = ideaTickerValues[count];
	 }
	 else if(val=="prev" && count>0)
	 {
			count--;
	  		ideaTicker.innerHTML = ideaTickerValues[count];
	 }	
}// ideaTicker() ends



/*+ Tabs handling +*/
var curSelTab = "tab2Div";
function openTab(para)
{	
   var curTabText = document.getElementById(para+"Text");
   var curObj  = document.getElementById(para);
   var curObjBg  = document.getElementById(para+"Bg");
   var curObjText = curObjBg.childNodes[0];
   var curSelTabText = document.getElementById(curSelTab+"Bg").childNodes[0];
	
	
   if(curTabText.className!="activeTabFont")	
   {	   
		// change the font color of selected Tab
		curTabText.className="activeTabFont";
		//change prev. selected tab to normal font 
		document.getElementById(curSelTab+"Text").className="normalTabFont";		
	 
	    // shift Tab text down 
		curObjText.className="activeTabText";
		curSelTabText.className="normalTabText";		
		
		// increase height		
		curObj.className="activeTab";
		document.getElementById(curSelTab).className="normalTab";
						
		// change the Bg image of the tabs
		curObjBg.className="activeTabBg";
		document.getElementById(curSelTab+"Bg").className="normalTabBg";
				
		//show-hide the tab opener
		document.getElementById(para+"Bottom").className="activeTabBottom";
		document.getElementById(curSelTab+"Bottom").className="normalTabBottom";
		
		//show the content area 
		document.getElementById(para+"Content").style.display="inline";
		document.getElementById(curSelTab+"Content").style.display="none";
		
	   // set the current tab
	    curSelTab = para;		
   }
}// openTab() ends

/* right navigation expan collaps */
function showHide(thisID){
	alert (thisID)
	if (document.getElementById(thisID).style.display == 'none')
	{
		alert (thisID+ '1')
	document.getElementById(thisID).style.display = ''
	}
	else if (document.getElementById(thisID).style.display == 'block')
	{
	document.getElementById(thisID).style.display = none
	}
}
