<!--
//==============================================================================
//下拉式Menu===================================================================
//alert(location.pathname);
  VPath=location.pathname;
  var Start=VPath.lastIndexOf('\/');
	var VPath=VPath.substring(0,Start);
      Start=VPath.lastIndexOf('\/');
      VPath=VPath.substring(Start,VPath.length);
	var srp=document.getElementsByTagName('script');
	var srpPath=srp[srp.length-1].src;
  if (srpPath.indexOf('http')>-1){  //firebox
    	if (srpPath.indexOf(VPath)==-1){
    		 var  stcPath='../';   //指定相對路徑
    	}else{
    		 var  stcPath='';
    	}
  }else{
    	if (srpPath.indexOf('..')>-1){ //ie
    		 var  stcPath='../';   //指定相對路徑
    	}else{
    		 var  stcPath='';
    	}
  }
var curDiv="";
var curDiv3="";
var curDivflag="open";
var curDiv3flag="open";
//document.getElementById("01_ul").className ='menu_level_3';
var curLeft4="";
function callLevel4DownLoad(SiteId){
 
    if (document.getElementById(SiteId+'_L2')!=null){
      indexflag=location.pathname.substring(location.pathname.length-1,location.pathname.length)
      var strValue ='SiteId='+SiteId+'&stcPath='+stcPath;
   //   alert(stcPath+'DownLoadCenter_Data.asp?SiteId='+SiteId+'&stcPath='+stcPath);
      xmlhttpPost(stcPath+"DownLoadCenter_Data.asp", strValue, "callLevel4Result",SiteId);
    }
 }
 
 function callLevel4(SiteId){
 //alert('1')
    var SiteIddefault=SiteId.substring(0,10);
    var SiteId2='';
    var SiteId3='';
    if (SiteId.substring(0,3)=='B01') {
      if ((SiteId.length)>5){
          SiteId2=SiteId.substring(0,5);
          SiteId3=SiteId.substring(0,7);
          //alert('SiteId2=='+SiteId2+'****SiteId3==='+SiteId3)
          //SiteId=SiteId2;
          if (SiteId2=='B0125' && SiteId3!=''){
            SiteId=SiteId3;
          }else{
            SiteId=SiteId2;
          }
      }
    }else{
       SiteId=SiteId;
    }
   //***modify by Oscar20090727---for首頁時,leftmenu太長,所以不要顯示Technlogy、Platform及Application(與LeftMenuList.inc對應)---<start>---***
   indexflag=location.pathname.substring(location.pathname.length-1,location.pathname.length)
   if ((location.pathname.indexOf('index.htm')>-1)||(location.pathname.indexOf('index_tw.htm')>-1)||(location.pathname.indexOf('winmate_overview.htm')>-1)||(indexflag=='/')){
      if (document.getElementById("forIndexHideMenu")!=null){
         for (var i=0; i<document.getElementsByName("forIndexHideMenu").length; i++) {
            obj=document.getElementsByName("forIndexHideMenu")[i];
            obj.style.display='none';
         }
      }
   }else{
      for (var i=0; i<document.getElementsByName("forIndexHideMenu").length; i++) {
         obj=document.getElementsByName("forIndexHideMenu")[i];
         obj.style.display='block';
      }
   }
   //***modify by Oscar20090727---for首頁時,leftmenu太長,所以不要顯示Technlogy、Platform及Application與LeftMenuList.inc對應)---<end>---***
    
    if (document.getElementById(SiteId+'_L2')!=null){
      indexflag=location.pathname.substring(location.pathname.length-1,location.pathname.length)
      if ((location.pathname.indexOf('index.htm')>-1)||(location.pathname.indexOf('index_tw.htm')>-1)||(indexflag=='/')){
        var strValue ='SiteId='+SiteId+'&stcPath='+stcPath+'&index=Y';
      }else{
        var strValue ='SiteId='+SiteId+'&stcPath='+stcPath;
      }
  //alert('strValue='+strValue)       
      //xmlhttpPost(stcPath+"LeftMenu4_Data.asp", strValue, "callLevel4Result",SiteId);
      var divSite=document.getElementById(SiteId+'_L2');
       divSite.style.display='';
       var fontSite=document.getElementById('font'+SiteIddefault);
       if(fontSite!=null){
         fontSite.style.color='FF6600';
       }else{
         var fontSite=document.getElementById('font'+SiteIddefault.substring(0,4));
         if (fontSite!=null){
          fontSite.style.color='blue';
         }
       }

   //alert('fontSite='+fontSite) 
   //alert('curDiv='+curDiv+'****curDivflag=='+curDivflag) 
      if ((curDiv!='' && curDiv!=SiteId ) || (curDiv==SiteId && curDivflag=="open") ){
            if (document.getElementById(curDiv+'_L2')!=null){
               var CurdivSite=document.getElementById(curDiv+'_L2');
               CurdivSite.style.display='none';
            }
            if (document.getElementById('font'+curDiv)!=null){
              var CurfontSite=document.getElementById('font'+curDiv);    
              CurfontSite.style.color='';
            }
       }
       if (curDiv==SiteId){
          if (curDivflag=="open"){  curDivflag="close";       }else{curDivflag="open";}
       }
       curDiv=SiteId;
    }
    
    
   if (document.getElementById(SiteId+'_L3')!=null){
      indexflag=location.pathname.substring(location.pathname.length-1,location.pathname.length)
      if ((location.pathname.indexOf('index.htm')>-1)||(location.pathname.indexOf('index_tw.htm')>-1)||(indexflag=='/')){
        var strValue ='SiteId='+SiteId+'&stcPath='+stcPath+'&index=Y';
      }else{
        var strValue ='SiteId='+SiteId+'&stcPath='+stcPath;
      }
  //alert('strValue='+strValue)       
      //xmlhttpPost(stcPath+"LeftMenu4_Data.asp", strValue, "callLevel4Result",SiteId);
      var divSite=document.getElementById(SiteId+'_L3');
       divSite.style.display='';
       var fontSite=document.getElementById('font'+SiteIddefault);
       if(fontSite!=null){
         fontSite.style.color='FF6600';
       }else{
         var fontSite=document.getElementById('font'+SiteIddefault.substring(0,6));
         if (fontSite!=null){
          fontSite.style.color='blue';
         }
       }
   //alert('fontSite='+fontSite) 
   //alert('curDiv='+curDiv+'****curDivflag=='+curDivflag) 
      var imgsrcobj=document.getElementById('Img'+SiteId);
      //imgsrcobj.src='\\$themes\\default\\images\\TREE2.gif';
      imgsrcobj.src='..\\$themes\\default\\images\\TREE2.gif';
      if ((curDiv!='' && curDiv!=SiteId ) || (curDiv==SiteId && curDivflag=="open") ){
           if (document.getElementById(curDiv+'_L3')!=null){
              var CurdivSite=document.getElementById(curDiv+'_L3');
                  CurdivSite.style.display='none';
              var CurfontSite=document.getElementById('font'+curDiv);    
              CurfontSite.style.color='';
              var imgsrcobj=document.getElementById('Img'+curDiv);
              imgsrcobj.src='\\$themes\\default\\images\\TREE1.gif';
           }
       }
       if (curDiv==SiteId){
          if (curDivflag=="open"){  curDivflag="close";       }else{curDivflag="open";}
       }
       curDiv=SiteId;
    }
    
   if (document.getElementById(SiteId3+'_L3')!=null){
      var divSite=document.getElementById(SiteId3+'_L3');
       divSite.style.display='';
     /* var fontSite=document.getElementById('font'+SiteId3);
       fontSite.style.color='blue';*/
      var imgsrcobj=document.getElementById('Img'+SiteId3);
      //imgsrcobj.src='\\$themes\\default\\images\\TREE2.gif';
      imgsrcobj.src='..\\$themes\\default\\images\\TREE2.gif';
      if ((curDiv3!='' && curDiv3!=SiteId3 ) || (curDiv3==SiteId3 && curDiv3flag=="open") ){
           var CurdivSite=document.getElementById(curDiv3+'_L3');
               CurdivSite.style.display='none';
           var CurfontSite=document.getElementById('font'+curDiv3);    
           CurfontSite.style.color='';
           var imgsrcobj=document.getElementById('Img'+curDiv3);
           imgsrcobj.src='\\$themes\\default\\images\\TREE1.gif';
       }
       if (curDiv3==SiteId3){
          if (curDiv3flag=="open"){  curDiv3flag="close";       }else{curDiv3flag="open";}
       }
       curDiv3=SiteId3;
    }
    
 }
 function callLevel4Result(ResultValue,SiteId){
      // alert(ResultValue)
       var divSite=document.getElementById(SiteId+'_L2');
           curLeft4=SiteId;
           divSite.innerHTML=ResultValue;
           divSite.style.display='';
       if ((curDiv!='' && curDiv!=SiteId ) || (curDiv==SiteId && curDivflag=="open") ){
           var CurdivSite=document.getElementById(curDiv+'_L2');
               CurdivSite.innerHTML='';
               CurdivSite.style.display='none';
       }
       if (curDiv==SiteId){
          if (curDivflag=="open"){  curDivflag="close";       }else{curDivflag="open";}
       }
       curDiv=SiteId;
 }
 


function showhiddenMenu(SiteId){
   //***---add by Oscar20090512---<start>---***
   if (curDiv!=''){
      if (document.getElementsByName("Type"+curDiv+"Menu_hidden")!=null){
         for (var i=0; i<document.getElementsByName("Type"+curDiv+"Menu_hidden").length; i++) {
            obj=document.getElementsByName("Type"+curDiv+"Menu_hidden")[i];
            obj.style.display='none';
         } 
      }
      for (var i=0; i<document.getElementsByName("More"+curDiv+"Menu").length; i++) {
         obj=document.getElementsByName("More"+curDiv+"Menu")[i];
         obj.style.display='block';
      }
   }
   
   //***---add by Oscar20090512---<end>---***
   
   var  topPos=0
   for (var i=0; i<document.getElementsByName("Type"+SiteId+"Menu_hidden").length; i++) {
      obj=document.getElementsByName("Type"+SiteId+"Menu_hidden")[i];
      obj.style.display='block';
   }
  
   for (var i=0; i<document.getElementsByName("More"+SiteId+"Menu").length; i++) {
      obj=document.getElementsByName("More"+SiteId+"Menu")[i];
      obj.style.display='none';
   }
   
   curDiv=SiteId;    //***---add by Oscar20090512---***
   
//document.all.More01Menu.style.display='none';
}

function mmLoadMenus() {//call 目錄函式
		  TopMenu();
			LeftMenu();
      writeMenus();
}

function openvedioById(showvideoUrl,Id){
			 //window.open('../video/sample0413_S.swf','video','width=480,height=432')
//   alert(showvideoUrl);    
      var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=mini&autoPlay=true";
   //var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=embedded&autoPlay=true";
   //var video_url="/Image/3247397568-audio-player.swf?videoUrl="+showvideoUrl+"&playerMode=embedded&autoPlay=true";
   document.getElementById(Id).innerHTML='<table ><tr bgcolor="#FFFFCC"><td align="right" ><img src="/Image/close.gif" alt="closevideo" title="closevideo" style="float:right;height:11px;width:43px;" onclick="closevedioByID(\''+Id+'\')"></td></tr>'+
    '<tr><td>'+
   //--換 video的object -- modify by oscar20081110---<start>---    
    '<embed src="/Image/mediaplayer.swf" width="480" height="370"'+
    'allowfullscreen="true" '+
    'flashvars="&file='+showvideoUrl+'&height=370&width=480&location=/Image/mediaplayer.swf&autostart=True" />'+
 /***    --原object --            
    '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="360" id="sample0413_S" align="middle">'+
    '<param name="allowScriptAccess" value="never" />'+
    '<param name="movie" value="'+video_url+'" />'+									
    '<param name="quality" value="high" />'+
    '<param name="bgcolor" value="#ffffff" />'+
    '<embed src="'+video_url+'" quality="high" bgcolor="#ffffff"  '+
    'name="sample0413_S " '+
    'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+									
    'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
    '</object>'+
     ***/ 
    '</td></tr><tr><td align="center"><font style="font-size:7pt;">This video is a simplified outline and some components are not showed in detail.\n<BR>Please contact our sales representative if you need further product information.</font></td></tr>';
 document.getElementById(Id).style.display="inline";
 document.getElementById(Id).style.visibility="inherit";
}
function closevedioByID(Id){
     document.getElementById(Id).innerHTML="";
     document.getElementById(Id).style.display="none";
     document.getElementById(Id).style.visibility="hidden";
}

function openvedio(showvideoUrl){
			 //window.open('../video/sample0413_S.swf','video','width=480,height=432')
//   alert(showvideoUrl);    
//   var video_url="/Image/googleplayer.swf?videoUrl="+videoUrl+"&playerMode=mini&autoPlay=true";'
   var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=mini&autoPlay=true";
   document.getElementById("ShowVidio").innerHTML='<table align="center" ><tr bgcolor="#FFFFCC"><td align="right" > <img src="/Image/close.gif" alt="closevideo" title="closevideo" onclick="closevedio()"></td></tr>'+
    '<tr><td>'+
  //--換 video的object -- modify by oscar20081110---<start>---    
    '<embed src="/Image/mediaplayer.swf" width="480" height="370"'+
    'allowfullscreen="true" '+
    'flashvars="&file='+showvideoUrl+'&height=370&width=480&location=/Image/mediaplayer.swf&autostart=True" />'+
/***    --原object --     
    '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="360" id="sample0413_S" align="middle">'+
    '<param name="allowScriptAccess" value="sameDomain" />'+
    '<param name="movie" value="'+video_url+'" />'+									
    '<param name="quality" value="high" />'+
    '<param name="bgcolor" value="#ffffff" />'+
    '<embed src="'+video_url+'" quality="high" bgcolor="#ffffff"  '+
    'name="sample0413_S" '+
    'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+									
    'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
    '</object>'+
***/      
    '</td></tr><tr><td align="center"><font style="font-size:7pt;">This video is a simplified outline and some components are not showed in detail.\n<BR>Please contact our sales representative if you need further product information.</font></td></tr></table>';
 document.getElementById("ShowVidio").style.display="inline";
 document.getElementById("ShowVidio").style.visibility="inherit";
}
function closevedio(){
     document.getElementById("ShowVidio").innerHTML="";
     document.getElementById("ShowVidio").style.display="none";
     document.getElementById("ShowVidio").style.visibility="hidden";
}


function openvedioByIdSite(showvideoUrl,Id){
			 //window.open('../video/sample0413_S.swf','video','width=480,height=432')
//   alert(showvideoUrl);    
      var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=mini&autoPlay=true";
   //var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=embedded&autoPlay=true";
   //var video_url="/Image/3247397568-audio-player.swf?videoUrl="+showvideoUrl+"&playerMode=embedded&autoPlay=true";
   document.getElementById(Id).innerHTML='<table ><tr bgcolor="#FFFFCC"><td align="right" ><img src="/Image/close.gif" alt="closevideo" title="closevideo" style="float:right;height:11px;width:43px;" onclick="closevedioByID(\''+Id+'\')"></td></tr>'+
    '<tr><td>'+
    '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="200" id="sample0413_S" align="middle">'+
    '<param name="allowScriptAccess" value="never" />'+
    '<param name="movie" value="'+video_url+'" />'+									
    '<param name="quality" value="high" />'+
    '<param name="bgcolor" value="#ffffff" />'+
    '<embed src="'+video_url+'" quality="high" bgcolor="#ffffff"  '+
    'name="sample0413_S " '+
    'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+									
    'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
    '</object>'+
    '</td></tr>';
 document.getElementById(Id).style.display="inline";
 document.getElementById(Id).style.visibility="inherit";
}

function openvediominiById(showvideoUrl,Id,hrefhttp){
			 //window.open('../video/sample0413_S.swf','video','width=480,height=432')
//   alert(showvideoUrl);    
//   var video_url="/Image/googleplayer.swf?videoUrl="+videoUrl+"&playerMode=mini&autoPlay=true";'
   var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=mini&autoPlay=true";
   oriinnerHTML=document.getElementById(Id).innerHTML
   
   document.getElementById(Id).innerHTML=''+
   // '<div style="position: absolute;z-index:-1000;display:block;top:155px;background-color:green;" >'+
    '<table border="0"  cellpadding=0 cellspacing=0>'+
    //'<tr bgcolor="#FFFFCC"><td align="right" > <img src="/Image/close.gif" alt="closevideo" title="closevideo" ></td></tr>'+
    '<tr><td> '+
    '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="154" height="120" id="sample0413_'+Id+'S" align="middle">'+
    '<param name="allowScriptAccess" value="sameDomain" />'+
    '<param name="movie" value="'+video_url+'" />'+									
    '<param name="quality" value="high" />'+
    '<param name="bgcolor" value="#ffffff" />'+   
    '<param name="wmode" value="transparent" />'+
    '<embed src="'+video_url+'" quality="high" bgcolor="#ffffff"  '+
//    'name="sample0413_S" '+
    'name="sample0413_'+Id+'S" '+
    'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+									
    'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
    '</object>'+
    '</td></tr>'+
    '</tbody></table>'+
    //'</div>'+
    //'<div onclick="window.location=\''+hrefhttp+'\';" style="position: absolute;top:176px;background-color:red;height:122px;width:156px;filter:Alpha(opacity=0);cursor:hand;display:block;z-index:30000;" '+
    '<div onclick="window.open(\''+hrefhttp+'\');" style="position: absolute;top:176px;background-color:red;height:122px;width:156px;filter:Alpha(opacity=0);cursor:hand;display:block;z-index:30000;" '+
//    ' onmouseout="outvediominiById('
    '></div>';
 //alert(document.getElementById(Id).innerHTML)  
 //alert(document.all.ShowVidio1.style.top)
 
 document.getElementById(Id).style.display="inline";
 document.getElementById(Id).style.visibility="inherit";
}
//-->

function outvediominiById(showvideoUrl,Id,hrefhttp,imgUrl){

}

var currheader='';
function chg_title_pic(LevelPath,chgId){
   if (document.getElementById('header_locator')!=null){
      if (currheader!=chgId){
         switch (chgId){
            case 'DS':
               document.all.header_locator.style.background='url("'+LevelPath+'image/Bar_DS-1.jpg")';
               break;
            case 'ppc':
               document.all.header_locator.style.background='url("'+LevelPath+'image/Bar_PPC.jpg")';
               break;                 
            case 'display': 
               document.all.header_locator.style.background='url("'+LevelPath+'image/Bar_Display.jpg")';
               break;
            case 'Optical_Bonding': 
               document.all.header_locator.style.background='url("'+LevelPath+'image/Bar_Optical Bonding.jpg")';
               break;
            case 'SDI':
            case 'TablePc':
            case '':
            default:
               document.all.header_locator.style.background='url("'+LevelPath+'image/Bar_2.jpg")';
               break;
         }
         currheader=chgId;
      }
   }
}
 

function openPlatformVedioById(showvideoUrl,Id,YouTubeUrl){
			 //window.open('../video/sample0413_S.swf','video','width=480,height=432')
//   alert(showvideoUrl);    
      var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=mini&autoPlay=true";
      
      /* for PlatformVideo---<start>---*/
      var strYouTubeLink=''
      if (YouTubeUrl!=''){
         strYouTubeLink='<tr><td>If the video is buffering too long, please <a color="blue" href="'+YouTubeUrl+'" target="_blank">click here to watch the video on YouTube</a></td></tr>'
      }
      /* for PlatformVideo---<end>---*/
      
   //var video_url="/Image/googleplayer.swf?videoUrl="+showvideoUrl+"&playerMode=embedded&autoPlay=true";
   //var video_url="/Image/3247397568-audio-player.swf?videoUrl="+showvideoUrl+"&playerMode=embedded&autoPlay=true";
   document.getElementById(Id).innerHTML='<table >'+strYouTubeLink+
    '<tr bgcolor="#FFFFCC"><td align="right" ><img src="/Image/close.gif" alt="closevideo" title="closevideo" style="float:right;height:11px;width:43px;" onclick="closevedioByID(\''+Id+'\')"></td></tr>'+
    '<tr><td>'+
 //--換 video的object -- modify by oscar20081110---<start>---    
    '<embed src="/Image/mediaplayer.swf" width="480" height="370"'+
    'allowfullscreen="true" '+
    'flashvars="&file='+showvideoUrl+'&height=370&width=480&location=/Image/mediaplayer.swf&autostart=True" />'+
/***    --原object --   
    '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="360" id="sample0413_S" align="middle">'+
    '<param name="allowScriptAccess" value="never" />'+
    '<param name="movie" value="'+video_url+'" />'+									
    '<param name="quality" value="high" />'+
    '<param name="bgcolor" value="#ffffff" />'+
    '<embed src="'+video_url+'" quality="high" bgcolor="#ffffff"  '+
    'name="sample0413_S " '+
    'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+									
    'pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
    '</object>'+
 ***/    
   //--原object -- modify by oscar20081110---<end>---
    '</td></tr>';
 document.getElementById(Id).style.display="inline";
 document.getElementById(Id).style.visibility="inherit";
}
 
function sharePlatformVideo(showVideoID,showVideoTitle,showVideoUrl){  
   mailSubject='You have received a Winmate video!'

   // "%20" → 表示"一個空白字串"
   //mailbody=showVideoUrl=showVideoUrl.replace(/ /g,'%20')+''
   //location.href='mailto:?subject='+mailSubject+'&body='+ escape(mailBody.replace(/ /g,'%20'))
   
   mailBody=location.href
   
   tmpInt=mailBody.indexOf('#')
   if (tmpInt!=-1){
      mailBody=mailBody.substring(0,tmpInt)
   }
   
   tmpS=mailBody.indexOf('&VideoId')
   if (tmpS!=-1){
      mailBody=mailBody.substring(0,tmpS)
   }
   showVideoTitle=showVideoTitle.replace(/@@@/g,'"')
   mailBody=showVideoTitle+' : '+mailBody+'&VideoId='+showVideoID
   //alert('mailBody=='+mailBody)
   //self.location='mailto:?subject='+mailSubject+'&body='+mailBody-->語法這樣也可以
   location.href='mailto:?subject='+mailSubject+'&body='+  escape(mailBody)
}

function shareProdVideo(showVideoID,showVideoType,showVideoTitle,showVideoUrl,shareUrl){  
   mailSubject='You have received a Winmate video!'
   // "%20" → 表示"一個空白字串"
   //mailbody=showVideoUrl=showVideoUrl.replace(/ /g,'%20')+''
   //location.href='mailto:?subject='+mailSubject+'&body='+ escape(mailBody.replace(/ /g,'%20'))
    
   if (shareUrl==''){
      mailBody=location.href
   }else{
      mailBody=shareUrl
   }
   

   tmpInt=mailBody.indexOf('#')
   if (tmpInt!=-1){
      mailBody=mailBody.substring(0,tmpInt)
   }
   
   if (mailBody.indexOf('?')==-1){
      mailBody=mailBody+'?Video=1'
   }


   
   tmpInt=mailBody.indexOf('&VideoType')
   if (tmpInt!=-1){
      mailBody=mailBody.substring(0,tmpInt)
   }
   
   if (showVideoType!=''){
      mailBody=mailBody+'&VideoType='+showVideoType
   }
   
   tmpInt=mailBody.indexOf('&VideoId')
   if (tmpInt!=-1){
      mailBody=mailBody.substring(0,tmpInt)
   }
   showVideoTitle=showVideoTitle.replace(/@@@/g,'"')
   mailBody=showVideoTitle+' : '+mailBody+'&VideoId='+showVideoID
   //alert('mailBody=='+mailBody)
   //self.location='mailto:?subject='+mailSubject+'&body='+mailBody-->語法這樣也可以
   location.href='mailto:?subject='+mailSubject+'&body='+  escape(mailBody)
}

//***將所點的video置頂***
//***focusobjId:起始點  ;focusHref:要置頂的Div Id***
function fn_videoFocus(focusobjId,focusHref){
   var targetObject = document.getElementsByName(focusHref)[0];
   if (targetObject){
     var  topPos = targetObject.parentNode.offsetTop+targetObject.parentNode.offsetHeight;
   }else{
     var  topPos = 0
   }
   window.scroll(0,topPos);
}

