<style type="text/css">
<!--
html,body{height:100%;margin: 0px;font-size: 14px;color:#b9e77b}
#MessageBoxBG { display: none; position: absolute; background: #000; opacity: 0.4; -moz-opacity: 0.4; -khtml-opacity: 0.4; filter: alpha(opacity=60); width: 100%; height: 100%; }
#MessageBox { display: none; position: absolute; background: #b9e77b; color: #333; text-align: center; border: 1px solid #636D61; top: 70px; z-index: 100; }
.MessageBoxClose { font-size: 12px; color: #ddd; padding: 4px 0; border-top: 1px solid #636D61; background: #778574;text-align : right; }
.MessageBoxTitle { font-size: 14px; text-align:left; font-weight:bold; color: #fff; padding: 4px 0; border-down: 1px solid #636D61; background:#434A42; }
.MessageBoxClose ul {list-style:none;margin:0px;}
.MessageBoxClose ul li {float:right;margin:0 10px}
-->
</style>
<script type="text/javascript">
function GetDiv(divName) {
return(document.getElementById(divName));
}
function DivStyle(divName) {
return(GetDiv(divName).style);
}
function agent(divName) { return(Math.max(navigator.userAgent.toLowerCase().indexOf(divName),0)); }
function isset(divName) { return((typeof(divName)=='undefined' || divName.length==0)?false:true); }
function XYwin(divName) { var z=agent('msie')?Array(document.body.clientHeight,document.body.clientWidth):Array(window.innerHeight,window.innerWidth); return(isset(divName)?z[divName]:z); }
function MessageBoxTOG() { document.onclick=function(){ DivStyle('MessageBoxBG').display='none'; DivStyle('MessageBox').display='none'; document.onclick=function(){}; }; }
function ShowMessageBox(title,content,BoxLeft,BoxTop,BoxWidth,playUrl)
{
//alert(window.screen.availWidth);
//alert(BoxLeft) ;
var strMediaplaer="<div ><object id='WindowsMediaPlayer' width='"+BoxWidth+"px' height='64px' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' ";
strMediaplaer=strMediaplaer+"codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112'" ;
strMediaplaer=strMediaplaer+"align='baseline' border='0' standby='Loading Microsoft Windows Media Player components...' " ;
strMediaplaer=strMediaplaer+"type='application/x-oleobject'>" ;
strMediaplaer=strMediaplaer+"<param name='URL' value='"+playUrl+"'>";
strMediaplaer=strMediaplaer+"<param name='autoStart' value='false'>" ;
strMediaplaer=strMediaplaer+"<param name='invokeURLs' value='false'>" ;
strMediaplaer=strMediaplaer+"<param name='playCount' value='1'>" ;
strMediaplaer=strMediaplaer+"<param name='defaultFrame' value='datawindow'>";
strMediaplaer=strMediaplaer+"<embed src='' align='baseline' border='0' width='"+BoxWidth+"' height='64'";
strMediaplaer=strMediaplaer+" type='application/x-mplayer2'" ;
strMediaplaer=strMediaplaer+"pluginspage=''" ;
strMediaplaer=strMediaplaer+"name='MediaPlayer1' showcontrols='0' showpositioncontrols='0'";
strMediaplaer=strMediaplaer+"showaudiocontrols='1' showtracker='0' showdisplay='0'" ;
strMediaplaer=strMediaplaer+"showstatusbar='0'" ;
strMediaplaer=strMediaplaer+"autosize='0'" ;
strMediaplaer=strMediaplaer+"showgotobar='0' showcaptioning='0' autostart='0' autorewind='0'";
strMediaplaer=strMediaplaer+"animationatstart='0' transparentatstart='0' allowscan='0'" ;
strMediaplaer=strMediaplaer+"enablecontextmenu='0' clicktoplay='0'" ;
strMediaplaer=strMediaplaer+"defaultframe='datawindow' invokeurls='0'>" ;
strMediaplaer=strMediaplaer+"</embed>" ;
strMediaplaer=strMediaplaer+"</object></div>" ;
content=content+strMediaplaer;
DivStyle('MessageBoxBG').height=XYwin(0)+'px';
DivStyle('MessageBoxBG').display='block';
GetDiv('MessageBox').innerHTML="<div class=/"MessageBoxTitle/"> "+title+"<//div>"+content+"<div class=/"MessageBoxClose/" style=/"cursor:pointer;/"><a onclick='play();'>试听 | </a><a>下载 | </a><a onclick='stop()' onMouseMove=/"setTimeout('MessageBoxTOG()',1);/" onMouseOut=/"setTimeout('document.onclick=function(){}',1);/" >关闭 | </a>"+"<//div>";
if(parseInt(BoxLeft)+parseInt(BoxWidth)+20>=window.screen.availWidth)
{
var tmpleft=window.screen.availWidth-BoxWidth-30;
DivStyle('MessageBox').left=tmpleft+'px';
}else
{
DivStyle('MessageBox').left=BoxLeft+'px';
}
DivStyle('MessageBox').top=BoxTop+'px';
DivStyle('MessageBox').width=BoxWidth+'px';
DivStyle('MessageBox').display='block'; }
window.onload=function(){
document.body.innerHTML="<div id=/"MessageBoxBG/"></div><div id=/"MessageBox/"></div>"+document.body.innerHTML;
}
function ShowMessageImageBox(title,content,BoxLeft,BoxTop,BoxWidth)
{
DivStyle('MessageBoxBG').height=XYwin(0)+'px';
DivStyle('MessageBoxBG').display='block';
GetDiv('MessageBox').innerHTML="<div class=/"MessageBoxTitle/"> "+title+"<//div>"+content+"<div class=/"MessageBoxClose/" style=/"cursor:pointer;/"><a>下载 | </a><a onclick='stop()' onMouseMove=/"setTimeout('MessageBoxTOG()',1);/" onMouseOut=/"setTimeout('document.onclick=function(){}',1);/" >关闭 | </a>"+"<//div>";
if(parseInt(BoxLeft)+parseInt(BoxWidth)+20>=window.screen.availWidth)
{
var tmpleft=window.screen.availWidth-BoxWidth-30;
DivStyle('MessageBox').left=tmpleft+'px';
}
else
{
DivStyle('MessageBox').left=BoxLeft+'px';
}
DivStyle('MessageBox').top=BoxTop+'px';
DivStyle('MessageBox').width=BoxWidth+'px';
DivStyle('MessageBox').display='block'; }
window.onload=function(){
document.body.innerHTML="<div id=/"MessageBoxBG/"></div><div id=/"MessageBox/"></div>"+document.body.innerHTML;
}
function play()
{
if (WindowsMediaPlayer.controls.isavailable('play'))
{
WindowsMediaPlayer.controls.play();
var state=setInterval("updatetime()",1000);
}
}
function stop()
{
if (WindowsMediaPlayer.controls.isavailable('stop'))
{
WindowsMediaPlayer.controls.stop();
clearInterval(state);
}
}
</script>
<body>
<form id="form1" runat="server">
<div >
<table width="50%" border="0" cellspacing="1" cellpadding="0" bgcolor="#0066FF">
<tr >
<td bgcolor="#ffffff"><a href="#" onclick="ShowMessageBox('标题','<a href=/'http://www.sina.com/'>批着羊皮的狼</a>',event.clientX,event.clientY,300,''); return false;">批着羊皮的狼</a> </td>
</tr>
</table>
<table width="50%" border="0" cellspacing="1" cellpadding="0" bgcolor="#0066FF">
<tr>
<td bgcolor="#ffffff" align="center">
<img src="images/1.jpg" onmouseover="this.style.cursor = 'hand';"onmouseout="this.style.cursor = 'default'" onclick="ShowMessageImageBox('标题','<img height =/'200/' width=/'200/' src=/'images/1.jpg/' />',event.clientX,event.clientY,300); return false;"/></td>
</tr>
</table>
</div>
</form>
</body>
</html>