﻿// JScript File
function NewWindow(HtmlName,WinName,ToolOptions)
			{
			window.open(HtmlName,WinName,ToolOptions);
			}

			function loadBigGoldChart()
			{
			if (bigGoldChart!="")
			{
				clearTimeout(bigGoldChart);
				bigGoldChart = "";
			}
			
			var str = "<a href='http://www.kitco.com/images/live/gold.gif' target='_blank'>"
				str = str + "<img src='http://www.kitco.com/images/live/gold.gif?nocache=" + new Date().getTime() + "' width='560' height='400' border='0' alt='Live 24 hour Gold Chart' />"
				str = str + "</a><br />"

			$('Big_Gold_Chart_1').innerHTML = str;
			bigGoldChart = setTimeout("loadBigGoldChart()",60000);
			}
			function loadSmallGoldChart()
			{
			if (smallGoldChart!="")
			{
				clearTimeout(smallGoldChart);
				smallGoldChart = "";
			}
			
				var str = "<iframe  src='http://www.eximbank.com.vn/WebsiteExRate/gold.aspx' width='310' height='100' frameborder='0' scrolling='No'></iframe>"

			$('Small_Gold_Chart').innerHTML = str;

			smallGoldChart = setTimeout("loadSmallGoldChart()",60000);
			}
			function loadUSD_EUR()
			{
			if (USD_EUR!="")
			{
				clearTimeout(USD_EUR);
				USD_EUR = "";
			}
			
			var str = ""
			str += "<table border='0' cellspacing='0' cellpadding='5' width='240'>"
			str += "<tr>"
			str += "<td class='border2' background='http://www.giavangonline.com/images/cell-background.gif'>USD/EUR EXCHANGE"
			str += "</td>"
			str += "</tr>"

			str += "<tr>"
			str += "<td class='border'>"
			str += "<img alt='' src='http://www.weblinks247.com/exrate/24hr-euro-small.gif?nocache=" + new Date().getTime() +  "' width='180' height='150' border='0' />"
			str += "</td>"
			str += "</tr>"
			str += "</table>"
			$('exrate_USD_EUR').innerHTML = str;
			USD_EUR = setTimeout("loadUSD_EUR()",60000);

			}
			function load24hGoldPic()
			{
			if (goldPic24h!="")
			{
				clearTimeout(goldPic24h);
				goldPic24h = "";
			}
			
			
			var str = ""
			str += "<table border='0' cellspacing='0' cellpadding='5' width='240'>"
			str += "<tr>"
			str += "<td class='border2' background='http://www.giavangonline.com/images/cell-background.gif'>GOLD PRICE 24H"
			str += "</td>"
			str += "</tr>"

			str += "<tr>"
			str += "<td class='border'>"
			str = str + "<img alt='' src='http://www.kitconet.com/charts/metals/gold/t24_au_en_usoz_2.gif?nocache=" + new Date().getTime() +  "' width='172' height='114' border='0' />"
			str += "</td>"
			str += "</tr>"
			str += "</table>"
      $('GoldPic24h').innerHTML = str;
      goldPic24h = setTimeout("load24hGoldPic()",60000);
      }

      


      function GetNews()
      {
      var url = "gold_news_list.php";
      var pars = "nocache=" + new Date().getTime();


      var myAjax = new Ajax.Request(url,
      {
      method: "get",
      parameters: pars,
      onComplete:NewsChanged
      });
      setTimeout("GetNews()",300000);
      }

      function NewsChanged(originalRequest)
      {
      $('_info').innerHTML = originalRequest.responseText;
      }

      
	  var bigGoldChart = "";		  
	  var smallGoldChart = "";
	  var USD_EUR = "";
	  var goldPic24h = "";
	
      bigGoldChart = setTimeout("loadBigGoldChart()",40000);
      smallGoldChart = setTimeout("loadSmallGoldChart()",60000);
      USD_EUR = setTimeout("loadUSD_EUR()",30000);
      goldPic24h = setTimeout("load24hGoldPic()",50000);

