function anymedia_flash(id,src,mime,width,height,autoplay,loop){if(is_ie){var result='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="movie" value="'+src+'" />';result+='<param name="play" value="'+autoplay+'" />';result+='<param name="wmode" value="opaque" />';result+='<param name="quality" value="high" />';result+='<param name="loop" value="'+loop+'" />';result+='</object>';}else{var result='<object data="'+src+'" type="'+mime+'" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="play" value="'+autoplay+'" />';result+='<param name="wmode" value="opaque" />';result+='<param name="quality" value="high" />';result+='<param name="loop" value="'+loop+'" />';result+='</object>';}
document.getElementById('anymedia_container_'+id).innerHTML=result;}
function anymedia_quicktime(id,src,mime,width,height,autoplay,loop){if(is_ie){var result='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="autoplay" value="'+autoplay+'" />';result+='<param name="src" value="'+src+'" />';result+='<param name="loop" value="'+loop+'" />';result+='</object>';}else{var result='<object data="'+src+'" type="'+mime+'" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="autoplay" value="'+autoplay+'" />';result+='<param name="loop" value="'+loop+'" />';result+='</object>';}
document.getElementById('anymedia_container_'+id).innerHTML=result;}
function anymedia_realmedia(id,src,mime,width,height,autoplay,loop){var result='<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="src" value="'+src+'" />';result+='<param name="controls" value="Imagewindow" />';result+='<param name="console" value="clip'+id+'" />';result+='<param name="autostart" value="'+autoplay+'" />';result+='<param name="loop" value="'+loop+'" />';result+='<embed src="'+src+'" type="audio/x-pn-realaudio-plugin" ';result+='autostart="'+autoplay+'" console="clip'+id+'" ';result+='width="'+width+'" height="'+height+'" ';result+='controls="Imagewindow" loop="'+loop+'"></embed><br />';result+='</object>';result+='<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ';result+='width="'+width+'" height="42">';result+='<param name="src" value="'+src+'" />';result+='<param name="controls" value="ControlPanel" />';result+='<param name="console" value="clip'+id+'" />';result+='<param name="autostart" value="'+autoplay+'" />';result+='<param name="loop" value="'+loop+'" />';result+='<embed src="'+src+'" type="audio/x-pn-realaudio-plugin" ';result+='autostart="'+autoplay+' console="clip'+id+'" ';result+='width="'+width+'" height="42" ';result+='controls="ControlPanel" loop="'+loop+'"></embed>';result+='</object>';document.getElementById('anymedia_container_'+id).innerHTML=result;}
function anymedia_windowsmedia(id,src,mime,width,height,autoplay,loop){if(is_ie){var result='<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="autoplay" value="'+autoplay+'" />';result+='<param name="filename" value="'+src+'" />';result+='<param name="loop" value="'+loop+'" />';result+='</object>';}else{var result='<object data="'+src+'" type="'+mime+'" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="autostart" value="'+((autoplay=='false')?'0':'1')+'" />';result+='<param name="loop" value="'+loop+'" />';result+='</object>';}
document.getElementById('anymedia_container_'+id).innerHTML=result;}
function anymedia_adobepdf(id,src,mime,width,height,autoplay,loop){if(is_ie){var result='<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="src" value="'+src+'" />';result+='</object>';}else{var result='<object data="'+src+'" type="'+mime+'" ';result+='width="'+width+'" height="'+height+'">';result+='</object>';}
document.getElementById('anymedia_container_'+id).innerHTML=result;}
function anymedia_pplive(id,src,mime,width,height,autoplay,loop){var result='<object classid="clsid:18226BF8-DC0B-4D81-80E9-A41AE37BB73A" ';result+='codeBase="http://www.pplive.com/zh-cn/other/live/install.cab#version=1,2,32,0" ';result+='width="'+width+'" height="'+height+'">';result+='<param name="URL" value="'+src+'" />';result+='<param name="ControlVisible" value="1" />';result+='</object>';document.getElementById('anymedia_container_'+id).innerHTML=result;}
function anymedia_checkall(str,checked){var a=document.getElementsByName('anymedia_check_'+str);var n=a.length;for(var i=0;i<n;i++){a[i].checked=checked;}
anymedia_size(str);}
function anymedia_download(str,i,first){var a=document.getElementsByName('anymedia_check_'+str);var n=a.length;for(var i=i;i<n;i++){if(a[i].checked){window.location=a[i].value;if(first){timeout=5000;}else{timeout=1000;}
i++;window.setTimeout('anymedia_download(\''+str+'\', '+i+', 0)',timeout);break;}}}
function anymedia_copy(str){var a=document.getElementsByName('anymedia_check_'+str);var n=a.length;var anymediaCopy=document.getElementById('copy_anymedia_'+str)
anymediaCopy.innerHTML='';for(var i=0;i<n;i++){if(a[i].checked){anymediaCopy.innerHTML+=a[i].value;anymediaCopy.innerHTML+='<br />';}}
var rng=document.body.createTextRange();rng.moveToElementText(anymediaCopy)
rng.scrollIntoView();rng.select();rng.execCommand("Copy");rng.collapse(false);}
function anymedia_size(str){var a=document.getElementsByName('anymedia_check_'+str);var b=document.getElementsByName('item_anymedia_'+str);var n=a.length;try{var input_checkall=document.getElementById('checkall_anymedia_'+str);var size=0;input_checkall.checked=true;for(var i=0;i<n;i++){if(a[i].checked){size+=b[i].value*1;}else{input_checkall.checked=false;}}
test=document.getElementById('size_anymedia_'+str);test.innerHTML=anymedia_gen_size(size,3,2);}catch(e){}}
function anymedia_gen_size(val,li,sepa){sep=Math.pow(10,sepa);li=Math.pow(10,li);retval=val;unit='B';if(val>=li*1000000000){val=Math.round(val/(1099511627776/sep))/sep;unit='TB';}else if(val>=li*1000000){val=Math.round(val/(1073741824/sep))/sep;unit='GB';}else if(val>=li*1000){val=Math.round(val/(1048576/sep))/sep;unit='MB';}else if(val>=li){val=Math.round(val/(1024/sep))/sep;unit='KB';}
return val+unit;}
function imgzoom(o){if(event.ctrlKey){var zoom=parseInt(o.style.zoom,10)||100;zoom-=event.wheelDelta/12;if(zoom>0){o.style.zoom=zoom+'%';}
return false;}else{return true;}}