if (navigator.platform.indexOf('Mac') != -1) {
		document.write('<link rel="stylesheet" href="/inc/css/articles_mac.css">');
}	

function parse_links () {
	// ---	cycle all document links
	for ( i = 0;  i < document.links.length;  i++ ) {
		currHref 	= document.links[ i ].href;
		currText 	= document.links[ i ].innerHTML;
		if ( currHref && currHref.indexOf ( "[[" ) != -1 ) 	document.links[ i ].href 		= parse_eml ( currHref );
		if ( currText && currText.indexOf ( "[[" ) != -1 ) 	document.links[ i ].innerHTML 	= parse_eml ( currText );
	}
}
function parse_eml ( str ) {
	posBegin 	= str.indexOf ( "[[" );
	posEnd 		= str.indexOf ( "]]" );
	strBegin 	= str.substr ( 0, posBegin );
	strEnd 		= str.substr ( posEnd +2 );
	strParse 	= str.substr ( ( posBegin +2 ), ( posEnd - ( posBegin +2 ) ) );
	arrParse 	= strParse.split ( "," );
	strEml 		= strBegin + arrParse[ 2 ] + "@" + arrParse[ 1 ] + "." + arrParse[ 0 ] + strEnd;
	return strEml;
}

function show_flyout ( id ) {
	hide_all_flyouts ();
	document.getElementById ( id ).style.display 	= 'block';
}
function hide_flyout ( id ) {
	document.getElementById ( id ).style.display 	= 'none';
}
function hide_all_flyouts () {
	// ---	cycle all <div>
	var collDiv 	= document.getElementsByTagName ( "div" );
	//for ( d in collDiv ) {
	for ( d = 0;  d < collDiv.length;  d++ ) {
		if ( collDiv[ d ].className == "flyout" ) {
			collDiv[ d ].style.display 	= "none";
		}
	}
}

function load_flash_header () {
	// ---	extract contents of the title to send to flash
	var display 	= document.getElementById ( "flash_header" ).innerHTML;
	display 		= display.replace ( "&", "%26" );
	//swfobject.embedSWF ( swfUrl, id, width, height, version, expressInstallSwfurl, flashvars, params, attributes )
	var vars 	= { txt: display };
	var params 	= { 
					menu: 	"false",
					wmode: "opaque"
				};
	var attrs 	= {id:"flash_header"};
	swfobject.embedSWF ( "/inc/swf/h1.swf", "flash_header", "1000", "66", "8", "", vars, params, attrs );
	
}

