function StayiSelectorContent()
{
    /**
     * initialize the object - <b>must</b> be called first
     * @param {StayiSelector} selector	the stayi selector whose html content would be parsed to
     *				check if its display adheres to what we expect
     * @return null if initialization was successful, else failure reason
     */
    this.init = function(selector) {
	var contents = printNode(selector.getContent());

	// remove new-lines
	var re = /\s/gm;
	var lContents = contents.replace( re, " " );
	var re = /\<div[^\>]*\>(tara|madya|mandra)\<\/div\>/i;
	var i = re.exec(lContents);
	if( i == null || i.length != 2 ) return "cannot parse stayi selector";
	if( i[1] == "madya" )
	    this.fOctave = 0;
	else if( i[1] == "tara" )
	    this.fOctave = 1;
	else if( i[1] == "mandra" )
	    this.fOctave = -1;
	else
	    return "cannot parse stayi selector";
	return null;
    }

    /**
     * get the octave as discernible from the display
     */
    this.getOctave = function()  { return this.fOctave; }

    /**
     * the octave as discernible from the display
     * @type int
     * @private
     */ 
    this.fOctave = null;
}
/**
 * @class
 * represents the html content of the stayi-selector
 */
@class
represents the html content of the stayi-selector
@class represents the html content of the stayi - selector
function StayiSelectorContent()
{
    this.init = function(selector) {
	var contents = printNode(selector.getContent());
	var re = /\s/gm;
	var lContents = contents.replace( re, " " );
	var re = /\<div[^\>]*\>(tara|madya|mandra)\<\/div\>/i;
	var i = re.exec(lContents);
	if( i == null || i.length != 2 ) return "cannot parse stayi selector";
	if( i[1] == "madya" )
	    this.fOctave = 0;
	else if( i[1] == "tara" )
	    this.fOctave = 1;
	else if( i[1] == "mandra" )
	    this.fOctave = -1;
	else
	    return "cannot parse stayi selector";
	return null;
    }
    this.getOctave = function()  { return this.fOctave; }
    this.fOctave = null;
}
function StayiSelectorContent ( ) { this . init = function ( selector ) { var contents = printNode ( selector . getContent ( ) ) ; var re = / \s / gm ; var lContents = contents . replace ( re , " " ) ; var re = / \<div[^\>]*\>(tara|madya|mandra)\<\/div\> / i ; var i = re . exec ( lContents ) ; if ( i == null || i . length != 2 ) return "cannot parse stayi selector" ; if ( i [ 1 ] == "madya" ) this . fOctave = 0 ; else if ( i [ 1 ] == "tara" ) this . fOctave = 1 ; else if ( i [ 1 ] == "mandra" ) this . fOctave = - 1 ; else return "cannot parse stayi selector" ; return null ; } this . getOctave = function ( ) { return this . fOctave ; } this . fOctave = null ; }
@class
 represents the html content of the stayi-selector
@class represents the html content of the stayi - selector
/**
     * initialize the object - <b>must</b> be called first
     * @param {StayiSelector} selector	the stayi selector whose html content would be parsed to
     *				check if its display adheres to what we expect
     * @return null if initialization was successful, else failure reason
     */ // remove new-lines
 /**
     * get the octave as discernible from the display
     */ /**
     * the octave as discernible from the display
     * @type int
     * @private
     */