
var i=0;
flowplayer("player", {src: "http://www.cinecomcast.com/flw/flowplayer.commercial-3.1.2.swf", wmode: 'opaque'},{
		   key: '@3f9bce52ec750d84504',
		   clip:{
					scaling:'orig', 
					 autoPlay: false
					
		   },
		   playlist: 'http://www.cinecomcast.com/curl/feedreader_CHFR.php',	
		   onLoad: function(){ 
		   $f().playlist(".entries", {loop: true, autoPlay: true});
    	   },    		
		onFinish: function() { 
				i++;
				if(i == 1){
	
				}
				if(i>0){
				var uri = 'http://impch.tradedoubler.com/imp?type(iframe)g(17342118)a(1172517)' + new String (Math.random()).substring (2, 11);
				document.getElementById('myOverlay').style.display = '';
				document.getElementById('pl').style.display = 'none';				
	 			document.getElementById('myOverlay').innerHTML = '<div id="internaloverlay"><iframe src="'+uri +'" width="160" height="600" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>';
	 			// registerads();
				}
    	 },
		
		canvas: {backgroundColor: "#000000",backgroundGradient:"none"},

		plugins: {
						controls: {
							playlist: false, 
	  buttonColor: '#bd282a',
      timeColor: '#ff5759',
      buttonOverColor: '#f36d6e',
      volumeSliderColor: '#000000',
      sliderGradient: 'none',
      sliderColor: '#9c2626',
      progressColor: '#f04244',
      bufferColor: '#88111d',
      backgroundGradient: [0.6,0.3,0,0,0],
      bufferGradient: 'none',
      tooltipColor: '#5F747C',
      progressGradient: 'medium',
      volumeSliderGradient: 'none',
      tooltipTextColor: '#ffffff',
      durationColor: '#112233',
      borderRadius: '0px',
      timeBgColor: '#112233',
      backgroundColor: '#870304',
      height: 24,
      opacity: 1.0,
	  time:false,
	  stop:false,
	  volume:false
							
	

	
	}
	
			}

		   });    





function fetchAdress(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
	// Opera 8.0+, Firefox, Safari
	ajaxRequest = new XMLHttpRequest();
	}catch (e){
	// Internet Explorer Browsers
	try{
	ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try{
	ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e){
	// Something went wrong
	alert("Your browser broke!");
	return false;
	}
	}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//return ajaxRequest.responseText;
			//alert(ajaxRequest.responseText);
			//$f().addClip({url: ajaxRequest.responseText, autoPlay: true}, 1);
			//updateliste();
			//$f.play();
			

		}
	}
	var vidID = document.getElementById('player').name;
	ajaxRequest.open("GET", "http://www.cinecomcast.com/fetchfeeds.php?vidID="+vidID+"&media=5", true);
	ajaxRequest.send(null); 
}




function updateliste(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
	// Opera 8.0+, Firefox, Safari
	ajaxRequest = new XMLHttpRequest();
	}catch (e){
	// Internet Explorer Browsers
	try{
	ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try{
	ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e){
	// Something went wrong
	alert("Your browser broke!");
	return false;
	}
	}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//return ajaxRequest.responseText;
			//alert(ajaxRequest.responseText);
		}
	}
	var vidID = document.getElementById('player').name;
	ajaxRequest.open("GET", "http://www.cinecomcast.com/fetchmultiplefeeds.php?recherche="+vidID+"", true);
	ajaxRequest.send(null); 
}




function hideads(){
document.getElementById('myOverlay').style.display='none';
document.getElementById('pl').style.display = '';
}
function registerads(){
	var ajaxRequest2;  // The variable that makes Ajax possible!
	try{
	// Opera 8.0+, Firefox, Safari
	ajaxRequest2 = new XMLHttpRequest();
	}catch (e){
	// Internet Explorer Browsers
	try{
	ajaxRequest2 = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try{
	ajaxRequest2 = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e){
	// Something went wrong
	alert("Your browser broke!");
	return false;
	}
	}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest2.onreadystatechange = function(){
		if(ajaxRequest2.readyState == 4){		
		}
	}
	var vidID = document.getElementById('player').name;
	ajaxRequest2.open("GET", "http://www.cinecomcast.com/registerads.php?vidID="+vidID+"&media=5", true);
	ajaxRequest2.send(null); 	
}
