﻿// JScript 文件

var DateNow=new Date();
function GetServerDate(Date1)
{
    DateNow=new Date(Date.parse(Date1)); 
}
//<0,小于当前日期；=0等于当前日期；>0大于当前日期
function CompareDate(inputDate){   
  var today = DateNow;    
  if(today.getFullYear() > inputDate.getFullYear())   
    return -1;   
  else if(today.getFullYear() < inputDate.getFullYear())   
    return 1;   
  if(today.getMonth() > inputDate.getMonth())   
    return -1;   
  else if(today.getMonth() < inputDate.getMonth())   
    return 1;   
  if(today.getDate() > inputDate.getDate())   
    return -1;   
  else if(today.getDate() < inputDate.getDate())   
    return 1;   
  return 0;   
  }   

function FlashShow(Date1,FileUrlBefore,FileUrlAfter)
{
    myDate = new Date(Date.parse(Date1));   
    if(CompareDate(myDate)>0)
    {
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="730" height="73"><param name="movie" value="'+FileUrlBefore+'""><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+FileUrlBefore+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="730" height="73"></embed></object>');
    }
    else
    {
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="730" height="73"><param name="movie" value="'+FileUrlAfter+'""><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+FileUrlAfter+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="730" height=" 73"></embed></object>');
    }
}
