var vis = 1;
var extrasout = true;
var moveextrasdiv = 168;
var timer_extras = null;

// fisrstvideo - Global store of first video of each play list.
var firstvideo = [];

// For Sharing info through share link
var a2a_config = a2a_config || {};  

//-----------------------------------------------------------------------------------------
// ------ Channel Line Up for Web Site --------
// name: youtube channel name
// uploads, playlists, favorites, subscriptions: [last last number video list, number of videos to get, used or not, drop down list 0=not selected 1=selected]
// channellist: [0=local 1=state 2=national, Channel List Name] Uploads will be the only item ever selected to keep it simple
// vidpop: This var is used to populate the uploads, playlists, favorites, subscriptions DIVs/Channel list of pop up video player
//-----------------------------------------------------------------------------------------
var ChannelName = [  
  { name: "hopkinscountygop", uploads: [11,1,1,1,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [0,"Hopkins County GOP"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "hcrepwomensclub", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [0,"Hopkins County RWC"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "txgoptv", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Republican Party of Texas"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "governorrickperry", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Governor Rick Perry"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "TexansForGregAbbott", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Attorney General Greg Abbott"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "SenJohnCornyn", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,0], subscriptions: [11,1,0,0], channellist: [1,"Senator John Cornyn"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "SenatorHutchison", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Senator Kay Bailey Hutchison"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "bobdeuell", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Senator Bob Deuell: District 2"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "ErwinCain", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"State Representative Erwin Cain, District 3"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "RonPaul2008dotcom", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Congressman Ron Paul: District 14"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "FlorenceShapiro", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [1,"Senator Florence Shapiro: District 8"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "rnc", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [2,"Republican National Committee"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "johnboehner", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [2,"Speaker of the House"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "EricCantor", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [2,"Majority Leader"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "HouseConference", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [2,"Republicans in Congress"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "RepublicanSenators", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [2,"Senate Republican Conference"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "TheNRSC", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [2,"The National Republican Senatorial Committee"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "TheFreedomlinkRadio", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"The Freedom Link Radio Channel 1"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "AdmiralConservative", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"The Freedom Link Radio Channel 2"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
//  { name: "TheDailyBeck", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"The Daily Glenn Beck - Show Intro"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
//  { name: "TheDailyBeck2", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"The Daily Glenn Beck - Full Show"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "RTAmerica", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,0,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"RT America - Question More"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "TheAlexJonesChannel", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,1,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"Alex Jones infowars Channel 1"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] },
  { name: "THElNFOWARRlOR", uploads: [11,1,1,0,[{video: "", icon: "", title: "", duration: ""}]], playlists: [11,1,1,0], favorites: [11,1,0,0,[{video: "", icon: "", title: "", duration: ""}]], subscriptions: [11,1,0,0], channellist: [3,"Alex Jones infowars Channel 2"], vidpop: ["", "", "", ""], playlistlist: [{id: "", imgurl: "", videolist: []}] }
]; //Global store array of the current Channels*/

// Track Current Youtube List and which element from ChannelName array
var ChannelName_userlist = [];
var ChannelName_Element = 0;
var UpdateChannel = false;

// DIV and Select for Vidoe pop up player
var html_pl = [];
var html_sel_pl = [];
var currentPlaylist = [];

// Copy Link and Embed text to Clipboard
function ClipBoard(VideoID) {
	var x = document.getElementById(VideoID); 
	var y = "";
	     
  document.YouTubeCopyForm.copyArea.value = x.value;
  //alert(document.YouTubeCopyForm.copyArea.value);
  y = document.YouTubeCopyForm.copyArea.createTextRange();
  y.select();
  y.execCommand("Copy");

  //VideoID.innerText = copytext.innerText;
  //Copied = VideoID.createTextRange();
  //Copied.execCommand("Copy");
}

// Insert an invisible full-size IFRAME on top of the ModalPopup background DIV
function jsCreateModalIframe() {
	var elemIframe = document.createElement('iframe');
	// 'ModalBackGround' was defined in the ASPX ModalPopupExtender declaration
	var elemModalBg = document.getElementById('cover'); //getElementsByClassName('ModalBackGround')[0];

	elemIframe.style.width = '100%';
	elemIframe.style.height = '100%';
	elemIframe.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
	elemIframe.style.zIndex = elemModalBg.style.zIndex + 1;
	elemModalBg.appendChild(elemIframe);
}

//-----------------------------------------------------
// elemId - The id attribute of the DOM object (or HTML entity) to animate. 
// fromOpacity - The starting opacity for the animation. 
// toOpacity - The ending opacity of the animation. This is the opacity the element will have when the animation ends. 
// time - The time the animation should take, in milliseconds. This should be divisible by the frames per second or it will be rounded to the next highest number that is divisible. 
// fps - The frames per second for the animation. A higher fps value means a smoother animation, but opacity changes can be processor-intensive on larger elements, so you could lower this if needed. 8 - 12 fps is a good quality setting. 
//-----------------------------------------------------
function FadeOpacity(elemId, fromOpacity, toOpacity, time, fps) {
   var steps = Math.ceil(fps * (time / 1000));
   var delta = (toOpacity - fromOpacity) / steps;
     
   FadeOpacityStep(elemId, 0, steps, fromOpacity, delta, (time / steps));
}

function FadeOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep) {
  SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));

  if (stepNum < steps)
    setTimeout("FadeOpacityStep('" + elemId + "', " + (stepNum+1) 
              + ", " + steps + ", " + fromOpacity + ", "
              + delta + ", " + timePerStep + ");", 
              timePerStep);
}

function SetOpacity(elem, opacityAsInt) {
  var opacityAsDecimal = opacityAsInt;
     
  if (opacityAsInt > 100)
    opacityAsInt = opacityAsDecimal = 100; 
  else if (opacityAsInt < 0)
    opacityAsInt = opacityAsDecimal = 0; 
     
  opacityAsDecimal /= 100;
  if (opacityAsInt < 1)
    opacityAsInt = 1; // IE7 bug, text smoothing cuts out if 0
    
  elem.style.opacity = (opacityAsDecimal);
  elem.style.filter  = "alpha(opacity=" + opacityAsInt + ")";
}


//Gets the width of an object used with centering screen
function getWidth(someObject){
  var w = 0;
  
  if (someObject.style.width){ 
    w=someObject.style.width;
  }
  else if(someObject.style.pixelWidth){
    w=someObject.style.pixelWidth;
   }
  else if(someObject.offsetWidth){
    w=someObject.offsetWidth;
  }
  else if(document.defaultView && document.defaultView.getComputedStyle) {
    w=document.defaultView.getComputedStyle(someObject ,'').getPropertyValue('width');       
  }
  else if(someObject.currentStyle) {
    w=someObject.currentStyle.width; //[toCamelCase('width')];
  }
  
  if(typeof w == "string") 
    w=parseInt(w);
  
  return w;
}

//Gets the width of an object used with centering screen
function getHeight(someObject){
  var h = 0;
  
  if (someObject.style.height) { 
    h=someObject.style.height;
  }
  else if(someObject.style.pixelHeight){
    h=someObject.style.pixelHeight;
   }
  else if(someObject.offsetHeight){
    h=someObject.offsetHeight;
  }
  else if(document.defaultView && document.defaultView.getComputedStyle) {
    h=document.defaultView.getComputedStyle(someObject ,'').getPropertyValue('height');     
  }
  else if(someObject.currentStyle) {
    h=someObject.currentStyle.height; //[toCamelCase('width')];
    if (h = 'auto')
       h = 0;
  }
  
  if(typeof h=="string") 
    h=parseInt(h);
  
  return h;
}

//Covers the screen totally with Div
function cover()  {  
  var coverscreen=document.getElementById('cover');
  var popscreen=document.getElementById('popscreen'); 
  var _docHeight = (document.height || document.body.scrollHeight);
  var _docWidth = (document.width || document.body.scrollWidth);
  
  coverscreen.style.height=_docHeight; 
  coverscreen.style.width=_docWidth;
 
  if(vis)  {
    vis=0;
    popscreen.style.display='block';
    coverscreen.style.display='block';      
    popscreen.style.visibility='visible';
    coverscreen.style.visibility='visible';
    FadeOpacity('cover', 0, 50, 250, 10);
  } 
  else  {   
    vis=1;
    popscreen.style.display='none';
    coverscreen.style.display='none'; 
    popscreen.style.visibility='hidden';
    coverscreen.style.visibility='hidden';
  }
}

//Slides the Video Screen up and down the screen.
function positionscreen(whichDiv)  {
  var popscreen = document.getElementById(whichDiv); 
  var _docWidth = (document.width || document.body.scrollWidth); //screen.width;
  var _popWidth = getWidth(popscreen);
  var _docHeight = screen.height;
  var _popHeight = getHeight(popscreen);
  var ScrollTop = document.body.scrollTop;
    
  if (ScrollTop == 0)  {
    if (window.pageYOffset)
      ScrollTop = window.pageYOffset;
    else
      ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
  }
  setLeft = Math.floor(_docWidth/2-_popWidth/2);
  setTopMax = Math.floor((_docHeight/2-_popHeight/2)/8);
  setTop = +ScrollTop+setTopMax;
  popscreen.style.left = setLeft + 'px';
  popscreen.style.top = setTop + 'px';
}

// Used to Escape player full screen mode
function fireEvent(target) {     
  var evt = document.createEvent("UIEvents");     
  evt.initEvent("keypress", true, true);      
  
  //evt.view = window;     
  //evt.altKey = false;     
  //evt.ctrlKey = false;     
  //evt.shiftKey = false;     
  //evt.metaKey = false;     
  evt.keyCode = 27;     
  //evt.charCode = 'a';      
  
  target.dispatchEvent(); 
} 

function fireEvent2(fireOnThis) {
  if( document.createEvent ) {
    var evObj = document.createEvent('UIEvents');
    evObj.initMouseEvent( 'keypress', true, false, window, 0, 12, 345, 7, 220, false, false, true, false, 0, null );
    fireOnThis.dispatchEvent(evObj);
  } 
  else if( document.createEventObject ) {
    var evObj = document.createEventObject();
    evObj.keyCode = 27;
    evObj.charCode = 27;
    swfobject.getObjectById("myytplayer").fireEvent('onkeypress',evObj);
    swfobject.getObjectById("myytplayer").fireEvent('onkeydown',evObj);
    swfobject.getObjectById("myytplayer").fireEvent('onkeyup',evObj);
  }
}


//-- Beginning OF PLAYER API --
 function updateHTML(elmId, value) {
   document.getElementById(elmId).innerHTML = value;
 }

 function setytplayerState(newState) {
   updateHTML("playerstate", newState);
 }

function onYouTubePlayerReady(playerId) {
  ytplayer = document.getElementById("myytplayer");
  //setInterval(updateytplayerInfo, 250);
  //updateytplayerInfo();
  ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
  ytplayer.addEventListener("onError", "onPlayerError");
}

function onPlayerError(errorCode) {
	/*if (errorCode == 100) {
	  //alert("An error occured: " + errorCode + " failed to load video");
	  var currentVid = ytplayer. getVideoUrl().split("=");
	  if (currentVid.length < 3)
	    currentVid = ytplayer. getVideoUrl().split(",");
	  currentVid = currentVid[1].split("&");
	  currentVid = currentVid[0].split(",");
	  
	  loadNewVideo(currentVid[0], 0, null, null);
	} */
}

var setDelay = false;
var _TMRUP = "";
var TMRUP = "";
function onytplayerStateChange(newState) {
  var PlayVid = "";
  var curElm = 1;
  var f = 10; 
	var tmpvid = "";
	 
	if (newState == 0) {
		if ((currentPlaylist[1] == true) || (typeof currentPlaylist[0] == 'number')) {
	    var currentVid = ytplayer.getVideoUrl().split("=");
	    if (currentVid.length < 3)
	      currentVid = ytplayer.getVideoUrl().split(",");
	    currentVid = currentVid[1].split("&");
      var cn = currentPlaylist[0];
      var list = currentPlaylist[1];

      if (typeof currentPlaylist[0] != 'number') {
        for(var i = 3; i < currentPlaylist.length; i++) {
	        if (currentPlaylist[i] == currentVid[0]) {
	          curElm = i+1;
	          if (curElm == currentPlaylist.length)
	            curElm = 3;
	        
	          currentPlaylist[2] = currentPlaylist[curElm];  
	        }
	      }
	    }
	    else {
	      tmpvidlen = eval('ChannelName[cn].'+list+'[4].length');
	      for(var i = 1; i < tmpvidlen; i++) {
    	    tmpvid = eval('ChannelName[cn].'+list+'[4][i]');  
	        if (tmpvid.video == currentVid[0]) {
	          curElm = i-1;
	          if (tmpvidlen == 0)
	            curElm = tmpvidlen-1;
	      
	          tmpvid = eval('ChannelName[cn].'+list+'[4][curElm]'); 
	          var video = tmpvid.video;
	          var title = tmpvid.title;
	          var duration = tmpvid.duration;
	          var icon = tmpvid.icon;
	        }
	      }
	    }
	  }
	  
    if (setDelay) {
  	 	var youtubeplr = "youtubeplayer";
      var stickamplr = "stickamplayer";
      //fireEvent2(ytplayer);
      showHideDiv(true, youtubeplr); //hide
      var thDivNow = showHideDiv(false, stickamplr); //show
   		thDivNow.innerHTML =    '<div align="center">'
   		                          +'<table border="0" cellspacing="0" cellpadding="0" width="560" style="background-image: url(\'/assets/images/Next_Vidoe_BackGround.jpg\'); height: 340px;">'
                                  +'<tr align="left" valign="top">'
                                    +'<td>'
                                      +'<table border="0" cellspacing="0" cellpadding="0" width="518" Inside%Tag>'
                                        +'<tr valign="top" align="left">'
                                          +'<td width="69" height="20"><img src="/assets/images/autogen/clearpixel.gif" width="69" height="1" border="0" alt=""></td>'
                                          +'<td width="449"><img src="/assets/images/autogen/clearpixel.gif" width="449" height="1" border="0" alt=""></td>'
                                        +'</tr>'
                                        +'<tr valign="top" align="left">'
                                          +'<td></td>'
                                          +'<td width="449" class="TextObject">'
                                            +'<p style="margin-bottom: 0px;"><span style="font-family: Arial,Helvetica,Geneva,Sans-serif; font-size: 25px; color: rgb(255,255,255);"><span style="font-size: 24px;">NEXT VIDEO WILL START IN<span id="TimerCnt" style="font-size: 34px;"> 10 </span>SECS</span>.</span></p>'
                                          +'</td>'
                                        +'</tr>'
                                      +'</table>'
                                      +'<table cellpadding="0" cellspacing="0" border="0" width="542">'
                                        +'<tr valign="top" align="left">'
                                          +'<td>'
                                            +'<table border="0" cellspacing="0" cellpadding="0" width="262" Inside%Tag>'
                                              +'<tr valign="top" align="left">'
                                                +'<td width="69" height="11"><img src="/assets/images/autogen/clearpixel.gif" width="69" height="1" border="0" alt=""></td>'
                                                +'<td></td>'
                                              +'</tr>'
                                              +'<tr valign="top" align="left">'
                                                +'<td height="145"></td>'
                                                +'<td width="193"><img id="Picture193" height="145" width="193" src="' + icon + '" border="0"></td>'
                                              +'</tr>'
                                            +'</table>'
                                          +'</td>'
                                          +'<td>'
                                            +'<table border="0" cellspacing="0" cellpadding="0" width="280" Inside%Tag>'
                                              +'<tr valign="top" align="left">'
                                                +'<td width="4" height="24"><img src="/assets/images/autogen/clearpixel.gif" width="4" height="1" border="0" alt=""></td>'
                                                +'<td width="183"><img src="/assets/images/autogen/clearpixel.gif" width="183" height="1" border="0" alt=""></td>'
                                                +'<td width="93"><img src="/assets/images/autogen/clearpixel.gif" width="93" height="1" border="0" alt=""></td>'
                                              +'</tr>'
                                              +'<tr valign="top" align="left">'
                                                +'<td></td>'
                                                +'<td colspan="2" width="276" class="TextObject">'
                                                  +'<p style="margin-bottom: 0px;"><span style="color: rgb(255,255,255);">' + title + '</span></p>'
                                                +'</td>'
                                              +'</tr>'
                                              +'<tr valign="top" align="left">'
                                                +'<td colspan="3" height="10"></td>'
                                              +'</tr>'
                                              +'<tr valign="top" align="left">'
                                                +'<td></td>'
                                                +'<td width="183" class="TextObject">'
                                                  +'<p style="margin-bottom: 0px;"><span style="font-family: Arial,Helvetica,Geneva,Sans-serif; color: rgb(255,255,255);">Duration: ' + duration + '</span></p>'
                                                +'</td>'
                                                +'<td></td>'
                                              +'</tr>'
                                            +'</table>'
                                          +'</td>'
                                        +'</tr>'
                                      +'</table>'
                                    +'</td>'
                                  +'</tr>'
                                +'</table>'
                              +'</div>';  
      var _TMRUP = setInterval(function() {
      	changeSpanText('TimerCnt', ' ' + f + ' ');
   		  f--;
   		}, 1000);
   		
   		TMRUP = setTimeout(function() {
   			clearInterval(_TMRUP);
   			thDivNow.innerHTML = "";
   			_onytplayerStateChange(newState, video);
   	  }, 12000);
 	  }
    else {
    	  currentPlaylist[1] = true;
    	  if (curElm-2 == -1)
    	    curElm = 1;
    	  else
    	  	curElm = curElm-2;
    	  changeSpanText('PlaylistCurrentVideo$'+currentPlaylist[0], curElm);
   	    _onytplayerStateChange(newState, currentPlaylist[2]);
   	    
    }	 
  }
}

function _onytplayerStateChange(newState, PlayVid) {
	var startSeconds = 0;
		 
  if(newState == 0)
	   loadNewVideo(PlayVid, startSeconds, null, null);
}

function updateytplayerInfo() {
  updateHTML("bytesloaded", getBytesLoaded());
  updateHTML("bytestotal", getBytesTotal());
  updateHTML("videoduration", getDuration());
  updateHTML("videotime", getCurrentTime());
  updateHTML("startbytes", getStartBytes());
  updateHTML("volume", getVolume());
}

function loadNewArrayVideo(Playlist,chan,list) {
  setDelay = false;
  
  if (currentPlaylist[0] != undefined)
	  changeSpanText('PlaylistCurrentVideo$'+currentPlaylist[0], 0);
	  
	if (currentPlaylist[0] == chan+'$'+list)
	  currentPlaylist[1] = true;
	else {
	  currentPlaylist.length = 0;
	  currentPlaylist[0] = chan+'$'+list;
	  currentPlaylist[1] = false;
	  currentPlaylist[2] = Playlist[0];
	  currentPlaylist = currentPlaylist.concat(Playlist);
  }
	onytplayerStateChange(0);
}

function loadArrayVideo(delay) {
	var i = 0;
	setDelay = delay;
	ytplayer = document.getElementById("myytplayer");
	//var ytplayer = swfobject.getObjectById("myytplayer");
	
  if (ytplayer) {
    ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
    ytplayer.addEventListener("onError", "onPlayerError");
  }
}

function resetembedVideo() {
	swfobject.removeSWF("myytplayer");
	var youtubeplayer = document.getElementById("youtubeplayer");
   	  youtubeplayer.innerHTML = '<div id="ytapiplayer">',
                                   +'You need Flash player 8+ and JavaScript enabled to view this video.',
                                +'</div>';
}

function embedVideo(video) {
  var params = { allowScriptAccess: "always", allowFullScreen: "true", bgcolor: "#cccccc" };
	var atts = { id: "myytplayer", name: "myytplayerContent" };
	var _video = "http://www.youtube.com/v/" + video + "&amp;hl=en&amp;fs=1&amp;rel=0&amp;border=0&amp;showinfo=0&amp;autoplay=1;enablejsapi=1&amp;playerapiid=ytplayer";
	
	swfobject.embedSWF(_video, "ytapiplayer", "560", "340", "8", null, null, params, atts);
}	

function loadLiveVideo() {
 	  if (typeof ytplayer != 'undefined')
 	    resetembedVideo();
 	  showHideDiv(true, youtubeplayer); //hide
    var theDivUpdate = showHideDiv(false, stickamplayer); //show
    theDivUpdate.innerHTML = '<div align="center"><embed id="myplayer" name="myplayer" src="http://player.stickam.com/stickamPlayer/178526287-11320568" type="application/x-shockwave-flash" wmode="transparent" width="400" height="340"  allowScriptAccess="always" allowFullScreen="true"></embed></div>';
    var Link = 'http://www.stickam.com/hopkinscountygop';
    var Embed = '<embed src=\'http://player.stickam.com/stickamPlayer/vo/178526287\' width=\'400\' height=\'340\' flashvars=\'autoPlay=1&autoMute=0\'type=\'application/x-shockwave-flash\' scale=\'noscale\' allowfullscreen=\'true\' allowscriptaccess=\'always\' />';
    document.getElementById("GOPVideoLink").value = Link;
    document.getElementById("GOPVideoEmbed").value = Embed;
    sharelinks(Link);
}

function loadFreedomLinkLiveAudio() {
 	  if (typeof ytplayer != 'undefined')
 	    resetembedVideo();
 	  showHideDiv(true, youtubeplayer); //hide
    var theDivUpdate = showHideDiv(false, stickamplayer); //show
    theDivUpdate.innerHTML = '<div align="center">'+
                                '<div style="height: 105px; width: 500px; overflow: hidden;">'+
                                '<object name="InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" id="InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="126" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash" align="middle">'+
                                  '<param name="movie" value="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf" />'+
                                  '<param name="quality" value="high" />'+
                                  '<param name="wmode" value="transparent" />'+
                                  '<param name="menu" value="false" />'+
                                  '<param name="flashvars" value="r=2&amp;appId=34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" />'+
                                  '<param name="allowScriptAccess" value="sameDomain" />'+
                                  '<embed type="application/x-shockwave-flash" width="500" height="126" src="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf" name="InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" id="InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" allowscriptaccess="sameDomain" flashvars="r=2&amp;appId=34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" align="middle"></embed>'+
                                '</object>'+
                                '</div>'+
                                '<object width=\'560\' height=\'235\' id=\'obj_1298780006373\'>'+
                                  '<param name=\'movie\' value=\'http://intelhubsradio.chatango.com/group\'/>'+
                                  '<param name=\'wmode\' value=\'transparent\'/>'+
                                  '<param name=\'AllowScriptAccess\' VALUE=\'always\'/>'+
                                  '<param name=\'AllowNetworking\' VALUE=\'all\'/>'+
                                  '<param name=\'AllowFullScreen\' VALUE=\'true\'/>'+
                                  '<param name=\'flashvars\' value=\'cid=1298780006373&amp;a=000000&amp;b=100&amp;c=FF0000&amp;d=FFFFCC&amp;k=000000&amp;l=FF0000&amp;m=FF0000&amp;q=FF0000&amp;r=100&amp;s=1\'/>'+
                                  '<embed id=\'emb_1298780006373\' src=\'http://intelhubsradio.chatango.com/group\' width=\'560\' height=\'235\' wmode=\'transparent\' allowScriptAccess=\'always\' allowNetworking=\'all\' type=\'application/x-shockwave-flash\' allowFullScreen=\'true\' flashvars=\'cid=1298780006373&amp;a=000000&amp;b=100&amp;c=FF0000&amp;d=FFFFCC&amp;k=000000&amp;l=FF0000&amp;m=FF0000&amp;q=FF0000&amp;r=100&amp;s=1\'></embed>'+
                                '</object>'+
                              '</div>';
    var Link = 'http://theintelhubradio.com/listen-live-chat/';
    var Embed = '<object id="InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="126" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash" align="middle"><param name="movie" value="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="menu" value="false" /><param name="flashvars" value="r=2&amp;appId=34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" /><param name="allowScriptAccess" value="sameDomain" /><embed type="application/x-shockwave-flash" width="500" height="126" src="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf" name="InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" allowscriptaccess="sameDomain" flashvars="r=2&amp;appId=34fdfbe3-15db-4f51-87fa-2fd1f9f37adf" align="middle"></embed></object>';
    document.getElementById("GOPVideoLink").value = Link;
    document.getElementById("GOPVideoEmbed").value = Embed;
    sharelinks(Link);
}

function remove_flash() {
  var obj_1 = document.getElementById("InsertWidget_34fdfbe3-15db-4f51-87fa-2fd1f9f37adf");
  var obj_2 = document.getElementById("obj_1298780006373");
  var obj_3 = document.getElementById("myplayer");
  
  if (obj_1) {
    obj_1.parentNode.removeChild(obj_1);
    if (obj_2)
      obj_2.parentNode.removeChild(obj_2);
  }  
  else if (obj_3)
    obj_3.parentNode.removeChild(obj_3);
} 

function loadNewVideo(id, startSeconds, chan, list) {
	var player = document.getElementById('stickamplayer');
	//var ytplayer = swfobject.getObjectById("myytplayer");
	var youtubeplayer = "youtubeplayer";
	var stickamplayer = "stickamplayer";

	if ((list == 'favorites') || (list == 'uploads')) {	
		setDelay = true;
		if (typeof TMRUP == 'object') {
		  clearInterval(_TMRUP);
		  clearSetTimeout(TMRUP);
		}
		if ((typeof currentPlaylist[0] != 'number') && (currentPlaylist[0] != undefined))
	    changeSpanText('PlaylistCurrentVideo$'+currentPlaylist[0], 0);
		currentPlaylist.length = 0;
	  currentPlaylist[0] = chan;
		currentPlaylist[1] = list;
  }

	if (player.style.display == "block") {
		remove_flash();
    showHideDiv(false, youtubeplayer); //show
  	showHideDiv(true, stickamplayer); //hide
  	resetembedVideo();
  	embedVideo(id);
  }
  else if (ytplayer) {
    ytplayer.loadVideoById(id, parseInt(startSeconds));
  }
  var Link = "http://www.youtube.com/watch?v="+ id;
  var Embed = "<object width='640' height='385'><param name='movie' value='http://www.youtube.com/v/"+ id +"?fs=1&hl=en_US'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/"+ id +"?fs=1&hl=en_US' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='640' height='385'></embed></object>";
  document.getElementById("GOPVideoLink").value = Link;
  document.getElementById("GOPVideoEmbed").value = Embed;
  sharelinks(Link);
}

function getPlayerState() {
  if (ytplayer) {
    return ytplayer.getPlayerState();
  }
}
    
function stop() {
  if (ytplayer) {
    ytplayer.stopVideo();
  }
}      

function stopcheck() {
	//do {
		if (typeof(ytplayer) != 'undefined' && ytplayer != null)
	    stop();
	  //alert(ytplayer);
  //} while (typeof(ytplayer) == 'undefined' || ytplayer == null);
	//alert(getPlayerState());
}

function stop_all() {
	var ytplayer = swfobject.getObjectById("myytplayer");

  remove_flash();
  
  if (ytplayer)
    resetembedVideo(); 
}      

//-- END OF PLAYER API --  

//Change Background Color Function
function  CC(WhichID, newcolor, cursortype) {
  document.getElementById(WhichID).style.backgroundColor = newcolor;
  if (cursortype != null)
    document.getElementById(WhichID).style.cursor = cursortype;
}  

//Uses Tool Tips to give a tip to click to play image pop up
function PlayOverlay() {
	//Tip('<div style="width: 100px; height: 100px; z-index:4000; background: url(\'/assets/images/play.png\') transparent 0% 0% no-repeat;">', BGCOLOR, '', BORDERWIDTH, 0);
	Tip('<img width="100" height="100" src="/assets/images/play.png">', BGCOLOR, '', BORDERWIDTH, 0);
}

function ChanPlaylistGen(data) {
	var len = 0;
	var k = 0;
	var feed = data.feed;
	var feedid = feed.id.$t.split("/");
	var id = feedid[feedid.length-1];
	var entries = feed.entry || [];
  var thumbnailUrl = "";
  
  try { thumbnailUrl = entries[0].media$group.media$thumbnail[0].url; }
  catch(e) {  try {thumbnailUrl = entries[1].media$group.media$thumbnail[0].url; } catch(e) {} }
  	
  for (var j = 0; j < ChannelName.length; j++) {
    try { len = ChannelName[j].playlistlist.length; }
  	catch(e) { alert(ChannelName[j].name); }
  	for (var g = 0; g < len; g++) {
  	  if (ChannelName[j].playlistlist[g].id == id)
  	    k = j;
  	} 
  }
  
  len = ChannelName[k].playlistlist.length - 1;
  ChannelName[k].playlistlist.push({id: "", imgurl: "", videolist: []});
  ChannelName[k].playlistlist[len].imgurl = thumbnailUrl;
  
	for (var i = 0; i < entries.length; i++) {
		try { 
  	  var entry = entries[i];
  	  var VidHref = entry.link[3].href.split("=");
  	  var idlen = 1;
  	  if (VidHref.length == 1) {
  	    VidHref = entry.link[3].href.split("/");
  	    idlen = 5;
  	  }  
  	  var VideoToPlay = VidHref[idlen];
	    //var VideoToPlay = entry.id.$t.substr(entry.id.$t.length-11,entry.id.$t.length);
  	  ChannelName[k].playlistlist[len].videolist.push(VideoToPlay);  	
  	}
  	catch(e) { 
  		//alert("YouTube Account suspended");
    }
	}
}

function vidlisthtml(vidscript, VideoToPlay, thumbnailUrl, title, description, list) {
	var html = [];
	
  html.push('<table id="Table_',list,'_',VideoToPlay,'" border="2" cellspacing="0" cellpadding="0" width="268" style="border-left-color:  rgb(0,0,0); border-left-style: solid; border-top-color:  rgb(0,0,0); border-top-style: solid; border-right-color:  rgb(0,0,0); border-right-style: solid; border-bottom-color:  rgb(0,0,0); border-bottom-style: solid; height: 122px;" class="collapsed">',
                 '<tr style="height: 24px;" class="navbar">',
                   '<td id="Cell_', list, '_', VideoToPlay, '" width="262" onclick="', vidscript,';" onmouseover="CC(\'Cell_', list, '_', VideoToPlay, '\',\'#B22222\',\'pointer\'); PlayOverlay();" onmouseout="CC(\'Cell_', list, '_', VideoToPlay, '\',\'#6994AA\',\'auto\'); UnTip();">',
                     '<p style="text-align: justify; margin-bottom: 0px;">', title, '</p>',
                   '</td>',
                 '</tr>',
                 '<tr style="height: 90px;">',
                   '<td>',
                     '<p style="margin-bottom: 0px;"><a href="javascript:;" onclick="', vidscript, ';" onmouseover="CC(\'Cell_', list, '_', VideoToPlay, '\',\'#B22222\',null); PlayOverlay();" onmouseout="CC(\'Cell_', list, '_', VideoToPlay, '\',\'#6994AA\',null); UnTip();"><img id="Picture_', VideoToPlay, '" height="90" width="120" src="', thumbnailUrl, '" vspace="0" hspace="0" align="left" border="0" alt="" title=""></a>', description, '</p>',
                   '</td>',
                 '</tr>',
               '</table>',
               '<table id="Table57" border="0" cellspacing="0" cellpadding="0" width="277" style="height: 4px;">',
                 '<tr style="height: 4px;">',
                   '<td width="277"></td>',
                 '</tr>',
               '</table>');
  return html;             
}	

function LoadScript(src, entry, list, id, k, vidPopElm, callback) {
	var done = false;
	
	len = ChannelName[k].playlistlist.length - 1;
  ChannelName[k].playlistlist[len].id = id;
	
  var head = document.getElementsByTagName('head').item(0);
  var script = document.createElement('script');
  script.setAttribute( 'src', src );
  script.setAttribute( 'type', 'text/javascript' );
  script.setAttribute( 'charset', 'utf-8' );
  script.onload = script.onreadystatechange = function() {
    if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
    	done = true;
      script.onload = script.onreadystatechange = null;
      if (callback) {
         callback(done,entry, list, id, k, vidPopElm);
      }
    }
  }
  head.insertBefore(script, head.firstChild);
}

function secondsToHms(d) {
	d = Number(d);
	var h = Math.floor(d / 3600);
	var m = Math.floor(d % 3600 / 60);
	var s = Math.floor(d % 3600 % 60);
	return ((h > 0 ? h + ":" : "00:") + (m > 0 ? (h > 0 && m < 10 ? "0" : m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
}

//-----------------------------------------------------------------------------------------
//The Following Generate the video play lists...
//Must include this call before calling PlayList, GOPGov, RNCGOP, TXGop
// <script type="text/javascript" src="/assets/vtplayer/scripts/swfobject.js"></script>
//
// data - Meta data passed from youtube
// list - Video list to generate: sl - site list on main site, pl - player list on video pop up
// UserName - Name of youtube channel
// UserList - which list from youtube channel
//-----------------------------------------------------------------------------------------
function PlayList(data, list, UserName, UserList, vidPopElm) {
	var vidscript = null;
  var feed = data.feed;
  var entries = feed.entry || [];
  var author = feed.author || [];
  var html = [];
  var html_sl = [];
  var html_pl = [];
  var authorname = author[0].name.$t;
  var totalResults = feed.openSearch$totalResults.$t;
  var callbacklen = ""; 
  
  for (var i = 0; i < ChannelName.length; i++) {
    if (ChannelName[i].name == UserName) {
  	 	callbacklen = eval('ChannelName[i].'+UserList);
      callbacklen[1] = totalResults; //entries.length;
      var k = i;
    }
  }
  
  if (entries.length >= 1)
    firstvideo.push(entries[0].id.$t.substr(entries[0].id.$t.length-11,entries[0].id.$t.length));
  if (UserList == "playlists") {
  	var i = 0;
  	var done = false;
  	var DivLoaddone = false;
  	var TMR = setInterval(function() {
	    if (i < entries.length) {
	      if (!done) {
	      	done = true;
    	    var entry = entries[i];
  	      var playlistcount = entry.gd$feedLink[0].countHint;
          var playlistURL = entry.gd$feedLink[0].href;
          var playlistURLid = playlistURL.split("/");
          var id = playlistURLid[playlistURLid.length-1];
          var src = playlistURL +'?alt=json-in-script&callback=ChanPlaylistGen&max-results=' + playlistcount + '&orderby=published&start-index=1';
        	  
  	      LoadScript(src, entry, list, id, k, vidPopElm, function(done_2, entry_2, list_2, id, w, j) {
  	  	      var playlistcount = entry_2.gd$feedLink[0].countHint;
  	  	      var playlisttitle = entry_2.title.$t;
              
  	          for (var g = 0; g < ChannelName[w].playlistlist.length; g++) {
  	        	  if (ChannelName[w].playlistlist[g].id == id)
  	              var f = g;
  	          }

  	          var thumbnailUrl = ChannelName[w].playlistlist[f].imgurl;
              var PlayVideoID = "Playlist" + UserName + f;
              var videolist = [];
              videolist = ChannelName[w].playlistlist[f].videolist;
          
  	  	      
    	        var playlistdescr = '<table border="0" cellspacing="0" cellpadding="0" width="140px" border="1" style=" border-left: 1px; border-left-color:  rgb(192,192,192); border-left-style: solid; border-top: 1px; border-top-color:  rgb(192,192,192); border-top-style: solid; border-right: 1px; border-right-color:  rgb(192,192,192); border-right-style: solid; border-bottom: 1px; border-bottom-color:  rgb(192,192,192); border-bottom-style: solid; height: 22px;">' +
                                     '<tr style="height: 22px;">' +
                                       '<td width="100" style="background-color: rgb(171,191,208);">' +
                                          '<p style="margin-bottom: 0px;"><b><span style="font-size: 12px;">&nbsp; Videos in List:</span></b></p>' +
                                        '</td>' +
                                        '<td width="40" style="background-color: rgb(230,230,230);">' +
                                           '<p style="text-align: center; margin-bottom: 0px;"><span style="font-size: 12px;">' + playlistcount + '</span></p>' +
                                        '</td>' +
                                      '</tr>';
                                    if (list_2 == "pl") {
                                      playlistdescr += '<tr style="height: 22px;">' +
                                       '<td width="100" style="background-color: rgb(171,191,208); border-top: 1px; border-top-style: solid; border-top-color: rgb(192,192,192);">' +
                                          '<p style="margin-bottom: 0px;"><b><span style="font-size: 12px;">&nbsp; Current Video:</span></b></p>' +
                                        '</td>' +
                                        '<td width="40" style="background-color: rgb(230,230,230); border-top: 1px; border-top-style: solid; border-top-color: rgb(192,192,192);">' +
                                           '<p style="text-align: center; margin-bottom: 0px;"><span id="PlaylistCurrentVideo$' + UserName + '$' + f + '" style="font-size: 12px;">0</span></p>' +
                                        '</td>' +
                                      '</tr>';
                                    }  
                                  playlistdescr += '</table>' + entry_2.yt$description.$t;
  	          
              if (list_2 == "sl") {
          	    vidscript = 'vidotoplay(ChannelName['+w+'].playlistlist['+f+'].videolist,\'' + UserName + '\',' + f + ')';
          	    document.getElementById('Video_Table_'+ChannelName[w].name+UserList).innerHTML += vidlisthtml(vidscript, PlayVideoID, thumbnailUrl, playlisttitle, playlistdescr, list_2).join('');
  	  	      }  
  	  	      else if (list_2 == "pl") {
  	  	  	    vidscript = 'loadNewArrayVideo(ChannelName['+w+'].playlistlist['+f+'].videolist,\'' + UserName + '\',' + f + ')';
  	  	  	    ChannelName[k].vidpop[j] += vidlisthtml(vidscript, PlayVideoID, thumbnailUrl, playlisttitle, playlistdescr, list_2).join('');
  	  	  	    if (document.getElementById('Video_' + ChannelName[k].name + UserList))
  	  	  	      document.getElementById('Video_' + ChannelName[k].name + UserList).innerHTML = ChannelName[k].vidpop[j];
  	  	      }
              DivLoaddone = done_2;
            });
          }  
        
          if(DivLoaddone) {
	  	      done = false;
	  	      DivLoaddone = false;
	  	      i++;
	        }	
        }
        else if (i == entries.length) {
    	    clearInterval(TMR);
    	  }
    }, 100);   
  }
  else {
    for (var i = 0; i < entries.length; i++) {
        var entry = entries[i];
        var title = entry.title.$t; //.substr(0, 80);
        try {
          var thumbnailUrl = entry.media$group.media$thumbnail[0].url;
          var description =  entry.media$group.media$description.$t;
          var duration = entry.media$group.yt$duration.seconds; 
          //var duration = entry.media$group.media$content[0].duration;
        }
        catch(e) {
      	alert("Error with Channel: " + UserName);
      }
        var timeReadOut = secondsToHms(duration);
        var VideoToPlay = entry.id.$t.substr(entry.id.$t.length-11,entry.id.$t.length);
        //var playerUrl = entry.media$group.media$content[0].url;
        //var rating =  entry.gd$rating.average;
        //alert(rating);
        //var rates =  entry.gd$rating.numRaters;
        //var average = entry.gd$rating.average;
        var chan = k;

      	eval('ChannelName[k].' + UserList + '[4].push({video: VideoToPlay, icon: thumbnailUrl, title: title, duration: timeReadOut})');
     	     	
       	if (list == "sl")
          vidscript = 'vidotoplay(\'' + VideoToPlay + '\',' + chan + ',\'' + UserList + '\')';
        else if (list == "pl")
          vidscript = 'loadNewVideo(\'' + VideoToPlay + '\',0,' + chan + ',\'' + UserList + '\')';
        
        html.push(vidlisthtml(vidscript, VideoToPlay, thumbnailUrl, title, description, list).join(''));
    }
  }
  return html;
}

// Retrieve data using the XMLHttpRequest object
function ajax_call_server(url, vars){
 var xml = null;
 try{
    xml = new ActiveXObject("Microsoft.XMLHTTP");
 }catch(exception){
    xml = new XMLHttpRequest();
 }

 if(xml!=null){
    xml.open("GET",url + vars, true);
    xml.send(null);
    if(xml.status == 404) alert("Error 404: Incorrect url.");
    
    return ""; //xml.responseText;
 }
 alert("Your browser does not support XMLHTTP.");
 return "";
}

/*
Display the element with id "busy_message" (which should be set to display:none
via some CSS style rule) while function fun is running and reset it's style
afterwards.
*/
function busy(fun, list, whichDiv) {
	var div_style = null;
	
	if (list == null)
    div_style = "busy_sl";
  else
  	div_style = "busy_pl";
  
  showHideDiv(true, whichDiv); //hide
  showHideDiv(false, div_style); //show
  
  setTimeout(function() {
    fun;
    showHideDiv(true, div_style); //hide
    showHideDiv(false, whichDiv); //show
  }, 0);
}

function _busy(list, on_off) {
	var div_style = null;
	
	if (list == null)
    div_style = "busy_sl";
  else
  	div_style = "busy_pl";
	
	if (on_off)
		showHideDiv(false, div_style); //show
  else if (!on_off)
  	showHideDiv(true, div_style); //hide
}  

function makeDisable(id, enable) {
  var sel = document.getElementById(id);
  for (var n = 0; n < sel.length; n++) {
    if (enable)
      sel[n].disabled = false;
    else if (!enable)
  	  sel[n].disabled = true;
  }	
}

//----------------------------------------------------------------------
//whichDIV - current div making function call
//whichChannel - the channel being called from youtube user
//callback - script used by youtube to generate video list link
//ChannelArrayNum - which youtube channel being called set to a number corralating to ChannelName array  element
//PopUPChannel - Checks to see if video selection is play list on page or play list on pop up overaly video player
//UserList can be set to : uploads, playlists, favorites, subscriptions
//----------------------------------------------------------------------
function UpdateContent(whichDIV, whichChannel, ChannelArrayNum, PopUPChannel, UserList) {
  var callbacklen = eval('ChannelName[ChannelArrayNum].'+UserList); //length of the number of elements in playlist for each channel
  var startindex = eval('ChannelName[ChannelArrayNum].'+UserList); //start-index of youtube video start of playlist for each channel
  var skipitall = false;
  var MenuItem = "";
  var StIndex = 11;
  var maxNum = 10;
  UpateChannel = true;
  
  if (PopUPChannel != null) 
    MenuItem = document.forms["VideoPopForm"]["VideoPopSelect"];
  else 
    MenuItem = document.forms["VideoForm"]["VideoSelect"];
  var chosenoption=MenuItem.options[MenuItem.selectedIndex];
	ChannelName_Element = chosenoption.value - 2;
		
  if ((whichDIV.scrollTop + whichDIV.clientHeight - 50) == (whichDIV.scrollHeight - 50)) {
    if (startindex[0] == 0)
		  skipitall = true;
		else if (startindex[0] == 11)
		  if (callbacklen[1] - startindex[0] <= 10) {
				 StIndex = startindex[0];
				 maxNum = callbacklen[1] - startindex[0];
				 startindex[0] = 0;
		  }	
		  else
		    startindex[0] += 10;
		else if (startindex[0] <= callbacklen[1]) {
			if (callbacklen[1] - startindex[0] <= 10) {
				 StIndex = startindex[0];
				 maxNum = callbacklen[1] - startindex[0];
				 startindex[0] = 0;
		  }	
		  else {
		    StIndex = startindex[0];
			  startindex[0] += 10;
		  }
		}   
		else if (startindex[0] > callbacklen[1]) {
			  alert(startindex[0]);
			  skipitall = true;
			  startindex[0] = 0;
	  }   	
  
    if (!skipitall) {  
      var head = document.getElementsByTagName('head').item(0); 
      var script = document.createElement('script');
      var done = false;
      script.setAttribute( 'src', 'http://gdata.youtube.com/feeds/api/users/' +  whichChannel + '/' + UserList +'?alt=json-in-script&callback=ChanScriptGen&max-results=' + maxNum + '&orderby=published&start-index='+ StIndex);
      script.setAttribute( 'type', 'text/javascript' ); 
      script.setAttribute( 'charset', 'utf-8' );            
      //busy(head.insertBefore( script, head.firstChild ), PopUPChannel, whichDIV);
      showHideDiv(true, whichDIV); //hide
      _busy(PopUPChannel, true);
      script.onload = script.onreadystatechange = function() {
        if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
    	    done = true;
          script.onload = script.onreadystatechange = null;
          /*if (PopUPChannel != null) {
      	    var k = ChannelName_userlist[ChannelName_Element][1];
	          var rta = chooselist (ChannelName_Element);
	          var j = rta[0];
	          var ChannelID = rta[1];
            document.getElementById('Video_' + PopUPChannel + ChannelID).innerHTML = ChannelName[k].vidpop[j];
          }*/
          _busy(PopUPChannel, false);
          showHideDiv(false, whichDIV); //show
        }
      }
      head.insertBefore( script, head.firstChild );   
    }
  }
}

function CallCallBack(whichChannel, UserList, ChannelArrayNum, callback) {
	ChannelName_userlist.push([UserList, ChannelArrayNum]);

  var done = false;
	var head = document.getElementsByTagName('head').item(0);
  var script = document.createElement('script');
  script.setAttribute( 'src', 'http://gdata.youtube.com/feeds/api/users/' +  whichChannel + '/' + UserList +'?alt=json-in-script&callback=ChanScriptGen&max-results=10&orderby=published&start-index=1');
  script.setAttribute( 'type', 'text/javascript' );
  script.setAttribute( 'charset', 'utf-8' );
  script.onload = script.onreadystatechange = function() {
    if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
    	done = true;
      script.onload = script.onreadystatechange = null;
      if (callback) {
         callback(done);
      }
    }
  }
  head.insertBefore(script, head.firstChild);
}

function toggleSelectBox(selbox, hide){ 
  if(hide) {//HIDE:
    selbox.size=1;
    selbox.style.position='static';
  }
  else {//SHOW:
    selbox.size = 20; //selbox.options.length;
    selbox.style.position='absolute';
    selbox.style.height='auto';
    selbox.style.zIndex="10";
  }
}


function GenerateChannelPlayLists() {
	var html_sl = [];
	var html_sel_sl = [];
	var html_script = [];
	var ChannelType = [];
	var Seperator = 1;
	var ChannelID = "";
	var DivStyle = "";
	var x = 1;
	var k = 2;
	var done = false;
	var DivLoaddone = false;
  var div_style_sel = null;
  
	html_script.push('HCGOPLIVE();');
	html_script.push('FREEDOMLINKLIVE();');
	html_sl.push('<div id="Video_Table_HCLIVE" class="playlist_sl"></div>',
	             '<div id="Video_Table_FLLIVE" class="playlist_sl"></div>',
	             '<div id="busy_sl"></div>');
  html_pl.push('<div id="Video_HCLIVE" class="playlist_pl"></div>',
               '<div id="Video_FLLIVE" class="playlist_pl"></div>',
               '<div id="busy_pl"></div>');   
  html_sel_sl.push('<optgroup label="-------------- Local Video Feeds --------------">',
                   '<option value="0">Hopkins County GOP Live</option>');                 
  html_sel_pl.push('<select id="VideoPopSelect" name="VideoPopSelect" style="height: 24px; width: 280px;" onchange="getVideovalues(document.forms[\'VideoPopForm\'][\'VideoPopSelect\'], \'pl\', false);">',
                   '<optgroup label="-------------- Local Video Feeds --------------">',              
	                 '<option value="0">Hopkins County GOP Live</option>');
	                 
	for (var i = 0; i < ChannelName.length; i++) {
	  
		if(ChannelName[i].uploads[2]) 
		  ChannelType.push('uploads');
		if(ChannelName[i].playlists[2])
		  ChannelType.push('playlists');
		if(ChannelName[i].favorites[2])
		  ChannelType.push('favorites');
		if(ChannelName[i].subscriptions[2])
		  ChannelType.push('subscriptions');

		for (var j = 0; j < ChannelType.length; j++) {
			ChannelID = ChannelType[j] == "uploads" ?"" : ChannelType[j];
		  ChannelID_Up = ChannelType[j] == "uploads" ?"" : ChannelType[j].substr(0,1).toUpperCase() + ChannelType[j].substr(1,ChannelType[j].length+1);
		  x++;
		  
		  if (eval('ChannelName[i].'+ChannelType[j]+'[3]')) {
		    DivStyle = 'style="display:block; visibility:visible;"';
		    var selectedDiv = 'Video_Table_' + ChannelName[i].name + ChannelID;
		  }
		  else
		  	DivStyle = "";
		  
	  	html_sl.push('<div id="Video_Table_', ChannelName[i].name, ChannelID, '" class="playlist_sl"',  DivStyle, ' onscroll="UpdateContent(this,\'', ChannelName[i].name, '\',', i, ', null,\'', ChannelType[j], '\');"></div>');
	  	CallBackFun = 'CallCallBack("' + ChannelName[i].name + '","' + ChannelType[j] + '", ' + i + ', function(done_2){ DivLoaddone = done_2; });';
	  	
	  	
	  	html_script.push(CallBackFun);
	                 //'<script type="text/javascript" src="http://gdata.youtube.com/feeds/api/users/', ChannelName[i].name, '/favorites?alt=json-in-script&callback=', ChanScriptName, '&max-results=10&orderby=published&start-index=1"></script>');
	              
	    html_pl.push('<div id="Video_', ChannelName[i].name, ChannelID, '" class="playlist_pl" onscroll="UpdateContent(this,\'', ChannelName[i].name, '\',', i, ', \'', ChannelName[i].name, '\', \'', ChannelType[j], '\');"></div>');
	    
	    if (ChannelName[i].channellist[0] == Seperator) {
	    	if (ChannelName[i].channellist[0] == 1) {
	        html_sel_sl.push('</optgroup>',
                           '<optgroup label="-------------- State Video Feeds --------------">');
          html_sel_pl.push('</optgroup>',
                           '<optgroup label="-------------- State Video Feeds --------------">');                           
        }          
        else if (ChannelName[i].channellist[0] == 2) {
	        html_sel_sl.push('</optgroup>',
                           '<optgroup label="------------ National Video Feeds -----------">');
          html_sel_pl.push('</optgroup>',
                           '<optgroup label="------------ National Video Feeds -----------">');
	      }
	      else if (ChannelName[i].channellist[0] == 3) {
	        html_sel_sl.push('</optgroup>',
                           '<optgroup label="-------------- Alternative News -------------">',
                           '<option value="', 1, '">The Intel Hub Radio Live</option>');
          html_sel_pl.push('</optgroup>',
                           '<optgroup label="-------------- Alternative News -------------">',
                           '<option value="', 1, '">The Intel Hub Radio Live</option>');
	      }
        Seperator++;
	    }
	    
	    if (eval('ChannelName[i].'+ChannelType[j]+'[3]')) { //onclick="toggleSelectBox(this, true)" onmouseout="toggleSelectBox(this, true)" onmouseover="toggleSelectBox(this, false)"
	    	html_sel_sl.unshift('<select id="VideoSelect" name="VideoPopSelect" style="height: 24px; width: 280px;" >',
	    	                    '<option value="', x, '" selected="selected">Select Your News Channel</option>');
	    	html_sel_sl.push('<option value="', x, '">', ChannelName[i].channellist[1], ' ', ChannelID_Up, '</option>');
	      html_sel_pl.push('<option value="', x, '" selected="selected">', ChannelName[i].channellist[1], ' ',  ChannelID_Up, '</option>');
	    }  
	    else {
        html_sel_sl.push('<option value="', x, '">', ChannelName[i].channellist[1], ' ',  ChannelID_Up, '</option>');
	      html_sel_pl.push('<option value="', x, '">', ChannelName[i].channellist[1], ' ',  ChannelID_Up, '</option>');
	    }  
	  }
	  ChannelType.length = 0;
  }
  html_sel_sl.push('</optgroup>',
                   '</select>');
  html_sel_pl.push('</optgroup>',
                   '</select>');

  document.getElementById('VideoSelect_sl').innerHTML = html_sel_sl.join('');
	document.getElementById('ChannelList_sl').innerHTML = html_sl.join('');

	_busy(null, true);
	makeDisable("ChannelList_sl", false);
  eval(html_script[0]);
  eval(html_script[1]);
  
	var TMR = setInterval(function() {
	  if (k < html_script.length){
	    if (!done) {
	      eval(html_script[k]);
	      done = true;
	      var div_style_sel = document.getElementById(selectedDiv).style;
	  	  if ((div_style_sel.display == "block") || (div_style_sel.display.visibility == "visible")) {
	  	  	showHideDiv(true, selectedDiv); //hide
	  	  }
	    }
	  
	    if(DivLoaddone) {
	  	  done = false;
	  	  DivLoaddone = false;
	  	  k++;
	    }	
    }
    else if (k == html_script.length) {
    	_busy(null, false);
    	makeDisable("ChannelList_sl", true);
    	showHideDiv(false, selectedDiv); //show
    	clearInterval(TMR);
    }
  }, 100);
}

//Choose ChannelName User Playlist
function chooselist (i) {
	var rta = [];
	var userlist = ChannelName_userlist[i][0] == "uploads" ?"" : ChannelName_userlist[i][0];
	var j = 0;
  
	switch(ChannelName_userlist[i][0]){
    case "uploads":
      j = 0;    
    break;
    case "playlists":
      j = 1;
    break;
    case "favorites":
      j = 2;
    break;
    case "subscriptions":
      j = 3;
    break;
    default : alert("No Channel List!");
  }
  rta.push(j, userlist);
  return rta;
}

//CallBack functions used by youtube
function ChanScriptGen(data) {
	var i = ChannelName_Element;
	var k = ChannelName_userlist[i][1];
	var rta = chooselist(i);
	var j = rta[0];
	var userlist = rta[1];

	document.getElementById('Video_Table_' + ChannelName[k].name + userlist).innerHTML += PlayList(data, "sl", ChannelName[k].name,  ChannelName_userlist[i][0], null).join('');
	ChannelName[k].vidpop[j] += PlayList(data, "pl", ChannelName[k].name,  ChannelName_userlist[i][0], j).join('');
	if (document.getElementById('Video_' + ChannelName[k].name + userlist))
	  document.getElementById('Video_' + ChannelName[k].name + userlist).innerHTML = ChannelName[k].vidpop[j];
	if(!UpdateChannel)
	  ChannelName_Element++;
}

function LIVE_PL(list) {
	var vidscript = null;
	var html = [];
	
	if (list == "sl")
    vidscript = 'vidotoplay(\''+ firstvideo[6] +'\',null,\'GOPLive\')';
  else if (list == "pl") 
    vidscript = 'loadLiveVideo()';
	
	html.push('<table id="Table_GOP_', list, '_Live" border="2" cellspacing="0" cellpadding="0" width="268" style="border-left-color:  rgb(0,0,0); border-left-style: solid; border-top-color:  rgb(0,0,0); border-top-style: solid; border-right-color:  rgb(0,0,0); border-right-style: solid; border-bottom-color:  rgb(0,0,0); border-bottom-style: solid; height: 122px;" class="collapsed">',
                 '<tr style="height: 24px;" class="navbar">',
                   '<td id="Cell_GOP_', list, '_Live" width="262" onclick="', vidscript,';" onmouseover="CC(\'Cell_GOP_', list, '_Live\',\'#B22222\',\'pointer\'); PlayOverlay();" onmouseout="CC(\'Cell_GOP_', list, '_Live\',\'#6994AA\',\'auto\'); UnTip();">',
                     '<p style="text-align: justify; margin-bottom: 0px;">Hopkins County Republican Party Live Video Feed</p>',
                   '</td>',
                 '</tr>',
                 '<tr style="height: 90px;">',
                   '<td>',
                     '<p style="margin-bottom: 0px;"><a href="javascript:;" onclick="', vidscript, ';" onmouseover="CC(\'Cell_GOP_', list, '_Live\',\'#B22222\',null); PlayOverlay();" onmouseout="CC(\'Cell_GOP_', list, '_Live\',\'#6994AA\',null); UnTip();"><img id="Picture_LIVE" height="120" width="120" src="/assets/images/GOP_LOGO_SM_C.gif" vspace="0" hspace="0" align="left" border="0" alt="" title=""></a>We will be running a live feed of our upcoming meetings and events when possible.</p>',
                   '</td>',
                 '</tr>',
               '</table>',
               '<table id="Table57" border="0" cellspacing="0" cellpadding="0" width="277" style="height: 4px;">',
                 '<tr style="height: 4px;">',
                   '<td width="277"></td>',
                 '</tr>',
               '</table>');
               
  return html;
}

function HCGOPLIVE() { 
  document.getElementById('Video_Table_HCLIVE').innerHTML = LIVE_PL("sl").join('');
  HCLIVE_VidPop = LIVE_PL("pl").join('');
}

function LIVE_FREEDOMLINK_PL(list) {
	var vidscript = null;
	var html = [];
	
	if (list == "sl")
    vidscript = 'vidotoplay(\''+ firstvideo[6] +'\',null,\'FreedomLinkLive\')';
  else if (list == "pl") 
    vidscript = 'loadFreedomLinkLiveAudio()';
	
	html.push('<table id="Table_FL_', list, '_Live" border="2" cellspacing="0" cellpadding="0" width="268" style="border-left-color:  rgb(0,0,0); border-left-style: solid; border-top-color:  rgb(0,0,0); border-top-style: solid; border-right-color:  rgb(0,0,0); border-right-style: solid; border-bottom-color:  rgb(0,0,0); border-bottom-style: solid; height: 122px;" class="collapsed">',
                 '<tr style="height: 24px;" class="navbar">',
                   '<td id="Cell_FL_', list, '_Live" width="262" onclick="', vidscript,';" onmouseover="CC(\'Cell_FL_', list, '_Live\',\'#B22222\',\'pointer\'); PlayOverlay();" onmouseout="CC(\'Cell_FL_', list, '_Live\',\'#6994AA\',\'auto\'); UnTip();">',
                     '<p style="text-align: justify; margin-bottom: 0px;">The Intel Hub Radio Live Feed</p>',
                   '</td>',
                 '</tr>',
                 '<tr style="height: 90px;">',
                   '<td>',
                     '<p style="margin-bottom: 0px;"><a href="javascript:;" onclick="', vidscript, ';" onmouseover="CC(\'Cell_FL_', list, '_Live\',\'#B22222\',null); PlayOverlay();" onmouseout="CC(\'Cell_FL_', list, '_Live\',\'#6994AA\',null); UnTip();"><img id="Picture_FL_LIVE" height="140" width="120" src="/assets/images/Intel-Hub-150.jpg" vspace="0" hspace="0" align="left" border="0" alt="" title=""></a>The Intel Hub Radio - A dynamic cutting edge radio network with a great selection of shows and guests. Topics range from current news and events to secret societies and the Global Banking Syndicate Agenda.<span style="font-size: 12px;"><br><br>Show Hosts: Shepard Ambellas, Bob Tuskin<br>Show Times: MON - THURS 8-10 pm EST<br><br>Show Hosts: Joe Joseph, A.C. Griffith and John King with Future News.<br>Show Times: FRI 8-10 pm EST & SUN 5-7 pm EST</span></p>',
                   '</td>',
                 '</tr>',
               '</table>',
               '<table id="Table57" border="0" cellspacing="0" cellpadding="0" width="277" style="height: 4px;">',
                 '<tr style="height: 4px;">',
                   '<td width="277"></td>',
                 '</tr>',
               '</table>');
               
  return html;
}

function FREEDOMLINKLIVE() { 
  document.getElementById('Video_Table_FLLIVE').innerHTML = LIVE_FREEDOMLINK_PL("sl").join('');
  FLLIVE_VidPop = LIVE_FREEDOMLINK_PL("pl").join('');
}

function displayscreen(html,whichDiv) {
	var popscreen=document.getElementById('popscreen');
	   
  cover();
  popscreen.innerHTML = html.join('');
  
  if (document.getElementById('cover').getElementsByTagName('iframe')[0] == null) {
    jsCreateModalIframe();
  }
  positionscreen(whichDiv);
}

//Set up http://www.addtoany.com share links on pop up video include script page.js file fix.
function sharelinks(video_id) {
  var sharesave = document.getElementById('share_save');
  
  if (typeof a2a == 'object') {
  	a2a.total = 0;
    a2a_config.linkurl = video_id;
    a2a.init();
  }  
  else {
  	a2a_config = a2a_config || {};
    a2a_config.linkname = "Check out the video I found on Hopkins County Republican Party's website:";
    a2a_config.linkurl = video_id;
  }
  
  if (sharesave.childNodes.length == 0) { 	
  	var img = document.createElement('img');
    img.src = 'http://www.hopkinscountygop.org/assets/images/share_button.jpg';
    img.setAttribute('width', '256px');
    img.setAttribute('height', '24px');
    img.title = 'Share/Bookmark';
    img.alt = 'Share/Bookmark';
    sharesave.appendChild(img);
  
    var fileName = document.createElement('script');
    fileName.src = "http://static.addtoany.com/menu/page.js";
    fileName.setAttribute("type","text/javascript");
    sharesave.appendChild(fileName);
  }
}

function _sharelinks(video_id) {
	var sharesave = document.getElementById('share_save');
	
	a2a_config.linkurl = video_id;
	if (sharesave.childNodes.length < 2)
	  sharelinks(video_id);
	else {
		a2a_config.vars.vars[2][1] = "Check out the video I found on Hopkins County Republican Party's website:";
    a2a_config.vars.vars[3][1] = video_id;
		a2a.init_show();
		a2a.make_once();
    a2a.init();
  } 
}

function vidotoplay(video,chan,list) {
	var html = [];
	var _video = "";
	var Link = "";
	var Embed = "";
	var index = 0;

	if (chan != null) {
    if (video instanceof Array)
		  var fvid = video[0];
	  else
	    var fvid = video;
	  Link = 'http://www.youtube.com/watch?v=' + fvid;
    Embed = '<object width=\'640\' height=\'385\'><param name=\'movie\' value=\'http://www.youtube.com/v/' + fvid + '?fs=1&hl=en_US\'></param><param name=\'allowFullScreen\' value=\'true\'></param><param name=\'allowscriptaccess\' value=\'always\'></param><embed src=\'http://www.youtube.com/v/' + fvid + '?fs=1&hl=en_US\' type=\'application/x-shockwave-flash\' allowscriptaccess=\'always\' allowfullscreen=\'true\' width=\'640\' height=\'385\'></embed></object>';
  }
  else if (list == 'GOPLive') {
    Link = 'http://www.stickam.com/hopkinscountygop';
    Embed = '<embed src=\'http://player.stickam.com/stickamPlayer/vo/178526287\' width=\'400\' height=\'340\' flashvars=\'autoPlay=1&autoMute=0\'type=\'application/x-shockwave-flash\' scale=\'noscale\' allowfullscreen=\'true\' allowscriptaccess=\'always\' />';
  }
  else if (list == 'FreedomLinkLive') {
    Link = 'http://theintelhubradio.com/listen-live-chat/';
    Embed = '<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\' width=\'210\' height=\'105\' name=\'113888\' id=\'113888\'>  <param name=\'movie\' value="http://www.blogtalkradio.com/btrplayer.swf?file=http://www.blogtalkradio.com%2Ftheintelhubnewsnetwork%2Fplay_list.xml&autostart=false&bufferlength=5&volume=80&corner=rounded&callback=http://www.blogtalkradio.com/flashplayercallback.aspx\' />  <param name=\'quality\' value=\'high\' />  <param name=\'wmode\' value="transparent\' />   <param name=\'menu\' value=\'false\' />  <param name=\'allowScriptAccess\' value=\'always\' /><embed src=\'http://www.blogtalkradio.com/btrplayer.swf\' flashvars=\'file=http://www.blogtalkradio.com%2ftheintelhubnewsnetwork%2fplay_list.xml&autostart=false&shuffle=false&callback=http://www.blogtalkradio.com/FlashPlayerCallback.aspx&width=210&height=105&volume=80&corner=rounded\' width=\'210\' height=\'105\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' quality=\'high\' wmode=\'transparent\' menu=\'false\' name=\'113888\' id=\'113888\' allowScriptAccess=\'always\'></embed></object><div style=\'font-size: 10px;text-align: center; width:220px;\'>Listen to <a href=\'http://www.blogtalkradio.com\'>internet radio</a> with <a href=\'http://www.blogtalkradio.com/theintelhubnewsnetwork\'>Intel News Network</a> on Blog Talk Radio</div>';
  }
  
	html.push('<table id="popscreenT" border="0" cellspacing="0" cellpadding="0">',
  '<tr valign="top" align="left">',
   '<td width="827">',
    '<table id="Table81" border="0" cellspacing="0" cellpadding="0" width="827" style="height: 372px;">',
     '<tr style="height: 31px;">',
      '<td colspan="2" align="right" style="background-image: url(\'/assets/images/GOP_News_Video_Header.jpg\');">',
       '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
        '<tr>',
         '<td align="right">',
           '<a href="javascript:stop_all();cover();" onMouseOver="onPictureRollover1A0740Over(this)" onMouseOut="onPictureRollover1A0740Out(this)"><img id="PictureRollover1" height="31" width="87" src="/assets/images/GOP_News_Video_Close_Off.jpg" border="0" name=PictureRollover1A0740></a>',
         '</td>',
        '</tr>',
       '</table>',
      '</td>',
     '</tr>',
     '<tr style="height: 341px;">',
      '<td width="541" style="background-color: rgb(255,255,255);" >',
        '<div id="youtubeplayer" style="display:block; visibility:visible;">',
      	'<div id="ytapiplayer">',
          'You need Flash player 8+ and JavaScript enabled to view this video.',
        '</div>',
        '</div>',
        '<div id="stickamplayer" style="display:none; background-color: rgb(0,0,0); width: 560px; height:340px; visibility:hidden;">',
          'Embedded stickam player live feed.',
        '</div>',
      '</td>',
      '<td valign="bottom" width="286" style="background-color: rgb(255,255,255);">',
       '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
        '<tr>',
         '<td align="center">',
          '<table border="0" cellspacing="0" cellpadding="0" width="286" style="background-color: rgb(192,192,192); height: 40px;">',
           '<tr align="left" valign="top">',
            '<td>',
             '<form name="VideoPopForm" action="" method="post">',
              '<table border="0" cellspacing="0" cellpadding="0" width="283">',
               '<tr valign="top" align="left">',
                '<td width="1" height="10"><img src="/assets/images/autogen/clearpixel.gif" width="24" height="1" border="0" alt=""></td>',
                '<td></td>',
               '</tr>',
               '<tr valign="top" align="left">',               
                 '<td width="283" id="VideoSelect_pl" name="VideoSelect_pl">',
                 '</td>',
                '</tr>',
               '</table>',
              '</form>',
             '</td>',
            '</tr>',
          '</table>',
         '</td>',
        '</tr>',
       '</table>',
       '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
        '<tr>',
         '<td align="center">',
          '<table id="Table53" border="0" cellspacing="0" cellpadding="0" width="286" style="height: 19px;">',
           '<tr style="height: 19px;">',
            '<td width="286" style="background-image: url(\'/assets/images/note_bg.jpg\'); background-repeat: no-repeat; background-position: bottom;" name="ChannelList_pl" id="ChannelList_pl">',
            '</td>',
           '</tr>',
          '</table>',
         '</td>',
        '</tr>',
       '</table>',
      '</td>',
     '</tr>',
    '</table>',
   '</td>',
  '</tr>',
 '</table>',
 '<table border="0" cellspacing="0" cellpadding="0" width="846">',
   '<tr valign="top" align="left">',
    '<td height="1"></td>',
   '</tr>',
   '<tr valign="top" align="left">',
    '<td height="83" width="846">',
     '<table border="0" cellspacing="0" cellpadding="0" width="846" style="background-color: rgb(190,190,190); background-image: url(\'../assets/images/Video_Pop_UP_Bottom.jpg\'); height: 83px;">',
      '<tr align="left" valign="top">',
       '<td>',
        '<form name="YouTubeCopyForm" action="" method="post">',
         '<table cellpadding="0" cellspacing="0" border="0" width="782">',
          '<tr valign="top" align="left">',
           '<td>',
            '<table border="0" cellspacing="0" cellpadding="0" width="61">',
             '<tr valign="top" align="left">',
              '<td width="4" height="20"><img src="../assets/images/autogen/clearpixel.gif" width="4" height="1" border="0" alt=""></td>',
              '<td width="57"><img src="../assets/images/autogen/clearpixel.gif" width="57" height="1" border="0" alt=""></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td></td>',
              '<td width="57" class="TextObject" style="background-color: transparent;">',
               '<p style="text-align: right; margin-bottom: 0px;"><b>Link: </b></p>',
              '</td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td colspan="2" height="12"></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td></td>',
              '<td width="57" class="TextObject" style="background-color: transparent;">',
               '<p style="text-align: right; margin-bottom: 0px;"><b>Embed: </b></p>',
              '</td>',
             '</tr>',
            '</table>',
           '</td>',
           '<td>',
            '<table border="0" cellspacing="0" cellpadding="0" width="721">',
             '<tr valign="top" align="left">',
              '<td width="3" height="18"><img src="../assets/images/autogen/clearpixel.gif" width="3" height="1" border="0" alt=""></td>',
              '<td></td>',
              '<td width="2"><img src="../assets/images/autogen/clearpixel.gif" width="2" height="1" border="0" alt=""></td>',
              '<td></td>',
              '<td width="35"><img src="../assets/images/autogen/clearpixel.gif" width="35" height="1" border="0" alt=""></td>',
              '<td></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td height="22"></td>',
              '<td width="368"><input type="hidden" name="copyArea" value><input type="text" id="GOPVideoLink" name="GOPVideoLink" size="46" maxlength="46" style="width: 364px; white-space: pre;" value="',Link,'"></td>',
              '<td></td>',
              '<td rowspan="2" width="57"><input type="button" id="Copy_Link" name="Copy_Link" value="Copy" onClick="ClipBoard(\'GOPVideoLink\');" style="height: 24px; width: 57px;"></td>',
              '<td colspan="2"></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td colspan="3" height="2"></td>',
              '<td colspan="2"></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td colspan="6" height="1"></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td colspan="5" height="3"></td>',
              '<td rowspan="3" width="256"><a href="http://www.addtoany.com/share_save" class="a2a_dd addtoany_share_save" id="share_save"></a></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td height="1"></td>',
              '<td rowspan="3" width="368"><input type="text" id="GOPVideoEmbed" name="GOPVideoEmbed" size="200" maxlength="46" style="width: 364px; white-space: pre;" value="',Embed,'"></td>',
              '<td colspan="3"></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td height="20"></td>',
              '<td></td>',
              '<td rowspan="3" width="57"><input type="button" id="Copy_Embed" name="Copy_Embed" value="Copy" onClick="ClipBoard(\'GOPVideoEmbed\');" style="height: 24px; width: 57px;"></td>',
              '<td></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td height="1"></td>',
              '<td></td>',
              '<td colspan="2"></td>',
             '</tr>',
             '<tr valign="top" align="left">',
              '<td colspan="3" height="3"></td>',
              '<td colspan="2"></td>',
             '</tr>',
            '</table>',
           '</td>',
          '</tr>',
         '</table>',
        '</form>',
       '</td>',
      '</tr>',
     '</table>',
    '</td>',
   '</tr>',
 '</table>');
	
	displayscreen(html,'popscreen');
	
	document.getElementById('VideoSelect_pl').innerHTML = html_sel_pl.join('');
	document.getElementById('ChannelList_pl').innerHTML = html_pl.join('');
	document.getElementById('Video_HCLIVE').innerHTML = HCLIVE_VidPop;
	document.getElementById('Video_FLLIVE').innerHTML = FLLIVE_VidPop;
	
	//Populate Playlist Divs
	for (var i = 0; i < ChannelName_userlist.length; i++) {
		var k = ChannelName_userlist[i][1];
		var rta = chooselist (i);
	  var j = rta[0];
	  var userlist = rta[1];
  	  	
 	  document.getElementById('Video_'+ChannelName[k].name+userlist).innerHTML = ChannelName[k].vidpop[j];
	}
	
	if (chan != null) {
	  if (video instanceof Array) {
	  	_video = video[0];
		  var elementChecker_ytplayer = setInterval(function() {  if (typeof ytplayer != 'undefined') {
			                                                          clearInterval(elementChecker_ytplayer);
			                                                          currentPlaylist.length = 0;
			                                                          currentPlaylist[0] = chan+'$'+list;
			                                                          currentPlaylist[1] = false;
			                                                          currentPlaylist[2] = video[0];
			                                                          currentPlaylist = currentPlaylist.concat(video);
			                                                          changeSpanText('PlaylistCurrentVideo$'+currentPlaylist[0], 1);
	                                                              loadArrayVideo(false);
	                                                            }
      },100);
    }
	  else {
		  _video = video;
	    var elementChecker_ytplayer = setInterval(function() {  if (typeof ytplayer != 'undefined') {
			                                                          clearInterval(elementChecker_ytplayer);
			                                                          currentPlaylist.length = 0;
			                                                          currentPlaylist[0] = chan;
			                                                          currentPlaylist[1] = list;
	                                                              loadArrayVideo(true);
	                                                            }
      },100);
	  }
	  embedVideo(_video);
  }
  else if(list == 'GOPLive')
    loadLiveVideo();
  else if (list == 'FreedomLinkLive')
  	loadFreedomLinkLiveAudio();
  
  if (document.forms["VideoForm"]["VideoSelect"].selectedIndex == 0)
    index = 1;
  else
  	index = document.forms["VideoForm"]["VideoSelect"].selectedIndex-1;
  	
	document.forms["VideoPopForm"]["VideoPopSelect"].options[index].selected = true;
	getVideovalues(document.forms["VideoPopForm"]["VideoPopSelect"], "pl", true);
  sharelinks(Link);	
}	

function _vidotoplay(video) {
	var html = [];
	
	html.push('<p align="right"><input type="button" onclick="javascript:cover();" value="Close" /><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/',  video,  '"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/', video, '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340" wmode="window"></embed></object></p>');
  displayscreen(html);
}

window.onscroll = function() {
  positionscreen('popscreen');
}

function changeSpanText(id, txt) {
	var elm =	document.getElementById(id);
	if (elm != null) {
	  elm.removeChild(elm.childNodes[0]);
	  elm.appendChild(document.createTextNode(txt));
	}  
}	

function showHideDiv(hide, idDiv) {
	var whichDiv = "";
	
	if (typeof idDiv == "object")
	  whichDiv = idDiv;
	else
	  whichDiv = document.getElementById(idDiv); 
	
	whichDiv.style.display = (hide == true? "none" : "block");
  whichDiv.style.visibility = (hide == true? "hidden" :"visible");
  
  return whichDiv;
}

function getVideovalues(MenuItem, list, init) {
	var ChannelID = "";
  var chosenoption=MenuItem.options[MenuItem.selectedIndex];
  var VideoSel=chosenoption.value;
  var whichDiv = "";
  var HCGOPLIVE = "";
  var j = 0;

  if (list == "pl") {//Pop video player list
    HCGOPLIVE = "Video_HCLIVE";
    FLLIVE = "Video_FLLIVE";
  }
  else {  
    HCGOPLIVE = "Video_Table_HCLIVE";
    FLLIVE = "Video_Table_FLLIVE";
  }  
  
  showHideDiv(true, HCGOPLIVE); //hide
  showHideDiv(true, FLLIVE); //hide
  
  for (var i = 0; i < ChannelName_userlist.length; i++) {
  	var k = ChannelName_userlist[i][1];
  	ChannelID = ChannelName_userlist[i][0] == "uploads" ?"" : ChannelName_userlist[i][0];
  	j = i + 2;
  	
    if (list == "pl") //Pop video player list	
  	  whichDiv = "Video_" + ChannelName[k].name + ChannelID;  	  
    else 
      whichDiv = "Video_Table_" + ChannelName[k].name + ChannelID;

    showHideDiv(true, whichDiv);   //hide
    
    if (VideoSel == j) {
    	showHideDiv(false, whichDiv); //show
    	if(init)
    		document.getElementById("Video_" + ChannelName[k].name + ChannelID).scrollTop = document.getElementById("Video_Table_" + ChannelName[k].name + ChannelID).scrollTop;
    }
    else if (VideoSel == 0) {
    	showHideDiv(false, HCGOPLIVE); //show
    }
    else if (VideoSel == 1) {
    	showHideDiv(false, FLLIVE); //show
    }
  } 
}

//Feedback pop up form
function feedback() {
	var html = [];
	
	html.push('<table style="margin: 0 auto;" border="0" cellspacing="0" cellpadding="0">',
     '<tr valign="top" align="left">',
      '<td width="500">',
       '<table id="Table81" border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 372px;">',
        '<tr style="height: 31px;">',
         '<td align="right" width="500" style="background-image: url(\'../assets/images/Feedback_Header.jpg\');">',
          '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
           '<tr>',
            '<td align="right">',
              '<a href="javascript:cover();" onMouseOver="onPictureRollover1A0413Over(this)" onMouseOut="onPictureRollover1A0413Out(this)"><img id="PictureRollover1" height="31" width="87" src="../GOP_News_Video_Close_Off.jpg" border="0" name=PictureRollover1A0413></a>',
            '</td>',
           '</tr>',
          '</table>',
         '</td>',
        '</tr>',
        '<tr style="height: 350px;">',
         '<td style="background-color: rgb(255,255,255);">',
          '<table width="500" border="0" cellspacing="0" cellpadding="0" align="left">',
           '<tr>',
            '<td>',
             '<table border="0" cellspacing="0" cellpadding="0" width="500" style="background-image: url(\'../assets/images/note_bg.jpg\'); background-repeat: repeat-x; background-position: bottom; height: 350px;">',
              '<tr align="left" valign="top">',
               '<td>',
                '<form name="Feedback" action="/assets/scripts/ContactForm.php" method="post" onSubmit="return __fv1_Feedback(this)">',
                 '<table border="0" cellspacing="0" cellpadding="0">',
                  '<tr valign="top" align="left">',
                   '<td width="25" height="11"><img src="../assets/images/autogen/clearpixel.gif" width="25" height="1" border="0" alt=""></td>',
                   '<td></td>',
                  '</tr>',
                  '<tr valign="top" align="left">',
                   '<td></td>',
                   '<td width="466">',
                    '<table id="Table84" border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 147px;">',
                     '<tr style="height: 29px;">',
                      '<td width="175">',
                       '<table width="149" border="0" cellspacing="0" cellpadding="0" align="left">',
                        '<tr>',
                         '<td class="TextObject">',
                          '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">First Name:</span></b></p>',
                         '</td>',
                        '</tr>',
                       '</table>',
                       '&nbsp;</td>',
                      '<td width="291">',
                       '<p style="margin-bottom: 0px;"><input type="hidden" id="whichform" name="whichform" value="Feedback"><input type="text" id="firstname" name="firstname" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                      '</td>',
                     '</tr>',
                     '<tr style="height: 29px;">',
                      '<td>',
                       '<table width="149" border="0" cellspacing="0" cellpadding="0" align="left">',
                        '<tr>',
                         '<td class="TextObject">',
                          '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Last Name:</span></b></p>',
                         '</td>',
                        '</tr>',
                       '</table>',
                       '&nbsp;</td>',
                      '<td>',
                       '<p style="margin-bottom: 0px;"><input type="text" id="lastname" name="lastname" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                      '</td>',
                     '</tr>',
                     '<tr style="height: 29px;">',
                      '<td>',
                       '<table width="149" border="0" cellspacing="0" cellpadding="0" align="left">',
                        '<tr>',
                         '<td class="TextObject">',
                          '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Email Address:</span></b></p>',
                         '</td>',
                        '</tr>',
                       '</table>',
                       '&nbsp;</td>',
                      '<td>',
                       '<p style="margin-bottom: 0px;"><input type="text" id="email" name="email" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                      '</td>',
                     '</tr>',
                     '<tr style="height: 29px;">',
                      '<td>',
                       '<table width="149" border="0" cellspacing="0" cellpadding="0" align="left">',
                        '<tr>',
                         '<td class="TextObject">',
                          '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Phone Number:</span></b></p>',
                         '</td>',
                        '</tr>',
                       '</table>',
                       '&nbsp;</td>',
                     '<td>',
                       '<p style="margin-bottom: 0px;"><input type="text" id="phone" name="phone" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                      '</td>',
                     '</tr>',
                     '<tr style="height: 30px;">',
                      '<td>',
                       '<table width="149" border="0" cellspacing="0" cellpadding="0" align="left">',
                        '<tr>',
                         '<td class="TextObject">',
                          '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Subject:</span></b></p>',
                         '</td>',
                        '</tr>',
                       '</table>',
                       '&nbsp;</td>',
                      '<td>',
                       '<p style="margin-bottom: 0px;">',
                        '<select id="subject" name="subject" style="height: 24px;" class="formInputText">',
                         '<option value="0" selected="selected">Select</option>',
                         '<option value="Technical Issue">Technical Issue</option>',
                         '<optgroup label="------- Grammar Issue --------">',
                         '<option value="Words Misspelled">- Words Misspelled</option>',
                         '<option value="Punctuation">- Punctuation</option>',
                         '<option value="Other Grammar Issue">- Other</option>',
                         '<optgroup label="------ Video/Audio Issue ------">',
                         '<option value="Broken Audio">- Broken Audio</option>',
                         '<option value="Video problems">- Video problems</option>',
                         '<option value="Other Video/Audio Issue">- Other</option>',
                        '</select>',
                       '</p>',
                      '</td>',
                     '</tr>',
                    '</table>',
                   '</td>',
                  '</tr>',
                 '</table>',
                 '<table cellpadding="0" cellspacing="0" border="0" width="480">',
                  '<tr valign="top" align="left">',
                   '<td>',
                    '<table border="0" cellspacing="0" cellpadding="0" width="174">',
                     '<tr valign="top" align="left">',
                      '<td width="25" height="3"><img src="../assets/images/autogen/clearpixel.gif" width="25" height="1" border="0" alt=""></td>',
                      '<td width="149"><img src="../assets/images/autogen/clearpixel.gif" width="149" height="1" border="0" alt=""></td>',
                     '</tr>',
                     '<tr valign="top" align="left">',
                     '<td></td>',
                      '<td width="149" class="TextObject">',
                       '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Feedback:</span></b></p>',
                      '</td>',
                     '</tr>',
                    '</table>',
                   '</td>',
                   '<td>',
                    '<table border="0" cellspacing="0" cellpadding="0" width="306">',
                     '<tr valign="top" align="left">',
                      '<td width="25" height="3"><img src="../assets/images/autogen/clearpixel.gif" width="25" height="1" border="0" alt=""></td>',
                      '<td></td>',
                     '</tr>',
                     '<tr valign="top" align="left">',
                      '<td height="118"></td>',
                      '<td width="281"><textarea id="message" name="message" wrap="virtual" rows="7" cols="33" style="width: 277px; white-space: normal;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></textarea></td>',
                     '</tr>',
                    '</table>',
                   '</td>',
                  '</tr>',
                 '</table>',
                 '<table border="0" cellspacing="0" cellpadding="0">',
                  '<tr valign="top" align="left">',
                   '<td width="156" height="22"><img src="../assets/images/autogen/clearpixel.gif" width="156" height="1" border="0" alt=""></td>',
                   '<td></td>',
                  '</tr>',
                  '<tr valign="top" align="left">',
                   '<td></td>',
                  '<td width="190">',
                    '<table id="Table83" border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 50px;">',
                    '<tr style="height: 50px;">',
                      '<td width="190" >',
                       '<a href="javascript:document.Feedback.submit();" class="FEEDBACK" onclick="return __fv1_Feedback(document.forms[\'Feedback\']);"></a>',
                      '</td>',
                     '</tr>',
                    '</table>',
                   '</td>',
                  '</tr>',
                 '</table>',
                '</form>',
               '</td>',
              '</tr>',
             '</table>',
            '</td>',
           '</tr>',
          '</table>',
         '</td>',
        '</tr>',
       '</table>',
     '</td>',
   '</tr>',
  '</table>');
  
	displayscreen(html,'popscreen');
}

//slide out Extras DIV
function sed() {
	var obj = document.getElementById('Extras_Div');
	
	if (extrasout) {
	  if (moveextrasdiv == -88) {
	  	extrasout = false;
	    clearTimeout(timer_extras);
	  }  
	  else {
	  	moveextrasdiv -= 4;
	  	obj.style.right = moveextrasdiv+'px';
	  	timer_extras = setTimeout ("sed();", 1);
	  }	
	} 	
	else {
	 	if (moveextrasdiv == 168) {
	  	extrasout = true;
	    clearTimeout(timer_extras);
	  }  
	  else {
	  	moveextrasdiv += 4;
	  	obj.style.right = moveextrasdiv+'px';
	  	timer_extras = setTimeout ("sed();", 1);
	  }	
	} 	  
}

//Used with shoutbox pop up form
function smiley(img) {
		document.Shoutbox.message.value += ' ' + img + ' ';
}

//Shoutbox pop up form
function shoutbox() {
	var urlpath = window.location;
	var html = [];
	var extrastufftable = null;
	var whichclass = null;
	var j=0;
	
	var smilies_find=[
	":-",
	":)",
	":|",
	":(",
	":O",
	";)" ,
	":P",
	":D",
	":!",
	"8)",
	":@",
	"=)",
	":>",
	":X",
	":`(",
	":IN LOVE:",
	"@}->--",
	"]:>",
	"O)",
	":{}",
	":*",
	":THUMBS UP:"];
  
  var smilies_replace=[
  "/assets/phshoutbox/smilies/22.png",
	"/assets/phshoutbox/smilies/01.png",
	"/assets/phshoutbox/smilies/02.png",
	"/assets/phshoutbox/smilies/03.png",
	"/assets/phshoutbox/smilies/04.png",
	"/assets/phshoutbox/smilies/05.png",
	"/assets/phshoutbox/smilies/06.png",
	"/assets/phshoutbox/smilies/07.png",
	"/assets/phshoutbox/smilies/08.png",
	"/assets/phshoutbox/smilies/09.png",
	"/assets/phshoutbox/smilies/10.png",
	"/assets/phshoutbox/smilies/11.png",
	"/assets/phshoutbox/smilies/12.png",
	"/assets/phshoutbox/smilies/13.png",
	"/assets/phshoutbox/smilies/14.png",
	"/assets/phshoutbox/smilies/15.png",
	"/assets/phshoutbox/smilies/16.png",
	"/assets/phshoutbox/smilies/17.png",
	"/assets/phshoutbox/smilies/18.png",
	"/assets/phshoutbox/smilies/19.png",
	"/assets/phshoutbox/smilies/20.png",
	"/assets/phshoutbox/smilies/21.png"];
	
	extrastufftable = '<table align="center" class="table" width="100%">'+
		'<tr>'+
			'<td colspan="2" align="center" class="table_header">phShoutBox Smilies:</td>'+
		'</tr>';
		
		for (var i = 0; i < smilies_find.length; i++) {
			j++;
			if (j == 3)
			  j = 1;
			whichclass = (j == 1) ? "1" : "2";
			extrastufftable += '<tr>'+
				'<td width="70%" title="Click To Use" align="center" class="table_alt'+whichclass+'" onmouseover="this.style.cursor=\'pointer\';" onclick="smiley(\''+smilies_find[i]+'\');">'+smilies_find[i]+'</td>'+
				'<td width="30%" align="center" class="table_alt'+whichclass+'"><a href="javascript:smiley(\''+smilies_find[i]+'\');"><img style="border:0px;" src="'+smilies_replace[i]+'" alt="Click To Use" /></a></td>'+
			'</tr>';
		}
		extrastufftable += '<tr>'+
			'<td colspan="2" align="center" class="table_header">phShoutBox Code:</td>'+
		'</tr>'+
		'<tr>'+
			'<td colspan="2" align="center" class="table_alt1">[b]<b>Bold</b>[/b]</td>'+
		'</tr>'+
		'<tr>'+
			'<td colspan="2" align="center" class="table_alt2">[i]<i>Italics</i>[/i]</td>'+
		'</tr>'+
		'<tr>'+
			'<td colspan="2" align="center" class="table_alt1">[u]<u>Underline</u>[/u]</td>'+
		'</tr>'+
		'<tr>'+
			'<td colspan="2" align="center" class="table_alt2">[move]<marquee>Move</marquee>[/move]</td>'+
		'</tr>'+
		'<tr>'+
			'<td colspan="2" align="center" class="table_alt1">[color=red]<span style="color:red">Red</span>[/color]</td>'+
		'</tr>'+
		'<tr>'+
			'<td colspan="2" align="center" class="form_bottom">&copy;<a href="http://www.phphq.net/?script=phShoutBox" target="_blank" title="Powered By phShoutBox &lt;www.phphq.net&gt;" class="alt"><b>phShoutBox</b></a></td>'+
		'</tr>'+
	'</table>';
	
	html.push('<table style="margin: 0 auto;" border="0" cellspacing="0" cellpadding="0">',
   '<tr valign="top" align="left">',
    '<td width="500">',
     '<table id="Table81" border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 362px;">',
      '<tr style="height: 31px;">',
       '<td align="right" width="500" style="background-image: url(\'../assets/images/SHOUTBOX_Header.jpg\');">',
        '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
         '<tr>',
          '<td align="right">',
             '<a href="javascript:cover();" onMouseOver="onPictureRollover1A0413Over(this)" onMouseOut="onPictureRollover1A0413Out(this)"><img id="PictureRollover1" height="31" width="87" src="../GOP_News_Video_Close_Off.jpg" border="0" name=PictureRollover1A0413></a></td>',
         '</tr>',
        '</table>',
       '</td>',
      '</tr>',
      '<tr style="height: 362px;">',
       '<td style="background-color: rgb(255,255,255);">',
        '<table width="500" border="0" cellspacing="0" cellpadding="0" align="left">',
         '<tr>',
          '<td>',
           '<table border="0" cellspacing="0" cellpadding="0" width="500" style="background-image: url(\'../assets/images/note_bg.jpg\'); background-repeat: repeat-x; background-position: bottom; height: 362px;">',
            '<tr align="left" valign="top">',
             '<td>',
              '<form name="Shoutbox" action="/assets/scripts/ContactForm.php" method="post" onSubmit="return __fv1_Shoutbox(this)">',
               '<table border="0" cellspacing="0" cellpadding="0">',
                '<tr valign="top" align="left">',
                 '<td width="25" height="11"><img src="../assets/images/autogen/clearpixel.gif" width="25" height="1" border="0" alt=""></td>',
                 '<td></td>',
                '</tr>',
                '<tr valign="top" align="left">',
                 '<td></td>',
                 '<td width="466">',
                  '<table id="Table84" border="0" cellspacing="0" cellpadding="0" width="466" style="height: 281px;">',
                   '<tr style="height: 27px;">',
                    '<td width="149">',
                     '<table width="102" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">First Name:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td width="317">',
                     '<p style="margin-bottom: 0px;"><input type="hidden" id="whichform" name="whichform" value="ShoutBox"><input type="hidden" id="whichurl" name="whichurl" value="'+urlpath+'"><input type="text" id="firstname" name="firstname" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="100" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Last Name:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text" id="lastname" name="lastname" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="129" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Email Address:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text" id="email" name="email" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="133" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Phone Number:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text" id="phone" name="phone" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="82" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Address:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text" id="addr1" name="addr1" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="81" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">City:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text" id="city" name="city" size="20" maxlength="75" style="width: 156px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 28px;">',
                    '<td>',
                     '<table width="77" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">State:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;">',
                      '<select id="state" name="state" style="height: 24px;" class="formInputText">',
                       '<option value="" selected="selected">Select State</option>',
                       '<option value="AK">Alaska</option>',
                       '<option value="AL">Alabama</option>',
                       '<option value="AR">Arkansas</option>',
                       '<option value="AS">American Samoa</option>',
                       '<option value="AZ">Arizona</option>',
                       '<option value="CA">California</option>',
                       '<option value="CO">Colorado</option>',
                       '<option value="CT">Connecticut</option>',
                       '<option value="DC">District of Columbia</option>',
                       '<option value="DE">Delaware</option>',
                       '<option value="FL">Florida</option>',
                       '<option value="GA">Georgia</option>',
                       '<option value="GU">Guam</option>',
                       '<option value="HI">Hawaii</option>',
                       '<option value="IA">Iowa</option>',
                       '<option value="ID">Idaho</option>',
                       '<option value="IL">Illinois</option>',
                       '<option value="IN">Indiana</option>',
                       '<option value="KS">Kansas</option>',
                       '<option value="KY">Kentucky</option>',
                       '<option value="LA">Louisiana</option>',
                       '<option value="MA">Massachusetts</option>',
                       '<option value="MD">Maryland</option>',
                       '<option value="ME">Maine</option>',
                       '<option value="MI">Michigan</option>',
                       '<option value="AE">Military Post Office</option>',
                       '<option value="MN">Minnesota</option>',
                       '<option value="MO">Missouri</option>',
                       '<option value="MP">Northern Mariana Isl</option>',
                       '<option value="MS">Mississippi</option>',
                       '<option value="MT">Montana</option>',
                       '<option value="NA">National</option>',
                       '<option value="NC">North Carolina</option>',
                       '<option value="ND">North Dakota</option>',
                       '<option value="NE">Nebraska</option>',
                       '<option value="NH">New Hampshire</option>',
                       '<option value="NJ">New Jersey</option>',
                       '<option value="NM">New Mexico</option>',
                       '<option value="NV">Nevada</option>',
                       '<option value="NY">New York</option>',
                       '<option value="OH">Ohio</option>',
                       '<option value="OK">Oklahoma</option>',
                       '<option value="OR">Oregon</option>',
                       '<option value="PA">Pennsylvania</option>',
                       '<option value="PR">Puerto Rico</option>',
                       '<option value="RI">Rhode Island</option>',
                       '<option value="SC">South Carolina</option>',
                       '<option value="SD">South Dakota</option>',
                       '<option value="TN">Tennessee</option>',
                       '<option value="TX">Texas</option>',
                       '<option value="UT">Utah</option>',
                       '<option value="VA">Virginia</option>',
                       '<option value="VI">Virgin Islands</option>',
                       '<option value="VT">Vermont</option>',
                       '<option value="WA">Washington</option>',
                       '<option value="WI">Wisconsin</option>',
                       '<option value="WV">West Virginia</option>',
                       '<option value="WY">Wyoming</option>',
                      '</select>',
                     '</p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="84" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Zip Code:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text" id="ZipShoutBox" name="Zip5" size="8" maxlength="5" style="width: 60px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td>',
                     '<table width="87" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Web Site:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '&nbsp;</td>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="hidden" id="whichform" name="whichform" value="ShoutBox"><input type="text" id="url" name="url" size="35" maxlength="50" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                   '<tr style="height: 27px;">',
                    '<td valign="top">',
                     '<table width="88" border="0" cellspacing="0" cellpadding="0" align="left">',
                      '<tr>',
                       '<td class="TextObject">',
                        '<p style="margin-bottom: 0px;"><b><span style="font-family: Georgia, Palatino, \'Times New Roman\', Times, Serif;">Comment:</span></b></p>',
                       '</td>',
                      '</tr>',
                     '</table>',
                     '<table width="64" border="0" cellspacing="0" cellpadding="0" align="left">',
                     '<tr>',
                       '<td>',
                         '<table id="Table93" border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 20px;">',
                           '<tr style="height: 20px;">',
                             '<td width="64" ><a href="javascript:sed();" class="SHOUTBOXEXTRAS"></a></td>',
                           '</tr>',
                         '</table>',
                        '</td>',
                       '</tr>',
                     '</table>',
                    '<td>',
                     '<p style="margin-bottom: 0px;"><input type="text"  id="message" name="message" size="35" maxlength="256" style="width: 276px; white-space: pre;" class="formInputText" onMouseover="this.focus();this.select();this.style.backgroundColor=\'#ABBFD0\'" onMouseout="this.style.backgroundColor=\'#6994AA\';"></p>',
                    '</td>',
                   '</tr>',
                  '</table>',
                 '</td>',
                '</tr>',
               '</table>',
               '<table border="0" cellspacing="0" cellpadding="0">',
                '<tr valign="top" align="left">',
                 '<td width="156" height="20"><img src="../assets/images/autogen/clearpixel.gif" width="156" height="1" border="0" alt=""></td>',
                 '<td></td>',
                '</tr>',
                '<tr valign="top" align="left">',
                 '<td></td>',
                 '<td width="190">',
                  '<table id="Table83" border="0" cellspacing="0" cellpadding="0" width="190" style="height: 50px;">',
                   '<tr style="height: 50px;">',
                    '<td width="190" ><a href="javascript:document.Shoutbox.submit();" class="FEEDBACK" onclick="return __fv1_Shoutbox(document.forms[\'Shoutbox\']);"></a>',
                    '</td>',
                   '</tr>',
                  '</table>',
                 '</td>',
                '</tr>',
               '</table>',
              '</form>',
             '</td>',
            '</tr>',
           '</table>',
          '</td>',
         '</tr>',
        '</table>',
       '</td>',
      '</tr>',
     '</table>',
    '</td>',
   '</tr>',
  '</table>',
   '<div id="Extras_Div" class="ExtrasDiv">',
    '<table border="0" cellspacing="0" cellpadding="0">',
     '<tr valign="top" align="left">',
      '<td width="250"><div id="extras">',
       '<table id="Table87" border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 372px;">',
        '<tr style="height: 31px;">',
         '<td align="right" width="250" style="background-image: url(\'../assets/images/Extras_Header.jpg\');">',
          '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
           '<tr>',
            '<td align="right">',
             '<a href="javascript:sed();" onMouseOver="onPictureRollover2A0663Over(this)" onMouseOut="onPictureRollover2A0663Out(this)"><img id="PictureRollover2" height="31" width="87" src="../GOP_News_Video_Close_Off.jpg" border="0" name=PictureRollover2A0663></a></td>',
           '</tr>',
          '</table>',
         '</td>',
        '</tr>',
        '<tr style="height: 362px;">',
         '<td style="background-color: rgb(255,255,255);">',
          '<table width="250" border="0" cellspacing="0" cellpadding="0" align="left">',
           '<tr>',
            '<td>',
             '<table border="0" cellspacing="0" cellpadding="0" width="250" style="background-image: url(\'../assets/images/note_bg.jpg\'); background-repeat: repeat-x; background-position: bottom; height: 362px;">',
              '<tr align="left" valign="top">',
               '<td>',
                '<table border="0" cellspacing="0" cellpadding="0">',
                 '<tr valign="top" align="left">',
                  '<td width="250">',
                   '<div id="Extra_Smiles" class="ExtraSmiles">',
                    extrastufftable,
                   '</div>',
                  '</td>',
                 '</tr>',
                '</table>',
               '</td>',
              '</tr>',
             '</table>',
            '</td>',
           '</tr>',
          '</table>',
         '</td>',
        '</tr>',
       '</table>',
      '</td>',
     '</tr>',
    '</table>',
   '</div>');
	displayscreen(html,'popscreen');
	//InitQueryCode('Zip5', './assets/scripts/LookupZips.php?q=', 'DivZip5');
}

//Current News pop up form
function currentnewsbox(TheURL) {
	var html = [];
	
	html.push('<table border="0" cellspacing="0" cellpadding="0">',
   '<tr valign="top" align="left">',
    '<td width="951">',
     '<table id="Table81" border="0" cellspacing="0" cellpadding="0" width="500" style="height: 372px;">',
      '<tr style="height: 31px;">',
       '<td align="right" width="951" style="background-image: url(\'../assets/images/Current_News_Header.jpg\');">',
        '<table width="100%" border="0" cellspacing="0" cellpadding="0">',
         '<tr>',
          '<td align="right">',
          '<a href="javascript:cover();" onMouseOver="onPictureRollover1A0864Over(this)" onMouseOut="onPictureRollover1A0864Out(this)"><img id="PictureRollover1" height="31" width="87" src="../GOP_News_Video_Close_Off.jpg" border="0" name=PictureRollover1A0864></a></td>',
         '</tr>',
         '</table>',
       '</td>',
      '</tr>',
      '<tr style="height: 521px;">',
       '<td style="background-color: rgb(255,255,255);">',
        '<table width="951" border="0" cellspacing="0" cellpadding="0" align="left">',
         '<tr>',
          '<td>',
           '<table border="0" cellspacing="0" cellpadding="0" width="951" style="background-image: url(\'../assets/images/note_bg.jpg\'); background-repeat: repeat-x; background-position: bottom; height: 521px;">',
            '<tr align="left" valign="top">',
             '<td>',
              '<table border="0" cellspacing="0" cellpadding="0" width="951">',
               '<tr valign="top" align="left">',
                '<td height="521" width="951"><iframe id="CurrentNewsBox" name="CurrentNewsBox" src="'+TheURL+'" width="951" height="521" frameborder="0"></iframe></td>',
                '</tr>',
              '</table>',
             '</td>',
            '</tr>',
           '</table>',
          '</td>',
         '</tr>',
        '</table>',
       '</td>',
      '</tr>',
     '</table>',
    '</td>',
   '</tr>',
  '</table>');
  
  displayscreen(html,'popscreen');
}	

//Close Button on Pop Up Video, Feedback & Shoutbox roll over
function onPictureRollover1A0740Over() { 	document.PictureRollover1A0740.src='/assets/images/GOP_News_Video_Close_On.jpg'; }
function onPictureRollover1A0740Out() { 	document.PictureRollover1A0740.src='/assets/images/GOP_News_Video_Close_Off.jpg'; }
function onPictureRollover1A0413Over() { 	document.PictureRollover1A0413.src='/assets/images/GOP_News_Video_Close_On.jpg'; }
function onPictureRollover1A0413Out() { 	document.PictureRollover1A0413.src='/assets/images/GOP_News_Video_Close_Off.jpg'; }
function onPictureRollover2A0663Over() { document.PictureRollover2A0663.src='/assets/images/GOP_News_Video_Close_On.jpg'; }
function onPictureRollover2A0663Out() { document.PictureRollover2A0663.src='/assets/images/GOP_News_Video_Close_Off.jpg'; }
function onPictureRollover1A0864Over() { document.PictureRollover1A0864.src='/assets/images/GOP_News_Video_Close_On.jpg'; }
function onPictureRollover1A0864Out() { document.PictureRollover1A0864.src='/assets/images/GOP_News_Video_Close_Off.jpg'; }

//Sliding Feedback button roll over
function onPictureRollover1A413230Over() { document.PictureRollover1A413230.src='/assets/images/Feedback_Button_OUT.gif'; }
function onPictureRollover1A413230Out() { document.PictureRollover1A413230.src='/assets/images/Feedback_Button_IN.gif'; }

//Feedback form check
function __fv1_Feedback(form) {
  var args = {
    "message":[["NOF_isRequired", [''], "Please enter a feedback message.", "", "inputErrorField"]],
    "firstname":[["NOF_isRequired", [''], "Please enter your frist name.", "", "inputErrorField"]],
    "lastname":[["NOF_isRequired", [''], "Please enter your last name.", "", "inputErrorField"]],
    "email":[["NOF_isEmailAddress", [''], "Please enter a valid email address.", "", "inputErrorField"], ["NOF_isRequired", [''], "Please enter a valid email address.", "", "inputErrorField"]],
    "phone":[["NOF_isPhoneNumber", ['ddd-ddd-dddd'], "Please enter a valid phone number. Example: 123-456-7890", "", "inputErrorField"]],
    "subject":[["NOF_isRequired", [''], "Please select a submect for the feedback message.", "", "inputErrorField"]]
  };
  return NOF_validateForm(form, args, true, null,'Please correct the following errors:');
}

//Shoutbox form check
function __fv1_Shoutbox(form) {
  var args = {
    "firstname":[["NOF_isRequired", [''], "Please enter your frist name.", "", "inputErrorField"]],
    "lastname":[["NOF_isRequired", [''], "Please enter your last name.", "", "inputErrorField"]],
    "email":[["NOF_isEmailAddress", [''], "Please enter a valid email address.", "", "inputErrorField"], ["NOF_isRequired", [''], "Please enter a valid email address.", "", "inputErrorField"]],
    "phone":[["NOF_isPhoneNumber", ['ddd-ddd-dddd'], "Please enter a valid phone number. Example: 123-456-7890", "", "inputErrorField"]],
    "addr1":[["NOF_isRequired", [''], "Please enter your primary contact address.", "", "inputErrorField"]],
    "city":[["NOF_isRequired", [''], "Please enter your city.", "", "inputErrorField"]],
    "state":[["NOF_isRequired", [''], "Please select your state.", "", "inputErrorField"]],
    "ZipShoutBox":[["NOF_isRequired", [''], "Please enter a valid zip code.", "", "inputErrorField"], ["NOF_isNumber", [''], "Please enter a valid zip code.", "", "inputErrorField"]],
    "message":[["NOF_isRequired", [''], "Please enter a comment for the SHOUTBOX.", "", "inputErrorField"]]
  };
  return NOF_validateForm(form, args, true, null,'Please correct the following errors:');
}
