﻿//pro_menu
//argument
program_path='programs/';
//argument//
var xmlHttp
function showdate(str)
{ 
document.getElementById("main").innerHTML="<table width=\"525\" height=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"  valign=\"middle\"><tr align=\"center\" class=\"content_title\"><td><img src=\"http://www.tmtf.org.tw/chinese/templates/images/loading.gif\"/></tr></td></table>"	

//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");
//alert(str);
if (str.length > 0)
   {            
   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//

//show_company_date
function show_company_date(str)
{ 

//alert("into the call_programs");
//alert(str);
if (str.length > 0)
   {            
   xmlHttp=GetXmlHttpObject(companyChanged)
   xmlHttp.open("GET", str , true)
   xmlHttp.send(null)
   } 
   else
   { 
      document.getElementById("interview_way").innerHTML="<div class=\"title\" align=\"center\">目前沒有連結</div>"

   } 
} 


function companyChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
   document.getElementById("interview_way").innerHTML=xmlHttp.responseText 
   } 
} 
//show_company_date//

//show_login_date
function show_login(str)
{ 
//alert("into the call_programs");
//alert(str);
if (str.length > 0)
   {            
   xmlHttp=GetXmlHttpObject(logindate)
   xmlHttp.open("GET", str , true)
   xmlHttp.send(null)
   } 
   else
   { 
      document.getElementById("left").innerHTML="<div class=\"title\" align=\"center\">目前沒有連結</div>"

   } 
} 
function logindate() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   { 
   document.getElementById("left").innerHTML=xmlHttp.responseText 
   } 
} 
//show_login_date//


//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");
	}
	
	
	
	
//the  picture can with the mouse

function YY_Mousetrace(evnt) { //v1.2 copyright (c)1998 Yaro von Flocken
var yy_mt = 0; 
var yy_ml = 0;
yy_ml=(document.layers.event.clientX + document.body.scrollLeft);
yy_mt=(event.clientY + document.body.scrollTop);
document.all.cursor.style.left=yy_ml+10;
document.all.cursor.style.top=yy_mt+10;
document.all.cursor.style.display='inline';
if(document.all.cursor)document.onmousemove = YY_Mousetrace;
}
//the  picture can with the mouse

function admin () {
var name = prompt('請輸入用戶名!','');
var pass = prompt('請輸入密碼!','');
document.k.user.value=name;
document.k.pass.value=pass;
document.k.submit();
}