ÿþ<HTML> <HEAD> <TITLE>Les Villages de l'Artisanat de la Tunisie</TITLE> <style type="text/css"> a:link{color:#fff; text-decoration:none;} a:visited{color:#fff; text-decoration:none;} a:hover{color:#fff; text-decoration:underline;} a:link{color:#fff; text-decoration:none;} img{border:0px;} .select_direction{cursor:hand} ul, li {list-style:none; padding:0; margin:0;} .slider_td{padding-top:16px;} .slider_ul li {width:340px; height:230px; padding-right:9px; float:left; white-space: nowrap; overflow:hidden; } .slider_ul li img {vertical-align:top; border:1px solid #eeeeee; width:320; height:210; white-space: nowrap;} .slider_ul li h1 {font-family:"˳ÀÆ",tahoma,verdana; padding:0; margin:0; width:59px; height:20px; line-height:20px; overflow:hidden; text-align:center; font-size:11px; font-weight:normal; padding-top:2px;white-space: nowrap;} </style> <script> var my_config = []; with (my_config) { my_config.speed = "30"; my_config.scroll = 1; my_config.width = "900"; my_config.height = "230"; my_config.direction = "left"; my_config.banners; my_config.slider; my_config.slider_1; my_config.slider_2; my_config.timer; } function autoScroll(type){ my_config.direction = type; this.items = []; this.add_banner = function(image,link,title,target){ var newItem = {}; newItem.image = image; newItem.link = link; newItem.title = title; newItem.target = target; this.items[this.items.length] = newItem; } this.play = function(){ my_config.banners = this.items; scroll_html(); with (my_config) { slider=document.getElementById("slider_box"); slider_1=document.getElementById("slider_box_1"); slider_2=document.getElementById("slider_box_2"); slider_2.innerHTML=slider_1.innerHTML; timer=setInterval(do_timer,speed); } } } function scroll_html(){ var str = "", tmp = "", b = "", c ="", d = ""; for(var i=0;i<my_config.banners.length;i++){ var a = my_config.banners[i] str += "<li><a href='"+a.link+"' target='"+a.target+"'><img src='"+a.image+"' width=57 height=40 title='"+a.title+"'></a><h1><a href='"+a.link+"' >"+a.title+"</a></h1></li>"; } if (my_config.direction == "left" || my_config.direction == "right"){ b = "<div id=slider_scroller style='float: left; width: 800%'>"; c = " style='float: left'"; d = "</div>"; } tmp += "<div id=slider_box onmouseover='do_stop()' onmouseout='do_move()' style='overflow:hidden; width:"+my_config.width+"px; height:"+my_config.height+"px'>"; tmp += b + "<div id=slider_box_1"+c+">" + str; tmp += "</div><div id=slider_box_2"+c+">"+d+"</div></div>"; document.getElementById("slider_show").innerHTML = tmp; } function do_left() {my_config.direction='left'} function do_right() {my_config.direction='right'} function do_stop() {my_config.scroll=0} function do_move() {my_config.scroll=1} function do_timer(){ with(my_config){ if (scroll) { if (direction == "top"){ if (slider_2.offsetTop-slider.scrollTop<=0){ slider.scrollTop-=slider_1.offsetHeight } else {slider.scrollTop++} } else if(direction == "down"){ if (slider_1.offsetTop-slider.scrollTop>=0) slider.scrollTop+=slider_2.offsetHeight else {slider.scrollTop--} } else if (direction == "left"){ if (slider_2.offsetWidth-slider.scrollLeft<=0) slider.scrollLeft-=slider_1.offsetWidth else {slider.scrollLeft++;} } else if (direction == "right"){ if (slider.scrollLeft<=0) slider.scrollLeft+=slider_2.offsetWidth else {slider.scrollLeft--} } } } } function play_game (type){ if (my_config.timer) clearInterval(my_config.timer); var direction = type; var obj = new autoScroll(type); obj.add_banner("images/nabeul.jpg","#","Nabeul",""); obj.add_banner("images/kef.jpg","#","Kef",""); obj.add_banner("images/denden.jpg","denden/index.html","Denden","_blank"); obj.add_banner("images/fernena.jpg","#","Fernena",""); obj.add_banner("images/beja.jpg","#","Beja",""); obj.add_banner("images/brouta.jpg","#","Brouta",""); obj.add_banner("images/denden.jpg","denden/index.html","Denden","_blank"); obj.add_banner("images/tata.jpg","#","Tataouine",""); obj.play(); } </script> <link rel="stylesheet" type="text/css" href="main_style.css" /> </HEAD> <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <img src="images/back.jpg"> <img src="images/title.jpg"> <table border="0" cellspacing="0" cellpadding="0"> <tr><td width="10"></td> <td width="20" class="select_direction" onclick="do_left();return false;" align=right><img src="images/l_btn.jpg"></td><td width="10"></td> <td class="slider_td"> <ul class="slider_ul" id="slider_show"></ul> </td><td width="10"></td> <td width="20" class="select_direction" onclick="do_right();return false;"><img src="images/r_btn.jpg"></td><td width="10"></td> </tr> </table><br> <div id="wrap"> <div class="clearfix"></div> <div id="footer"> <div id="ftinner"> <div class="ftlink fl"> Avenue de l'independance 2011 Denden - Mannouba - Tunisie <p id="copyright">l'Office National de l'Artisanat Tunisien © 2010. All Rights Reserved. <br/> </p> </div> </div> </div> </div> <script> play_game("left"); </script> </BODY> </HTML>