function displayInfo(info)
{
	if (info == 'weather')
		showDialog('http://www3.tuoitre.com.vn/transweb/rams.htm', 492, 659);
	if (info == 'forex')	
	    showDialog('http://www.tuoitre.com.vn/tianyon/transweb/TyGia.htm', 305, 415);
	    //showDialog('http://www.eximbank.com.vn/vietnam/exchange.aspx', 460, 432);
		//showDialog('http://www3.tuoitre.com.vn/transweb/tygia.htm', 460, 432);
	if (info == 'gold')
		showDialog('http://www3.tuoitre.com.vn/transweb/giavang.htm', 450, 220);
	if (info == 'tvguide')
		showWindow('http://www3.tuoitre.com.vn/transweb/truyenhinh.htm', false, false, true, false, false, false, true, true, 450, 354, 0, 0);
	if (info == 'lottery')	
	    showDialog('http://www.tuoitre.com.vn/tianyon/transweb/xoso.htm', 400, 665);
	    //showWindow('http://www.xosobinhduong.com.vn/Forms/xemkq_tt.aspx', false, false, true, false, false, false, true, true, 450, 600, 0, 0);
		//showWindow('http://www3.tuoitre.com.vn/Transweb/XoSo.html', false, false, true, false, false, false, true, true, 450, 600, 0, 0);
		//showDialog('http://www3.tuoitre.com.vn/transweb/xoso.htm', 600, 346);
		//showDialog('http://www.xsktcantho.com.vn/xsktcantho.asp', 1024, 1350);
	if (info == 'stock_ho')
		showWindow('http://www3.tuoitre.com.vn/transweb/chungkhoan_ho.htm', false, false, true, false, false, false, true, true, 770, 770);
	if (info == 'stock_ha')
		showWindow('http://www3.tuoitre.com.vn/transweb/chungkhoan_ha.htm', false, false, true, false, false, false, true, true, 770, 770);	
}

function showDialog(url, width, height)
{
	return showWindow(url, false, false, false, false, false, false, true, true, width, height, 0, 0);
}

function showWindow(url, isStatus, isResizeable, isScrollbars, isToolbar, isLocation, isFullscreen, isTitlebar, isCentered, width, height, top, left)
{
	if (isCentered)
	{
		top = (screen.height - height) / 2;
		left = (screen.width - width) / 2;
	}

	open(url, '_blank', 'status=' + (isStatus ? 'yes' : 'no') + ','
	+ 'resizable=' + (isResizeable ? 'yes' : 'no') + ','
	+ 'scrollbars=' + (isScrollbars ? 'yes' : 'no') + ','
	+ 'toolbar=' + (isToolbar ? 'yes' : 'no') + ','
	+ 'location=' + (isLocation ? 'yes' : 'no') + ','
	+ 'fullscreen=' + (isFullscreen ? 'yes' : 'no') + ','
	+ 'titlebar=' + (isTitlebar ? 'yes' : 'no') + ','
	+ 'height=' + height + ',' + 'width=' + width + ','
	+ 'top=' + top + ',' + 'left=' + left);
}

function redirect_cart(id,cid,url)
{
	switch(id)
	{
		
		case 'addcart' :
		{
			window.location='index.php?op=add_pro&id='+cid+'&link='+url;
			break;
		}
	}
}

function redirect(id)
{
	switch(id)
	{
		case 'yourcart' :
		{
			window.location='index.php?op=basket';
			break;
		}
		
		case 'contact' :
		{
			
		ShowLinkNoBaket('8','modules/contact.php','home_main','0');
			
			break;
		}
		
		
		case 'index' :
		{
			ShowLinkNoBaket('1','modules/main_home.php','home_main','1');
			//window.location='index.php';
			break;
		}
		case 'faqs':
		{
			ShowLinkNoBaket('7','modules/faqs.php','home_main','1');
			//window.location='index.php?op=faqs';
			break;
		}
		case 'newproductlist':
		{
			ShowLinkNoBaket('3','modules/product_new.php','home_main','0');
			
			//window.location='index.php?op=product_hot';
			break;
		}
		case 'placeordermanual':
		{			
			window.open("HuongDanDatHang.htm","_blank");
			break;
		}
		
		case 'map_contact':
		{			
			
			window.open("http://www.vinafoods.net/lienhe.html","_blank","scrollbars=no, resizable=no, width=700, height=550");
			
			break;
		}
		
		case 'live_support':
		{			
			
			window.open("http://www.vinafoods.net/chat_supper/livehelp.php?page=leavemessage.php&department=2&tab=2","_blank","scrollbars=no, resizable=no, width=400, height=415");
			
			break;
		}
		case 'shipping':
		{
			  window.location='index.php?op=shipping';
			//window.open("index.php?op=shipping","_blank");
			break;
		}
		case 'viewpromotion':
		{
			
			ShowLinkNoBaket('2','modules/method_foods.php','home_main','0');
			
			break;
		}
		
		case 'viewallestore':
		{
			ShowLinkNoBaket_Estore('4','modules/left_estore.php','modules/viewallestore.php','left_estore','home_main','0');
			//window.location='index.php?op=viewallestore';
			break;
		}
		
		case 'news_events':
		{
			ShowLinkNoBaket('5','modules/news.php','home_main','0');
			//window.location='index.php?op=news';
			break;
		}
		
		case 'forums':
		{
			window.open("http://www.vinafoods.net/forums","_blank");
			//window.location='http://www.vinafoods.net/forums';
			break;
		}
		
		
		
	}
}