// JavaScript Document
var mqAry1=['images/logo/divinehome.gif,153','images/logo/foodcare.gif,117','images/logo/goldenstars.gif,189','images/logo/jamunainternationa .gif,69','images/logo/Logo_ucal.gif,40','images/logo/new jassmin.gif,90','images/logo/mahindraodyssea.gif,131','images/logo/medifield.gif,48','images/logo/omegalab.gif,50','images/logo/Qvalytec_logo.gif,85','images/logo/sathya_book _logo.gif,165','images/logo/SVC Logo.gif,37','images/logo/trivenitours.gif,61'];


function start() {
   new mq('m1',mqAry1,100);
   mqRotate(mqr); // must come last
}
window.onload = start;

// Continuous Image Marquee
// copyright 24th July 2008 by Stephen Chapman
// http://javascript.about.com
// permission to use this Javascript on your web page is granted
// provided that all of the code below in this script (including these
// comments) is used without any alteration
var mqr = []; 
function mq(id,ary,wid)
{
	this.mqo=document.getElementById(id); 
	var heit = '40px'; //this.mqo.style.height; 
	this.mqo.onmouseout=function() {mqRotate(mqr);}; 
	this.mqo.onmouseover=function() {clearTimeout(mqr[0].TO);}; 
	this.mqo.ary=[]; 
	var maxw = ary.length; 
	var ActWidth = 0;
	for (var i=0;i<maxw;i++)
	{
		var withsrc_array = ary[i].split(",");
		//alert('111 ' + withsrc_array[0]);
		//alert('222 ' + withsrc_array[1]);
		this.mqo.ary[i]=document.createElement('img'); 
		this.mqo.ary[i].src=withsrc_array[0]; 
		this.mqo.ary[i].style.position = 'absolute'; 
		//this.mqo.ary[i].style.border='10px';
		
		if ( i == 0 )
		{
			ActWidth = 0;
		}
		else
		{
			var with_array = ary[i-1].split(",");
			//alert('with_array =' + with_array[1]);
			//alert('ActWidth = ' + ActWidth);
			ActWidth += parseInt(with_array[1],10)+10;
		}
		this.mqo.ary[i].style.left = (ActWidth)+'px'; 
		this.mqo.ary[i].style.width = withsrc_array[0]+'px'; 
		this.mqo.ary[i].style.height = heit; 
		this.mqo.appendChild(this.mqo.ary[i]);
	} 
	mqr.push(this.mqo);
} 

function mqRotate(mqr)
{
	if (!mqr) return; 
	for (var j=mqr.length - 1; j > -1; j--) 
	{
		maxa = mqr[j].ary.length; 
		for (var i=0;i<maxa;i++)
		{
			var x = mqr[j].ary[i].style;  
			x.left=(parseInt(x.left,10)-1)+'px';
		} 
		var y = mqr[j].ary[0].style; 
		if (parseInt(y.left,10)+parseInt(y.width,10)<0) 
		{
			var z = mqr[j].ary.shift(); 
			z.style.left = (parseInt(z.style.left) + parseInt(z.style.width)*maxa) + 'px'; 
			mqr[j].ary.push(z);
		}
	} 
	mqr[0].TO=setTimeout('mqRotate(mqr)',10);
}
