//选择全部
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
//限制只允许输入数字
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
//ewebeditor提取上传图片地址
function doChange(objText, objDrop){
 if (!objDrop) return;
 var str = objText.value;
 var arr = str.split("|");
 var nIndex = objDrop.selectedIndex;
 objDrop.length=1;
 for (var i=0; i<arr.length; i++){
  objDrop.options[objDrop.length] = new Option(arr[i], arr[i]);
 }
 objDrop.selectedIndex = nIndex;
}
//点击图片打开新窗口
function imglink(divid) 
{ 
var imgs = document.getElementById(divid).getElementsByTagName("img"); 
for(var i=0;i <imgs.length;i++) 
{ 
imgs[i].style.cursor= "url('/images/magnify.cur')"; 
imgs[i].onclick = function(){window.open(this.src);} 
} 
} 


//符合W3C标准的插入FLASH
function showflash(ur,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="' + ur + '" />');
document.write('<param name="quality" value="high" /> ');
document.write('<param name="wmode" value="transparent" /> ');
document.write('<param name="menu" value="false" /> ');
document.write('<embed src="' + ur + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
document.write('</object> ');
} 

//符合W3C标准的插入播放器
function showAudio(ur,w,h){
document.write('<object width="'+w+'" height="'+h+'" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6">');
document.write('<param name="autoStart" value="false" />');
document.write('<param name="animationatStart" value="true" />');
document.write('<param name="transparentatStart" value="true" />');
document.write('<param name="CanSeek" value="flase" />');
document.write('<param name="showControls" value="false" />');
document.write('<param name="URL" value="'+ur+'" />');
document.write('<param name="volume" value="50" />');
document.write('</object>');
}

//符合W3C标准的插入FLV播放器
function showVideo(ur,w,h){
document.write('<object id="vcastr3" data="flv/vcastr3.swf?xml=');
document.write('<vcastr>');
document.write('<channel>');
document.write('<item>');
document.write('<source>'+ur+'</source>');
document.write('</item>');
document.write('</channel>');
document.write('</vcastr>" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="flv/vcastr3.swf?xml=');
document.write('<vcastr>');
document.write('<channel>');
document.write('<item>');
document.write('<source>'+ur+'</source>');
document.write('</item>');
document.write('</channel>');
document.write('</vcastr>" />');
document.write('<param name="allowFullScreen" value="true" />');
document.write('</object>');
}

//调用招商银行的涨跌排名
function cmbchina(){
document.write('<IFRAME name="homephb" align="absMiddle" marginWidth="0" marginHeight="0" src="http://info.cmbchina.com/cmb2005stock/investaspxbin/stock/Stock_homephb.aspx" frameBorder="no" width="172" scrolling="no" height="293"></IFRAME>');
}
//东方财富网的K线图
function KK(){
document.write('<IFRAME name="kkk" align="absMiddle" marginWidth="0" marginHeight="0" src="k.asp" frameBorder="no" width="350" scrolling="no" height="260"></IFRAME>');
}


function K(){
document.write('<div id="hangqing"><a href="###" id="t1" onMouseOver="chgimg(1)">沪A</a><a href="###" id="t2" onMouseOver="chgimg(2)">深A</a><a href="###" id="t3" onMouseOver="chgimg(3)">沪B</a><a href="###" id="t4" onMouseOver="chgimg(4)">深B</a><a href="###" id="t5" onMouseOver="chgimg(5)">300</a><a href="###" onclick="javascript:window.location.reload();">刷新</a></div>');
document.write('<div id="k"><img id="img1" src="http://hqpicir.eastmoney.com/img/000001.png" border="0" /></div>');
}
function chgimg(nIndex)
{
      if(nIndex == 1)
        document.getElementById("img1").src="http://hqpicir.eastmoney.com/img/000001.png";
      if(nIndex == 2)
        document.getElementById("img1").src="http://hqpicir.eastmoney.com/img/399001.png";
      if(nIndex == 3)
        document.getElementById("img1").src="http://hqpicir.eastmoney.com/img/000003.png";
      if(nIndex == 4)
        document.getElementById("img1").src="http://hqpicir.eastmoney.com/img/399003.png";
      if(nIndex == 5)
        document.getElementById("img1").src="http://hqpicir.eastmoney.com/img/000300.png";
}