﻿function Delete()
{
    return confirm("是否删除?");
}  

function picresize(obj,MaxWidth,MaxHeight){
    obj.onload=null;
    img=new Image();
    img.src=obj.src;
    if (img.width>MaxWidth && img.height>MaxHeight){
        if (img.width/img.height>MaxWidth/MaxHeight) {
            obj.height=MaxWidth*img.height/img.width;
              obj.width=MaxWidth;
          }else {
              obj.width=MaxHeight*img.width/img.height;
            obj.height=MaxHeight;
        }
    }else if (img.width>MaxWidth) {
        obj.height=MaxWidth*img.height/img.width;
          obj.width=MaxWidth;
      }else if (img.height>MaxHeight) {
          obj.width=MaxHeight*img.width/img.height;
        obj.height=MaxHeight;
    }else{
        obj.width=img.width;
        obj.height=img.height;
    }
}

function PlayVideo(play_name)
{
    document.write('<object id="FLVPlayer" height="300" width="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">');
    document.write('<param name="movie" value="/tools/FLVPlayer_Progressive.swf" />');
    document.write('<param name="salign" value="lt" />');
    document.write('<param name="quality" value="high" />');
    document.write('<param name="scale" value="noscale" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="FlashVars" value="MM_ComponentVersion=1&skinName=/tools/Corona_Skin_3&streamName=/UploadVideo/PlayFiles/' + play_name + '&autoPlay=true&autoRewind=true" />');
    document.write('<embed name="FLVPlayer" wmode="transparent" height="300" width="400" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" salign="LT" scale="noscale" quality="high" flashvars="MM_ComponentVersion=1&skinName=/tools/Corona_Skin_3&streamName=/UploadVideo/PlayFiles/' + play_name + '&autoPlay=true&autoRewind=true" src="/tools/FLVPlayer_Progressive.swf"></embed>');
    document.write('</object>');
}

function getRandomNum()
{
    return new Date().getTime();
}
