
/***********************************************
* MultiFrame Image Slideshow script- ?Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var seqslides1=new Array()
seqslides1[0]=["pics/plc/main/scomi.jpg", "http://www.scomigroup.com.my"]
seqslides1[1]=["pics/plc/main/wahseong.jpg", "http://www.wahseong.com"]
seqslides1[2]=["pics/plc/main/ccm.jpg", "http://www.ccm.com.my/"]
seqslides1[3]=["pics/plc/main/leader.jpg", "http://www.leaderuniversal.com"]
seqslides1[4]=["pics/plc/main/gab.jpg", "http://www.gab.com.my/"]
seqslides1[5]=["pics/plc/main/kfc.jpg", "http://www.kfcholdings.com.my/"]
seqslides1[6]=["pics/plc/main/qsr.jpg", "http://www.qsrbrands.com/"]
seqslides1[7]=["pics/plc/main/mnrb.jpg", "http://www.mnrb.com.my"]
seqslides1[8]=["pics/plc/main/mflour.jpg", "http://www.mfm.com.my/"]
seqslides1[9]=["pics/plc/main/mulpha.jpg", "http://www.mulpha.com.my"]
seqslides1[10]=["pics/plc/main/digi.jpg", "http://www.digi.com.my"]
seqslides1[11]=["pics/plc/main/ubg.jpg", "http://www.ubg.com.my"]
// seqslides1[10]=["pics/plc/main/egyptday.jpg", "http://ir.nextview.com/egyptday"]

//Set pause between each image display (2000=2 second):
var slidedelay1=2000

//Set how many images to show at once (must be less than total # of images above):
var slidestoreveal1=1

//Specify code to insert between each slide (ie: "<br>" to insert a line break and create a vertical layout)
//"" for none (or horizontal):
var slideseparater=""

//Set optional link target to be added to all images with a link:
var optlinktarge1="secwindow1"

//Set image border width:
var imgborderwidth=0

//Set opacity value of each image when it's "dimmed", and when it's not, respectively (1=100% opaque/normal).
//Change 0.2 to 0 to completely hide image when it's dimmed:
var opacityvalues1=[1,1]

///No need to edit beyond here///////////

function processimgcode1(theimg1){
    var imghtml1=""
    if (theimg1[1]!="")
        imghtml1='<a href="'+theimg1[1]+'" target="'+optlinktarge1+'">'
    imghtml1+='<img src="'+theimg1[0]+'" border="'+imgborderwidth+'" style="filter:alpha(opacity='+(opacityvalues1[0]*100)+');-moz-opacity:'+opacityvalues1[0]+'">'
    if (theimg1[1]!="")
        imghtml1+='</a>'
    return imghtml1
}

var curslide1=1 //var to track current slide (total: slidestoreveal1)
var curimgindex1=0 //var to track current image (total: seqslides.length)
var isfirstcycle1=1 //boolean to indicate whether this is the first cycle

if (document.getElementById){
    for (i=0;i<slidestoreveal1;i++)
        document.write('<span id="seqslidea'+i+'" class="seqslidestyle">'+processimgcode1(seqslides1[i])+'</span>'+slideseparater)
    curimgindex1=slidestoreveal1
    illuminateslide1(0,opacityvalues1[1])
}

function illuminateslide1(slideindex, amt){
    var slideobj=document.getElementById("seqslidea"+slideindex).getElementsByTagName("IMG")[0]
    //if (slideobj.filters)
    //    slideobj.filters.alpha.opacity=amt*100
    if (slideobj.style) {
        amt = amt * 100
        slideobj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + amt + ")"
    }
    else if (slideobj.style.MozOpacity)
        slideobj.style.MozOpacity=amt
}

function displayit1(){
    if (curslide1<slidestoreveal1){
        if (!isfirstcycle1)
            changeimage1(curslide1)
        illuminateslide1(curslide1, opacityvalues1[1])
        curslide1++
    }
    else{
        isfirstcycle1=0
        for (i=0;i<slidestoreveal1;i++)
            illuminateslide1(i, opacityvalues1[0])
        changeimage1(0)
        illuminateslide1(0, opacityvalues1[1])
        curslide1=1
    }
}

function changeimage1(slideindex){
    document.getElementById("seqslidea"+slideindex).innerHTML=processimgcode1(seqslides1[curimgindex1])
    curimgindex1++
    if (curimgindex1>=seqslides1.length)
        curimgindex1=0
}

if (document.getElementById)    {
    setInterval("displayit1()",slidedelay1)
}
