function showTaijiPrinciple( linkEl, doNotUnderline ) {
    document.getElementById( "taijiPrinciplesDefinitionImage" ).src = linkEl.href;

    var links = getElementsByClassName( "taijiPrinciplesLink" );

    for( var i=0; i<links.length; i++ ) {
        links[i].style.textDecoration = "";
    }

    if( !doNotUnderline ) {
        linkEl.style.textDecoration = "underline";
    }
    linkEl.blur();

    return false;
}

function getElementsByClassName( className ) {
    var elements = document.getElementsByTagName( "*" );
    var matchingElements = [];
    var matchingClass = new RegExp( "(^|\\s)" + className.replace( /\-/g, "\\-" ) + "(\\s|$)" );
    for( var i=0; i<elements.length; i++ ) {
        if( matchingClass.test( elements[i].className ) ) {
            matchingElements.push( elements[i] );
        }
    }
    return matchingElements;
}

function insertFlashVideo( elId, flv, width, height, autostart ) {
    if( !width ) {
        width = "360";
    }
    if( !height ) {
        height = "240";
    }
    if( !autostart ) {
        autostart = ",'autoPlay':false,'autoBuffering':false";
    } else {
        autostart = "";
    }

    swfobject.embedSWF(
            "layout/flash/FlowPlayerDark.swf"
        , 	elId
        , 	width
        , 	height
        , 	"9.0.48"
        , 	'layout/flash/expressInstall.swf'
        ,	{"config":"{'showVolumeSlider':false,'showFullScreenButton':false,'showMenu':false,'controlsOverVideo':'ease',"
                 +"'controlBarBackgroundColor':-1,'controlBarGloss':'low','videoFile':'" + flv + "',"
                 +"'initialScale':'scale','useHwScaling':true,'loop':false,'autoRewind':true" + autostart + "}"}
        ,	{"wmode":"transparent", "quality":"high", "bgcolor":"#FFFFFF"}
    );
}