// JavaScript Document

/*
Left-Right image slideshow Script-
By Dynamic Drive (www.dynamicdrive.com)
For full source code, terms of use, and 100's more scripts, visit http://dynamicdrive.com
*/
function Launchcompetition(page) { 
OpenWin = this.open(page, "KirupaStyle", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=600,height=825"); 
}
///////configure the below four variables to change the style of the slider///////
//set the scrollerwidth and scrollerheight to the width/height of the LARGEST image in your slideshow!
var scrollerwidth='725px'
var scrollerheight='130px'
var scrollerbgcolor='black'
//3000 miliseconds=3 seconds
var pausebetweenimages=9000

/*
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','725','height','135','src','paris PhotoBanner_725x135','quality','high','wmode','transparent','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','paris PhotoBanner_725x135' );
*/
//end AC code


//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[1]='<a href="http://www.artdubai.ae" id="paris" onClick="counter(this.id);" target="_blank"><img src="banner/art_dubai_banner.gif" width="725" height="130"  border=0"></a>'
slideimages[2]='<a href="http://www.zonamaco.com" id="paris" onClick="counter(this.id);" target="_blank"><img src="banner/zonaMaco.jpg" width="725" height="130"  border=0"></a>'
slideimages[3]='<a href="http://www.michaeljacksonopus.com" id="mulsaq" onClick="counter(this.id);" target="_blank"><img src="banner/MJ_banner.jpg" width="725" height="130"  border=0"></a>'
slideimages[4]='<a href="http://www.soura.ae" id="can" onClick="counter(this.id);" target="_blank"><img src="banner/add.gif" width="725" height="130"  border=0"></a>'
slideimages[0]='<a href="http://www.soura.ae/souraofthemonth.htm" id="can" onClick="counter(this.id);" target="_blank"><img src="banner/POTMBanner.jpg" width="725" height="130"  border=0"></a>'
slideimages[5]='<a href="http://www.artlimited.net" id="can" onClick="counter(this.id);" target="_blank"><img src="banner/artlimited-banner-01.gif" width="725" height="130"  border=0"></a>'
//extend this list

///////Do not edit pass this line///////////////////////
     
var ie=document.all
var dom=document.getElementById

if (slideimages.length>1)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.left>0&&tlayer.left<=5){
tlayer.left=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.left>=tlayer.document.width*-1){
tlayer.left-=5
setTimeout("move1(tlayer)",5)
}
else{
tlayer.left=parseInt(scrollerwidth)+5
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.left>0&&tlayer2.left<=5){
tlayer2.left=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.left>=tlayer2.document.width*-1){
tlayer2.left-=5
setTimeout("move2(tlayer2)",5)
}
else{
tlayer2.left=parseInt(scrollerwidth)+5
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.left)>0&&parseInt(tdiv.style.left)<=5){
tdiv.style.left=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(scrollerdiv2)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.left)>=tdiv.offsetWidth*-1){
tdiv.style.left=parseInt(tdiv.style.left)-5+"px"
setTimeout("move3(tdiv)",5)
}
else{
tdiv.style.left=scrollerwidth
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.left)>0&&parseInt(tdiv2.style.left)<=5){
tdiv2.style.left=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(scrollerdiv1)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.left)>=tdiv2.offsetWidth*-1){
tdiv2.style.left=parseInt(tdiv2.style.left)-5+"px"
setTimeout("move4(scrollerdiv2)",5)
}
else{
tdiv2.style.left=scrollerwidth
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
scrollerdiv1=ie? first2 : document.getElementById("first2")
scrollerdiv2=ie? second2 : document.getElementById("second2")
move3(scrollerdiv1)
scrollerdiv2.style.left=scrollerwidth
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.left=parseInt(scrollerwidth)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll




