function slide_cover(int_number)
{
	$('.all').slideUp();
	$('.links_all').html('+');
	$('#child_'+int_number).html("<center><img src='images/loading.gif' style='margin-top:1px;'></center>");
	$('#child_'+int_number).load("hot.php",{ItemIdx:int_number,lang:lang_var,show_img:1});
	$('#title_'+int_number).load("hot.php",{ItemIdx:int_number,lang:lang_var});
	$('#child_'+int_number).slideDown();
	$('#link_'+int_number).html('-');
}


var counter=0;
function timedSlide()
{
	slide_cover(counter);
	if(counter < 2)
	{
		counter++;
	}
	else
	{
		counter=0;
	}
	var t=setTimeout("timedSlide()",30000);
}


function contacts_open(about_as)
{
	if(about_as==0)
	{
		window.open('contacts.php?lang='+lang_var+'','Welcome',"width=640,height=480,toolbar=0,directories=0,channelmode=0,left=200,top=200,location=0,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=1");
	}
	else
	{
		window.open('contacts.php?lang='+lang_var+'&a=1','Welcome',"width=640,height=480,toolbar=0,directories=0,channelmode=0,left=200,top=200,location=0,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=1");
	}
}


function validate_email(field,alerttxt)
{
	with (field)
	{
		apos=value.indexOf("@");
		dotpos=value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) 
		  {alert(alerttxt);return false;}
		else {return true;}
	}
}
function validate_form(thisform)
{
	with (thisform)
	{
		if (validate_email(E_Mail,"Not a valid e-mail address!")==false)
		  {E_Mail.focus();return false;}
	}
}


function slide_topic(topic_id)
{
	var inner=$('#plus_'+topic_id).html();
	if(inner=="-")
	{
		$('#plus_'+topic_id).html("+");
		$('#tr_'+topic_id).slideUp();
		$.post('cookier.php',{topicid:topic_id,action:'set'});
	}
	else
	{
		$('#plus_'+topic_id).html("-");
		$('#tr_'+topic_id).slideDown();
		$.post('cookier.php',{topicid:topic_id});
	}
}

