﻿var curlinkid = null;
var hidelink = null;

function showOuterLink(id,type)
{
   if(type == 1)
   {
	   if(hidelink!=null)
	   {
	   		clearTimeout(hidelink);
			hidelink = null;
	   }
	   
	   if(document.getElementById("links" + id))
	   {
		    if(curlinkid != null)
			{
				document.getElementById("links" + curlinkid).style.display = "none";
			}
			
			curlinkid = id;
			
			document.getElementById("links" + curlinkid).style.display = "block";  	 
	   }
   }		  	
   else
   {
	   if(document.getElementById("links" + curlinkid))
	   {
			document.getElementById("links" + curlinkid).style.display = "none";  	 	   
	   }
   }
}		

function hideOuterLink()
{	
	hidelink = setTimeout(function(){
			if(curlinkid != null)
				document.getElementById("links" + curlinkid).style.display = "none";
		},1000);	
}
