﻿// JavaScript Document
// By bcbgrand
function LoadFlash(src,width,height,wmode){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+width+'" height="'+height+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="bgcolor" value="#ffffff">';
	html += '<param name="wmode" value="'+wmode+'">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+width+'" height="'+height+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

function LoadFlash2(src,w,h,wmode){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="bgcolor" value="#ffffff">';
	html += '<param name="scale" value="exactfit" >';
	html += '<param name="wmode" value="'+wmode+'">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+w+'" height="'+h+'" scale="exactfit" wmode="opaque" id="param" name="param" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

///弹出窗口
function openwin(URL,w,h)
{
  window.open (URL,'newwindow','height='+h+',width='+w+',top=100,left=120,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no')
} 

function showwin1(URL,w,h) 
{ 
	var getv = showModelessDialog(URL, "egwin", "dialogWidth:"+w+"px; dialogHeight:"+h+"px;status:no;help:no;scroll:no"); 	
	location.reload();   
} 
 function showwin(URL,w,h) 
    { 
	    var getv =showModalDialog(URL, "egwin", "dialogWidth:"+w+"px; dialogHeight:"+h+"px;status:no;help:no;scroll:no"); 
	    if(getv!=null&&getv!='')
	    {
	        try{
	        document.getElementById("_btnkong").click()
	        }
	        catch(ex)
	        {
    	    
	        }
	    }
    } 
    

////插入视屏
function MoviePlayer(URL,w,h)
{

var info= '<object name="player" id="player" hideFocus title classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" STANDBY="Microsoft Windows Media Player." VIEWASTEXT width="'+w+'" height="'+h+'">' +
'<param NAME="URL" value="'+URL+'" >' + 
'<param NAME="playCount" value="1">' + 
'<param NAME="enableContextMenu" VALUE="0">' + 
'<param NAME="currrentMarker" VALUE="0">' + 
'<param NAME="ShowStatusBar" VALUE="1">' + 
'<param NAME="currentPosition" VALUE="0">' + 
'<param NAME="defaultFrame" value="0">' + 
'<param NAME="ShowDisplay" value="0">' + 
'<param NAME="backgroundColor" VALUE="2566468">' + 
'<param NAME="DisplayForeColor" VALUE="15264680">' + 
'<param NAME="uiMode" VALUE="none">' + 
'<param NAME="EnableContextMenu" Value="0">' + 
'<param NAME="stretchToFit" Value="true">' + 
'</object>';
document.write(info);

}

///获得Id
function $(_sId){
	return document.getElementById(_sId);
}
///改变属性
function hide(_sId){
	$(_sId).style.display = $(_sId).style.display == "none" ? "" : "none";
}

///添加收藏
function bookmarkit(Url,_name)
{
     window.external.addFavorite(Url,_name)
}