var myimages = new Array();

function toggle_tabs()
{
  var args = toggle_tabs.arguments.length;
  if (args < 2)
  {
    return false;
  }
  else
  {
    target = document.getElementById(toggle_tabs.arguments[0]);
    target.style.display = "";
    
    for (x = 1; x < toggle_tabs.arguments.length; x++)
    {
      target = document.getElementById(toggle_tabs.arguments[x]);
      target.style.display = "none";
    }
  }
  return false;
}

function tx_scroll_left() {
    if (tx_cur_first != tx_first) {
        tx_cur_first -= 1;
        nav_id1 = document.getElementById('tx_a'+tx_cur_first);
        setTimeout("nav_id1.style.display = '';", 350);
        nav_id2 = document.getElementById('tx_a'+tx_cur_last);
        setTimeout("nav_id2.style.display = 'none';", 350);
        tx_cur_last -= 1;
        tx_action = setTimeout("tx_scroll_left()", 350);
    }
}
function tx_scroll_right() {
    if (tx_cur_last != tx_last) {
        nav_id1 = document.getElementById('tx_a' + tx_cur_first);
        setTimeout("nav_id1.style.display = 'none';", 350);
        tx_cur_first += 1;
        tx_cur_last += 1;
        nav_id2 = document.getElementById('tx_a' + tx_cur_last);
        setTimeout("nav_id2.style.display = '';", 350);
        tx_action = setTimeout("tx_scroll_right()", 350);
    }
}

function tx_clear() {
    clearTimeout(tx_action);
}

function set_font(size) {
    new_size = size + 'px';
    fontsize = document.getElementById('font10');
    fontsize.style.cssText = 'font-size: 10px; font-weight: normal;';
    fontsize = document.getElementById('font11');
    fontsize.style.cssText = 'font-size: 11px; font-weight: normal;';
    fontsize = document.getElementById('font12');
    fontsize.style.cssText = 'font-size: 12px; font-weight: normal;';
    fontsize = document.getElementById('font14');
    fontsize.style.cssText = 'font-size: 14px; font-weight: normal;';
    fontsize = document.getElementById('font' + size);
    fontsize.style.cssText = 'font-size: ' + size + 'px; font-weight: bold;';
    fontsize = document.getElementById('story');
    fontsize.style.cssText = 'font-size: ' + size + 'px; margin-top: 10px;';    
}

function toggle_sports_tab(sport) {
	if(sport == 'sports_basketball') {
		document.getElementById('sports_basketball').style.display= "";
		document.getElementById('sports_volleyball').style.display= "none";
	} else if(sport == 'sports_volleyball') {
		document.getElementById('sports_volleyball').style.display= "";
		document.getElementById('sports_basketball').style.display= "none";
	}
		
}

function sendEvent(typ,prm) {
    thisMovie("clearcutmovie").sendEvent(typ,prm);
};
function loadFile(fil, n) {
    stopMovie();
    for (i=0; i < videocount+1; i++) {
        linkID = document.getElementById('clearcut-item' + i);
        linkID.style.cssText = 'background: #000000; color: #CCCCCC;';
    }
    linkID = document.getElementById('clearcut-item' + n);
    linkID.style.cssText = 'background: #003366; color: #CCCCCC;';
    
    thisMovie("clearcutmovie").loadFile('http://69.59.182.177/videos/' + fil);
    sendEvent('playitem', 0);
};
function thisMovie(movieName) {
    if(navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    } else {
        return document[movieName];
    }
};

function stopMovie() {
    stopAnims();
    sendEvent('playitem', 0);
    sendEvent('playpause');
}

function videoscroll(dir) {
    if (dir == 'up') {
        if (videofirst != 0) {
            videofirst -= 1;
            video_id1 = document.getElementById('videoclip'+videofirst);
            video_id1.style.display = '';
            video_id2 = document.getElementById('videoclip'+videolast);
            video_id2.style.display = 'none';            
            videolast -= 1;            
        }
    } else {
        if (videolast < videocount) {
            video_id1 = document.getElementById('videoclip' + videofirst);
            video_id1.style.display = 'none';
            videofirst += 1;
            videolast += 1;
            video_id2 = document.getElementById('videoclip' + videolast);
            video_id2.style.display = '';
            
        }
    }
}

function playLive(clipName) {
    stopAnims();
    if (document.liveVideo) {
        stopLive();
        livelink = document.getElementById(clipName);
        livelink.style.cssText = 'font-weight: bold';    
        
        document.liveVideo.DoStop();
        document.liveVideo.SetSource('rtsp://69.59.187.66/broadcast/' + clipName + '.rm');
        document.liveVideo.DoPlayPause();
    }
}

function stopLive() {
    if (document.liveVideo) {
        livelink = document.getElementById('dzbb');
        livelink.style.cssText = 'font-weight: normal;';
        livelink = document.getElementById('traffic_edsa');
        livelink.style.cssText = 'font-weight: normal;';
        livelink = document.getElementById('traffic_slex');
        livelink.style.cssText = 'font-weight: normal;';
        document.liveVideo.DoStop();
    }
}

function openvideo(link) {
    window.open('/video/' + link);
}   

function stopAnims() {
    if (inpictures_curr_delay) {
        stop_slideshow();
    }
    if (tick_running) {
        clearTimeout(tick_running);
    }
}

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
function right(e) {
	var msg = "Sorry, you don't have permission to save this image.";
	if (navigator.appName == 'Netscape' && e.which == 3) {
	alert(msg);
	return false;
	}
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
	alert(msg);
	return false;
	}
	else return true;
}

function trap() {
  if(document.images)
    {
	  if( document.images.pic0) {	
		  document.images.pic0.onmousedown = right;
		  document.images.pic0.onmouseup = right;
	  }

	  if( document.images.pic1) {
	   	document.images.pic1.onmousedown = right;
		document.images.pic1.onmouseup = right;
	  }
	  if( document.images.pic2) {
	   	document.images.pic2.onmousedown = right;
		document.images.pic2.onmouseup = right;
	  }
 	}
}

var inpictures_curr_delay;
var tick_running;


/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}