// IPTV 
var timer;
var g_channel_no=1;
var g_channel_max_no=100;
var g_volume_no=100;
var g_volume_max_no=200;
var how_many_press = 0;   
var g_video_itemid= Array();
var channel= Array()
var vlc_monitorTimerId = 0; 
var prevState = 0; 
var g_ad=0;
var g_timer;
//

//var main_menu_items=Array("1","Products","1","Solutions","1","Services","1","Download","1","Company","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Buy Now","1","Download","1","Developer","1","Company","0","FAQ","faq.htm","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","0","EZ Store","store.htm","1","Download","1","Developer","1","Company","0","FAQ","faq.htm","0", "Home","index.htm");
//var main_menu_items=Array("0","EZ Store","ezstore.htm","1","Products","1","Download","1","Developer","1","Company","0","FAQ","faq.htm","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Download","1","Developer","1","Company","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Price","1","Download","1","Developer","1","Company","0", "Partner","partner.htm","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Buy","1","Developer","1","Download","1","Company","0", "Partner","partner.htm","0", "Home","index.htm");
var main_menu_items=Array("1","Products","1","Buy","1","Developer","1","Company","0", "Partner","partner.htm","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Buy Now","1","Demo","1","Download","1","Company","0","FAQ","faq.htm","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Solutions","1","Download","1","Company","0", "Home","index.htm");
//var main_menu_items=Array("1","Software","1","Hardware","1","Solutions","1","EML2.0","1","Download","1","Company","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Solutions","1","Services","1","EML2.0","1","Download","1","Company","0", "Home","index.htm");
//var main_menu_items=Array("1","Products","1","Solutions","1","Services","1","EML2.0","1","Download","0","Company","about_us.htm");
//var main_menu_items=Array("1","Products","1","Solutions","1","Services","1","Demos","1","EML2.0","1","Download","0","Company","about_us.htm");
//var main_menu_items=Array("1","Products","1","Solutions","1","Demos","1","EML2.0","1","Download","1","Company","0","Help","help.htm");
//var product_menu_items=Array("0", "Software", "1","Cloud Media Player","ezcplayer.htm","1","VOD Server","ezserver.htm","1","IPTV Server","eziptv.htm","1","Billing System","ezbilling.htm","1","Player Mangement","ezmagem.htm","0", "Hardware","1", "EZTbox IV","eztbox_4.htm","1", "EZTbox III","eztbox.htm","1", "EZTboard III","eztboard.htm",
//var sw_product_menu_items=Array("0","Server Software","1","VOD Server","ezserver.htm","1","IPTV Server","eziptv.htm","1","Billing System","ezbilling.htm","1","Player Mangement","ezmagem.htm","1","P2P IPTV Server","ezp2ps.htm","0","Client Software","1","GUI System","ezgui.htm","1","IPTV Player","iptv_player.htm","1","VOD Player","vod_player.htm","1","P2P IPTV Player","p2p_iptv_player.htm","1","Digital Signage Player","ds_player.htm");
//var sw_product_menu_items=Array("0","Server Software","1","EZserver6.0","ezserver.htm","1","EZmagem2.0","ezmagem.htm","0","Client Software","1","IPTV Player","iptv_player.htm","1","VOD Player","vod_player.htm","0","IP STB","1","EZbox","ezbox.htm","0","IP Camera (1080p)", "1","EZIPcam","ezipcam.htm");
//var sw_product_menu_items=Array("0","Server Software","1","EZserver6.0","ezserver.htm","1", "REST Applications","ezserver_rest_applications.htm","0","Client Software","1","IPTV Player","iptv_player.htm","1","VOD Player","vod_player.htm","1","Signage Player","ds_player.htm","0","Hardware","1","EZbox","ezbox.htm","1","EZTboard","eztboard.htm");
//var sw_product_menu_items=Array("0","Server Software","1","EZserver6.0","ezserver.htm","1", "REST Applications","ezserver_rest_applications.htm","0","Client Software","1","IPTV Player","iptv_player.htm","1","VOD Player","vod_player.htm","1","Signage Player","ds_player.htm","0","Hardware","1","EZboard-100","ezboard-100.htm","1","EZboard-101","ezboard-101.htm");
//var sw_product_menu_items=Array("0","Server Software","1","EZserver6.0","ezserver.htm","1", "Video Server Applications","video_server_applications.htm");
//var sw_product_menu_items=Array("1","EZserver 6.0","ezserver.htm","1", "EZserver Apps","ezserver_apps.htm","1", "EZserver App SDK","ezserver_app_sdk.htm");
//var sw_product_menu_items=Array("1","EZserver 6.0","ezserver.htm","1", "EZtvware 1.0","eztvware.htm","1", "EZserver Apps","ezserver_apps.htm");
//var sw_product_menu_items=Array("1","EZserver 6.0","ezserver.htm","1", "EZtvware 1.0","eztvware.htm");
var sw_product_menu_items=Array("1","EZserver 6.0","ezserver.htm","1", "EZtvware 1.0","eztvware.htm","1", "IP STB-100","ipstb-100.htm","1", "IP STB-101","ipstb-101.htm","1", "IP STB-102","ipstb-102.htm");
//var sw_product_menu_items=Array("0","Server Software","1","EZserver6.0","ezserver.htm","1","EZmagem2.0","ezmagem.htm","0","Client Software","1","GUI System","ezgui.htm","1","IPTV Player","iptv_player.htm","1","VOD Player","vod_player.htm","1","P2P IPTV Player","p2p_iptv_player.htm","1","Digital Signage Player","ds_player.htm");
//var hw_product_menu_items=Array("1", "EZTbox IV","eztbox_4.htm","1", "EZTbox III","eztbox.htm","1", "EZTboard III","eztboard.htm");
//var hw_product_menu_items=Array("1", "EZTbox IV","eztbox_4.htm","1", "EZTbox III","eztbox.htm","1", "EZTboard III","eztboard.htm",
//"0", "SDK","1", "EZTbox IV SDK","eztbox_4_sdk.htm","1", "EZTbox III SDK","eztbox_3_sdk.htm","1", "EZTboard III SDK","eztboard_3_sdk.htm");
//var product_menu_items=Array("0", "Software", "1","IPTV Player","iptv_player.htm","1","VOD Player","vod_player.htm","1","Digital Signage Player","ds_player.htm","1","VOD Server","ezserver.htm","1","IPTV Server","eziptv.htm","1","Billing System","ezbilling.htm","1","Player Mangement","ezmagem.htm","0", "Hardware","1", "EZTbox IV","eztbox_4.htm","1", "EZTbox III","eztbox.htm","1", "EZTboard III","eztboard.htm",
//"0", "SDK","1", "EZTbox IV SDK","eztbox_4_sdk.htm","1", "EZTbox III SDK","eztbox_3_sdk.htm","1", "EZTboard III SDK","eztboard_3_sdk.htm");
// "0","Server Software","1","VOD Server","ezserver.htm","1","IPTV Server","eziptv.htm","1","Player Mangement","ezmagem.htm","1","Content Mangement","ezconmag.htm","0","SDK","1","Development Kits","sdk.htm");

//var iptv_product_menu_items=Array("0","Embedded Software","1","Embedded GUI","ssp.htm","1","EML Viewer","eml_viewer.htm",
//"0","Server Software","1","VOD Server","ezserver.htm","1","IPTV Server","eziptv.htm","1","Player Mangement","ezmagem.htm","1","Content Mangement","ezconmag.htm");
//var signage_product_menu_items=Array("0","Embedded Software","1","Embedded GUI","ssp.htm","1","EML Viewer","eml_viewer.htm","0","Server Software","1","Player Mangement","ezmagem_signage.htm");
//var sdk_product_menu_items=Array("0","Player SDK","1","VOD EML SDK","vod_eml_sdk.htm","1","IPTV EML SDK","iptv_eml_sdk.htm","1","Digital Signage EML SDK","signage_eml_sdk.htm","0","Server SDK","1","EZmagem SDK","ezmagem_sdk.htm");

var company_menu_items=Array("1","About us","about_us.htm","1","News","news.htm","1","Contact us","contact_us.htm");
//var solution_menu_items=Array("1","IPTV Solution","iptv_solution.htm","1", "Internet VOD Solution","internet_vod_solution.htm","1","Digital Signage Solution","digital_signage_solution.htm","1","VOD/IPTV Bus Solution","bus_vod_iptv_solution.htm","1","internet TV Relay","internet_tv_realy_solution.htm");
var solution_menu_items=Array("1","IPTV Solution","iptv_solution.htm","1", "Internet VOD Solution","internet_vod_solution.htm","1","Digital Signage Solution","digital_signage_solution.htm","1","internet TV Relay","internet_tv_realy_solution.htm");
//var solution_menu_items=Array("1","Internet IPTV Solution","internet_iptv_solution.htm","1", "Push VOD Solution","push_vod_solution.htm", "1","Bus VOD/IPTV Solution","bus_vod_iptv_solution.htm");
//var solution_menu_items=Array("1","Internet IPTV","internet_iptv_solution.htm","1","Bus VOD","bus_vod_solution.htm","1","Bus Digital Signage","bus_ds_solution.htm");
//var demo_menu_items=Array("1","VOD Demo","vod_demo.htm","1","IPTV Demo","iptv_demo.htm","1","Digital Signage Demo","ds_demo.htm");
//var service_menu_items=Array("1","IPTV Player Service","service_iptv_player.htm", "1","VOD Player Service","service_vod_player.htm","1","Signage Player Service","service_signage_player.htm");
var service_menu_items=Array("1","EZserver Everyhardware","service_ezserver.htm");
//var price_menu_items=Array("1","EZserver & Apps","ezserver_price.htm","1","EZserver App SDK","ezserver_app_sdk_price.htm","1","IPTV Suite","iptv_suite.htm");
var price_menu_items=Array("1","EZserver & Apps","ezserver_price.htm","1","IPTV Suite","iptv_suite.htm");
//var buynow_menu_items=Array("1","EZserver","ezserver_order.htm","1","IPTV suite","iptv_suite_order.htm","1","Digital Signage suite","digital_signage_suite_order.htm");
var buynow_menu_items=Array("1","IPTV suite-100","iptv_suite_100.htm","1","IPTV suite-101","iptv_suite_101.htm","1","IPTV suite-102","iptv_suite_102.htm");
//var developer_menu_items=Array("1","Satellite IPTV","iptv/sat_iptv/user_manual.htm","1","Live IPTV","iptv/live_iptv/user_manual.htm","1","Prerecorded IPTV","iptv/prerecorded_iptv/user_manual.htm");
//var developer_menu_items=Array("1","EZserver Installation","developer/ezserver_installation/user_manual.htm","1", " EZserver Forum", "http://groups.google.com/group/ezserver","1","EZserver HTTP API","developer/httpapi/user_manual.htm","1","Billing Protocol","developer/billing_protocol/user_manual.htm");
//var developer_menu_items=Array("1","EZserver Manual","developer/ezserver_installation/user_manual.htm","1","EZtvware Manual","developer/eztvware/user_manual.htm","1","EZserver HTTP API","developer/httpapi/user_manual.htm","1"," EZserver Forum", "http://groups.google.com/group/ezserver");
//var developer_menu_items=Array("1","EZserver Manual","developer/ezserver_installation/user_manual.htm","1","EZtvware Manual","developer/eztvware/user_manual.htm","1","EZserver Forum", "http://groups.google.com/group/ezserver");
var developer_menu_items=Array("1","EZserver Manual","developer/ezserver_installation/user_manual.htm","1","EZtvware Manual","developer/eztvware/user_manual.htm");
//var service_menu_items=Array("1","IP STB Service","ip_stb_service.htm","1","Middleware Service","middleware_service.htm","1","Server Service","server_service.htm");
//var download_menu_items=Array("1","EZserver","download_ezserver.htm","1","EZIPTV","download_eziptv.htm","1","EZmagem","download_ezmagem.htm","1","EML examples","download_eml_example.htm");
//var download_menu_items=Array("1","EZserver","download_ezserver.htm","1","EZIPTV","download_eziptv.htm","1","EZmagem","download_ezmagem.htm");
var download_menu_items=Array("1","EZserver","download_ezserver.htm");
var demo_menu_items=Array("1","EZserver","demo_ezserver.htm");
//var eml_menu_items=Array("1","EML Introduction","eml_intro.htm","1","EML Get Started","eml_started.htm","1","EML Basic","eml_basic.htm","1","EML VOD","eml_vod.htm","1","EML IPTV","eml_iptv.htm");
var eml2_menu_items=Array("1","EML2.0 Introduction","eml2_intro.htm","1","EML2.0 Get Started","eml2_started.htm","1","EML2.0 Basic","eml2_basic.htm","1","EML2.0 VOD","eml2_vod.htm","1","EML2.0 IPTV","eml2_iptv.htm","1","EML2.0 Sigange","eml2_ds.htm");
//var eml2_menu_items=Array("0", "EML2.0","1","EML2.0 Introduction","eml2_intro.htm","1","EML2.0 Get Started","eml2_started.htm","1","EML2.0 Basic","eml2_basic.htm","1","EML2.0 VOD","eml2_vod.htm","1","EML2.0 IPTV","eml2_iptv.htm","1","EML2.0 Sigange","eml2_ds.htm","0", "EML1.0", "1","EML1.0", "eml1.htm","0", "EML Porting","1", "EML Viewer Porting", "eml_porting.htm");

function check_ezserver_win_pass()
{
	var password = ''
	password=prompt('Please contact sales@ezhometech.com for Password:','');
	if (password != null) {
	location.href= 'download/ezserver6.0.'+password+'.zip';
	}
}
function check_ezserver_linux_pass()
{
	var password = ''
	password=prompt('Please contact sales@ezhometech.com for Password:','');
	if (password != null) {
	location.href= 'download/ezserver6.0.'+password+'.tar';
	}
}
function check_eziptv_win_pass()
{
	var password = ''
	password=prompt('Please contact sales@ezhometech.com for Password:','');
	if (password != null) {
	location.href= 'download/eziptv1.0.'+password+'.zip';
	}
}
function check_eziptv_linux_pass()
{
	var password = ''
	password=prompt('Please contact sales@ezhometech.com for Password:','');
	if (password != null) {
	location.href= 'download/eziptv1.0.'+password+'.tar';
	}
}
function check_ezmagem_win_pass()
{
	var password = ''
	password=prompt('Please contact sales@ezhometech.com for Password:','');
	if (password != null) {
	location.href= 'download/ezmagem2.0.'+password+'.zip';
	}
}
function check_ezmagem_linux_pass()
{
	var password = ''
	password=prompt('Please contact sales@ezhometech.com for Password:','');
	if (password != null) {
	location.href= 'download/ezmagem2.0.'+password+'.tar';
	}
}
function posX(obj) {
  var x = 0;
  if (obj.offsetParent) {
    while (obj.offsetParent) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
  }
  else if (obj.y) {
    while (obj.x) {
      x += obj.x;
    }
  }
  return x;
}

function posY(obj) {
  var y = 0;
  if (obj.offsetParent) {
    while (obj.offsetParent) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
  }
  else if (obj.y) {
    while (obj.y) {
      y += obj.y;
    }
  }
  return y;
}
function show_underline(item)
{
  var item = document.getElementById(unescape(item));
//  alert(item.innerHTML);
  item.style.textDecoration="underline";
// item.style.color="#00ff00";
//	item.style.backgroundColor="#0000FF";
//	 item.filters.item('DXImageTransform.Microsoft.Gradient').StartColorStr="#8888";
// item.filters.item('DXImageTransform.Microsoft.Gradient').EndColorStr="#88";

}
function close_underline(item)
{
  var item = document.getElementById(unescape(item));
//	item.style.backgroundColor="#555555";
  item.style.textDecoration="none";

}
function show_simple_left_menu_item(item)
{

  // var item = document.getElementById(item);
 var menu_item = document.getElementById("left_menu_item_float");
   var i=0;
  var TempArray;
  var temp;
	var menu_item_buffer="";
 return;
   menu_item.innerHTML="";
// temp=item.innerHTML;
 temp=item;
 TempArray=0;
 if (temp.match(main_menu_items[1])) 
 {
  	TempArray=sw_product_menu_items;
 } 
// else if (temp.match(main_menu_items[3])) 
// {
 //	TempArray=price_menu_items;
 // }
 else if (temp.match(main_menu_items[3])) 
{
 	TempArray=buynow_menu_items;
}
// else if (temp.match(main_menu_items[5])) 
 //{
 //	TempArray=demo_menu_items;
// }
//  else if (temp.match(main_menu_items[7])) 
 //{
  //	TempArray=eml2_menu_items;
  //}
 else
  	 if (temp.match(main_menu_items[5])) 
 {
  	TempArray=developer_menu_items;
  }  
//  else	 if (temp.match(main_menu_items[7])) 
 //{
 //	TempArray=download_menu_items;
 // }
   else
  	 if (temp.match(main_menu_items[7])) 
 {
  	TempArray=company_menu_items;
  }
  
 if (TempArray.length>0)	
 {
 	menu_item.style.paddingTop=5;
 	menu_item.style.paddingLeft=5;
 	menu_item.style.paddingRight=5;
 	menu_item.style.paddingBottom=5;
 	menu_item.style.width="170px";

 	

	  for (i=0;i<=TempArray.length-1;i++)
 	 {
 	 	if (TempArray[i]==0)
 	 	{
 	 		i++;
	 		menu_item_buffer=menu_item_buffer+'<tr><td ><font face="Verdana" size="2" color="#0000aa"><b>'+TempArray[i]+'</b></font></td></tr>';

 		}
 	 	else if (TempArray[i]==1)
 	 	{
 	 		i++;
//			menu_item_buffer=menu_item_buffer+'<tr><td id="submenu_item_00'+i+'" '+'onmouseover=show_underline("submenu_item_00'+i+'") '+'onmouseout=close_underline("submenu_item_00'+i+'")> '+'<p style="margin-top: 3; margin-bottom: 5">'+'<a style="text-decoration:none" href="'+TempArray[i+1]+'">'+' <font face="Verdana" size="2" color="#FFFFFF">'+TempArray[i]+'</font></a></td></tr>';
//			menu_item_buffer=menu_item_buffer+'<tr><td id="submenu_item_000'+i+'" '+'onmouseover=show_underline("submenu_item_00'+i+'") '+'onmouseout=close_underline("submenu_item_00'+i+'")> '+'<p style="margin-top: 3; margin-bottom: 5">'+'<a '+'id="submenu_item_00'+i+'" '+'style="text-decoration:none" href="'+TempArray[i+1]+'">'+' <font face="Verdana" size="2" color="#FFFFFF">'+TempArray[i]+'</font></a></td></tr>';
			menu_item_buffer=menu_item_buffer+'<tr><td onmouseover=show_underline("submenu_item_00'+i+'") '+'onmouseout=close_underline("submenu_item_00'+i+'")> '+'<p style="margin-top: 3; margin-bottom: 5">'+'<a '+'id="submenu_item_00'+i+'" '+'style="text-decoration:none" href="'+TempArray[i+1]+'">'+' <font face="Verdana" size="1" color="#0000ff"><li>'+TempArray[i]+'</li></font></a></td></tr>';
			i++;
 			
 		}
 	 }
 	 menu_item.innerHTML='<table border="0" cellpadding="0" cellspacing="0"> '+menu_item_buffer+' </table>';
  } else
  	{
  		 menu_item.style.paddingTop=0;
		 menu_item.style.paddingLeft=0;
		 menu_item.style.paddingRight=0;
		 menu_item.style.paddingBottom=0;
 	         menu_item.style.width="0px";


  	}
  	
 // alert(menu_item.innerHTML);
 
}
function show_left_menu_item(item)
{
 
}

function show_menu_item(item)
{
	
  var item = document.getElementById(unescape(item));
 var menu_item = document.getElementById("menu_item_float");
   var i=0;
  var TempArray;
  var temp;
	var menu_item_buffer="";

   item.style.textDecoration="underline";

//   menu_item.style.left=posX(item)+item.offsetWidth/5;
   menu_item.style.left=posX(item);
  menu_item.style.right=posX(item)+item.offsetWidth;
    menu_item.style.top=posY(item)+item.offsetHeight;

   menu_item.innerHTML="";
 temp=item.innerHTML;
 TempArray=0;
 if (temp.match(main_menu_items[1])) 
 {
  	TempArray=sw_product_menu_items;
 }
// else if (temp.match(main_menu_items[3])) 
// {
 // 	TempArray=price_menu_items;
// }
 else if (temp.match(main_menu_items[3])) 
{
	TempArray=buynow_menu_items;
}
// else if (temp.match(main_menu_items[5])) 
// {
//	TempArray=demo_menu_items;
// }
 //else if (temp.match(main_menu_items[7])) 
 //{
//	TempArray=eml2_menu_items;
 //}
  else if (temp.match(main_menu_items[5])) 
 {
	TempArray=developer_menu_items;
 }
 // else if (temp.match(main_menu_items[7])) 
 //{
//	TempArray=download_menu_items;
 //}
  else if (temp.match(main_menu_items[7])) 
 {
	TempArray=company_menu_items;
 }
 if (TempArray.length>0)	
 {
 	menu_item.style.paddingTop=5;
 	menu_item.style.paddingLeft=5;
 	menu_item.style.paddingRight=5;
 	menu_item.style.paddingBottom=5;
 	menu_item.style.width="170px";

 	

	  for (i=0;i<=TempArray.length-1;i++)
 	 {
 	 	if (TempArray[i]==0)
 	 	{
 	 		i++;
	 		menu_item_buffer=menu_item_buffer+'<tr><td ><font face="Verdana" size="1" color="#ffffff"><b>'+TempArray[i]+'</b></font></td></tr>';

 		}
 	 	else if (TempArray[i]==1)
 	 	{
 	 		i++;
//			menu_item_buffer=menu_item_buffer+'<tr><td id="submenu_item_00'+i+'" '+'onmouseover=show_underline("submenu_item_00'+i+'") '+'onmouseout=close_underline("submenu_item_00'+i+'")> '+'<p style="margin-top: 3; margin-bottom: 5">'+'<a style="text-decoration:none" href="'+TempArray[i+1]+'">'+' <font face="Verdana" size="2" color="#000000">'+TempArray[i]+'</font></a></td></tr>';
//			menu_item_buffer=menu_item_buffer+'<tr><td id="submenu_item_000'+i+'" '+'onmouseover=show_underline("submenu_item_00'+i+'") '+'onmouseout=close_underline("submenu_item_00'+i+'")> '+'<p style="margin-top: 3; margin-bottom: 5">'+'<a '+'id="submenu_item_00'+i+'" '+'style="text-decoration:none" href="'+TempArray[i+1]+'">'+' <font face="Verdana" size="2" color="#FFFFFF">'+TempArray[i]+'</font></a></td></tr>';
			menu_item_buffer=menu_item_buffer+'<tr><td onmouseover=show_underline("submenu_item_00'+i+'") '+'onmouseout=close_underline("submenu_item_00'+i+'")> '+'<p style="margin-top: 3; margin-bottom: 5">'+'<a '+'id="submenu_item_00'+i+'" '+'style="text-decoration:none" href="'+TempArray[i+1]+'">'+' <font face="Verdana" size="1" color="#000000"><li>'+TempArray[i]+'</li></font></a></td></tr>';
			i++;
 			
 		}
 	 }
 	 menu_item.innerHTML='<table border="0" cellpadding="0" cellspacing="0" bordercolor="#ffffff"> '+menu_item_buffer+' </table>';
  } else
  	{
  		 menu_item.style.paddingTop=0;
		 menu_item.style.paddingLeft=0;
		 menu_item.style.paddingRight=0;
		 menu_item.style.paddingBottom=0;
 	         menu_item.style.width="0px";


  	}
  	
 // alert(menu_item.innerHTML);
 
}

function close_menu_item()
{
	
 var menu_item = document.getElementById("menu_item_float");
 menu_item.style.paddingTop=0;
 menu_item.style.paddingLeft=0;
 menu_item.style.paddingRight=0;
 menu_item.style.paddingBottom=0;
 menu_item.style.width="0px";

  menu_item.innerHTML="";
   

}


function init_menu()
{
	var item_width=0;
	var i=0;
 	var main_menu = document.getElementById("main_menu"); 
 	var main_menu_buffer="";
	
//	main_menu_buffer='<p align="center" style="margin-top: 0; margin-bottom: 0"><b><i><font color="#FFFFFF" size="6" face="Bookman Old Style">EZhometech</font>&nbsp;&nbsp;</i><font size="2" face="Verdana" color="#FFFF00">'+'The leading media software company</font></td></tr>';
//        main_menu_buffer='<table border="0" height="30" cellpadding="0" cellspacing="0" width="100%"><tr><td background="picture/title.PNG" width=987></td></tr>'
        main_menu_buffer='<table border="0" background="picture/title.PNG"  width="987" height="65" cellpadding="0" cellspacing="0" >';


	main_menu_buffer+='<tr valign="bottom">';
 	for (i=0;i<main_menu_items.length;i++)
 	{
 		if (main_menu_items[i]==1)
 		{
 		 i++;
			main_menu_buffer=main_menu_buffer+'<td align="center" width="17%" style="cursor:hand" onmouseover=show_menu_item("'+escape(main_menu_items[i])+'") '+'onmouseout=close_underline("'+escape(main_menu_items[i])+'")'+' id="'+main_menu_items[i]+'" align="center">'+' <font face="Verdana" size="2" color="#333333"><b>'+main_menu_items[i]+'</b></font></td>';
		} else if (main_menu_items[i]==0)
		{
			i++;
			main_menu_buffer=main_menu_buffer+'<td align="center" width="17%" onmouseover=show_menu_item("'+escape(main_menu_items[i])+'") '+'onmouseout=close_underline("'+escape(main_menu_items[i])+'")'+'> <a'+' id="'+main_menu_items[i]+'" '+'  href="'+main_menu_items[i+1]+'" style="text-decoration:none">'+' <font face="Verdana" size="2" color="#333333"><b>'+main_menu_items[i]+'</b></font></a></td>';
		}
	
	}
		main_menu_buffer=main_menu_buffer+'<td align="center" width="17%"></td>';
		main_menu.innerHTML=main_menu_buffer+'</tr></table>';
//		alert(main_menu.innerHTML);
//		main_menu.innerHTML='<table border="0" height="30" cellpadding="0" cellspacing="0" width="100%" style="FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorstr=#35a9bb,endColorstr=#dae9fe,GradientType=0)"><tr>'+main_menu_buffer+'</tr></table>';

//	alert(main_menu.innerHTML);
	

}

/*
function loop_show(index_no){
var timeValue;
var page_message;
var banner;
var how_many_ads = 4;   
var time_delay=4000;


if (index_no==1) 
{
	g_ad=0;
	clearTimeout(g_timer);

}else if (index_no==2) 
{
	g_ad=1;
	clearTimeout(g_timer);
}else if (index_no==3) 
{
	g_ad=2;
	clearTimeout(g_timer);
}
else if (index_no==4) 
{
	g_ad=3;
	clearTimeout(g_timer);

}


if (g_ad==0)
{
banner="picture/ezserver.PNG";
timeValue ='<a href="ezserver.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p style="margin: 5" align="left"><font face="Verdana" size="2"  color="#000000"><b>We are software experts in IP STB and Video Server...</b></font>';

} else if (g_ad==1)
{
banner="picture/eziptv.PNG";
timeValue ='<a href="eziptv.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p style="margin: 5" align="left"><font face="Verdana" size="2"  color="#000000"><b>We have at least 14-year experience in IP STB Software Porting...</b></font>';

}else if (g_ad==2) {
banner="picture/ezmagem.PNG";
timeValue ='<a href="ezmagem.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p style="margin: 5" align="left"><font face="Verdana" size="2"  color="#000000"><b>We have the total software solution in IPTV and VOD...</b></font>';

} else if (g_ad==3)
{
banner="picture/ezbilling.PNG";
timeValue ='<a href="ezbilling.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p style="margin: 5" align="left"><font face="Verdana" size="2"  color="#000000"><b>We will be your best software partner in IPTV and VOD market...</b></font>';

} 
mainpage.innerHTML = timeValue;
mainpage_text.innerHTML = page_message;
g_timer=setTimeout("loop_show(0)",time_delay);
g_ad=(g_ad+1)%how_many_ads;

}
*/

/*
function loop_show(index_no){
var timeValue;
var page_message;
var banner;
var how_many_ads = 4;   
var time_delay=4000;


if (index_no==1) 
{
	g_ad=0;
	clearTimeout(g_timer);
}
else if (index_no==2) 
{
	g_ad=1;
	clearTimeout(g_timer);

}
else if (index_no==3) 
{
	g_ad=2;
	clearTimeout(g_timer);
}else if (index_no==4) 
{
	g_ad=3;
	clearTimeout(g_timer);
}

if (g_ad==0) {
banner="picture/ezserver.PNG";
timeValue ='<a href="ezserver.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p align="center"><font face="Verdana" size="2"  color="#000000">A Leading IP STB Software Company</font>';

} else if (g_ad==1)
{
banner="picture/eziptv.PNG";
timeValue ='<a href="eziptv.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p align="center"><font face="Verdana" size="2"  color="#000000">A Leading IP STB Software Company</font>';

} else if (g_ad==2)
{
banner="picture/ezmagem.PNG";
timeValue ='<a href="ezmagem.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p align="center"><font face="Verdana" size="2"  color="#000000">A Leading IP STB Software Company</font>';

}  else if (g_ad==3)
{
banner="picture/ezbilling.PNG";
timeValue ='<a href="ezbilling.htm">'+'<img border="0" src="'+banner+'">'+'</a>'
page_message='<p align="center"><font face="Verdana" size="2"  color="#000000">A Leading IP STB Software Company</font>';
}
mainpage.innerHTML = timeValue;
mainpage_text.innerHTML = page_message;
g_timer=setTimeout("loop_show(0)",time_delay);
g_ad=(g_ad+1)%how_many_ads;

}
*/
