var focus_width = 510;
var focus_height = 272;
var text_height = 0;
var swf_height = focus_height + text_height;

document.write("<object 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=\"flash/indexad.swf\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#ffffff\">");
document.write("<param name=\"menu\" value=\"false\"/><param name=\"wmode\" value=\"opaque\"/>");
document.write("<param name=\"FlashVars\" value=\"pics="+pics+"&links="+links+"&texts="+texts+"&borderwidth="+focus_width+"&borderheight="+focus_height+"&textheight="+text_height+"\">");
document.write("<embed src=\"flash/indexad.swf\" wmode=\"opaque\" FlashVars=\"pics="+pics+"&links="+links+"&texts="+texts+"&borderwidth="+focus_width+"&borderheight="+focus_height+"&textheight="+text_height+"\" menu=\"false\" bgcolor=\"#ffffff\" quality=\"high\" width=\""+ focus_width +"\" height=\""+ focus_height +"\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
document.write("</object>");

var speed;  
var tab; 
var tab1; 
var tab2; 
var direction;
var MyMar; 
function Marquee()
{
	if(direction == "left")
	{ 
		if(tab2.offsetWidth-tab.scrollLeft<=0) 
		tab.scrollLeft-=tab1.offsetWidth 
		else{ 
		tab.scrollLeft ++; 
		} 
	}
	else
	{
		if(tab.scrollLeft<=0) 
		tab.scrollLeft+=tab2.offsetWidth 
		else{ 
		tab.scrollLeft--; 
		}
	}
}
function Mqe(direc)
{
   clearInterval(MyMar);
   direction = direc;
   MyMar=setInterval(Marquee,speed);
}
$(document).ready(function(){
	speed=10;  
	tab=document.getElementById("demo"); 
	tab1=document.getElementById("demo1"); 
	tab2=document.getElementById("demo2"); 
	tab2.innerHTML=tab1.innerHTML; 
	direction = "left";
	MyMar=setInterval(Marquee,speed); 
	tab.onmouseover=function() {clearInterval(MyMar)}; 
	tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)}; 					
})