function LoadFlash(url,wmode,width,Height,param)
{
var fstrs='';
fstrs+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ width +'" height="'+ Height +'">';
fstrs+='<param name="movie" value="'+ url + '" />';
fstrs+='<param name="quality" value="high" />';
fstrs+='<param name="menu" value="false" />';
fstrs+='<param name="wmode" value="'+ wmode +'" />';
fstrs+='<param name="FlashVars" value="'+param+'" />';
fstrs+='<embed src="'+ url + '" wmode="'+ wmode +'" FlashVars="'+param+'" menu="false" quality="high" width="'+ width +'" height="'+ Height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
fstrs+='</object>';
document.write (fstrs);
}
//LoadFlash("vcastr3.swf","opaque","320","290","xml=vcastr.xml");
function DateDemo(){
   var d, da, x, s = "";
   var x = new Array("星期日", "星期一", "星期二");
   var x = x.concat("星期三","星期四", "星期五");
   var x = x.concat("星期六");
   d = new Date();
   s += d.getYear() + "年";
   s += (d.getMonth() + 1) + "月";
   s += d.getDate() + "日 ";
   da = d.getDay();
   s += x[da];
   return(s);
}
function addfav(title, url) {   
    if(!title) {   
        var title = window.document.title;   
    }   
    if(!url) {   
        var url = window.document.location;   
    }   
    try{   
        if (document.all){    
            window.external.addFavorite(url,title);    
        } else if (window.sidebar) {    
            window.sidebar.addPanel(title, url,"");    
        }    
    }catch(e){};   
}
function addhome(ab) {
  document.body.style.behavior = 'url(#default#homepage)';
  document.body.sethomepage(ab);
}
function DrawImage(id,w,h)
{
    var imgs = new Image();
    var iw = w;
    var ih = h;
    imgs.src = id.src;
    if (imgs.width > 0 && imgs.height > 0)
    {
        flag = true;
        if (imgs.width / imgs.height >= iw / ih)
        {
            if (imgs.width > iw)
            {
                id.width = iw;
                id.height = (imgs.height * iw) / imgs.width;
            }
            else
            {
                id.width = imgs.width;
                id.height = imgs.height;
            }
        }
        else
        {
            if (imgs.height > ih)
            {
                id.height = ih;
                id.width = (imgs.width * ih) / imgs.height;
            }
            else
            {
                id.width = imgs.width;
                id.height = imgs.height;
            }
        }
    }
}

function ImgAuto(i,MaxW,MaxH){var o=new Image();o.src=i.src;var w=o.width;var h=o.height;var t;if (w>MaxW){t=MaxW;}else{t=w;}if ((h*t/w)>MaxH){i.height=MaxH;i.width=MaxH/h*w;}else{i.width=t;i.height=t/w*h;}}
