
    var pageTracker = _gat._getTracker('UA-958988-3');
    
    pageTracker._initData();
    pageTracker._trackPageview();
    

    function OpenLink( url, width, height){
        
        window.open( url, 'OpenLink', 'scrollbars=auto, width=' + width + ', height=' + height + '');
        
    }
    
    function isPrint( sn){
        
        window.open( './news_print.asp?sn=' + sn, 'OpenPrint', 'scrollbars=yes, width=570, height=650');
        
    }

    function isShare( sn){
        
        window.open( './news_share.asp?sn=' + sn, 'OpenShare', 'scrollbars=no, width=550, height=375');
        
    } 
    
    function getClassifyList(){

        var url;
    
        url = './xml/xml_news_template.xml';

        if( window.XMLHttpRequest) xmlhttp = new XMLHttpRequest();
        else if( window.ActiveXObject) xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
        
        xmlhttp.open( 'GET', url, false);
              
        if( navigator.appName == 'Netscape'){

            xmlhttp.send( null);
            setClassifyList();
        
        }
        
        else{

            xmlhttp.open( 'GET', url, false);
            xmlhttp.onreadystatechange = setClassifyList;
            xmlhttp.send( null);
            
        }

    }
    
    function setClassifyList(){

        var i, n;
        var total;
        var channel;
        var id, name;

        channel = document.seekform.channel.value;

        if( xmlhttp.readyState == 4 && xmlhttp.status == 200){ 

            total = parseInt( xmlhttp.responseXML.selectNodes('./root/result/channel[@id=\'' + channel + '\']/classify').length);

            document.seekform.classify.options[0] = new Option( '所有文章類別', '0');
            document.seekform.classify.selectedIndex = 0;
            
            if( total > 0){
              
                for( i = 0; i < total; i ++){

                    id = xmlhttp.responseXML.selectNodes('./root/result/channel[@id=\'' + channel + '\']/classify')[i].attributes[0].value;
                    name = xmlhttp.responseXML.selectNodes('./root/result/channel[@id=\'' + channel + '\']/classify')[i].attributes[1].value;

                    n = i + 1;
                    
                    document.seekform.classify.options[n] = new Option( name, id);

                }

            }

            document.seekform.classify.length = total + 1;

        }    
    
    }        
    
    function Trim( ins){ 
    
        var output;
    
        output = /(^\s*)|(\s*$)/g; 
        
        return ins.replace( output, ''); 

    }    