function moveandshowdiv(strImgID,id)
{
	for(i = 1; i < 5; i++)
	$("#" + strImgID +  i).css("display","none") ;		
	$("#" + strImgID + id).fadeIn(1000);
	if(id==1)
	{
		$("#img_ad1")[0].src="/images/ad_bt1_hover.png";			 
	}
	else
	{
		$("#img_ad1")[0].src="/images/ad_bt1.jpg";
	}
	if(id==2)
	{
		$("#img_ad2")[0].src="/images/ad_bt2_hover.png";			 
	}
	else
	{
		$("#img_ad2")[0].src="/images/ad_bt2.jpg";
	}
	if(id==3)
	{
		$("#img_ad3")[0].src="/images/ad_bt3_hover.png";			 
	}
	else
	{
		$("#img_ad3")[0].src="/images/ad_bt3.jpg";
	}
	if(id==4)
	{
		$("#img_ad4")[0].src="/images/ad_bt4_hover.png";			 
	}
	else
	{
		$("#img_ad4")[0].src="/images/ad_bt4.jpg";
	}
}


$("#img_ad1").bind('click', function()
	{
		
		moveandshowdiv('div_ad',1);
		clearInterval(m_tAutoImgShow);
	});
	
	 $("#img_ad2").bind('click', function()
	{
			moveandshowdiv('div_ad',2);
			clearInterval(m_tAutoImgShow);
	});
	
		$("#img_ad3").bind('click', function()
	{
			moveandshowdiv('div_ad',3);
			clearInterval(m_tAutoImgShow);
	});
		$("#img_ad4").bind('click', function()
	{
			moveandshowdiv('div_ad',4);
			clearInterval(m_tAutoImgShow);
	});	

$(document).ready(function(){
		var nShowImgID = 1;
	var m_tAutoImgShow;
	$(document).ready(function(){
	$.extend({
	   show:function(){
			nShowImgID++;
			if ( nShowImgID > 4)
				nShowImgID = 1;
			moveandshowdiv('div_ad',nShowImgID)
	   }
	});
	m_tAutoImgShow = setInterval("$.show()",8000);
});
	
});


 $("#img_article").bind('click',function()
 {
	$("#Article").css("display","");
	$("#faq").css("display","none");
});

 $("#img_faq").bind('click',function()
 {
	$("#Article").css("display","none");
	$("#faq").css("display","");
});
