<!-- شروع اسلايدر --><!---------------------------------->
<!-- START OF STYLE -->
<style>
.commentstyle{
/* style attributes for the comments below the pictures */
font-family:Arial;
font-size:15pt;
color:red;
vertical-align:middle;
text-align:center;
padding:5px;
}
.thumbnailstyle{
/* style attributes for the thumbnails */
margin:3px;
width:68px;
border-style:solid;
border-width:1px;
border-color:red;
/* shadow for Firefox */
-moz-box-shadow: 2px 2px 3px #AAAAAA;
/* shadow for Safari and Chrome */
-webkit-box-shadow: 2px 2px 3px #AAAAAA;
/* shadow for Opera */
box-shadow: 2px 2px 3px #AAAAAA;
/* shadow for Internet Explorer */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=2, Direction=135, Color='#AAAAAA');
}
.slideshowstyle{
overflow:hidden;
border-style:solid;
border-width:1px;
border-color:white;
background-color:#ffffff;
background-image: url(http://www.imgiran.com/images/7mcd43xfqtxoli1eiqpe.jpg);
margin:3px;
/* shadow for Firefox */
-moz-box-shadow: 5px 5px 8px #AAAAAA;
/* shadow for Safari and Chrome */
-webkit-box-shadow: 5px 5px 8px #AAAAAA;
/* shadow for Opera */
box-shadow: 5px 5px 5px #AAAAAA;
/* shadow for Internet Explorer */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#AAAAAA');
}
</style>
<!-- END OF STYLE -->
<script>
var picture= [
/////////////////////////////////////////////
//محل گذاشتن عكسها و خيرهاي اسلايدر
/////////////////////////////////////////////
<!-- حتما حتما عكس در سايز -->
<!--شماره 1 -->
{
imgsrc : "http://fc-perspolis.com/ImageGen/imagegen.ashx?image=/media/6554101/b.jpg&width=400&height=200",
linkto : "",
comment : ""
}, // comma required
<!-- عكس و خبر شماره2 -->
{
imgsrc : "http://fc-perspolis.com/ImageGen/imagegen.ashx?image=/media/214299/IMG_9220.jpg&width=400&height=200",
linkto : "",
comment : " "
}, // comma required
<!-- عكس و خبر شماره 3 -->
{
imgsrc : "http://fc-perspolis.com/ImageGen/imagegen.ashx?image=/media/214287/IMG_9429.jpg&width=400&height=200",
linkto : "",
comment : ""
}, // comma required
<!-- عكس و خبر شماره 4 -->
{
imgsrc : "http://fc-perspolis.com/ImageGen/imagegen.ashx?image=/media/214215/telecom%20(7).jpg&width=400&height=200",
linkto : "لينك4",
comment : " "
}, // comma required
<!-- عكس و خبر شماره 5 -->
{
imgsrc : "http://fc-perspolis.com/ImageGen/imagegen.ashx?image=/media/214260/IMG_9270.jpg&width=400&height=200",
linkto : "لينك5",
comment : " "
} // ATTENTION: the last entry requires NO final comma
]
// pause (seconds)
var stillstand=5
// speed of zooming. Higher value means faster zooming
var zoomspeed=4
// width of slideshow (px). Width of slideshow and width of images should be identical
var slideshowwidth=400
// height of slideshow (px). Height of slideshow and height of images should be identical
var slideshowheight=200
// Shall thumbnails be displayed? Enter "yes" or "no"
var show_thumbnails="yes"
/////////////////////////////////////////////
// پايان محل گذاشتن عكس و خبر اسلايدر
/////////////////////////////////////////////
// Do not edit below this line
var imgpreload=new Array()
for (iii=0;iii<=picture.length-1;iii++) {
imgpreload[iii]=new Image()
imgpreload[iii].src=picture[iii].imgsrc
}
var positionleft=0
var positiontop=0
var timer
var marginright=0
var i_fadestrength=0
var i_images=0
var step=1
var content_image
var content_text
var imageboxwidth=0
var imageboxheight=0
var imagebasicwidth=0
var imagebasicheight=0
var moveon=true
var timer
var timerpause
var stopid
stillstand*=600
function setimage() {
if (i_images>=picture.length) {i_images=0}
content_image="<a href='"+picture[i_images].linkto+"'><img border=0 name='newpic' src='"+picture[i_images].imgsrc+"'></a>"
content_text=picture[i_images].comment
document.getElementById('imagebox').innerHTML=content_image
document.getElementById('textbox').innerHTML=content_text
imagebasicwidth=document.newpic.width
imagebasicheight=document.newpic.height
if (show_thumbnails=="yes"){
if (document.all) {
for (i=0;i<=picture.length-1;i++) {
document.getElementById(i).filters.alpha.opacity=30
}
}
else {
for (i=0;i<=picture.length-1;i++) {
document.getElementById(i).style.opacity=0.3
}
}
}
timer=setTimeout("startenlarge()",50)
}
function startenlarge() {
if (moveon) {
if (imageboxwidth<imagebasicwidth) {
content_image="<a href='"+picture[i_images].linkto+"'><img border=0 name='newpic' src='"+picture[i_images].imgsrc+"' width="+imageboxwidth+"></a>"
document.getElementById('imagebox').innerHTML=content_image
imageboxwidth=document.newpic.width
imageboxheight=document.newpic.height
if (document.all) {
document.getElementById('imagebox').filters.alpha.opacity=Math.floor(i_fadestrength)
document.getElementById('textbox').filters.alpha.opacity=Math.floor(i_fadestrength)
if (show_thumbnails=="yes"){
document.getElementById(i_images).filters.alpha.opacity=Math.floor(i_fadestrength)
}
}
else {
document.getElementById('imagebox').style.opacity=(i_fadestrength)/100
document.getElementById('textbox').style.opacity=(i_fadestrength)/100
if (show_thumbnails=="yes"){
document.getElementById(i_images).style.opacity=(i_fadestrength)/100
}
}
document.getElementById('imagebox').style.left=(slideshowwidth/2-imageboxwidth/2)+"px"
document.getElementById('imagebox').style.top=(slideshowheight/2-imageboxheight/2)+"px"
document.getElementById('imagebox').style.overflowX="hidden"
document.getElementById('imagebox').style.visibility="visible"
step+=0.5
i_fadestrength+=(100/(slideshowwidth/zoomspeed))
imageboxwidth+=zoomspeed
timer=setTimeout("startenlarge()",20)
}
else {
clearTimeout(timer)
pauseimage()
}
}
else {
clearTimeout(timer)
stopanimation()
}
}
function pauseimage() {
if (moveon) {
content_image="<a href='"+picture[i_images].linkto+"'><img border=0 name='newpic' src='"+picture[i_images].imgsrc+"' width="+imagebasicwidth+" height="+imagebasicheight+"></a>"
document.getElementById('imagebox').style.left=0+"px"
document.getElementById('imagebox').style.top=0+"px"
document.getElementById('imagebox').innerHTML=content_image
if (document.all) {
document.getElementById('imagebox').filters.alpha.opacity=100
document.getElementById('textbox').filters.alpha.opacity=100
if (show_thumbnails=="yes"){
document.getElementById(i_images).filters.alpha.opacity=100
}
}
else {
document.getElementById('imagebox').style.opacity=1
document.getElementById('textbox').style.opacity=1
if (show_thumbnails=="yes"){
document.getElementById(i_images).style.opacity=1
}
}
i_fadestrength=0
timer=setTimeout("finishenlarge()",stillstand)
}
else {
clearTimeout(timer)
stopanimation()
}
}
function finishenlarge() {
if (moveon) {
if (i_fadestrength<=100) {
content_image="<a href='"+picture[i_images].linkto+"'><img border=0 name='newpic' src='"+picture[i_images].imgsrc+"' width="+imageboxwidth+"></a>"
document.getElementById('imagebox').innerHTML=content_image
imageboxwidth=document.newpic.width
imageboxheight=document.newpic.height
if (document.all) {
document.getElementById('imagebox').filters.alpha.opacity=Math.floor(100-i_fadestrength)
document.getElementById('textbox').filters.alpha.opacity=Math.floor(100-i_fadestrength)
}
else {
document.getElementById('imagebox').style.opacity=(100-i_fadestrength)/100
document.getElementById('textbox').style.opacity=(100-i_fadestrength)/100
}
document.getElementById('imagebox').style.left=(slideshowwidth/2-imageboxwidth/2)+"px"
document.getElementById('imagebox').style.top=(slideshowheight/2-imageboxheight/2)+"px"
document.getElementById('imagebox').style.overflow="hidden"
document.getElementById('imagebox').style.visibility="visible"
i_fadestrength+=5
imageboxwidth+=zoomspeed
timer=setTimeout("finishenlarge()",20)
}
else {
clearTimeout(timer)
i_fadestrength=0;
step=1;
i_images++
if (i_images>=picture.length) {i_images=0}
imageboxwidth=0
timer=setTimeout("setimage()",50)
}
}
else {
clearTimeout(timer)
stopanimation()
}
}
function onmsover(thisimg) {
stopid=thisimg.id
if (show_thumbnails=="yes"){
if (document.all) {
for (i=0;i<=picture.length-1;i++) {
document.getElementById(i).filters.alpha.opacity=30
}
document.getElementById(stopid).filters.alpha.opacity=100
}
else {
for (i=0;i<=picture.length-1;i++) {
document.getElementById(i).style.opacity=0.3
}
document.getElementById(stopid).style.opacity=1
}
}
moveon=false
}
function onmsout(thisimg) {
moveon=true
i_images=thisimg.id
clearTimeout(timer)
setimage()
}
function stopanimation() {
content_image="<a href='"+picture[stopid].linkto+"'><img border=0 name='newpic' src='"+picture[stopid].imgsrc+"' width="+imagebasicwidth+" height="+imagebasicheight+"></a>"
document.getElementById('imagebox').style.left=0+"px"
document.getElementById('imagebox').style.top=0+"px"
document.getElementById('imagebox').innerHTML=content_image
content_text=picture[stopid].comment
document.getElementById('textbox').innerHTML=content_text
if (document.all) {
document.getElementById('imagebox').filters.alpha.opacity=100
document.getElementById('textbox').filters.alpha.opacity=100
}
else {
document.getElementById('imagebox').style.opacity=1
document.getElementById('textbox').style.opacity=1
}
i_fadestrength=0
}
if (show_thumbnails=="yes") {
document.write("<DIV id='roofthumbnails' style='position:relative;width:"+slideshowwidth+"px;'>")
for (i=0;i<=picture.length-1;i++) {
document.write("<img class='thumbnailstyle' onmouseover='onmsover(this)' onmouseout='onmsout(this)' id='"+i+"' style='filter:alpha(opacity=50') src='"+picture.imgsrc+"'>")
}
document.write("</DIV>")
}
document.write("<DIV id='roofimages' class='slideshowstyle' style='position:relative;width:"+slideshowwidth+"px;height:"+slideshowheight+"px;overflow:hidden'>")
if (document.all) {
document.write("<DIV id='imagebox' style='position:absolute;left:0px;top:0px;filter:alpha(opacity=0);'></DIV>")
}
else {
document.write("<DIV id='imagebox' style='position:absolute;opacity:1;'></DIV>")
}
document.write("</DIV>")
document.write("<DIV style='position:relative;width:"+slideshowwidth+"px;'>")
document.write("<DIV><table style='width:"+slideshowwidth+"px;'><tr><td class='commentstyle' id='textbox' style='filter:alpha(opacity=0);'></td></tr></table></DIV>")
document.write("<DIV><table style='width:"+slideshowwidth+"px;'><tr><td class='commentstyle' id='textbox' style='filter:alpha(opacity=0);'></td></tr></table></DIV>")
document.write("</DIV>")
onload=setimage
</script>
<!---------------------------------->
<!-- پايان اسلايدر -->