uagent = window.navigator.userAgent.toLowerCase();
IEB=(uagent.indexOf('msie') != -1)?true:false;
var scompat = document.compatMode;
var carsintcomplate=0;
carsimgarr=new Array();
carsaltarr=new Array();
carslinkarr=new Array();
carstargetarr=new Array();
carstitarr=new Array();
carsdesarr=new Array();

carsimgarr[0]="";
carsaltarr[0]="";
carslinkarr[0]="";
carstargetarr[0]="";
carstitarr[0]="";
carsdesarr[0]="";

carsimgarr[1]="img/home.jpg";
carsaltarr[1]="cars-sale: home";
carslinkarr[1]="index.php";
carstargetarr[1]="_self";
carstitarr[1]="";
carsdesarr[1]="";

carsimgarr[2]="img/buyacar.jpg";
carsaltarr[2]="cars-sale: buy a car";
carslinkarr[2]="buyacar.php";
carstargetarr[2]="_self";
carstitarr[2]="";
carsdesarr[2]="";

carsimgarr[3]="img/sellacar.jpg";
carsaltarr[3]="cars-sale: sell a car";
carslinkarr[3]="sellacar.php";
carstargetarr[3]="_self";
carstitarr[3]="";
carsdesarr[3]="";

carsimgarr[4]="img/contact.jpg";
carsaltarr[4]="cars-sale: contact";
carslinkarr[4]="contact.php";
carstargetarr[4]="_self";
carstitarr[4]="";
carsdesarr[4]="";

var gnrated='';
var carsstepcount=20;
var carscurrstep=10;
var carstimeo=null;var carshorvert=0;var carsllllll=0;var carslllllll=0;var carsllllllll=0;var carsll=new Array();var carslll=new Array();var carsllll=new Array();var carsstartposx=new Array();var carslllll=new Array();var i=0;var carslllllllll=0;var carsDescCalcLeftBir=0;var carsDescCalcLeft=0;var carsDescCalcWidth=0;var carsDescCalcHeight=0;var carsDescCalcIcWidth=0;var carsDescCalcIcHeight=0;var carshpiece='';var carsds="";var carsIEDescOpacity=100;var carsFFOpacity=1.0;var carsDescFadeEffectTimer=null;var carsAutoPlayTimer=null;var carsAutoPlayCurrent=1;var carsicerdemi=0;function carsWriteDesc(){	if(carslinkarr[i].length>2){carsds=carsds+'<a href="'+carslinkarr[i]+'" target="'+carstargetarr[i]+'" style="text-decoration:none;">';}	carsds=carsds+'<div id="adesc'+i+'" style="position:absolute;top:'+80+'px;left:0px;width:'+carsDescCalcWidth+'px;height:'+carsDescCalcHeight+'px;visibility:hidden;overflow:hidden;cursor:pointer;filter:alpha(opacity=100);opacity:1.00;" onMouseOut="carsoutall()">';	carsds=carsds+'<div style="position:absolute;left:0px;top:0px;width:'+carsDescCalcWidth+'px;height:'+carsDescCalcHeight+'px;border-style:solid;border-width:0px;border-color:#000000;background-color:#'+'000000'+';opacity: '+1.00+';filter:alpha(opacity='+100+');" onMouseOut="carsoutall()"></div>';	carsds=carsds+'<div style="position:relative;left:0px;top:0px;width:'+carsDescCalcIcWidth+';height:'+carsDescCalcIcHeight+'px;text-align:'+'left'+';overflow:hidden;padding:'+4+'px;border-style:'+'solid'+';border-width:'+2+'px;border-color:#'+'990000'+';color:#'+'FFFFFF'+';font-family:'+'arial'+';font-style:'+'normal'+';font-size: '+14+';font-weight:'+'normal'+';text-decoration:'+'none'+';opacity: 1.0;filter:alpha(opacity=100);" onMouseOut="carsoutall()">';	carsds=carsds+'<span style="color:#'+'FECE4F'+';font-family:'+'arial'+';font-style:'+'normal'+';font-size: '+14+';font-weight:'+'normal'+';text-decoration:'+'none'+';" onMouseOut="carsoutall()">'+carstitarr[i]+'</span>';	if(carstitarr[i].length>0){carsds=carsds+'<br />';}			carsds=carsds+''+carsdesarr[i];	carsds=carsds+'</div>';	carsds=carsds+'</div>';	if(carslinkarr[i].length>2){carsds=carsds+'</a>';}}function carsinit_doc(fstr,hormuvertmi){	carsDescCalcLeftBir=5;		if((0==0)&&(carshorvert==0))	{		carsDescCalcLeft=5+2;	}	else	{		carsDescCalcLeft=5;	}	if(0==0)	{		carsDescCalcWidth=320-5-5;	}	else	{		carsDescCalcWidth=444-5-5;	}	if((carshorvert==1)&&(0==1))	{		carsDescCalcHeight=200-80-5;	}	else	{		carsDescCalcHeight=200-80-5;	}	if((IEB==true)&&(scompat == "BackCompat" ))	{		carsDescCalcIcWidth=carsDescCalcWidth;		carsDescCalcIcHeight=carsDescCalcHeight;	}	else	{		carsDescCalcIcWidth=carsDescCalcWidth-2*(2)-2*(4);		carsDescCalcIcHeight=carsDescCalcHeight-2*(2)-2*(4);	}	carsfolderset=fstr;	var tmpleftpad=0;	var tmptoppad=0;	carshpiece=carshpiece+'<div style="position:relative;width:'+444+'px;height:'+200+'px;border-style:solid;border-width:'+0+'px;border-color:#'+'666666'+';">';	carshpiece=carshpiece+'<div style="position:relative;width:'+444+'px;height:'+200+'px;overflow:hidden;border-style:solid;border-width:0px;border-color:#FFFFFF;cursor:default;" onMouseOver="carsoutall()" onMouseOut="carsmouse_divout()">';	if(0==1)	{		for(i=1;i<=4;i++) 		{			carsWriteDesc();		}	}	for(i=1;i<=4;i++)	{		if(carshorvert==0)		{			if(i==1){tmpleftpad=0;}else{tmpleftpad=2;}			tmptoppad=0;		}		else		{			tmpleftpad=0;			if(i==1){tmptoppad=0;}else{tmptoppad=2;}		}		gnrated=gnrated+'<div id="carspo'+i+'" style="position:absolute;left:0px;top:0px;" onMouseOver="carsmouse_over('+i+')" onMouseOut="carsoutall()"><div style="background-color:#FFFFFF;padding-left:'+tmpleftpad+'px;padding-top:'+tmptoppad+'px;"><a href="'+carslinkarr[i]+'" target="'+carstargetarr[i]+'"><img width="'+320+'" height="'+200+'" src="'+carsfolderset+carsimgarr[i]+'" style="border-style:solid;border-width:0px;" TITLE="'+carsaltarr[i]+'"></img></a>';		if(0==0)		{			carsds="";			carsWriteDesc();			gnrated=gnrated+carsds;		}		gnrated=gnrated+'</div></div>';	}	carshpiece=carshpiece+gnrated;	if(0==1)	{		carshpiece=carshpiece+carsds;	}	carshpiece=carshpiece+'</div>';	carshpiece=carshpiece+'</div>';	document.write(''+carshpiece);	setTimeout("carsinit_position("+parseInt(hormuvertmi)+")",50);}function carsinit_position(hv){	carshorvert=hv;	for(i=1;i<=4;i++)	{		carsll[i]=document.getElementById('carspo'+i);		carslll[i]=document.getElementById('adesc'+i);		if((carsll[i]==null)||(carslll[i]==null))		{		    setTimeout("carsinit_position("+parseInt(hv)+")",200);		    return;		}	}		if(carshorvert==0)	{		carsllllll=parseInt(     (444-((4-1)*2))     /(4));		carslllllll=carsllllll+2;		carsllllllll=parseInt(((444-320)/(4-1)));	}	else	{		carsllllll=parseInt(     (280-((4-1)*2))     /(4));		carslllllll=carsllllll+2;		carsllllllll=parseInt(((280-200)/(4-1)));	}	for(i=1;i<=4;i++)	{		carsll[i]=document.getElementById('carspo'+i);		sx=(carslllllll*(i-1))-2;		if(carshorvert==0)		{			if(i==1)			{				carsll[i].style.left="0px";			}			else			{				carsll[i].style.left=""+sx+"px";			}		}		else		{			if(i==1)			{				carsll[i].style.top="0px";			}			else			{				carsll[i].style.top=""+sx+"px";			}		}		carsstartposx[i]=sx;		carslllll[i]=carsstartposx[i];		if(i==1)		{			carslll[i].style.left=""+carsDescCalcLeftBir+"px";		}		else		{			carslll[i].style.left=""+carsDescCalcLeft+"px";		}			}	carsintcomplate=1;	if(0==1)	{		carsDoAutoPlay();	}}function carsDoAutoPlay(){	carsmouse_over(carsAutoPlayCurrent);	carsAutoPlayCurrent=carsAutoPlayCurrent+1;	if(carsAutoPlayCurrent>4)	{		carsAutoPlayCurrent=1;	}	carsAutoPlayTimer=setTimeout("carsDoAutoPlay()",2000);}function carsdo_FadeAnim(){	if(carslllllllll<1)	{		return;	}	carsIEDescOpacity=carsIEDescOpacity+5;	carsFFOpacity=carsFFOpacity+0.05;	if(IEB==true)	{		if(carsIEDescOpacity>100)		{			carsIEDescOpacity=100;			return;		}	}	else	{		if(carsFFOpacity>1.00)		{			carsFFOpacity=1.00;			return;		}	}	if(IEB==true)	{		carslll[carslllllllll].filters.item(0).opacity=carsIEDescOpacity;	}	else	{		carslll[carslllllllll].style.opacity = carsFFOpacity;	}	carsDescFadeEffectTimer=setTimeout("carsdo_FadeAnim()",20);}function carsdo_anim(){	if(carscurrstep<=0)	{		if(carslllllllll>=1)		{			if(carshorvert==0)			{				if(carslllllllll==1)				{					carslll[carslllllllll].style.left=""+carsDescCalcLeftBir+"px";				}				else				{					carslll[carslllllllll].style.left=""+carsDescCalcLeft+"px";				}			}			else			{				if(0==0)				{					carslll[carslllllllll].style.left=""+(carsDescCalcLeft+parseInt(carsll[carslllllllll].style.left))+"px";					var DesvertTop=0;					if((carslllllllll>1) &&(carslllllllll!=4)){DesvertTop=80+2;}else{DesvertTop=80;}					carslll[carslllllllll].style.top=""+(DesvertTop)+"px";				}				else				{					carslll[carslllllllll].style.left=""+(carsDescCalcLeft)+"px";					carslll[carslllllllll].style.top=""+80+"px";				}			}			if((carstitarr[carslllllllll].length>0)||(carsdesarr[carslllllllll].length>0))			{				if(2==2)				{					carsIEDescOpacity=0;					carsFFOpacity=0.00;					carsdo_FadeAnim();					carslll[carslllllllll].style.visibility="visible";				}				else				{					carslll[carslllllllll].style.visibility="visible";				}			}			else			{				carslll[carslllllllll].style.visibility="hidden";			}		}		return;	}	for(i=2;i<=4;i++)	{		carslllll[i] = parseInt(carslllll[i])+parseInt((carsllll[i]-carslllll[i])/carscurrstep);		if(carshorvert==0)		{			carsll[i].style.left=""+carslllll[i]+"px";		}		else		{			carsll[i].style.top=""+carslllll[i]+"px";		}	}	if((2==1)&&(carslllllllll>=1))	{		var dtop=0;		carslll[carslllllllll].style.visibility="visible";		dtop= 80+        parseInt(carsDescCalcHeight-      ((carsDescCalcHeight/carsstepcount)*(carsstepcount-(carscurrstep-1)))         );		carslll[carslllllllll].style.top=""+dtop+"px";	}	carscurrstep--;	setTimeout("carsdo_anim()",15);}function carsreposition(g){	for(i=1;i<=4;i++)	{		if(i<=g)		{			if(i==1)			{				carsllll[i]=0;			}			else			{				carsllll[i]=parseInt(((i-1)*carsllllllll)-2);			}		}		else		{			oncekix=0;			for(j=1;j<(i-1);j++)			{				oncekix=oncekix+carsllllllll;			}			if(carshorvert==0)			{				carsllll[i]=parseInt(((320)+(oncekix)));			}			else			{				carsllll[i]=parseInt(((200)+(oncekix)));			}		}			}	if((carshorvert==0)&&(4==g))	{		var bul1=carsllll[4]+2+320;		var bul2=444-bul1;		carsllll[4]=carsllll[4]+bul2;	}	if((carshorvert==1)&&(4==g))	{		var bul1=carsllll[4]+2+200;		var bul2=200-bul1;		carsllll[4]=carsllll[4]+bul2;	}	carscurrstep=carsstepcount;	carsdo_anim();}function carsmouse_over(g){	if(carsintcomplate==0){return;}	if(g==carslllllllll){return;}	carslllllllll=g;	clearTimeout(carstimeo);	if(0==1){if(carsicerdemi==1){clearTimeout(carsAutoPlayTimer);}}	for(i=1;i<=4;i++)	{		if(i!=g)		{			carslll[i].style.visibility="hidden";			if(IEB==true)			{				carslll[i].filters.item(0).opacity=100;			}			else			{				carslll[i].style.opacity = 1.0;			}		}	}	carsreposition(g);}function carsoutall(){	carsicerdemi=1;	clearTimeout(carsAutoPlayTimer);	clearTimeout(carstimeo);}function carsmouse_divout2(){	carsicerdemi=0;	clearTimeout(carstimeo);	if(0==1)	{		clearTimeout(carsAutoPlayTimer);		carsAutoPlayCurrent=1;		carsDoAutoPlay();	}	else	{	for(i=1;i<=4;i++)	{		carslll[i].style.visibility="hidden";	}	for(i=1;i<=4;i++)	{		sx=(carslllllll*(i-1))-2;		if(i==1)		{			carsllll[i]=0;		}		else		{			carsllll[i]=sx;		}			}	carslllllllll=-1;	carscurrstep=carsstepcount;	carsdo_anim();	}}function carsmouse_divout(){	clearTimeout(carstimeo);	carstimeo=setTimeout("carsmouse_divout2()",400);}
