//***	This function will be called in every page to set the title atttibute for images
function setTitleForImages()
{		
	var strUserAgent = navigator.userAgent.toUpperCase();		
	if((strUserAgent.indexOf("NETSCAPE")>=0) || (strUserAgent.indexOf("OPERA")>=0) || (strUserAgent.indexOf("MAC") >= 0) || (strUserAgent.indexOf("GECKO") >= 0))
	{
		for(var intImageIndex=0;intImageIndex<document.images.length;intImageIndex++)
		{		
			document.images[intImageIndex].title = document.images[intImageIndex].alt;
		}
	}
}


//*** This function will be called in footer.asp page,customstatement.asp,shipcalculator.asp for mac sumbit key compatability.
function setHrefForLinks()
{
	for(var intLinkIndex=0;intLinkIndex<document.links.length;intLinkIndex++)
	{		
		if(document.links[intLinkIndex].onclick != null)
		{						
			var strTemp = document.links[intLinkIndex].onclick + "";	
			strTemp = strTemp.replace("function onclick()","");
			strTemp = strTemp.replace("{","");	
			var pos = strTemp.lastIndexOf("}");
			strTemp = strTemp.substring(0,pos);			
			strTemp = strTemp.replace("return false;","");
			strTemp = strTemp.replace("return false","");								
			if(strTemp.toUpperCase().indexOf("JAVASCRIPT:")==-1) strTemp = "JavaScript:"+strTemp;
			document.links[intLinkIndex].href = strTemp;					
		}			
	}
}
