// JavaScript Document
var baseurl = "http://"+window.location.hostname+"/";
var imgpath = "http://"+window.location.hostname+"/resources/images/";
var LoadingStr = "<table style='width:100%;height:100%;' cellpadding='0' cellspacing='0'><tr><td style='width:100%;height:100%;' valign='middle' align='center'><img src='"+imgpath+"loading001.gif' /></td></tr></table>";

function show_competitive_absolute(id){
	var name_abs_div = id;
	$("#"+name_abs_div).fadeIn(300, function () { });
}

function hide_competitive_absolute(id){
	var name_abs_div = id;
	document.getElementById(name_abs_div).style.display = "none";	
}

function show_competitive_absolute2(id){
	var name_abs_div = id;
	document.getElementById(name_abs_div).style.display = "block";	
}
function ftcChangeRpt(id){
	$("ul.ftcRptNav li a").css({'background' : '#F5DDC4','border' : '1px solid #e9d2b0'});
	if(id == 1){
		$("li#ftcRptLink1 a").css({'background' : 'none','border' : 'none','border-top' : '1px solid #e9d2b0'});
	}else if(id == 2){
		$("li#ftcRptLink2 a").css({'background' : 'none','border-bottom' : 'none'});
	}else if(id == 3){
		$("li#ftcRptLink3 a").css({'background' : 'none','border' : 'none','border-top' : '1px solid #e9d2b0'});
	}
	
	$("div.ftcContentData").html(LoadingStr);
	
	$.ajax({
		type: "GET",
		url: baseurl+"index.php/newhome/chgFTC_reports/"+id,
		async: false,
		success: function(msg){
			$("div.ftcContentData").html(msg);
		}
	});
}

function changeMoversShakersDate(id){
	$("div.fx_movers_shakers_dataContent").html(LoadingStr);
	
	$("a.fxMSBottomLinks").removeClass("active");
	$("a#fxMSBottomLinks"+id).addClass("active");
	
	var gainLoss = 0;
	if($("a#fxmsLinks1").hasClass('activeNav')){
		gainLoss = 1;
	}
	
	$.ajax({
		type: "GET",
		url: baseurl+"index.php/newhome/chgFX_moversshakers/"+id+"/"+gainLoss,
		async: false,
		success: function(msg){
			$("div.fx_movers_shakers_dataContent").html(msg);
		}
	});
}

function showGainLose(id){
	$("a.fxmsLinks").removeClass("activeNav");
	$("a#fxmsLinks"+id).addClass("activeNav");
	$("div.fx_movers_shakers_data").hide();
	$("div#fx_movers_shakers_data"+id).fadeIn(300);
}
$(function(){
	$("a.bannerLink1").hover(function(){
									$(this).children().css({'display':'block'});
								},function(){
									$(this).children().css({'display':'none'});
								});
	
	$("a.bannerLink2").hover(function(){
									$(this).children().css({'display':'block'});
								},function(){
									$(this).children().css({'display':'none'});
								});
})
