

//--------------- Player Video ------------------------------

function redirect() {
	closeScreen() ;
}

function shut() {
	closeScreen() ;	
}

function openScreen(v) {
	//alert('http://www.danslacible.com');

	var fp = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"'; 
	fp = fp + ' WIDTH="512" HEIGHT="384" id="myMovieName">\n';
	fp = fp + '<PARAM NAME=movie VALUE="http://www.danslacible.com/dlc_player.swf?vdo=http://dlc-dl.tribers.net/'+v+'.flv&dst=javascript:redirect()&cls=javascript:shut();">\n';
	fp = fp + '<PARAM NAME=quality VALUE=high>\n';
	fp = fp + '<PARAM NAME=bgcolor VALUE=#000000>\n';
	fp = fp + '<EMBED src="http://www.danslacible.com/dlc_player.swf?vdo=http://dlc-dl.tribers.net/'+v+'.flv&dst=javascript:redirect()&cls=javascript:shut();" quality=high bgcolor=#000000 WIDTH="512" HEIGHT="384"'; 
	fp = fp + ' NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>\n';
	fp = fp + '</OBJECT>\n\n';

	if ( ctx == 'home' ) {
		document.getElementById('contScreenHome').style.display = 'block' ;
		document.getElementById('newsContent').style.display = 'none' ;
		document.getElementById('contScreenHome').innerHTML = '' ;
		document.getElementById('contScreenHome').innerHTML = fp ;

	} else {
		document.getElementById('contScreenMain').innerHTML = '' ;
		document.getElementById('contThumbs').style.display = 'none' ;
		document.getElementById('contScreen').style.display = 'block' ;
		document.getElementById('contScreenMain').innerHTML = fp ;
	}

}

function closeScreen() {

	if ( ctx == 'home' ) {
		document.getElementById('contScreenHome').innerHTML = '' ;	
		document.getElementById('contScreenHome').style.display = 'none' ;
		document.getElementById('newsContent').style.display = 'block' ;
	} else {
		document.getElementById('contScreenMain').innerHTML = '' ;	
		document.getElementById('contScreen').style.display = 'none' ;
		document.getElementById('contThumbs').style.display = 'block' ;		
	}		
}



//-------------- Scroll -------------------------

var scrollTimer = null ;
function trb_HorizScroll( action, element, parent, sens ) {

	if ( action.toLowerCase() == "stop" ) {

		clearTimeout(scrollTimer);

	} else {

		var oE = document.getElementById(element) ;
		var oP = document.getElementById(parent) ;
		var sSpeed = 6 ;

		if ( oE.style.left=="" || oE.style.left == "0px" || oE.style.left == "undefinded" || oE.style.left == false || oE.style.left == null ) { oE.style.left = "0px" ; }
		if ( sens.toLowerCase() == "l" || sens.toLowerCase() == "left" ) { sDir = -1 ; } else { sDir = 1 ; }

		if ( parseInt(oE.style.left)+(sSpeed*sDir) < (parseInt(oP.offsetWidth)-parseInt(oE.offsetWidth)) || parseInt(oE.style.left)+(sSpeed*sDir) > 0 ) {
			clearTimeout(scrollTimer);
		} else {
			oE.style.left = parseInt(oE.style.left) + (sSpeed*sDir) + "px" ;
			scrollTimer = setTimeout( 'trb_HorizScroll("'+ action +'","'+ element +'","'+ parent +'","'+ sens +'");', 20);
		}

	}

}




