function tg1() {
	document.getElementById('viewtg').innerHTML = '<embed id="sky_wowzakamai" type="application/x-shockwave-flash" flashvars="stream=rtmp://cp49989.live.edgefcs.net/live/streamRM1@2564&amp;service=A&amp;channel=cinema" salign="" allowscriptaccess="always" allowscale="true" allowfullscreen="true" menu="true" name="sky_wowzakamai" bgcolor="#000000" devicefont="false" wmode="window" scale="showall" loop="True" play="true" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://www.sky.it/static/swf/sky_wowzakamai.swf" align="middle" width="300" height="258">';
}

function tg2() {
	document.getElementById('viewtg').innerHTML = '<object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject" align="middle" width="300" height="300"><param name="FileName" value="http://www.rainews24.it/ran24/rainews24_2007/live/live_rainews24.asx"><param name="AutoStart" value="True"><param name="ShowStatusBar" value="False"><param name="DefaultFrame" value="mainFrame"><!-- BEGIN PLUG-IN HTML FOR FIREFOX--><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.rainews24.it/ran24/rainews24_2007/live/live_rainews24.asx" defaultframe="rightFrame" showstatusbar="False" align="middle" width="300" height="300"><!-- END PLUG-IN HTML FOR FIREFOX--></object>';
}

function tgoff(){
	document.getElementById('viewtg').innerHTML = '<img style="border:0;" src="http://www.financeaggregator.com/wp-content/themes/thmn/images/ghitg.gif" />';
}

function coms_on(){
	document.getElementById('coming-soon').innerHTML = '<embed name="AndiamoAlCinema" src="http://cinema.comingsoon.it/AndiamoAlCinema.swf?csuid=flashgame.it&amp;csby=dada&amp;volumeON=NO" quality="best" scale="noscale" bgcolor="#000000" allowscriptaccess="sameDomain" allowfullscreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" align="middle" width="320" height="240"><noscript><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0" name="AndiamoAlCinema" width="320" height="240" align="middle" id="AndiamoAlCinema"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="http://cinema.comingsoon.it/AndiamoAlCinema.swf?csuid=flashgame.it&amp;csby=dada&amp;volumeON=NO" /><param name="quality" value="best" /><param name="scale" value="noscale" /><param name="bgcolor" value="#000000" /><embed src="http://cinema.comingsoon.it/AndiamoAlCinema.swf?csuid=flashgame.it&amp;csby=dada&amp;volumeON=NO" width="320" height="240" align="middle" quality="best" scale="noscale" bgcolor="#000000" name="AndiamoAlCinema" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></noscript><br /><a style="padding-left:10px;font-size:11px;color:#d51;" href="javascript:void();" title="stop" onclick="coms_off();"> STOP </a>';

}

function coms_off(){
	document.getElementById('coming-soon').innerHTML = '<a href="javascript:void();" title="play" onclick="coms_on();"><img style="border:0;" src="http://www.financeaggregator.com/wp-content/themes/thmn/images/coming-soon.jpg" alt="Play" /></a>';

}


function chg_graph(sname,stext){ 
	document.getElementById('graph').innerHTML = '<div style="color:#555;font-size:13px;font-weight:bold;text-align:center;">'+stext+'</div><a href="http://it.finance.yahoo.com/q/bc?s='+sname+'&t=1d&l=on&z=l&q=l&c=" title="" onclick="return GB_showPage(\''+stext+'\', \'http://www.financeaggregator.com/go_art.php?urlsite=http%3A%2F%2Fit.finance.yahoo.com%2Fq%2Fbc%3Fs%3D'+sname+'%26t%3D1d%26l%3Don%26z%3Dl%26q%3Dl%26c%3D\')" rel="nofollow"><img alt="'+stext+' Intraday" src="http://it.ichart.yahoo.com/t?s='+sname+'" border="0" /></a>';
}

function URLEncode (clearString) {
  var output = '';
  var x = 0;
  clearString = clearString.toString();
  var regex = /(^[a-zA-Z0-9_.]*)/;
  while (x < clearString.length) {
    var match = regex.exec(clearString.substr(x));
    if (match != null && match.length > 1 && match[1] != '') {
    	output += match[1];
      x += match[1].length;
    } else {
      if (clearString[x] == ' ')
        output += '+';
      else {
        var charCode = clearString.charCodeAt(x);
        var hexVal = charCode.toString(16);
        output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();
      }
      x++;
    }
  }
  return output;
}

	
function nono_block(nadiv){
	if (document.getElementById(nadiv).style.display == 'none'){
		document.getElementById(nadiv).style.display = 'block';
	}else{
		document.getElementById(nadiv).style.display = 'none';
	}
}


