//pro_menu
//argument
program_path='programs/';

//argument//
var xmlHttp
function showdate(str)
{ 
//alert("into the call_programs");
//alert(str);
if (str.length > 0)
   {            
   xmlHttp=GetXmlHttpObject(stateChanged)
   xmlHttp.open("GET", str , true)
   xmlHttp.send(null)
   } 
   else
   { 
      document.getElementById("main").innerHTML="<div class=\"title\" align=\"center\">目前沒有連結</div>"

   } 
} 
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
   document.getElementById("main").innerHTML=xmlHttp.responseText 
   } 
} 
//pro_menu//

//show_item
function show_item(str)
{ 
 //alert("into the call_programs");
	
if (str.length > 0 && str.length <38)
   {          
	   if(str.slice(-2)=="=s" || str.slice(-2)=="=m" || str.slice(-2)=="=b"  ){   
	   xmlHttp=GetXmlHttpObject(itemChanged)
	   xmlHttp.open("GET", str , true)
	   xmlHttp.send(null)
	   }
   } 
   else
   { 
      //document.getElementById("show_item").innerHTML="<div class=\"title\" align=\"center\">目前沒有連結</div>"
    } 
} 

  
function itemChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
   //document.getElementById("show_item").innerHTML=xmlHttp.responseText 
   } 
} 
//show_item//


//introduce//



//know the browser what the useer use.
function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

if (navigator.userAgent.indexOf("Opera")>=0)
   {
    alert("This program doesn't work in Opera") 
    return;  
   }
if (navigator.userAgent.indexOf("MSIE")>=0)
   { 
   var strName="Msxml2.XMLHTTP"
   if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
      {
      strName="Microsoft.XMLHTTP"
      } 
   try
      { 
      objXmlHttp=new ActiveXObject(strName)
      objXmlHttp.onreadystatechange=handler 
      return objXmlHttp
      } 
   catch(e)
      { 
      alert("Error. Scripting for ActiveX might be disabled") 
      return 
      } 
    } 
if (navigator.userAgent.indexOf("Mozilla")>=0)
   {
   objXmlHttp=new XMLHttpRequest()
   objXmlHttp.onload=handler
   objXmlHttp.onerror=handler 
   return objXmlHttp
   }
} 

function open_date(url)
{
	window.open(url,"TMTF");
	}
