<!--
   function getURL(tcURL, scURL)
   {
     dest = top.location.href;
     if (dest.indexOf("unigb") != -1)
     {
       document.write(scURL);
     }
     else
     {
       document.write(tcURL);
     }         
   }

   function changelang() //English <-> T.Chinese
   {
     kanhan = "www4.itf.gov.hk/unigb/";
     actual = "www.itf.gov.hk/";
     dest = top.location.href;

     //document.write(dest.substring(dest.length - 1, dest.length));
     //Check for "#" in the last place of the URL
     if (dest.substring(dest.length - 1, dest.length) == "#")
     {
	dest = dest.substring(0,dest.length-1);
     }

     if (dest.indexOf("/Search/") != -1)
     {
         if(dest.indexOf("equip_db") != -1)
        {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "equip_db.asp";
         }
         
         if(dest.indexOf("project_search") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "programme.asp";
         }
         
         if(dest.indexOf("outcome") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "delive_adv.asp";
         }
         
     }

     if (dest.indexOf("/Reg/") != -1)
     {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "join_ITISuser.asp";
     }

     if (dest.indexOf("/News/") != -1)
     {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "proj_news_sel.asp";
     }

     //Redir from Kan Han to the actual server
     if (dest.indexOf("unigb") != -1)
     {
	dest = dest.replace(kanhan,"");
     }

     if (dest.indexOf("/eng/") != -1)
     {   
         top.location.replace(dest.replace(/\/eng\//,"/tc/"));
     }
     else if (dest.indexOf("/tc/") != -1)
     {   
         top.location.replace(dest.replace(/\/tc\//,"/eng/"));     
     }
     else if (dest.indexOf("\\eng\\") != -1)
     {  
         top.location.replace(dest.replace(/\\eng\\/,"\\tc\\"));     
     }
     else if (dest.indexOf("\\tc\\") != -1)
     {   
         top.location.replace(dest.replace(/\\tc\\/,"\\eng\\"));     
     }
   }

   function changelang2() //English <-> S.Chinese
   {
     //int position;
     //String aString;
     //String dest;
     kanhan = "www4.itf.gov.hk/unigb/";
     actual = "www.itf.gov.hk/"
     dest = top.location.href;
     
     //document.write(dest.substring(dest.length - 1, dest.length));
     //Check for "#" in the last place of the URL
     if (dest.substring(dest.length - 1, dest.length) == "#")
     {
	dest = dest.substring(0,dest.length-1);
     }

     if (dest.indexOf("/Search/") != -1)
     {
         if(dest.indexOf("equip_db") != -1)
	 {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "equip_db.asp";
         }
         
         if(dest.indexOf("project_search") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "programme.asp";
         }

         if(dest.indexOf("proj_") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "programme.asp";
         }
         
	if(dest.indexOf("outcome") != -1)
	{
		position = top.location.href.lastIndexOf("/");
		aString = top.location.href.substring(0,position+1);
		dest = aString + "delive_adv.asp";
	}	
     }

     if (dest.indexOf("/Reg/") != -1)
     {
	position = top.location.href.lastIndexOf("/");
	aString = top.location.href.substring(0,position+1);
	dest = aString + "join_ITISuser.asp";
     }

     if (dest.indexOf("/News/") != -1)
     {
	position = top.location.href.lastIndexOf("/");
	aString = top.location.href.substring(0,position+1);
	dest = aString + "proj_news_sel.asp";
     }

     if (dest.indexOf("unigb") != -1) //S.Chinese -> English
     {
	dest = dest.replace(kanhan,"");
     }
     else //English -> S.Chinese
     {
	dest = dest.replace(actual,kanhan + actual);
     }

     if (dest.indexOf("/eng/") != -1)
     {   
         top.location.replace(dest.replace(/\/eng\//,"/tc/"));
     }
     else if (dest.indexOf("/tc/") != -1)
     {  
         top.location.replace(dest.replace(/\/tc\//,"/eng/"));     
     }
     else if (top.location.href.indexOf("\\eng\\") != -1)
     {  
         top.location.replace(dest.replace(/\\eng\\/,"\\tc\\"));     
     }
     else if (top.location.href.indexOf("\\tc\\") != -1)
     {   
         top.location.replace(dest.replace(/\\tc\\/,"\\eng\\"));
     }
   }

   function changelang3() //T.Chinese <-> S.Chinese
   {
     //int position;
     //String aString;
     //String dest;
     kanhan = "www4.itf.gov.hk/unigb/";
     actual = "www.itf.gov.hk/"
     dest = top.location.href;
     
     //document.write(dest.substring(dest.length - 1, dest.length));
     //Check for "#" in the last place of the URL
     if (dest.substring(dest.length - 1, dest.length) == "#")
     {
	dest = dest.substring(0,dest.length-1);
     }

     if (dest.indexOf("/Search/") != -1)
     {
         if(dest.indexOf("equip_db") != -1)
        {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "equip_db.asp";
         }
         
         if(dest.indexOf("project_search") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "programme.asp";
         }

         if(dest.indexOf("proj_") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "programme.asp";
         }
         
         if(dest.indexOf("outcome") != -1)
         {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "delive_adv.asp";
         }
     }
     
     if (dest.indexOf("/Reg/") != -1)
     {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "join_ITISuser.asp";
     }

     if (dest.indexOf("/News/") != -1)
     {
             position = top.location.href.lastIndexOf("/");
             aString = top.location.href.substring(0,position+1);
             dest = aString + "proj_news_sel.asp";
     }

     if (dest.indexOf("unigb") != -1) //S.Chinese -> T.Chinese
     {
	dest = dest.replace(kanhan,"");
     }
     else //T.Chinese -> S.Chinese
     {
	dest = dest.replace(actual,kanhan + actual);
     }

     top.location.replace(dest);

     //if (dest.indexOf("/tc/") != -1)
     //{   
     //   top.location.replace(dest.replace(/\/tc\//,"/sc/"));
     //}
     //else if (dest.indexOf("/sc/") != -1)
     //{   
     //    top.location.replace(dest.replace(/\/sc\//,"/tc/"));     
     //}
     //else if (dest.indexOf("\\tc\\") != -1)
     //{  
     //    top.location.replace(dest.replace(/\\tc\\/,"\\sc\\"));     
     //}
     //else if (dest.indexOf("\\sc\\") != -1)
     //{   
     //    top.location.replace(dest.replace(/\\sc\\/,"\\tc\\"));     
     //}
   }

//-->	