function changeCSSDisplay( stylesheet, classname, newvalue ) {
	var theRules = new Array();
	if (document.styleSheets[ stylesheet ].cssRules) {
		theRules = document.styleSheets[ stylesheet ].cssRules;
	} else if (document.styleSheets[ stylesheet ].rules) {
		theRules = document.styleSheets[ stylesheet ].rules;
	}
	theRules[ classname ].style.display = newvalue;
}

function mToggle( area ) {
    var area = document.getElementById( area );
    if( area != null ) {
        if( area.style.display == "none" || area.style.display == "" ) area.style.display = "block";
        else if( area.style.display == "block" ) area.style.display = "none";
    }
}

function mShow( area ) {
    var area = document.getElementById( area );
    if( area != null ) {
        area.style.display = "block";
    }
}

function mHide( area ) {
    var area = document.getElementById( area );
    if( area != null ) {
        area.style.display = "none";
    }
}

function downloadTab( tab ) {
    document.getElementById( 'download-tab-mainstream' ).className = "";
    document.getElementById( 'download-tab-south-asian' ).className = "";
    document.getElementById( 'download-tab-asian' ).className = "";
    document.getElementById( 'download-tab-' + tab ).className = "current";

    mHide('download-mainstream');
    mHide('download-south-asian');
    mHide('download-asian');
    mShow('download-' + tab);
}

function defaultTab( tab, tabarray ) {
    for ( var i in tabarray ) {
        document.getElementById( 'default-tab-' + tabarray[i] ).className = "";
    }
    document.getElementById( 'default-tab-' + tab ).className = "current";

    for ( var i in tabarray ) {
        mHide( 'default-' + tabarray[i] );
    }
    mShow('default-' + tab);
}

