homeSite = 'http://www.sunday.com/Sunday/';
cornerSite = 'http://www.sunday.com/Sunday/';
ebillSite = 'http://ebinter.sunday.com/';
smsSite   = 'http://specials.sunday.com/sunday/';
//chatlineSite = 'http://www.blackoctopus.com/';
//eshopSite = 'http://www.sunday.com/Sunday/';
w2pSite   = 'http://specials.sunday.com/sunday/';
sowapSite = 'http://www.sunday.com/sowap/';
pdaSite   = 'http://win.sunday.com/';
wisSite   = 'http://win.sunday.com/';
logoutSite = 'http://www.sunday.com/Sunday/servlet/Logout?';
defaultSN = 'www.sunday.com';
releaseBarring = 'https://ecare.pccwmobile.com/ECOSWeb/callbarring3g.action?';
/*
homeSite = 'http://snsso2.sunday.com/Sunday/';
cornerSite = 'http://snsso2.sunday.com/Sunday/';
//ebillSite = 'http://ebinter.sunday.com/';
ebillSite = 'http://ebdevdb.sunday.com/';
//smsSite   = 'http://sms.sunday.com/sunday/';
smsSite   = 'http://development.imsunday.com/sunday/';
chatlineSite = 'http://www.blackoctopus.com/';
//eshopSite = 'http://www.sunday.com/Sunday/';
//w2pSite = 'http://sms.sunday.com/sunday/';
w2pSite = 'http://development.imsunday.com/sunday/';
//sowapSite = 'http://www.sunday.com/sowap/';
sowapSite = 'http://snsso2.sunday.com/sowap/';
pdaSite   = 'http://win.sunday.com/';
wisSite   = 'http://win.sunday.com/';
logoutSite = 'http://snsso2.sunday.com/Sunday/servlet/Logout?';
defaultSN = 'snsso2.sunday.com';
*/

//tomcatServer = "http://snsso2.sunday.com";
tomcatServer = "http://www.sunday.com";
ecosSite     = tomcatServer + "/cos/";
eshopSite    = tomcatServer + "/cos/";


function link (URL, pathName, queryString) {

  var loEN;
  var anchor=-1;
  var firstHalf="";
  var secHalf="";
  var thirdHalf="";
  var lang="en";
  var HomeSiteSID;
  var ServiceNode;
  var CustStat;
  // CustStat= readCookie ("CustStat");

  var wtVisitCount;   //added by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie
  var wtVisitID;      //added by IES Ken Ho(09/09/02 3:55PM), for web tracking visit ID cookie 
  
    
  //if (CustStat==null || CustStat =="" || CustStat== "null")
  //{
  //      CustStat="";
  //}
  //else  if (CustStat=="S")
  //{
  //      if (URL==smsSite || pathName.indexOf('sowap.html')>-1)
  //      {
  //              window.location="/Sunday/en/corner/login.jsp";
  //              return;
  //      }
  //}

  if (pathName == null || pathName == "" || pathName == "null" )
  {
    return null;
  }
  loEN = document.form1.english;
  if (loEN!=null) {
    lang = "tw";
  }

  HomeSiteSID = readCookie ("HomeSiteSID");
  ServiceNode = readCookie ("ServiceNode");
  wtVisitCount = readCookie ("wtVisitCount");   //added by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie  
  wtVisitID = readCookie ("wtVisitID");  

  if (HomeSiteSID == null)
  {
      HomeSiteSID = "";
  }
  if (ServiceNode == null)
  {
      ServiceNode = "";
  }

  if(HomeSiteSID == null || HomeSiteSID == "")
    gfnWriteCookie("CustStat", "");
  
  CustStat= readCookie ("CustStat");
 
  //if (HomeSiteSID == null)
  //{
  //    HomeSiteSID = "";
  //}
  
  //added by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie  
  if (wtVisitCount == null || wtVisitCount == "")
  {
      wtVisitCount = 1;   
  }
  
  

  //if (HomeSiteSID == null || HomeSiteSID == "" || HomeSite == "null" )
//  HomeSiteSID = "0";

  if (ServiceNode == null || ServiceNode == "" || ServiceNode == "null")
    ServiceNode = defaultSN;

  if (CustStat==null || CustStat =="" || CustStat== "null")
  {
        CustStat="";
  }
  else  if (CustStat=="S")
  {
//        if (URL==smsSite || pathName.indexOf('sowap.html')>-1 || URL==cornerSite || URL==ecosSite || URL==eshopSite)
          if (URL==smsSite || pathName.indexOf('sowap.html')>-1 || (URL==cornerSite && pathName.indexOf('index.html')==-1 ) || URL==ecosSite || URL==eshopSite)
        {
                //Modified by IES Ken Ho(10/04/02 3:28PM), for redirect the user to warning page instead of login page
                //window.location="/Sunday/en/corner/login.jsp";
                if (queryString != null && queryString != "")
                    window.location="/Sunday/"+lang+"/error/DeactWarning.jsp?"  + queryString + "&HomeSiteSID=" + HomeSiteSID  + "&wtVisitID=" + wtVisitID + "&wtVisitCount=" + wtVisitCount + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
                else
                    window.location="/Sunday/"+lang+"/error/DeactWarning.jsp?HomeSiteSID=" + HomeSiteSID + "&wtVisitID=" + wtVisitID + "&wtVisitCount=" + wtVisitCount + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
                return;
        }
  }  
  
  
  if (pathName.indexOf('corner/index.html') > -1)
  {
    //modified by IES Ken Ho(10/03/02 7:45PM), change to use lang variable instead of hardcode "en"
    //pathName = "en/Home/PageController.jsp?action=SundayCorner&page=CornerMain";
    pathName = lang + "/Home/PageController.jsp?action=SundayCorner&page=CornerMain";
  }
  if (pathName.indexOf("mobilechat/sundaychatline") > -1 )
  {
        pathName = "mobilechat/sundaychatline/chatline.asp";
  }

  if (pathName.indexOf('?') < 0)
  {
    if (queryString != null && queryString != "")
    {
        //modified by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie
        //  NOTICE: ServiceNode and Lang parameters should put to the tail of the query string, due to the cgi logic in eBill site
        //          otherwise, eBill site can't login
        //targetURL = URL + pathName + "?"  + queryString + "&HomeSiteSID=" + HomeSiteSID + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
        targetURL = URL + pathName + "?"  + queryString + "&HomeSiteSID=" + HomeSiteSID  + "&wtVisitID=" + wtVisitID + "&wtVisitCount=" + wtVisitCount + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
    }
    else
    {
        //modified by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie      
        //targetURL = URL + pathName + "?HomeSiteSID=" + HomeSiteSID + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
        targetURL = URL + pathName + "?HomeSiteSID=" + HomeSiteSID + "&wtVisitID=" + wtVisitID + "&wtVisitCount=" + wtVisitCount + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
    }
  }
  else
  {
    if (queryString != null && queryString != "")
    {
        //modified by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie      
        //targetURL = URL + pathName + "&" + queryString + "&HomeSiteSID=" + HomeSiteSID + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
        targetURL = URL + pathName + "&" + queryString + "&HomeSiteSID=" + HomeSiteSID + "&wtVisitID=" + wtVisitID + "&wtVisitCount=" + wtVisitCount + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
    }
    else
    {
        //modified by IES Ken Ho(09/09/02 3:55PM), for web tracking visit count cookie      
        //targetURL = URL + pathName + "&HomeSiteSID=" + HomeSiteSID + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
        targetURL = URL + pathName + "&HomeSiteSID=" + HomeSiteSID + "&wtVisitID=" + wtVisitID + "&wtVisitCount=" + wtVisitCount + "&ServiceNode=" + ServiceNode + "&lang=" + lang;
    }
  }

  anchor=targetURL.indexOf("#");
  if (anchor!=-1) {
        firstHalf=targetURL.substring(0,anchor);
        secHalf=targetURL.substring(anchor,targetURL.indexOf("&",anchor));
        thirdHalf=targetURL.substring(targetURL.indexOf("&",anchor),targetURL.length);
        targetURL = firstHalf+thirdHalf+secHalf;
  }

  if (targetURL.indexOf("PDA") > -1 )
  {
      window.open(targetURL,'pda1','scrollbars=yes,width=360,height=525');
  }
  else
  if (targetURL.indexOf("fun/pickup") > -1 )
  {
      window.open(targetURL,'pickup','scrollbars=yes,width=488,height=525');
  }
  else
  if (targetURL.indexOf("cgi") > -1 )
  {
      window.open(targetURL,'ebill1','scrollbars=yes,width=787,height=543');
  }
  else
   if (targetURL.indexOf("fun/goodie") > -1 )
   {
 
window.open(targetURL,'goodie','scrollbars=yes,width=650,height=600');
   }
   else
   if (targetURL.indexOf("fun/qlala") > -1 )
   {
       window.open(targetURL,'qlala','scrollbars=yes,width=650,height=700');
   }

  else
  if (targetURL.indexOf("mobilechat/sundaychatline") > -1 )
  {
    //var date = new Date();
    //targetURL = targetURL + "&dummy=" + date.getYear() +
//date.getMonth() + date.getDay() + date.getHours() + date.getMinutes() +
//date.getSeconds();
    //alert(targetURL);
    top.window.open(targetURL,'chat1','scrollbars=no,width=580,height=580');
  }
  else
  {
      window.location = targetURL;
  }
}

function MM_openBrWindow(theURL,winName,features) {
        window.open(theURL,winName,features);
}   
   
function readCookie (asName) {

    var lsSearch = asName + "=";
    var liSearchLen = lsSearch.length;
    var liCookieLen = document.cookie.length;
    var liEndStr = 0;
    var i = 0;

    while (i < liCookieLen) {
      var j = i + liSearchLen;

      if (document.cookie.substring(i, j) == lsSearch) {
        liEndStr = document.cookie.indexOf (";", j);
            if (liEndStr == -1) liEndStr = document.cookie.length;
            return unescape(document.cookie.substring(j, liEndStr));
          }

          i = document.cookie.indexOf(" ", i) + 1;
          if (i == 0) break;
    }
    return null;
}

function checkLogout(logoutOn, logoutOff){

    var HomeSiteSID;
    var ServiceNode;

    HomeSiteSID = readCookie("HomeSiteSID");
    ServiceNode = readCookie("ServiceNode");
//alert("" + document.cookie);
//alert(HomeSiteSID);
//alert(ServiceNode);
    lang = readCookie("lang");
    if (lang == "" || lang == null || lang == "null")
        lang = "en";
    if ((HomeSiteSID!=null) && (HomeSiteSID!="") && (ServiceNode!=null) && (ServiceNode!="") && (HomeSiteSID!="null") && (ServiceNode!="null"))
    {
        //display the logout button
        document.write("<a href=\"" + logoutSite + "HomeSiteSID=" + HomeSiteSID + "&ServiceNode=" + ServiceNode + "&lang=" + lang +  "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('logout','','" + logoutOn + "',1)\"><img name=\"logout\" border=\"0\" src=\"" + logoutOff + "\" width=\"59\" height=\"18\"></a>");

    }
}

function changeLang(){
    var originalURL = "";
    var newLocation="";
    var originalURL="";
    var lang="";
    //Check the current lang by local the image file name
    if (document.form1.chinese != null)
    {
        lang="en";
    }
    else
    {
        lang="tw";
    }
    originalURL = window.location.href;

    //replace language folder name and query string in the URL
        if (lang=="tw")
        {
                originalURL=originalURL.replace("/tw/","/en/");
                originalURL=originalURL.replace("lang=tw","lang=en");
        gfnWriteCookie ("StartLang", "en")
        }
        else
        {
                originalURL=originalURL.replace("/en/","/tw/");
                originalURL=originalURL.replace("lang=en","lang=tw");
        gfnWriteCookie ("StartLang", "tw")
        }
        //window.location.href=originalURL;
    window.location.replace(originalURL);
}

function isEnter(c, atxtbox)
{
    var charCode = (navigator.appName == "Netscape")? c.which : c.keyCode

    if ( charCode == 13 )
    {
        return true;
    }
    else
    {
        return false;
    }
}

function gfnWriteCookie (asName, avValue)
{
    var argv = gfnWriteCookie.arguments;
    var argc = gfnWriteCookie.arguments.length;
    var ldExp = new Date();
    ldExp.setTime (ldExp.getTime() + 365*24*60*60*1000);
    var ldExpires = (argc > 2) ? argv[2] : null;
    var lsPath = (argc > 3) ? argv[3] : null;
    var lsDomain = (argc > 4) ? argv[4] : null;
    var lbSecure = (argc > 5) ? argv[5] : false;
    document.cookie = asName + "=" + escape (avValue) +
        ((ldExpires == null) ? "; expires=" + ldExp.toGMTString() : ("; expires=" + ldExpires.toGMTString())) +
        ((lsPath == null) ? "; path=/" : ("; path=" + lsPath)) +
        ((lsDomain == null) ? "" : ("; domain=" + lsDomain)) +
        ((lbSecure == true) ? "; secure" : "");
}

//added by IES Ken Ho(09/10/02 3:43PM), for writing browser session cookies
function gfnWriteSessionCookie (asName, avValue)
{
    var argv = gfnWriteSessionCookie.arguments;
    var argc = gfnWriteSessionCookie.arguments.length;
    var ldExp = new Date();
    ldExp.setTime (ldExp.getTime() + 365*24*60*60*1000);
    var ldExpires = (argc > 2) ? argv[2] : null;
    var lsPath = (argc > 3) ? argv[3] : null;
    var lsDomain = (argc > 4) ? argv[4] : null;
    var lbSecure = (argc > 5) ? argv[5] : false;
    document.cookie = asName + "=" + escape (avValue) +
        //((ldExpires == null) ? "; expires=" + ldExp.toGMTString() : ("; expires=" + ldExpires.toGMTString())) +
        ((lsPath == null) ? "; path=/" : ("; path=" + lsPath)) +
        ((lsDomain == null) ? "" : ("; domain=" + lsDomain)) +
        ((lbSecure == true) ? "; secure" : "");
}

function gfnResetCookie()
{
    gfnWriteCookie("HomeSiteSID","");
    gfnWriteCookie("ServiceNode","");
}

function gfnTestCookieSupport()
{
    gfnWriteCookie("CookieEnabled", "Y");
}

//Function for banner
function banner1(aslang)
{
    path = "/news/index.html#1";
        window.location.href=homeSite + aslang + path;
}
function banner1b(aslang)
{
    path = "/products/service_sms.html";
        window.location.href=homeSite + aslang + path;
}
function banner1c(aslang)
{
    path = "/news/index.html#1b";
        window.location.href=homeSite + aslang + path;
}
function banner2(aslang)
{
//  path = "/products/wis.html";
 //       window.location.href=homeSite + aslang + path;
 window.open('http://www.hk.jippii.com');
}
function banner3(aslang)
{
//  path = "/news/index.html";
//      window.location.href=homeSite + aslang + path;
    path = "Portal?xml=sms/logo/home&cat=mfun";
        window.location.href=smsSite+path;
}
function banner4(aslang)
{
    path = "Portal?xml=sms/home&cat=main";
        link(smsSite, path, '');
}
function banner5(aslang)
{
    path = "/products/wis.html";
        window.location.href=homeSite + aslang + path;
}
function banner9(aslang)
{
    path = "/products/ser_roam_china.html#new";
        window.location.href=homeSite + aslang + path;
}
function banner10(aslang)
{
    path = "/products/prepaysim.html#new";
        window.location.href=homeSite + aslang + path;
}
function banner12(aslang)
{
    path = "/news/index.html#1b";
        window.location.href=homeSite + aslang + path;
}
function goback()
{
    if (navigator.appName == 'Netscape') {
        history.go(-2);
    }
    else
    {
        if (checkOS() == "Mac")
        {
        history.go(-2);
        }
        else
        {
        history.go(-1);
        }

    }
}

function checkOS() {
  if(navigator.userAgent.indexOf('IRIX') != -1)
    { var OpSys = "Irix"; }
  else if((navigator.userAgent.indexOf('Win') != -1) &&
  (navigator.userAgent.indexOf('95') != -1))
    { var OpSys = "Win95"; }
  else if(navigator.userAgent.indexOf('Win') != -1)
    { var OpSys = "Win"; }
  else if(navigator.userAgent.indexOf('Mac') != -1)
    { var OpSys = "Mac"; }
  else { var OpSys = "other"; }
    //alert(OpSys);
  return OpSys;
}

function AddSpace()
{
    var lsStr=document.search.query.value;
    var liStrCount=lsStr.length;
    var liCharCodeLength=0;
    var lsInput="";

    for(i=0;i<liStrCount;i++)
    {
        liCharCodeLength=("" + lsStr.charCodeAt(i));
        liCharCodeLength=liCharCodeLength.length;

        //for Chinese, unicode will be returned and the format should be '99999'
        if (liCharCodeLength==5 && lsStr.charCodeAt(i+1)!=32)
        {
            lsInput = lsInput + lsStr.charAt(i) + " ";
        }
        else
        {
            lsInput = lsInput + lsStr.charAt(i);
        }
    }
    document.search.query.value = lsInput;

}

function wtlog(asFunction)
{
    var oldLstVstDtTm = readCookie("wtLstVstDtTm"); //Previous last visit time stored in cookie in string format
    var dOldLstVstDtTm = new Date(oldLstVstDtTm);   //Previous last visit time stored in cookie in date format,
                                                    //  which used for calculating the time difference with current time
    
	var sSelfURL = window.location.href;
	
	var P="";                   //parameter string for storing logging information
	var sCurrent = "";          //current date time in string format
	var dCurrent = new Date();  //current date time in date format
	sCurrent = dCurrent;        //convert current date from date format to string format
	                            //  for writing to cookie

    gfnWriteSessionCookie("wtLstVstDtTm", sCurrent);    //last visit date time for the site
    	                                                //  used for checking expiry of wtVisitID
    
    var sHomeSiteSIDCookie = "";    //homeSiteSID string get from either query string or cookie
    //var sVisitID = "";              //visit ID string get from either query string or cookie
    var sVisitIDQueryStr = "";      //visit ID string get from either query string
    var sVisitIDCookie = "";        //visit ID string get from either cookie
    var iVisitCount = 0;            //visit count string get from either query string or cookie
    
    // Get query string variable
    var query = window.location.search.substring(1);    //get the whole query string
    var vars = query.split("&");
    for (var i=0;i<vars.length;i++) {
        var pair = vars[i].split("=");
        if (pair[0] == "HomeSiteSID") {
            sHomeSiteSIDCookie = pair[1];
        }else if (pair[0] == "wtVisitID") {
            sVisitIDQueryStr = pair[1];
        }else if (pair[0] == "wtVisitCount"){
            iVisitCount = pair[1];
        }
    }
    // END  Get query string variable
    
    //get data from cookies if it's not found in query string    
    if(sHomeSiteSIDCookie == null ||sHomeSiteSIDCookie == "")
        sHomeSiteSIDCookie = readCookie("HomeSiteSID");
    
    if(sVisitIDQueryStr == null || sVisitIDQueryStr == "")
        sVisitIDCookie = readCookie("wtVisitID");
    /////////////////////////////////////////////////
    //modified by IES Ken Ho(09/16/02 11:19AM), for those logon user, i.e. has HomeSiteSID, no need generate
    //a new wtVisitID
    if( (sHomeSiteSIDCookie == null ||sHomeSiteSIDCookie == "")
        && (sVisitIDQueryStr == null || sVisitIDQueryStr == "")
        && ( sVisitIDCookie == null || sVisitIDCookie == "" 
             || (dCurrent.getTime() - dOldLstVstDtTm.getTime()) > 30 * 60 * 1000 ) ){
        //there is no visit ID found in query string 
        //    and in case the page is first time visit or the visit ID is expired after 30 minutes   

        //generate a random number as the new visit ID
        var randVisitID;
        do{
            randVisitID = Math.floor(Math.random()*999999999);
        }while(randVisitID < 100000000);    //do while loop is used to ensure the random number is 9 digits
 	    
        gfnWriteSessionCookie ("wtVisitID", randVisitID);   //write the random number to
                                                            //  the session cookie representing the visit ID

        var iVC = 0;    //initialize a visit count
        if (readCookie("wtVisitCount") != null && readCookie("wtVisitCount") != ""){
            //if found the visit count in cookie, then increment it by 1
            iVC = parseInt( readCookie("wtVisitCount") ) + 1;
        }else{
            //if not found the visit count in cookie, then assign 1 to it
            iVC = 1;
        }
        gfnWriteCookie ("wtVisitCount", iVC);   //write a persistent cookie for keepign the visit count for the page
        
        //replicate the wtVisitID and wtVisitCount 
        if ( homeSite.indexOf(window.document.domain) >= 0){ 	        
            //replicate to smsSite
            document.location.href = smsSite + "Portal?xml=webTrack/SMSWebTrack" + 
                                        "&wtVisitID="+randVisitID+"&wtVisitCount="+iVC+"&address="+escape(sSelfURL);                                                             
        }else if (smsSite.indexOf(window.document.domain) >= 0){
            //replicate to home site
            document.location.href = homeSite + "webTrack/SundayWebTrack.html" +
                                        "?wtVisitID="+randVisitID+"&wtVisitCount="+iVC+"&address="+escape(sSelfURL);                            
        }
        //Commented by IES Ken Ho(09/17/02 5:15PM), no need web track for third party bookmark problem
        //else{
        //    //for third party, pass the cookies to both home site and sms site
        //    document.location.href = smsSite + "Portal?xml=webTrack/SMSWebTrack" + 
        //                                "&wtVisitID="+randVisitID+"&wtVisitCount="+iVC+"&address="+
        //                                escape(
        //                                    homeSite + "webTrack/SundayWebTrack.html" +
        //                                    "?wtVisitID="+randVisitID+"&wtVisitCount="+iVC+"&address="+escape(sSelfURL)
        //                                );
        //}
    }else{
        //in case there is a new visit ID in query string OR a valid visit ID is found in cookie
        //  then update the cookie with the new/same visit ID
        if (sVisitIDQueryStr != null && sVisitIDQueryStr != "")
            gfnWriteSessionCookie("wtVisitID", sVisitIDQueryStr);   

        //added by IES Ken Ho(09/13/02 9:31AM), for replicate visit count in case it's found in query string
        if(iVisitCount > 0)
            gfnWriteCookie("wtVisitCount", iVisitCount);
                
        //write to server access_log
    	// add the new parameters
    	P += "&wtluri="+window.location.pathname;
    	//P += "&wtlqry="+escape(window.location.search);
    	
    	if(asFunction!=null && asFunction!="")
    	    P += "&wtlqry="+escape(window.location.search + "&wtlfunc=" + asFunction);
    	else
    	    P += "&wtlqry="+escape(window.location.search);
    	        
    	if ((window.document.referrer != "") && (window.document.referrer != "-"))
    	{
    		if (!(navigator.appName == "Microsoft Internet Explorer" &&
    	        parseInt(navigator.appVersion) < 4) )
    		{
    		      P +="&wtlref="+escape(window.document.referrer);
    		}
    	}
    
    	P += "&wtlsip="+escape(window.document.domain);
    	sCurrent += ":"+dCurrent.getMilliseconds();
    	P += "&wtldat="+escape(sCurrent);
    	//P += "&wtlfunc=" + escape(asFunction);
    	
    	
    	//load an dummy image to let the server log the information
    	document.write('<DIV NAME="DCSDIV" STYLE="POSITION:ABSOLUTE;LEFT:0;TOP:0">');
    
    	/*
	document.write('<IMG BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC=' + homeSite+ 
    	                'en/images/wtl.gif?HomeSiteSID='+sHomeSiteSIDCookie+
    	                '&wtVisitID='+readCookie("wtVisitID")+
    	                '&wtVisitCount='+readCookie("wtVisitCount")+
    	                P+'>');
	*/
	
    	document.write('<IMG BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC=' + //document.location.host+ 
    	                '/Sunday/en/images/wtl.gif?HomeSiteSID='+sHomeSiteSIDCookie+
    	                '&wtVisitID='+readCookie("wtVisitID")+
    	                '&wtVisitCount='+readCookie("wtVisitCount")+
    	                P+'>');

    	document.write('</DIV>');
	
	}
	return null;
}

//Added by IES Ken Ho(09/20/02 2:23PM), as added by Christina
function Start(page) {

OpenWin = this.open(page, "smspop", "scrollbars=yes,width=488,height=543");
}

wtlog();