


$(document).ready(function()
{
	$("#showcase").awShowcase(
	{
		content_width:			560,
		content_height:			195,
		fit_to_parent:			false,
		auto:					true,
		interval:				30000,
		continuous:				false,
		loading:				true,
		tooltip_width:			200,
		tooltip_icon_width:		32,
		tooltip_icon_height:	32,
		tooltip_offsetx:		18,
		tooltip_offsety:		0,
		arrows:					true,
		buttons:				false,
		btn_numbers:			true,
		keybord_keys:			true,
		mousetrace:				false, /* Trace x and y coordinates for the mouse */
		pauseonover:			true,
		stoponclick:			false,
		transition:				'hslide', /* hslide/vslide/fade */
		transition_delay:		0,
		transition_speed:		500,
		show_caption:			'onload', /* onload/onhover/show */
		thumbnails:				false,
		thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
		thumbnails_direction:	'vertical', /* vertical/horizontal */
		thumbnails_slidex:		1, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
		dynamic_height:			false, /* For dynamic height to work in webkit you need to set the width and height of images in the source. Usually works to only set the dimension of the first slide in the showcase. */
		speed_change:			true, /* Set to true to prevent users from swithing more then one slide at once. */
		viewline:				false, /* If set to true content_width, thumbnails, transition and dynamic_height will be disabled. As for dynamic height you need to set the width and height of images in the source. */
		custom_function:		null /* Define a custom function that runs on content change */
	});
});


(function(){var menu,userAgent=navigator.userAgent.toLowerCase(),opera=/opera/.test(userAgent),onLoad=function(){var name="main_menu";var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){if(divs[i].className==name){menu=divs[i];var lis=menu.getElementsByTagName("li");for(var n=lis[0];n;n=n.nextSibling)if(n.tagName=="LI"){n.ajxtop=true;if(opera)n.style.width=n.offsetWidth-(n.className.indexOf("tlast")==-1? 3:0);}for(var j=0;j<lis.length;j++){lis[j].className=lis[j].className;lis[j].style.position="static";var uls=lis[j].getElementsByTagName("ul");if(uls.length>0)uls[0].style.display="none";lis[j].shown=lis[j].show=false;lis[j].onmouseover=function(){clearTimeout(menu.timer);if(this.className.indexOf("ajxover")==-1)this.className+=" ajxover";this.show=true;menu.timer=setTimeout(update,0);};lis[j].onmouseout=function(){clearTimeout(menu.timer);if(!this.shown)this.className=this.className.replace(new RegExp(" ?ajxover\\b"), "");this.show=false;menu.timer=setTimeout(update,0);};}}}},update=function(){var lis=menu.getElementsByTagName("li");for(var i=lis.length-1;i>=0;i--){if(lis[i].show){if(!lis[i].shown){if(!lis[i].parentNode.style.filter){var uls=lis[i].getElementsByTagName("ul");if(uls.length>0){lis[i].style.position="relative";uls[0].style.filter="alpha(opacity=0)";uls[0].style.opacity=0;uls[0].style.display="block";fadeIn(uls[0]);lis[i].shown=true;}}else setTimeout(update,0);}}else{var uls=lis[i].getElementsByTagName("ul");if(uls.length>0){uls[0].style.display="none";lis[i].style.position="static";lis[i].shown=false;if(lis[i].className.indexOf("ajxover")!=-1)lis[i].className=lis[i].className.replace(new RegExp(" ?ajxover\\b"), "");}}}},fadeIn=function(o){o.tstart=new Date;if(!o.timer)o.timer=setInterval(function(){var s=(new Date-o.tstart)/0;if(s<1){var v=s;o.style.filter="alpha(opacity="+v*100+")";o.style.opacity=v;}else{clearInterval(o.timer);o.timer=undefined;o.style.filter="";o.style.opacity=1;}}, 0);},addOnReady=function(f,fu){var isReady=false,ready=function(){if(!isReady){isReady=true;f();};};if(document.addEventListener){document.addEventListener('DOMContentLoaded',ready,false);window.addEventListener("load",ready,false);window.addEventListener("unload",fu,false);}if(window.attachEvent)window.attachEvent("onload",ready);if(document.documentElement.doScroll&&window==top){(function(){if(!isReady){try{document.documentElement.doScroll("left");}catch(E){setTimeout(arguments.callee,0);return;}ready();}})()}};addOnReady(onLoad, onLoad);})();

function ChartStoreAjax()
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  
var url="charts/charts_data.asp";
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
 
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

setTimeout("ChartStoreAjax()", 300000);

 
function xml_file(a,b)
{ 
document.getElementById(a).value= b;
 
		var so_left = new SWFObject("charts/line_chart.swf", "amline", "300", "190", "8");
		so_left.addVariable("path", "charts/");
		so_left.addVariable("settings_file", encodeURIComponent("charts/line_chart_settings.xml"));
		so_left.addVariable("data_file", encodeURIComponent("charts/"+document.getElementById(a).value+".xml"));
  		so_left.addVariable("preloader_color", "#FFFFFF");							
		so_left.addParam("wmode", "transparent");							
		so_left.write("flashcontent_left");
	
	
}

  /* Ajax Live Price*/
  var enableCache = false;
    var jsCache = new Array();
    var AjaxObjects = new Array();

    function ShowContent(divId,ajaxIndex,url)      {
	        document.getElementById(divId).innerHTML = AjaxObjects[ajaxIndex].response;
	        if(enableCache){
		        jsCache[url] = 	AjaxObjects[ajaxIndex].response;
	        }
	        AjaxObjects[ajaxIndex] = false;
        }

    function Ajax(divId,url)     {
	        if(enableCache && jsCache[url]){
		        document.getElementById(divId).innerHTML = jsCache[url];
		        return;
	        }	
	        var ajaxIndex = AjaxObjects.length;
	        AjaxObjects[ajaxIndex] = new sack();
	        AjaxObjects[ajaxIndex].requestFile = url;
	        AjaxObjects[ajaxIndex].onCompletion = function(){ ShowContent(divId,ajaxIndex,url); };
	        AjaxObjects[ajaxIndex].runAJAX();
        }   

var news_swf;
news_swf = '';
news_swf = news_swf+'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="265" height="195">';
news_swf = news_swf+'<param name="movie" value="charts/news.swf" />';
news_swf = news_swf+'<param name="quality" value="high" />';
news_swf = news_swf+'<param name="wmode" value="transparent" />';
news_swf = news_swf+'<embed src="charts/news.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" type="application/x-shockwave-flash" width="265" height="195"></embed>';
news_swf = news_swf+'</object> ';

