// Cascading Popup Menus v5.2 - Single Frame Menu example script.

if(isMac & isIE){
var hBar = new ItemStyle(40, 2, '', 0, 0, '', '', 'highText', 'highText', '', '',
 0, 20, 'hand', 'default');
}else{
var hBar = new ItemStyle(40, 2, '', 0, 0, '10#000000', '20#FFCC33', 'highText', 'highText', '', '',
 0, 20, 'hand', 'default');
}

// The 'sub Menu' items: these have popout indicators of "Greater Than" signs ">" 15px from their
// right edge, and CSS borders. Text class also changes on mouseover.
var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

// 'subBlank' is similar, but has an 'off' border the same colour as its background so it
// appears borderless when dim, and 1px spacing between items to show the hover border.
var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');

var button = new ItemStyle(22, 0, '&gt;', -15, 2, '10#333300', '20#5C6012', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 90, 100, 'hand', 'default');

//ItemStyle( Length, Spacing, 'Popout Indicator', Indicator Position, Padding, 'Out Background', 'Over Background', 'Out Font Class', 'Over Font Class', 'Out Border Class', 'Over Border Class', Out Opacity, Over Opacity, 'Link Cursor', 'Default Cursor'); 
 
var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
x_adjustment=0;
if(isMac & isIE)x_adjustment=10;
y_adjustment=0;
if(isFF || isSaf)y_adjustment=-16;
startMenu('root', false, 'window.page.elmPos("playing").x+x_adjustment', 'window.page.elmPos("playing").y+y_adjustment', 30, hBar, '', false);
addItem('&nbsp;', 'mPlaying', 'sm:', null, 102);
addItem('&nbsp;', 'mGenre', 'sm:', null, 117);
addItem('&nbsp;', 'mDemos', 'sm:', null, 68);

//startMenu( 'Menuname', Orientation, Left Offset, Top Offset, Menu Breadth, Default ItemStyle, 'Parent Frame', Show onclick); 
//addItem( 'Item HTML', 'URL / Menuname / Command', 'Item Type', Custom ItemStyle, Length, Spacing.....); 
startMenu('mPlaying', true, 0, 33, 120, button, '', false);
addItem('TRAILERS', 'playing.php?section_id=1', '');
addItem('PROMOS', 'playing.php?section_id=2', '');
addItem('COMMERCIALS', 'playing.php?section_id=3', '');
addItem('SHOW NARRATION', 'playing.php?section_id=4', '');
addItem('ANIMATION', 'playing.php?section_id=5', '');
addItem('INTERACTIVE', 'playing.php?section_id=6', '');




//startMenu( 'Menuname', Orientation, Left Offset, Top Offset, Menu Breadth, Default ItemStyle, 'Parent Frame', Show onclick); 
//addItem( 'Item HTML', 'URL / Menuname / Command', 'Item Type', Custom ItemStyle, Length, Spacing.....); 
startMenu('mDemos', true, 0, 31, 120, button, '', false);
addItem('TRAILERS', 'demos.php?section_id=1'+talent_token, '');
addItem('PROMOS', 'demos.php?section_id=2'+talent_token, '');
addItem('COMMERCIALS', 'demos.php?section_id=3'+talent_token, '');
addItem('SHOW NARRATION', 'demos.php?section_id=4'+talent_token, '');
addItem('ANIMATION', 'demos.php?section_id=5'+talent_token, '');
addItem('INTERACTIVE', 'demos.php?section_id=6'+talent_token, '');

// this is missing the final } which is added dynamically.
startMenu('mGenre', true, 0, 33, 205, button, '', false);
addItem('Trailers : Action/Adventure', 'genre.php?section_id=1&genre_id=1', '');
addItem('Trailers : Comedy', 'genre.php?section_id=1&genre_id=3', '');
addItem('Trailers : Drama', 'genre.php?section_id=1&genre_id=2', '');
addItem('Trailers : Family', 'genre.php?section_id=1&genre_id=4', '');
addItem('Trailers : Mystery/Suspense', 'genre.php?section_id=1&genre_id=8', '');
addItem('Trailers : Sci-Fi/Horror', 'genre.php?section_id=1&genre_id=6', '');
addItem('Promos : Announcer', 'genre.php?section_id=2&genre_id=19', '');
addItem('Promos : Dramatic', 'genre.php?section_id=2&genre_id=26', '');
addItem('Promos : Family', 'genre.php?section_id=2&genre_id=4', '');
addItem('Promos : Light', 'genre.php?section_id=2&genre_id=17', '');
addItem('Commercials : Announcer', 'genre.php?section_id=3&genre_id=19', '');
addItem('Commercials : Character/Dialects', 'genre.php?section_id=3&genre_id=7', '');
addItem('Commercials : Dialects/Character', 'genre.php?section_id=3&genre_id=28', '');
addItem('Commercials : Dialogue', 'genre.php?section_id=3&genre_id=20', '');
addItem('Commercials : Family', 'genre.php?section_id=3&genre_id=4', '');
addItem('Commercials : Light', 'genre.php?section_id=3&genre_id=17', '');
addItem('Show Narration : Dramatic', 'genre.php?section_id=4&genre_id=26', '');
addItem('Show Narration : Light', 'genre.php?section_id=4&genre_id=17', '');
addItem('Animation : Animal', 'genre.php?section_id=5&genre_id=22', '');
addItem('Animation : Character/Dialects', 'genre.php?section_id=5&genre_id=7', '');
addItem('Animation : Dialects/Character', 'genre.php?section_id=5&genre_id=28', '');
addItem('Animation : Dramatic', 'genre.php?section_id=5&genre_id=26', '');
addItem('Animation : Human', 'genre.php?section_id=5&genre_id=21', '');
addItem('Animation : Machine', 'genre.php?section_id=5&genre_id=23', '');
addItem('Interactive : Character/Dialects', 'genre.php?section_id=6&genre_id=7', '');
addItem('Interactive : Dialects/Character', 'genre.php?section_id=6&genre_id=28', '');
addItem('Interactive : Dramatic', 'genre.php?section_id=6&genre_id=26', '');
addItem('Interactive : Sci-Fi/Horror', 'genre.php?section_id=6&genre_id=6', '');
}