   var http_request = false;
   function makeRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      http_request.onreadystatechange = alertContents;
      http_request.open('GET', url + parameters, true);
      http_request.send(null);
   }

   function alertContents() {
      if (http_request.readyState == 4) 
      {
         if (http_request.status == 200) 
         {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('votespan').innerHTML = result;            
         } else 
         {
            alert('');
         }
      }
   }

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_jumpMenu(targ,selObj,restore) /*--- 下拉式選單新聞切換 ---*/
{
   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
   if (restore) selObj.selectedIndex=0;
}
      	
function showBookmarker()   /*--- 內文書籤頁面顯示 ---*/
{
	document.getElementById("bookmarker_menu").style.visibility="visible";
}
      	
function hideBookmarker()   /*--- 內文書籤頁面隱藏 ---*/
{
	document.getElementById("bookmarker_menu").style.visibility="hidden";
}

function showForum(tagid,issueid,artid)   /*--- 顯示各入口頁或Section頁面文章底下的即時討論 ---*/
 {
  var domain='tw.forum.nextmedia.com';
  $.ajax
  (
    {
      url: "/index/getforum/artid/"+artid+"/issueid/"+issueid,
      dataType: 'json',
      success: function(response)
      {
        if(response!=null)
        {
          if (response[0]!=null)
          {
            $('#'+tagid).html("<a href='http://"+domain+"/viewtopic.php?f="+response[0].$Forum_F+"&t="+response[0].$Forum_T+"'>"+response[0].$Forum_Title+"</a>");
          }
        }
      }
    }
  );
 }

 function show_newsmap(e,add,keyword){
  
	x_out=-120; // 與游標座標之水平距離
	y_out=10; // 與游標座標之垂直距離
	if(document.body.scrollTop && document.body.scrollTop !=0)
  {
		dbst=document.body.scrollTop;
		dbsl=document.body.scrollLeft;
	}
	else
  {
		dbst=document.getElementsByTagName("html")[0].scrollTop;
		dbsl=document.getElementsByTagName("html")[0].scrollLeft;
	}
	document.getElementById("newsmap").style.visibility="visible";
  document.getElementById("newsmap").style.position="absolute";
	dgs=document.getElementById("newsmap").style
	y=e.clientY;x=e.clientX;
	dgs.top=y+dbst+y_out+"px";
	dgs.left=x+dbsl+x_out+"px";
	
  if (GBrowserIsCompatible()) {
    var Icon = new GIcon(G_DEFAULT_ICON);

    Icon.shadow="";//定位標的陰影
    var map = new GMap2(document.getElementById("map"));
    var geocoder = new GClientGeocoder();
    var address = add;
    var tagword = keyword;
    geocoder.getLatLng(address, function(point) {
      if (!point) {
        document.getElementById('Gmap').style.display='none'; //如果Google Maps無法顯示該地址的警示文字
      } else {
        map.addControl(new GLargeMapControl());
        map.setCenter(point, 16);
        var marker = new GMarker(point,Icon); //顯示標的圖示
        map.addOverlay(marker);
        marker.openInfoWindowHtml("<table width=250 border=0 cellpadding=0 cellspacing=0 style=font-size:12px;><tr><td valign=center align=right width=60 style=padding:5px 3px 2px 0;><font style='font-size:15px'>看現場</font></td></tr><tr><td valign=center align=right style=padding:5px 3px 2px 0;>"+tagword+"</td></tr></table>");
      }
    });
  }
}

function switchmenu(a){      //影音player右側選單切換
	if(a==1)
	{
		document.getElementById("weeklist").style.visibility="hidden";
		document.getElementById("weeklist").style.position="absolute";
	  document.getElementById("videolist").style.visibility="visible";
	  document.getElementById("videolist").style.position="static";
	  document.getElementById("today_week").value=1;
	}
	else{
		document.getElementById("videolist").style.visibility="hidden";
		document.getElementById("videolist").style.position="absolute";
	 document.getElementById("weeklist").style.visibility="visible";
	 document.getElementById("weeklist").style.position="static";
	 document.getElementById("today_week").value=2;

	}
}




