function change(lieu,source) {
// indiquez l'emplacement des images a appeler
	//chemin = '../images/';
	lieu.src =  source;
	text="<img class='expendo' name='chart' border='0' width='500' src='";
	text+=source;
	text+="'>";
	document.getElementById(lieu).innerHTML=text;
	}
function detailler(lieu,source){
text="<div id='chart_principal' name='chart_principal'>";
text+="<img class='expando' name='chart' border='0' width='0px' src=''>";
text+="<div class='detaille' style='color:white;'>"+source+"</div>";
text+="</div>";
document.getElementById(lieu).innerHTML=text;
}	
var hauteur=new Array();
hauteur["america"]=153;
hauteur["asia"]=185;
hauteur["europe"]=110;
hauteur["all"]=358;
hauteur["e"]=128;
hauteur["m"]=152;
hauteur["g"]=123;
hauteur["s"]=153;
hauteur["oil"]=255;
hauteur["gold"]=240;
function change_url_de_frame(lieu){
document.getElementById(lieu).src="http://cafef.vn/cafef-tools/cf_stocklist.aspx";
}
function get_Stock(lieu){
text1="<iframe width='100%' height='480' style='margin-bottom:5px' src='http://cafef.vn//cafef-tools/cf_stocklist.aspx' frameborder='0' marginwidth='0' marginheight='0' scrolling='no'></iframe>";	
document.getElementById(lieu).innerHTML=text1;	
}
function to_Hide(lieu,lieu2,langue){
text1="<span id='"+lieu+"' onclick=\"to_View('"+lieu+"','"+lieu2+"','"+langue+"');hide_Stock('"+lieu2+"');\">";
if(langue=="En") text1+="Hide table"; else text1+="Đóng lại";
text1+="</span>";
document.getElementById(lieu).innerHTML=text1;	
}
function to_View(lieu,lieu2,langue){
text1="<span id='"+lieu+"' onclick=\"to_Hide('"+lieu+"','"+lieu2+"','"+langue+"');get_Stock('"+lieu2+"');\">";
if(langue=="En") text1+="View Vietnam Stocks"; else text1+="Xem Bảng Chứng khoán Việt Nam";
text1+="</span>";
document.getElementById(lieu).innerHTML=text1;	
}
function hide_Stock(lieu){
document.getElementById(lieu).innerHTML=" Phong";
}
function change_enligne(name,lieu,source,width,height) {
if(source!="init"){
	if (name=="Stock" && source!="vn"){		
		height=hauteur[source];
		source="widget_world_watch.jsp?market="+source;
		source="http://www.sanebull.com/"+source;
	}	
	else if(name=="Monitor"){
		height=hauteur[source];
		source="widget_commodities.jsp?type="+source;
		source="http://www.sanebull.com/"+source;
		}
	else if(name=="Oil" || name=="Gold"){
		height=hauteur["oil"];
		source="http://www.sanebull.com/"+source;}
}	text="";	
	if(source=="vn"){
	text1="<iframe width='100%' height='480' style='margin-bottom:5px' src='http://cafef.vn//cafef-tools/cf_stocklist.aspx' frameborder='0' marginwidth='0' marginheight='0' scrolling='no'></iframe>";	
	}
	else if(source!="init"){	
	text="<div id='";
	text+=lieu;
	text+="' align='center' width='";
	text+=width;
	text+="px' style='font-size:12px'><iframe width='";
	text+=width;
	text+="px' height='";
	text+=height;
	text+="px' style='margin-bottom:5px' src='";
	text+=source;
	text+="' frameborder='0' text-align='center' marginwidth='0' marginheight='0' scrolling='no'></iframe></div>";	
	}
	document.getElementById(lieu).innerHTML=text;
	if(source=="vn") document.getElementById("Display_LP_Stock").innerHTML=text1;	
	else document.getElementById("Display_LP_Stock").innerHTML="";	
}	
function change_enlign(lieu,source,width,height) {
	if (lieu=="Stock_LP"){
		height=hauteur[source];
		source="widget_world_watch.jsp?market="+source;
	}	
	else if(lieu=="Monitor_LP"){
		height=hauteur[source];
		source="widget_commodities.jsp?type="+source;
		}
		else{  height=hauteur["oil"];}
	text="<div id='";
	text+=lieu;
	text+="' align='center' width='";
	text+=width;
	text+="px' style='font-size:12px'><iframe width='";
	text+=width;
	text+="px' height='";
	text+=height;
	text+="px' style='margin-bottom:5px' src='http://www.sanebull.com/";
	text+=source;
	text+="' frameborder='0' marginwidth='0' marginheight='0' scrolling='no'></iframe></div>";	
	document.getElementById(lieu).innerHTML=text;
	}	

function stock(lieu,source,width,height){

	text="<div id='";
	text+=lieu;
	text+="' align='center' width='";
	text+=width;
	text+="px' style='font-size:12px'><iframe width='";
	text+=width;
	text+="px' height='";
	text+=height;
	text+="px' style='margin-bottom:5px' src='http://www.sanebull.com/widget_world_watch.jsp?market=";
	text+=source;
	text+="' frameborder='0' marginwidth='0' marginheight='0' scrolling='no'></iframe></div>";	
	document.getElementById(lieu).innerHTML=text;
}	
function change_table(semain){
text="<?php $week=5;include 'table_compare.php';?>";
document.getElementById("table_compare").innerHTML=text;	
}	
function getText(){
var x=document.getElementById("weekof");
//alert(x.options[x.selectedIndex].text);
return (x.options[x.selectedIndex].text);
}
function getText(id){
var x=document.getElementById(id);
//alert(x.options[x.selectedIndex].text);
return (x.options[x.selectedIndex].text);
}
function view_film(lieu1,lieu2,title,image){
text="<div width=''><object height='280' width='280' name='winMediaPlayer' classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' id='winMediaPlayerID'>";
text+="<param value='http://www.vietfish.com/phim/Hungca_SECC2009.wmv' name='URL'/>";
text+="<param value='1' name='rate'/>";
text+="<param value='0' name='balance'/>";
text+="<param value='0' name='currentPosition'/>";
text+="<param value='0' name='defaultFrame'/>";
text+="<param value='999' name='playCount'/>";
text+="<param value='1' name='autoStart'/>";
text+="<param value='0' name='currentMarker'/>";
text+="<param value='-1' name='invokeURLs'/>";
text+="<param value='' name='baseURL'/>";
text+="<param value='50' name='volume'/>";
text+="<param value='1' name='mute'/>";
text+="<param value='full' name='uiMode'/>";
text+="<param value='-1' name='stretchToFit'/>";
text+="<param value='0' name='windowlessVideo'/>";
text+="<param value='-1' name='enabled'/>";
text+="<param value='0' name='enableContextMenu'/>";
text+="<param value='0' name='fullScreen'/>";
text+="<param value='' name='SAMIStyle'/>";
text+="<param value='' name='SAMILang'/>";
text+="<param value='' name='SAMIFilename'/>";
text+="<param value='' name='captioningID'/>";
text+="<param value='0' name='enableErrorDialogs'/>";
text+="<param value='10980' name='_cx'/>";
text+="<param value='8996' name='_cy'/>";
text+="<param value='false' name='menu'/>";
text+="<embed height='280' width='280' showtracker='1' showstatusbar='1' showpositioncontrols='1' showgotobar='0' showdisplay='0' showaudiocontrols='1' showcontrols='1' playcount='999' mute='1' enabletracker='1' enablefullscreencontrols='1' enablecontextmenu='0' displaysize='1' clicktoplay='1' autostart='1' autosize='1' name='winMediaPlayer' src='http://www.vietfish.com/phim/Hungca_SECC2009.wmv' filename='http://www.vietfish.com/phim/Hungca_SECC2009.wmv' pluginspage='http://www.microsoft.com/windows/windowsmedia/download/' type='application/x-mplayer2'/> ";
text+="</object></div>";
/*text2="<div id='"+lieu2+"'><span id='Hide' style='cursor:pointer;' onclick='hiden('"+lieu1+"','"+lieu2+"','"+title+"','"+image+"');'>Hide</span></div>";*/
document.getElementById(lieu1).innerHTML=text;
document.getElementById("Hide").innerHTML="";
document.getElementById("View").innerHTML="Hide";
}
function hiden(lieu1,lieu2,title,image){
text="<img border='0' src='"+image+"' width='260' height='180' align='center' hspace='5'>";
/*text2="<span id='Hide' style='cursor:pointer;' onclick=\"view_film('"+lieu1+"','"+lieu2+"','"+title+"','"+image+"');\">View</span>";*/
document.getElementById(lieu1).innerHTML=text;
document.getElementById("Hide").innerHTML="View";
document.getElementById("View").innerHTML="";

}