// JScript source code

// Global Variables
var isIE = false;
var isMoz = false;
var isSaf = false;

// Browser Detection


if ((navigator.appName.toUpperCase().match(/MICROSOFT INTERNET EXPLORER/) != null || navigator.appName.toUpperCase().match(/MSIE/) != null) )
  isIE = true;

if(!isIE && (navigator.appVersion.toUpperCase().match(/SAFARI/) != null) || (navigator.userAgent.toUpperCase().match(/SAFARI/) != null))
  isSaf = true;

/* Condition previously used to determine Mozilla browsers
	&& ((navigator.appName.toUpperCase().match(/NETSCAPE/) != null) ||(navigator.appName.toUpperCase().match(/FIREFOX/) != null)))*/
if (!isSaf && !isIE) isMoz = true; 
  
  
  
// Setting HTML element attributes depending on browser type
function jsBrwSetAttrib( p_objTarget, p_strAttribName, p_strAttribValue )
{
	if( isMoz || isSaf)
	{
		p_objTarget.setAttribute( p_strAttribName, p_strAttribValue );
		if( p_strAttribName == "onclick" ) jsBrwSetAttrib( p_objTarget, "href", "#" );
	}
	else
	{
		switch( p_strAttribName )
		{
			case "class":
			{
				p_strAttribName = "className";
				break;
			}
			case "onclick":
			{			    
				p_strAttribName = "href";
				p_strAttribValue = "javascript:" + p_strAttribValue;
				break;
			}				
		}
		
		var l_strCDATA = 'p_objTarget.' + p_strAttribName + '="' + p_strAttribValue + '";';
		eval( l_strCDATA );
	}
}
