var ac1stepcount=10;var ac1currstep=10;var ac1timeo=null;var ac1horvert=1;var ac1folderset="";var ac1gorun_imgwidth=0;var ac1gorun_blockwidth=0;var ac1gorun_overblock_width=0;var ac1imgid=new Array();var ac1yeniposx=new Array();var ac1startposx=new Array();var ac1currposx=new Array();var i=0;var ac1hpiece='';function ac1init_doc(fstr){    ac1folderset=fstr;    ac1hpiece=ac1hpiece+'<div style="position:relative;width:'+175+'px;height:'+240+'px;overflow:hidden;border-style:solid;border-width:0px;border-color:#FFFFFF;cursor:default;" onMouseOut="ac1mouse_divout()">';    ac1hpiece=ac1hpiece+'<div id="ac1po1" style="position:absolute;left:0px;top:0px;" onMouseOver="ac1mouse_over(1)"><div style="background-color:#808080;padding-left:0px;padding-top:0px;"><a href="http://www.nsaskateboarding.co.za/current_event.php" target="_self"><img width="175" height="185" src="'+ac1folderset+'2.jpg" style="border-style:solid;border-width:0px;" TITLE="Next Event"></img></a></div></div>';ac1hpiece=ac1hpiece+'<div id="ac1po2" style="position:absolute;left:0px;top:0px;" onMouseOver="ac1mouse_over(2)"><div style="background-color:#808080;padding-left:0px;padding-top:2px;"><a href="http://www.nsaskateboarding.co.za/competitions.php" target="_self"><img width="175" height="185" src="'+ac1folderset+'3.jpg" style="border-style:solid;border-width:0px;" TITLE="Current Competitions"></img></a></div></div>';ac1hpiece=ac1hpiece+'<div id="ac1po3" style="position:absolute;left:0px;top:0px;" onMouseOver="ac1mouse_over(3)"><div style="background-color:#808080;padding-left:0px;padding-top:2px;"><a href="http://www.nsaskateboarding.co.za/submit_an_event.php" target="_self"><img width="175" height="185" src="'+ac1folderset+'4.jpg" style="border-style:solid;border-width:0px;" TITLE="Submit An Event"></img></a></div></div>';    ac1hpiece=ac1hpiece+'</div>';    document.write(''+ac1hpiece);}function ac1init_position(hv){	ac1horvert=hv;	for(i=1;i<=3;i++)	{		ac1imgid[i]=document.getElementById('ac1po'+i);		if(ac1imgid[i]==null)		{		    setTimeout("ac1init_position("+parseInt(hv)+")",300);		    return;		}	}		if(ac1horvert==0)	{		ac1gorun_imgwidth=parseInt(     (500-((3-1)*2))     /(3));		ac1gorun_blockwidth=ac1gorun_imgwidth+2;		ac1gorun_overblock_width=parseInt(((500-175)/(3-1)));	}	else	{		ac1gorun_imgwidth=parseInt(     (240-((3-1)*2))     /(3));		ac1gorun_blockwidth=ac1gorun_imgwidth+2;		ac1gorun_overblock_width=parseInt(((240-185)/(3-1)));	}	for(i=1;i<=3;i++)	{		ac1imgid[i]=document.getElementById('ac1po'+i);		sx=(ac1gorun_blockwidth*(i-1))-2;		if(ac1horvert==0)		{			if(i==1)			{				ac1imgid[i].style.left="0px";			}			else			{				ac1imgid[i].style.left=""+sx+"px";			}		}		else		{			if(i==1)			{				ac1imgid[i].style.top="0px";			}			else			{				ac1imgid[i].style.top=""+sx+"px";			}		}		ac1startposx[i]=sx;		ac1currposx[i]=ac1startposx[i];	}}function ac1do_anim(){	if(ac1currstep<=0)	{		return;	}	for(i=2;i<=3;i++)	{		ac1currposx[i] = parseInt(ac1currposx[i])+parseInt((ac1yeniposx[i]-ac1currposx[i])/ac1currstep);		if(ac1horvert==0)		{			ac1imgid[i].style.left=""+ac1currposx[i]+"px";		}		else		{			ac1imgid[i].style.top=""+ac1currposx[i]+"px";		}	}	ac1currstep--;	setTimeout("ac1do_anim()",40);}function ac1reposition(g){	for(i=1;i<=3;i++)	{		if(i<=g)		{			if(i==1)			{				ac1yeniposx[i]=0;			}			else			{				ac1yeniposx[i]=parseInt(((i-1)*ac1gorun_overblock_width)-2);			}		}		else		{			oncekix=0;			for(j=1;j<(i-1);j++)			{				oncekix=oncekix+ac1gorun_overblock_width;			}			if(ac1horvert==0)			{				ac1yeniposx[i]=parseInt(((175)+(oncekix)));			}			else			{				ac1yeniposx[i]=parseInt(((185)+(oncekix)));			}		}	}	ac1currstep=ac1stepcount;	ac1do_anim();}function ac1mouse_over(g){	clearTimeout(ac1timeo);	ac1reposition(g);}function ac1mouse_divout2(){	for(i=1;i<=3;i++)	{		sx=(ac1gorun_blockwidth*(i-1))-2;		if(i==1)		{			ac1yeniposx[i]=0;		}		else		{			ac1yeniposx[i]=sx;		}	}	ac1currstep=ac1stepcount;	ac1do_anim();}function ac1mouse_divout(){	ac1timeo=setTimeout("ac1mouse_divout2()",300);}