﻿// JavaScript Document
function banner(filepath,w,h,str) {
if(filepath.substring(filepath.length-3,filepath.length)=="swf"){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'"> ');
    document.write('<param name="movie" value="' + filepath + '">');
    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="' + filepath + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
    document.write('</object> ');
}else if(filepath.substring(filepath.length-3,filepath.length)=="mp3"||filepath.substring(filepath.length-3,filepath.length)=="avi"){
	document.write('<embed id="MediaPlayer963" src="'+filepath+'" width="100%" height="30" type="video/x-msvideo" volume="1" autostart="0" loop="1" align="left"></embed>');
}
else{
	document.write('<img src="'+filepath+'" width="'+w+'" height="'+h+'" alt="'+str+'" border="0" />');
}
}

var flag=false; 
function DrawImage(ImgD,w,t){ 
 var image=new Image(); 
 w=600;
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= w/w){ 
   if(image.width>w){
    ImgD.width=w; 
    ImgD.height=(image.height*w)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt=t; 
  } 
  else{ 
   if(image.height>w){
    ImgD.height=w; 
    ImgD.width=(image.width*w)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt=t; 
  } 
 }
}

function ShowAds(Piclist,Urllist,Width,Height)
{
var focus_width=Width //flash宽度定义
var focus_height=Height //flash高度定义
var swf_height = focus_height
var pics=''+Piclist+''
var links='' + Urllist + ''
document.write('<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="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/img/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#DADADA">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'">');
document.write('<embed src="/img/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}
