/**
					scoped to page and module name
				**/
				function globaldispatcher(){
				 	return dispatcher;
				}
				
				Page.mod_videos = {
					
					contentIDs : [],
					current_index : 0, // index starts at one
					current_object : 'mod_videos.tab_1.index_1', // the currently playing object
					current_highlight : null, // holds current hightlighted object
					
					// these objects are set in videos.jhtml
					current_contentID : null, //1540724, //1549668
					contentID_A : null,
					contentID_B : null,
					
					next_object : null,
					vspot_info : false,
					num_of_vids	: 0,
					timer : null,
										
					play : function(obj){ // When user clicks on list item
							
						if(obj)
							this.current_object = obj;
						else
							obj = this.current_object;
												
						// get data
						var name = 	Page.e(obj.id+'.name').innerHTML;
						var title = Page.e(obj.id+'.title').innerHTML;
						var vid = 	Page.e(obj.id+'.vid').innerHTML;
						
						obj.blur();
						
						// report the play functionality
						Page.mod_videos.report(10);
						
					},
					
					report : function(i){
						System.out.println('------------------------------------------------------');
						System.out.println('report #'+i);
						var obj = this.current_object;
						//System.out.println('a');
						var name = 	Page.e(obj.id+'.name').innerHTML;
						
						var seriesname = null;
						if(Page.e(obj.id+'.seriesname'))
							seriesname = Page.e(obj.id+'.seriesname').innerHTML;
						//System.out.println('b');
						var title = Page.e(obj.id+'.title').innerHTML;
						//System.out.println('c');
						title = Page.removeChar(title,'"');
						//System.out.println('d');
						var vid = 	Page.e(obj.id+'.vid').innerHTML;
						//System.out.println('e');
						var label = null;
						//System.out.println('f');
						if(Page.e(obj.id+'.label')!=null)
							label = Page.e(obj.id+'.label').innerHTML;
						//System.out.println('g');	
						var gaid  = null;
						if(Page.e(obj.id+'.gaid')!=null)
							gaid= Page.e(obj.id+'.gaid').innerHTML;
						
						var dispatcher = globaldispatcher();
						var oldpn = com.mtvi.config.SectionSetup.pageName;
						
						
						var pn; //pageName
						var h2; //hier2
						var p22; //Prop22
						
						//System.out.println('label='+label);
						
						if(i==10){
						
							if(seriesname!=null)
								pn = 'inline-video/main/'+seriesname+'/'+title+'#'+vid;
							else if(label != null)
								pn = 'inline-video/main/top_music_videos/'+title+'#'+vid;
							else
								pn = 'inline-video/main/top_show_videos/'+title+'#'+vid;
								
							System.out.println('report PAGENAME='+pn);
								
							try{
								if(label!=null){
									//System.out.println('LABEL REPORT');
									var distributor = getVidGovLabelName(gaid);
									var h5 = distributor+','+label+','+name+','+title;
									//System.out.println('h5='+h5);
									//System.out.println('sendReportingCall({setOverrides:{ s_pageName:'+pn+', s_hier2:'+ pn+', s_hier5: '+h5+', s_prop22:\'inline-video/main/index.jhtml\', s_prop13:'+gaid+':'+label+':'+name+':'+vid+':'+title+', s_channel:\'In-line Video\' }});');
									//sendReportingCall({setOverrides:{ s_pageName:pn, s_hier2: pn, s_hier5: h5, s_prop22:'inline-video/main/index.jhtml', s_prop13:gaid+':'+label+':'+name+':'+vid+':'+title, s_channel:'In-line Video' }});
									com.mtvi.config.SectionSetup.pageName = pn;
									com.mtvi.config.SectionSetup.hier2 = pn;
									com.mtvi.config.SectionSetup.hier5 = h5;
									dispatcher.setAttribute('pageName',pn);
									dispatcher.setAttribute('hier2',pn);
									dispatcher.setAttribute('hier5',h5);
									dispatcher.setAttribute('prop22','inline-video/main/index.jhtml');
									dispatcher.setAttribute('prop13',gaid+':'+label+':'+name+':'+vid+':'+title);
									dispatcher.setAttribute('channel','In-line Video');
									//dispatcher.setAttribute('prop23','LINE: 541');
									dispatcher.sendCall();
					
								}
								else{
									
									com.mtvi.config.SectionSetup.pageName = pn;
									com.mtvi.config.SectionSetup.hier2 = pn;
									dispatcher.setAttribute('pageName',pn);
									dispatcher.setAttribute('hier2',pn);
									dispatcher.setAttribute('prop22','inline-video/main/index.jhtml');
									dispatcher.setAttribute('channel','In-line Video');
									//dispatcher.setAttribute('prop23','LINE: 541');
									dispatcher.sendCall();
								
								}
							}
							catch(e){
								System.out.println('Reporting Error');
							}
						}
						
						
						com.mtvi.config.SectionSetup.pageName = oldpn;
						dispatcher.setAttribute('pageName',oldpn);
						
						System.out.println('com.mtvi.config.SectionSetup.pageName='+com.mtvi.config.SectionSetup.pageName);
						
						function getVidGovLabelName(id){
						   id = parseInt(id);
						   switch(id){
						      case 1:
						         return "Warner";
						      break;
						      case 2:
						         return "BMG";
						      break;
						
						      case 3:
						         return "Universal";
						      break;
						
						      case 4:
						         return "Sony";
						      break;
						
						      case 5:
						         return "EMI";
						      break;
						
						      case 6:
						         return "Independent Label";
						      break;
						
						      default:
						      return "Unknown";
						      break;
						   }
						}
					}
				
				}; // End Page.mod_videos
				