<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="JumboTCMS.WebFile.KChart._index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="index,follow" />
<title>flash行情</title>
<script type="text/javascript" src="libs/jquery.js"></script>
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="min_indexflash">
  <div class="flashpal">
    <h2 class="lefttex">实时交易行情图</h2>
    <span id="platinum_1" class="flashdiv">现货铂金</span> <span id="palladium_2" class="flashdiv"> 现货钯金</span> <span id="sliver_3" class="currentflash">现货白银</span> </div>
  <div class="flashdis">
    <div class="huangjin1" style="float:left;margin-left:5px; width:469px;overflow: hidden;">
      <div class="huangjin1_conter" id="flshdis_left">
        <iframe id='sliver_left' src="kline/sliver1.html" width="469" height="235" frameborder="0" scrolling="no"></iframe>
      </div>
    </div>
    <div class="huangjin1" style="float:right;margin-left:5px;width:434px;overflow: hidden;">
      <div class="huangjin1_conter" id="flshdis_right">
        <iframe id='sliver_right' src="kline/sliver2.html" width="434" height="235" frameborder="0" scrolling="no"></iframe>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
	var _root = 'kline/';
	window.onload=function(){
		gettimebuy();
		setInterval(gettimebuy,5000);
		$('span.flashdiv').live('click', function(event){
			$('.flashpal span').removeClass();
			$('.flashpal span').addClass('flashdiv');
			$(this).removeClass();
			$(this).addClass('currentflash');
			var flashname = $(this).attr('id').split('_')[0];
			$('#flshdis_left').html('<iframe id="' + flashname + '_left" src="' + _root +flashname + '1.html" width="469" height="235" frameborder="0" scrolling="no" ></iframe>');
			$('#flshdis_right').html('<iframe id="' + flashname + '_right" src="' + _root + flashname + '2.html" width="434" height="235" frameborder="0" scrolling="no" ></iframe>');
			gettimebuy();
		});
	}
	
	//显示flash之上的文字
	function gettimebuy()
	{
		var myDate=new Date();
		$.get("mytest.aspx?rand="+myDate.getTime(),function (datas){
			var json = eval("("+datas+")");
			if(json!='')
			{
				$("#timebuy").remove();
				$("#timebuys").append(json[0].all);
				$("#sliver_left").contents().find("#sliver1").html('分时线 ' + json[1].sliver); 
				$("#sliver_right").contents().find("#sliver2").html('日K线 ' + json[1].sliver); 
				$("#palladium_left").contents().find("#palladium1").html('分时线 ' + json[2].palladium); 
				$("#palladium_right").contents().find("#palladium2").html('日K线 ' + json[2].palladium); 
				$("#platinum_left").contents().find("#platinum1").html('分时线 ' + json[3].platinum); 
				$("#platinum_right").contents().find("#platinum2").html('日K线 ' + json[3].platinum); 
			}else{}
			
		},"JSON");
	}
    </script>
</body>
</html>
