/**
 * Notice: this compoment do not support 'GIF' format images, your'd better use '.JPG' format only!
 * 注意：这个组件不支“GIF”格式的图片，最好全部使用“JPG”格式！
 **/
function smartImageBox(width, height, infoArray){
	/*** 图片列表： ***/
	var pics = new Array();
	/*** 连接列表： ***/
	var links = new Array();
	/*** 连接列表： ***/
	var texts = new Array();
	for(var i=0; i<infoArray.length; i=i+1){
		pics[i]  = infoArray[i].P;
		links[i] = infoArray[i].L;
		texts[i] = infoArray[i].T;
	}
	var focus_width  = width?width:440;
	var focus_height = height?height:220;
	var text_height  = texts.join("").replace(" ","").length === 0 ? 0:18;
	var swf_height = focus_height+text_height;
	var flashSrc = "pixviewer.swf";
	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="'+flashSrc+'"><param name="quality" value="high"><param name="bgcolor" value="#cccccc">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque"><param name=wmode value="transparent">');
	document.write('<param name="FlashVars" value="pics='+pics.join('|')+'&links='+links.join('|')+'&texts='+texts.join('|')+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
	document.write('<embed src="'+flashSrc+'" wmode="opaque" FlashVars="pics='+pics.join('|')+'&links='+links.join('|')+'&texts='+texts.join('|')+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" 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>');
}