function ShowControl(ElementID){
 document.getElementById(ElementID).style.display="block";
}

function HideControl(ElementID){
 document.getElementById(ElementID).style.display="none";
}

function InsertFlash(Flash,Width,Height,ID){
 document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
 document.write("codebase=\"../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ");
 document.write("width=\"" + Width + "\" height=\"" + Height + "\" id=\"" + ID + "\">");
 document.write("<param name=\"movie\" value=\"" + Flash + "\">");
 document.write("<param name=\"quality\" value=\"high\">");
 document.write("<param name=\"wmode\" value=\"transparent\">");
 document.write("<embed src=\"" + Flash + "\" quality=\"high\" pluginspage=\"../www.macromedia.com/go/getflashplayer\" ");
 document.write("type=\"application/x-shockwave-flash\" width=\"" + Width + "\" height=\"" + Height + "\"></embed>");
 document.write("</object>");
}


	var aDay	= new Array("","","","","","","");
	var aMonth	= new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")


	function DateFormat(xdate,x)
		{
		/*	
			Date Format function to be used in internally by the Showdate function.
			Returns either: d, dd, ddd, dddd, m, mm, mmm, mmmm, y, yy, yyy, yyyy.
			eg. Sun Sep 28 09:22:08 EDT 2003returns28, 28, Sun., Sunday, 9, 09, Sep., September, 03, 03, 03, 2003
				Sun Sep 28 09:22:08 EDT 2003 = 28 28 Sun. Sunday, 9 09 Sep. September, 03 03 03 2003 
		*/
		x = x.toLowerCase();
		return (((x == "d")? xdate.getDate() : ((x == "dd") ? ((xdate.getDate() <= 9) ? "0"+xdate.getDate() : xdate.getDate()) : ((x == "ddd") ? aDay[xdate.getDay()].substring(0,3)+". " : ((x == "dddd") ? aDay[xdate.getDay()]+", " : ((x == "m")? xdate.getMonth()+1 : ((x == "mm") ? (((xdate.getMonth()+1) <= 9) ? "0"+(xdate.getMonth()+1) : xdate.getMonth()+1) : ((x == "mmm") ? aMonth[xdate.getMonth()].substring(0,3) : ((x == "mmmm") ? aMonth[xdate.getMonth()] : ((x == "y" || x == "yy" || x == "yyy") ? xdate.getFullYear().toString().substring(2,4) : ((x == "yyyy") ? xdate.getFullYear().toString() : "")))))))))))
		}


	function Showdate(_date, _var1, _var2, _var3, _var4, _del)
		{
		// ----------------------------------------------------------------------------------------
		// Content:	Date formatter where _month = month, _day = day of week spelled out, yyyy = four digit year. 
		// The script will only display a day spelled out if the parameter is ddd, or dddd. dd or d means do not display the day.
		//
		//	Syntax: document.writeln(Showdate(date object, "ddd", "mmm", "dd", "yyyy", "-"));
		//		where date can be a field variable = rs("Datecreated"); constant= new Date(yyyy,m,dd); 
		//
		//	Results in: Thursday, January-01-1970NOTE that the numeric month in Javascript is from 0-11
		//
		// timerID=setInterval("if (_ie){++nd; if (nd > xStyle.length) nd=0; document.all.md.innerHTML=Showdate(null, "mmm", "ddd", "yy" , "-");}",3000)
		// timerOn=true
		// ----------------------------------------------------------------------------------------

		var today	= (_date == null) ? new Date() : new Date(_date);
		_del =((_del == null) ? " " : _del);
		return ( DateFormat(today, _var1) + DateFormat(today, _var2) + ((_var2 != "")? _del : "") + DateFormat(today, _var3) + ((_var3 != "")? _del : "") + DateFormat(today, _var4))
		}


<!--
//图片按比例缩放
var flag=false;
function DrawImage(ImgD,iwidth,iheight){
    //参数(图片,允许的宽度,允许的高度)
    var image=new Image();
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= iwidth/iheight){
        if(image.width>iwidth){ 
        ImgD.width=iwidth;
        ImgD.height=(image.height*iwidth)/image.width;
        }else{
        ImgD.width=image.width; 
        ImgD.height=image.height;
        }
        //ImgD.alt=image.width+"×"+image.height;
        }
    else{
        if(image.height>iheight){ 
        ImgD.height=iheight;
        ImgD.width=(image.width*iheight)/image.height;        
        }else{
        ImgD.width=image.width; 
        ImgD.height=image.height;
        }
        //ImgD.alt=image.width+"×"+image.height;
        }
    }
} 
//-->

