<!--
mark ( home_pic ) parse begin
-->
<
script type
=
"
text/javascript
"
>
var
focus_width
=
200;
var
focus_height
=
140
;
var
text_height
=
60
;
var
swf_height
=
focus_height
+
text_height;
var
text
=
new
Array();
var
pic
=
new
Array();
var
mylink
=
new
Array(); pic[
0
]
=
'
http://*.*.*.*/****/
'
//
图片存放路径
pic[
1
]
=
'
a.jpg
'
//
图片文件名
pic[
2
]
=
'
b.jpg
'
pic[
3
]
=
'
c.jpg
'
pic[
4
]
=
'
d.jpg
'
pic[
5
]
=
'
e.jpg
'
pic[
6
]
=
'
|
'
var
pics
=
''
;
for
(i
=
1
;i
<
6
;i
++
)
...
{ pics = pics + pic[ 0 ] + pic[i] + pic[ 6 ]; }
pics
=
pics.slice(
0
,(pics.length
-
pic[
6
].length)) text[
0
]
=
'
<br>
'
text[
1
]
=
'
*********
'
//
图片说明文字
text[
2
]
=
'
*********
'
text[
3
]
=
'
*********
'
text[
4
]
=
'
*********
'
text[
5
]
=
'
*********
'
text[
6
]
=
'
|
'
function
wrapString(inputString,wrapLength,delimiter)
...
{ buildString = '' ; for (i = 0 ; i < inputString.length; i += wrapLength) ... { buildString += inputString.slice(i,i + wrapLength) + delimiter; } return buildString.slice( 0 ,(buildString.length - delimiter.length)); }
var
texts
=
''
;
for
(j
=
1
;j
<
6
;j
++
)
...
{ texts = texts + text[ 0 ] + wrapString(text[j], 15 , ' <br> ' ) + text[ 6 ]; }
texts
=
texts.slice(
0
,(texts.length
-
text[
6
].length))
var
links
=
'
http://*.*.*.*/***|http://*.*.*.*/***
'
<!--
图片新闻连接地址,用
|
分隔
-->
document.write(
'
<object ID="focus_flash" 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="http://*.*.*.*/****/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor">
'
); document.write(
'
<param name="menu" value="false"><param name=wmode value="transparent">
'
); document.write(
'
<param name="FlashVars" value="pics=
'
+
pics
+
'
&links=
'
+
links
+
'
&texts=
'
+
texts
+
'
&borderwidth=
'
+
focus_width
+
'
&borderheight=
'
+
focus_height
+
'
&textheight=
'
+
text_height
+
'
">
'
); document.write(
'
<embed ID="focus_flash" src="http://*.*.*.*/****/pixviewer.swf" wmode="opaque" FlashVars="pics=
'
+
pics
+
'
&links=
'
+
links
+
'
&texts=
'
+
texts
+
'
&borderwidth=
'
+
focus_width
+
'
&borderheight=
'
+
focus_height
+
'
&textheight=
'
+
text_height
+
'
" menu="false" 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>
'
);
</
script
>
<!--
mark ( home_pic ) parse end
-->
注: pixviewer.swf文件是用于显示图片的Flash文件,该文件必须存在。