
(function($){$.fn.tabControl=function(settings){settings=$.extend({tabSection:".tabSection",tabTitle:".tabTitle"},settings);
return this.each(function(){var $self=$(this),$tabSections;
$tabSections=$(settings.tabSection,this);
$tabSections.not(":first").hide();
var $tabs=$(this).find("ul.tabs");
$tabSections.each(function(i){$(settings.tabTitle,this).remove().text()
});
$tabs.find("li").each(function(i){var $tab=$(this);
$tab.bind("mouseover",function(){if($tab.hasClass("active")){return false
}$tab.addClass("active").siblings().removeClass("active");
$tabSections.hide().filter(":eq("+i+")").show();
return false
}).css("outline","none")
})
})
};


$.fn.ellipsis=function(enableUpdating){var s=document.documentElement.style;
if(!("textOverflow" in s||"OTextOverflow" in s)){return this.each(function(){var el=$(this);
if(el.css("overflow")=="hidden"){var originalText=el.html(),text=originalText,w=el.width()-15,t=$("#_ellipsis_calc"),tWidth=t.length>0?t.width():0;
if(t.length<1){t=$("<span id='_ellipsis_calc'/>").appendTo("body")
}t.html(originalText).hide();
while(text.length>0&&t.width()>w){text=text.substr(0,text.length-1);
t.html(text+"...")
}el.html(t.html());
if(t.length>0){t.remove()
}if(enableUpdating==true){var oldW=w;
setInterval(function(){if(w!=oldW){oldW=w;
el.html(originalText);
el.ellipsis()
}},200)
}}})
}else{return this
}}
})(jQuery);
$(document).ready(function(){if(typeof marketSummary!="undefined"){marketSummary.initPage()
}});


///////////////////////////////////////
function moveformat(id){
if(stopshow==0){
picswin(id);
var browser=navigator.appName;
//if(browser!="Microsoft Internet Explorer"){
layeri++;
document.getElementById(id).style.zIndex = layeri;
document.getElementById(id).style.left=(0+"px");
var linkid="link"+id;
document.getElementById("link5pic").href=document.getElementById(linkid).href;
//}
//else{
//document.getElementById(id).style.posLeft = 542;
//layeri++;
//document.getElementById(id).style.zIndex = layeri;
//movestart(id);
//}
}
}

function movestart(id){
if(document.getElementById(id).style.posLeft!=0){
var mnum=document.getElementById(id).style.posLeft*0.2;
var x=document.getElementById(id).style.posLeft-mnum;
document.getElementById(id).style.posLeft=x;
moveid=id;
setTimeout("movestart(moveid);",30);
}
else{
var linkid="link"+id;
document.getElementById("link5pic").href=document.getElementById(linkid).href;
}
}

function showindexad(){
if (i<5 && stopshow==0){
  i++;
  var picid="l";
  picid=picid+i;
  setTimeout("moveformat('"+picid+"');showindexad();",5000);
  }
else if(stopshow==0){
  i=1;
  var picid="l";
  picid=picid+i;
  setTimeout("moveformat('"+picid+"');showindexad();",5000);
  }
else{
timeout=1;
}
}

function picsw(id) {
if(document.getElementById("pn"+id+"").src!="images/p"+id+".gif"){
picswin(id);
showindexad2(id);
}
}

function picswin(id){
document.getElementById("pnl1").src="images/pl1a.gif";
document.getElementById("pnl2").src="images/pl2a.gif";
document.getElementById("pnl3").src="images/pl3a.gif";
document.getElementById("pnl4").src="images/pl4a.gif";
document.getElementById("pnl5").src="images/pl5a.gif";
document.getElementById("pn"+id+"").src="images/p"+id+".gif";
}

function showindexad2(id){
  stopshow=1;
  var browser=navigator.appName;
  //if(browser!="Microsoft Internet Explorer"){
  layeri++;
  document.getElementById(id).style.zIndex = layeri;
  document.getElementById(id).style.left=(0+"px");
  var linkid="link"+id;
  document.getElementById("link5pic").href=document.getElementById("link"+id).href;
  //}
//else{
  //document.getElementById(id).style.posLeft = 542;
  //layeri++;
  //document.getElementById(id).style.zIndex = layeri;
  //movestart(id);
  //}
}
function startauto(){
  stopshow=0;
  if(timeout==1){
  showindexad();
  timeout=0;
  }
}








