function RandomAd(AdNum) 
{  //AdNum :  共几个广告条随机显示
    var type = new Array();
    var width = new Array();
    var height = new Array();
    var res = new Array();
    var url = new Array();

    type[0] = 1;
    width[0] =960;
    height[0] = 70;
    res[0] = "index/hefei.swf";
    url[0] = "";

    type[1] = 1;
    width[1] =960;
    height[1] = 70;
    res[1] = "index/wuxi.swf";
    url[1] = "";

    type[2] = 1;
    width[2] = 960;
    height[2] = 70;
    res[2] = "index/xiamen.swf";
    url[2] = "";
    
    type[3] = 1;
    width[3] = 960;
    height[3] = 70;
    res[3] = "index/xian.swf";
    url[3] = "";
	
 	type[4] = 1;
    width[4] = 960;
    height[4] = 70;
    res[4] = "index/shenzhen.swf";
    url[4] = "";
    

    var i = Math.floor(Math.random() * AdNum)  
    OutputAd(type[i],width[i],height[i],res[i],url[i])
}

function OutputAd(type,width,height,res,url)
{
	var temp = ""
		if (type==1){
			temp = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
			temp += '      codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ width +'" height="'+ height +'">';
			temp += '         <param name="movie" value="'+ res  +'" />';
			temp += '         <param name="quality" value="high" />';
			temp += '         <param name="wmode" value="opaque" />';
			temp += '         <embed src="'+ res +'" width="'+ width +'" height="'+ height +'" vspace="0" quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="opaque"></embed>';
			temp += '</object>';
		}
		if (type==2)
		{
			temp = '<a href="'+ url +'" target="_blank"><img src="'+ res +'" width="'+ width +'" height="'+ height +'" border="0"></a>'
		}
	document.write(temp); 
}  

