
statestr = ""

type = "sleepy_mtd_sleepy_movingquotes"



	
//type-2
// code for roatated Sleepy and MTD add
if (type == "sleepy_mtd_sleepy_movingquotes")
{
	var rno = 0;
	var srid;
	var status = 1;
	srid = Math.floor(Math.random()*4);
	
	if (document.images)
	{
	      adImages = new Array("http://www.cityleases.com/images/mtdrotatebanner.gif",
								"http://www.cityleases.com/images/moving_quotes.jpg",
								"http://www.cityleases.com/images/creditscore_adv.gif",
								"http://www.cityleases.com/images/jobs.jpg");


	       adURLs = new Array("http://www.cityleases.com/redirect.asp?source=10413",
							  "http://www.cityleases.com/redirect.asp?source=10439",
							  "http://www.cityleases.com/redirect.asp?source=10432",
							  "http://www.cityleases.com/redirect.asp?source=10537");
	    thisAd = 0;
	}
	
	function cycleAds()
	{
	    if (rno == 0)
	    {
			document.adBanner.src = adImages[srid];
			rno = 1;
			thisAd = srid;
			status = 0;
	    }
	    else
	    {
			if (status == 0)
			{
				thisAd = 0;
				status = 1;
			}
			
			if (document.images)
			{
			    if (document.adBanner.complete)
			    {
			        if (++thisAd == adImages.length)
			            thisAd = 0;
					document.adBanner.src = adImages[thisAd];
			    }
			}
	    }
		setTimeout("cycleAds()", 15000);
	}

	function gotoAd()
	{
		Open_Win_bannerads(adURLs[thisAd])
	}

	function Open_Win_bannerads(theURL)
	{
		var winname = '';
		var myOptions = 'scrollbars=yes,width=900,height=600,resizable=yes';
		var myBars = 'directories=yes,location=yes,menubar=yes,toolbar=yes,status=yes';
		var myFeatures = myBars + ',' + myOptions;
		window.open(theURL,winname,myFeatures);
	} 
	document.write ('<table cellpadding="0" cellspacing="0" border="0">')
	document.write ('<tr>')
	document.write ('<td width="100%" align="center" colspan="2"><a href="javascript:gotoAd()"><img name="adBanner" src="http://www.cityleases.com/images/creditscore_adv.gif" border="0" width="470px" height="65px"></a></td>')
	document.write ('</tr>')
	document.write ('</table>')
	cycleAds();
}



