// JavaScript Document

var ichat = 55;
		var okk_chat = true;
		var c_chat;
		
		
		
		function st(){
			if(okk_chat){
				ichat=5;
				//espandichat()
				ints=setInterval('espandichat()', 15);
			}else{
				clearInterval(ints);
				//ritraichat()
				intv=setInterval('ritraichat()', 10);
			}
			
										   
		}
		
		function espandichat(){
			
		if(ichat>=600){clearInterval(ints);okk_chat=false;}
		if(ichat>=400){
					 document.getElementById("loginchat").style.width=ichat+"px";
					 //document.getElementById("freccia").style.right=ichat+"px";
					 if(ichat>=600){
					 	document.getElementById("loginchat").style.display="block";
					 }
					 document.getElementById("imgpubliling").style.width=ichat+"px";
					 document.getElementById("imgpubliling").style.height=ichat+"px";
					 ichat=ichat+10;
				 }else{
					document.getElementById("chat").style.display="block";
									
					document.getElementById("imgpubliling").style.width=ichat+"px";
					document.getElementById("imgpubliling").style.height=ichat+"px";
					document.getElementById("loginchat").style.width=ichat+"px";
					document.getElementById("freccia").style.display = "none";
					 ichat=ichat+((ichat/5));
			 };
		};
		
		
		
		 function ritraichat(){
			 if(ichat<=6){
			 	ichat=0;
				clearInterval(intv);
				
				okk_chat=true;
			};
			if(ichat>=150){
				document.getElementById("loginchat").style.display="none";
				document.getElementById("imgpubliling").style.width=ichat+"px";
				document.getElementById("imgpubliling").style.height=ichat+"px";
				ichat=ichat-8;
			}else{
				document.getElementById("imgpubliling").style.width=ichat+"px";
				document.getElementById("imgpubliling").style.height=ichat+"px";
				ichat=ichat-10;
			
			};
		};