//Function used to show tool tip for Twitter and Sildeshare 
function showToolTip(e,tooltip)
{
    document.getElementById(tooltip).style.display = "block"; 
    document.getElementById(tooltip).style.top= (e.clientY+(document.documentElement.scrollTop ?
    document.documentElement.scrollTop :
    document.body.scrollTop)-38)+"px";
    document.getElementById(tooltip).style.left = (e.clientX+(document.documentElement.scrollLeft ?
    document.documentElement.scrollLeft :
    document.body.scrollLeft)+10)+"px";
 
}


//Function used to hide tool tip for Twitter and Sildeshare 
function hideToolTip(tooltip)
{
    document.getElementById(tooltip).style.display = "none";
}


function convertToLocalTimeZone(date_time)
{
    var date_atom_format, date_localTZ, date_time, pos, str, date_part, time_part, str, date_txt;
        
    date_time = date_time.replace("T"," ");
    pos = date_time.indexOf(".");
    date_time = date_time.substring(0,pos);
    
    str = date_time.split(" ");
    time_part = str[1];
    
    date_part = str[0];
    date_part = date_part.split("-");
    
    str = date_part[1].toString() + "/" + date_part[2].toString() + "/" + date_part[0].toString() + " " + time_part.toString();
       
    date_atom_format = new Date(str);
    
    date_localTZ = date_atom_format.toLocaleString();
    date_txt = date_localTZ.toString();
    index_pos = date_txt.search("GMT");
    if(index_pos != -1 ) 
    {
      date_txt = date_txt.substring(0,index_pos);
    }
    
    return(date_txt);
}

/* To mark perticular top menu */
function markMenu(divId)
{
	document.getElementById(divId).innerHTML = '<img src="../images/menu_indicator.gif" width="9" height="5" >';
}

/* To mark perticular left menu */
function leftMenuMark(divId)
{
	document.getElementById(divId).className = "left_menu2_selected content";
}

	menuTop=[0,14,14,14];
  
  function load()
    {
    	for(var i=1;i<4;i++)
	    {
	    	document.getElementById('menu'+i+'body').style.top = menuTop[i]+'px';	    	   	
		}
		
	}
		function unload(arrowID , rowID)
	{
			document.getElementById(arrowID).style.backgroundImage='url(../images/offerings/menu_selected.JPG)';
			document.getElementById(rowID).className = 'menu_items_selected';
	}
    
/**************************************** LEFT Menu Animation Code Start********************************************************/
    // Following mouse_over and mouse_out used for left menu to create mouse over effect
    // Create effect that the item is selected i.e. mouse is over the item
    function mouse_over(arrowID , rowID)
	{
		if(document.layers)	   //NN4+
	    {
    		document.layers[arrowID].style.backgroundImage='url(../images/offerings/menu_selected.JPG)';
			document.layers[rowID].className = 'menu_items_selected'; 
	    }
		else if(document.getElementById)	  //gecko(NN6) + IE 5+
    	{
			
			document.getElementById(arrowID).style.backgroundImage='url(../images/offerings/menu_selected.JPG)';
			document.getElementById(rowID).className = 'menu_items_selected';
	     }
	    else if(document.all)	// IE 4
    	{
        	document.all[arrowID].style.backgroundImage='url(../images/offerings/menu_selected.JPG)';
			document.all[rowID].className = 'menu_items_selected';
	    }
	}
	
	// Create effect that the item is unselected i.e. mouse is out 
	function mouse_out(arrowID , rowID)
	{
		if(document.layers)	   //NN4+
	    {
    		document.layers[arrowID].style.backgroundImage='url(../images/offerings/menu_arrow.jpeg)';
			document.layers[rowID].className = 'menu_items_unselected'; 
	    }
		else if(document.getElementById)	  //gecko(NN6) + IE 5+
    	{
			document.getElementById(arrowID).style.backgroundImage='url(../images/offerings/menu_arrow.jpeg)';
			document.getElementById(rowID).className = 'menu_items_unselected';
	     }
	    else if(document.all)	// IE 4
    	{
        	document.all[arrowID].style.backgroundImage='url(../images/offerings/menu_arrow.jpeg)';
			document.all[rowID].className = 'menu_items_unselected';
	    }
	
	}
    
    
    function MouseOut(num)
    {
    	document.getElementById('menu'+num+'body').style.visibility = 'hidden';
		menu[num-1] = false;
    }
/**************************************** LEFT Menu Animation Code End********************************************************/



/**************************************** get Browser and it's version and change CSS Class *********************************/

function getBrowser(noOfMenu)
{
	var brow_UA = navigator.userAgent;
	var brow_type;

    if(  (brow_UA.indexOf("MSIE 7.0") != -1)||(brow_UA.indexOf("MSIE 6.0") != -1))
    {
		brow_type ="IE7";
		changeClass(noOfMenu);
        
    }
    else if( brow_UA.indexOf("MSIE 8.0") != -1)
    {
		brow_type ="IE8";
    }
    else if( brow_UA.indexOf("Firefox") != -1)
    {
		brow_type ="firefox";
    }
    else if( brow_UA.indexOf("Chrome") != -1)
    {
		brow_type ="Chrome";
    }
	
}

function changeClass(noOfMenu)
{
	
	inoOfMenu= parseInt(""+noOfMenu+"");
	
	for( i=1; i<=inoOfMenu; i++)
	{
		document.getElementById('content_sep'+i+'').className = 'content_seprator_IE7_IE6';
	}
	
	
	
}
