uagent = window.navigator.userAgent.toLowerCase();IEB=(uagent.indexOf('msie') != -1)?true:false;var scompat = document.compatMode;var Imgmenuintcomplate=0;Imgmenuimgarr=new Array();Imgmenualtarr=new Array();Imgmenulinkarr=new Array();Imgmenutargetarr=new Array();Imgmenutitarr=new Array();Imgmenudesarr=new Array();Imgmenuimgarr[0]="";Imgmenualtarr[0]="";Imgmenulinkarr[0]="";Imgmenutargetarr[0]="";Imgmenutitarr[0]="";Imgmenudesarr[0]="";Imgmenuimgarr[1]="http://www.thechocolatetier.co.za/Menu/home.jpg";Imgmenualtarr[1]="";Imgmenulinkarr[1]="http://www.thechocolatetier.co.za/";Imgmenutargetarr[1]="_self";Imgmenutitarr[1]="";Imgmenudesarr[1]="";Imgmenuimgarr[2]="http://www.thechocolatetier.co.za/Menu/shop-online.jpg";Imgmenualtarr[2]="";Imgmenulinkarr[2]="http://www.thechocolatetier.co.za/index.php?option=com_virtuemart&Itemid=2";Imgmenutargetarr[2]="_self";Imgmenutitarr[2]="";Imgmenudesarr[2]="";Imgmenuimgarr[3]="http://www.thechocolatetier.co.za/Menu/stores.jpg";Imgmenualtarr[3]="";Imgmenulinkarr[3]="http://www.thechocolatetier.co.za/index.php?option=com_content&view=article&id=4&Itemid=3";Imgmenutargetarr[3]="_self";Imgmenutitarr[3]="";Imgmenudesarr[3]="";Imgmenuimgarr[4]="http://www.thechocolatetier.co.za/Menu/fountains.jpg";Imgmenualtarr[4]="";Imgmenulinkarr[4]="http://www.thechocolatetier.co.za/index.php?option=com_content&view=article&id=8&Itemid=4";Imgmenutargetarr[4]="_self";Imgmenutitarr[4]="";Imgmenudesarr[4]="";Imgmenuimgarr[5]="http://www.thechocolatetier.co.za/Menu/tables.jpg";Imgmenualtarr[5]="";Imgmenulinkarr[5]="http://www.thechocolatetier.co.za/index.php?option=com_content&view=article&id=11&Itemid=5";Imgmenutargetarr[5]="_self";Imgmenutitarr[5]="";Imgmenudesarr[5]="";Imgmenuimgarr[6]="http://www.thechocolatetier.co.za/Menu/weddings.jpg";Imgmenualtarr[6]="";Imgmenulinkarr[6]="http://www.thechocolatetier.co.za/index.php?option=com_content&view=article&id=5&Itemid=6";Imgmenutargetarr[6]="_self";Imgmenutitarr[6]="";Imgmenudesarr[6]="";Imgmenuimgarr[7]="http://www.thechocolatetier.co.za/Menu/hospitality.jpg";Imgmenualtarr[7]="";Imgmenulinkarr[7]="http://www.thechocolatetier.co.za/index.php?option=com_content&view=article&id=9&Itemid=7";Imgmenutargetarr[7]="_self";Imgmenutitarr[7]="";Imgmenudesarr[7]="";Imgmenuimgarr[8]="http://www.thechocolatetier.co.za/Menu/events.jpg";Imgmenualtarr[8]="";Imgmenulinkarr[8]="http://www.thechocolatetier.co.za/index.php?option=com_content&view=article&id=13&Itemid=8";Imgmenutargetarr[8]="_self";Imgmenutitarr[8]="";Imgmenudesarr[8]="";Imgmenuimgarr[9]="http://www.thechocolatetier.co.za/Menu/gallery.jpg";Imgmenualtarr[9]="";Imgmenulinkarr[9]="http://www.thechocolatetier.co.za/index.php?option=com_phocagallery&view=categories&Itemid=9";Imgmenutargetarr[9]="_self";Imgmenutitarr[9]="";Imgmenudesarr[9]="";var gnrated='';var Imgmenustepcount=30;var Imgmenucurrstep=10;var Imgmenutimeo=null;var Imgmenuhorvert=0;var Imgmenullllll=0;var Imgmenulllllll=0;var Imgmenullllllll=0;var Imgmenull=new Array();var Imgmenulll=new Array();var Imgmenullll=new Array();var Imgmenustartposx=new Array();var Imgmenulllll=new Array();var i=0;var Imgmenulllllllll=0;var ImgmenuDescCalcLeftBir=0;var ImgmenuDescCalcLeft=0;var ImgmenuDescCalcWidth=0;var ImgmenuDescCalcHeight=0;var ImgmenuDescCalcIcWidth=0;var ImgmenuDescCalcIcHeight=0;var Imgmenuhpiece='';var Imgmenuds="";var ImgmenuIEDescOpacity=100;var ImgmenuFFOpacity=1.0;var ImgmenuDescFadeEffectTimer=null;var ImgmenuAutoPlayTimer=null;var ImgmenuAutoPlayCurrent=1;var Imgmenuicerdemi=0;function ImgmenuWriteDesc(){	if(Imgmenulinkarr[i].length>2){Imgmenuds=Imgmenuds+'<a href="'+Imgmenulinkarr[i]+'" target="'+Imgmenutargetarr[i]+'" style="text-decoration:none;">';}	Imgmenuds=Imgmenuds+'<div id="Imgmenuadesc'+i+'" style="position:absolute;top:'+80+'px;left:0px;width:'+ImgmenuDescCalcWidth+'px;height:'+ImgmenuDescCalcHeight+'px;visibility:hidden;overflow:hidden;cursor:pointer;filter:alpha(opacity=100);opacity:1.00;" onMouseOut="Imgmenuoutall()">';	Imgmenuds=Imgmenuds+'<div style="position:absolute;left:0px;top:0px;width:'+ImgmenuDescCalcWidth+'px;height:'+ImgmenuDescCalcHeight+'px;border-style:solid;border-width:0px;border-color:#000000;background-color:#'+'000000'+';opacity: '+0.50+';filter:alpha(opacity='+50+');" onMouseOut="Imgmenuoutall()"></div>';	Imgmenuds=Imgmenuds+'<div style="position:relative;left:0px;top:0px;width:'+ImgmenuDescCalcIcWidth+';height:'+ImgmenuDescCalcIcHeight+'px;text-align:'+'left'+';overflow:hidden;padding:'+3+'px;border-style:'+'solid'+';border-width:'+1+'px;border-color:#'+'FFFFFF'+';color:#'+'FFFFFF'+';font-family:'+'arial'+';font-style:'+'normal'+';font-size: '+13+';font-weight:'+'normal'+';text-decoration:'+'none'+';opacity: 1.0;filter:alpha(opacity=100);" onMouseOut="Imgmenuoutall()">';	Imgmenuds=Imgmenuds+'<span style="color:#'+'FECE3F'+';font-family:'+'arial'+';font-style:'+'normal'+';font-size: '+14+';font-weight:'+'normal'+';text-decoration:'+'none'+';" onMouseOut="Imgmenuoutall()">'+Imgmenutitarr[i]+'</span>';	if(Imgmenutitarr[i].length>0){Imgmenuds=Imgmenuds+'<br />';}			Imgmenuds=Imgmenuds+''+Imgmenudesarr[i];	Imgmenuds=Imgmenuds+'</div>';	Imgmenuds=Imgmenuds+'</div>';	if(Imgmenulinkarr[i].length>2){Imgmenuds=Imgmenuds+'</a>';}}function Imgmenuinit_doc(fstr,hormuvertmi){	ImgmenuDescCalcLeftBir=5;		if((0==0)&&(Imgmenuhorvert==0))	{		ImgmenuDescCalcLeft=5+1;	}	else	{		ImgmenuDescCalcLeft=5;	}	if(0==0)	{		ImgmenuDescCalcWidth=200-5-5;	}	else	{		ImgmenuDescCalcWidth=930-5-5;	}	if((Imgmenuhorvert==1)&&(0==1))	{		ImgmenuDescCalcHeight=150-80-5;	}	else	{		ImgmenuDescCalcHeight=150-80-5;	}	if((IEB==true)&&(scompat == "BackCompat" ))	{		ImgmenuDescCalcIcWidth=ImgmenuDescCalcWidth;		ImgmenuDescCalcIcHeight=ImgmenuDescCalcHeight;	}	else	{		ImgmenuDescCalcIcWidth=ImgmenuDescCalcWidth-2*(2)-2*(3);		ImgmenuDescCalcIcHeight=ImgmenuDescCalcHeight-2*(2)-2*(3);	}	Imgmenufolderset=fstr;	var tmpleftpad=0;	var tmptoppad=0;	Imgmenuhpiece=Imgmenuhpiece+'<div style="position:relative;width:'+930+'px;height:'+150+'px;border-style:solid;border-width:'+1+'px;border-color:#'+'FFFFFF'+';">';	Imgmenuhpiece=Imgmenuhpiece+'<div style="position:relative;width:'+930+'px;height:'+150+'px;overflow:hidden;border-style:solid;border-width:0px;border-color:#FFFFFF;cursor:default;" onMouseOver="Imgmenuoutall()" onMouseOut="Imgmenumouse_divout()">';	if(0==1)	{		for(i=1;i<=9;i++) 		{			ImgmenuWriteDesc();		}	}	for(i=1;i<=9;i++)	{		if(Imgmenuhorvert==0)		{			if(i==1){tmpleftpad=0;}else{tmpleftpad=1;}			tmptoppad=0;		}		else		{			tmpleftpad=0;			if(i==1){tmptoppad=0;}else{tmptoppad=1;}		}		gnrated=gnrated+'<div id="Imgmenupo'+i+'" style="position:absolute;left:0px;top:0px;" onMouseOver="Imgmenumouse_over('+i+')" onMouseOut="Imgmenuoutall()"><div style="background-color:#FFFFFF;padding-left:'+tmpleftpad+'px;padding-top:'+tmptoppad+'px;"><a href="'+Imgmenulinkarr[i]+'" target="'+Imgmenutargetarr[i]+'"><img width="'+200+'" height="'+150+'" src="'+Imgmenufolderset+Imgmenuimgarr[i]+'" style="border-style:solid;border-width:0px;" TITLE="'+Imgmenualtarr[i]+'"></img></a>';		if(0==0)		{			Imgmenuds="";			ImgmenuWriteDesc();			gnrated=gnrated+Imgmenuds;		}		gnrated=gnrated+'</div></div>';	}	Imgmenuhpiece=Imgmenuhpiece+gnrated;	if(0==1)	{		Imgmenuhpiece=Imgmenuhpiece+Imgmenuds;	}	Imgmenuhpiece=Imgmenuhpiece+'</div>';	Imgmenuhpiece=Imgmenuhpiece+'</div>';	document.write(''+Imgmenuhpiece);	setTimeout("Imgmenuinit_position("+parseInt(hormuvertmi)+")",50);}function Imgmenuinit_position(hv){	Imgmenuhorvert=hv;	for(i=1;i<=9;i++)	{		Imgmenull[i]=document.getElementById('Imgmenupo'+i);		Imgmenulll[i]=document.getElementById('Imgmenuadesc'+i);		if((Imgmenull[i]==null)||(Imgmenulll[i]==null))		{		    setTimeout("Imgmenuinit_position("+parseInt(hv)+")",200);		    return;		}	}		if(Imgmenuhorvert==0)	{		Imgmenullllll=parseInt(     (930-((9-1)*1))     /(9));		Imgmenulllllll=Imgmenullllll+1;		Imgmenullllllll=parseInt(((930-200)/(9-1)));	}	else	{		Imgmenullllll=parseInt(     (280-((9-1)*1))     /(9));		Imgmenulllllll=Imgmenullllll+1;		Imgmenullllllll=parseInt(((280-150)/(9-1)));	}	for(i=1;i<=9;i++)	{		Imgmenull[i]=document.getElementById('Imgmenupo'+i);		sx=(Imgmenulllllll*(i-1))-1;		if(Imgmenuhorvert==0)		{			if(i==1)			{				Imgmenull[i].style.left="0px";			}			else			{				Imgmenull[i].style.left=""+sx+"px";			}		}		else		{			if(i==1)			{				Imgmenull[i].style.top="0px";			}			else			{				Imgmenull[i].style.top=""+sx+"px";			}		}		Imgmenustartposx[i]=sx;		Imgmenulllll[i]=Imgmenustartposx[i];		if(i==1)		{			Imgmenulll[i].style.left=""+ImgmenuDescCalcLeftBir+"px";		}		else		{			Imgmenulll[i].style.left=""+ImgmenuDescCalcLeft+"px";		}			}	Imgmenuintcomplate=1;	if(0==1)	{		ImgmenuDoAutoPlay();	}}function ImgmenuDoAutoPlay(){	Imgmenumouse_over(ImgmenuAutoPlayCurrent);	ImgmenuAutoPlayCurrent=ImgmenuAutoPlayCurrent+1;	if(ImgmenuAutoPlayCurrent>9)	{		ImgmenuAutoPlayCurrent=1;	}	ImgmenuAutoPlayTimer=setTimeout("ImgmenuDoAutoPlay()",4000);}function Imgmenudo_FadeAnim(){	if(Imgmenulllllllll<1)	{		return;	}	ImgmenuIEDescOpacity=ImgmenuIEDescOpacity+5;	ImgmenuFFOpacity=ImgmenuFFOpacity+0.05;	if(IEB==true)	{		if(ImgmenuIEDescOpacity>100)		{			ImgmenuIEDescOpacity=100;			return;		}	}	else	{		if(ImgmenuFFOpacity>1.00)		{			ImgmenuFFOpacity=1.00;			return;		}	}	if(IEB==true)	{		Imgmenulll[Imgmenulllllllll].filters.item(0).opacity=ImgmenuIEDescOpacity;	}	else	{		Imgmenulll[Imgmenulllllllll].style.opacity = ImgmenuFFOpacity;	}	ImgmenuDescFadeEffectTimer=setTimeout("Imgmenudo_FadeAnim()",20);}function Imgmenudo_anim(){	if(Imgmenucurrstep<=0)	{		if(Imgmenulllllllll>=1)		{			if(Imgmenuhorvert==0)			{				if(Imgmenulllllllll==1)				{					Imgmenulll[Imgmenulllllllll].style.left=""+ImgmenuDescCalcLeftBir+"px";				}				else				{					Imgmenulll[Imgmenulllllllll].style.left=""+ImgmenuDescCalcLeft+"px";				}			}			else			{				if(0==0)				{					Imgmenulll[Imgmenulllllllll].style.left=""+(ImgmenuDescCalcLeft+parseInt(Imgmenull[Imgmenulllllllll].style.left))+"px";					var DesvertTop=0;					if((Imgmenulllllllll>1) &&(Imgmenulllllllll!=9)){DesvertTop=80+1;}else{DesvertTop=80;}					Imgmenulll[Imgmenulllllllll].style.top=""+(DesvertTop)+"px";				}				else				{					Imgmenulll[Imgmenulllllllll].style.left=""+(ImgmenuDescCalcLeft)+"px";					Imgmenulll[Imgmenulllllllll].style.top=""+80+"px";				}			}			if((Imgmenutitarr[Imgmenulllllllll].length>0)||(Imgmenudesarr[Imgmenulllllllll].length>0))			{				if(2==2)				{					ImgmenuIEDescOpacity=0;					ImgmenuFFOpacity=0.00;					Imgmenudo_FadeAnim();					Imgmenulll[Imgmenulllllllll].style.visibility="visible";				}				else				{					Imgmenulll[Imgmenulllllllll].style.visibility="visible";				}			}			else			{				Imgmenulll[Imgmenulllllllll].style.visibility="hidden";			}		}		return;	}	for(i=2;i<=9;i++)	{		Imgmenulllll[i] = parseInt(Imgmenulllll[i])+parseInt((Imgmenullll[i]-Imgmenulllll[i])/Imgmenucurrstep);		if(Imgmenuhorvert==0)		{			Imgmenull[i].style.left=""+Imgmenulllll[i]+"px";		}		else		{			Imgmenull[i].style.top=""+Imgmenulllll[i]+"px";		}	}	if((2==1)&&(Imgmenulllllllll>=1))	{		var dtop=0;		if((Imgmenutitarr[Imgmenulllllllll].length>0)||(Imgmenudesarr[Imgmenulllllllll].length>0))		{    		Imgmenulll[Imgmenulllllllll].style.visibility="visible";        }        else        {            Imgmenulll[Imgmenulllllllll].style.visibility="hidden";        }		dtop= 80+        parseInt(ImgmenuDescCalcHeight-      ((ImgmenuDescCalcHeight/Imgmenustepcount)*(Imgmenustepcount-(Imgmenucurrstep-1)))         );		Imgmenulll[Imgmenulllllllll].style.top=""+dtop+"px";	}	Imgmenucurrstep--;	setTimeout("Imgmenudo_anim()",30);}function Imgmenureposition(g){	for(i=1;i<=9;i++)	{		if(i<=g)		{			if(i==1)			{				Imgmenullll[i]=0;			}			else			{				Imgmenullll[i]=parseInt(((i-1)*Imgmenullllllll)-1);			}		}		else		{			oncekix=0;			for(j=1;j<(i-1);j++)			{				oncekix=oncekix+Imgmenullllllll;			}			if(Imgmenuhorvert==0)			{				Imgmenullll[i]=parseInt(((200)+(oncekix)));			}			else			{				Imgmenullll[i]=parseInt(((150)+(oncekix)));			}		}			}	if((Imgmenuhorvert==0)&&(9==g))	{		var bul1=Imgmenullll[9]+1+200;		var bul2=930-bul1;		Imgmenullll[9]=Imgmenullll[9]+bul2;	}	if((Imgmenuhorvert==1)&&(9==g))	{		var bul1=Imgmenullll[9]+1+150;		var bul2=150-bul1;		Imgmenullll[9]=Imgmenullll[9]+bul2;	}	Imgmenucurrstep=Imgmenustepcount;	Imgmenudo_anim();}function Imgmenumouse_over(g){	if(Imgmenuintcomplate==0){return;}	if(g==Imgmenulllllllll){return;}	Imgmenulllllllll=g;	clearTimeout(Imgmenutimeo);	if(0==1){if(Imgmenuicerdemi==1){clearTimeout(ImgmenuAutoPlayTimer);}}	for(i=1;i<=9;i++)	{		if(i!=g)		{			Imgmenulll[i].style.visibility="hidden";			if(IEB==true)			{				Imgmenulll[i].filters.item(0).opacity=100;			}			else			{				Imgmenulll[i].style.opacity = 1.0;			}		}	}	Imgmenureposition(g);}function Imgmenuoutall(){	Imgmenuicerdemi=1;	clearTimeout(ImgmenuAutoPlayTimer);	clearTimeout(Imgmenutimeo);}function Imgmenumouse_divout2(){	Imgmenuicerdemi=0;	clearTimeout(Imgmenutimeo);	if(0==1)	{		clearTimeout(ImgmenuAutoPlayTimer);		ImgmenuAutoPlayCurrent=1;		ImgmenuDoAutoPlay();	}	else	{	for(i=1;i<=9;i++)	{		Imgmenulll[i].style.visibility="hidden";	}	for(i=1;i<=9;i++)	{		sx=(Imgmenulllllll*(i-1))-1;		if(i==1)		{			Imgmenullll[i]=0;		}		else		{			Imgmenullll[i]=sx;		}			}	Imgmenulllllllll=-1;	Imgmenucurrstep=Imgmenustepcount;	Imgmenudo_anim();	}}function Imgmenumouse_divout(){	clearTimeout(Imgmenutimeo);	Imgmenutimeo=setTimeout("Imgmenumouse_divout2()",300);}
