var counter=0;var speed=2000;var margin=0;var curtop=0;var steparray=new Array();var laststep=0;var curmargin=0;var empty=0;var co=0;function next_group(condition)
{laststep=steparray.length;counter=(counter<0)?0:counter;counter++;curmargin=$("#newsmain").css("marginTop");curmargin=curmargin.replace("px","");curmargin=parseInt(curmargin);counter=(steparray[counter]==curmargin)?counter+1:counter;if(steparray[counter]==undefined)
{$("#down0").removeClass("hidden");var firstpos=$("#firstnews").position("");firstpos=firstpos.top;var lastpos=$("#lastnews").position("");lastpos=lastpos.top;margin=margin+((lastpos-(firstpos+overheight))*(-1));steparray[counter]=margin;$("#newsmain").animate({"marginTop":(margin)+"px"},speed,"",insertnew(condition));}
else
{if(empty!=0&&(counter+1)==empty)
$("#down0").removeClass("hidden");$("#newsmain").animate({"marginTop":steparray[counter]+"px"},speed);}
$("#up0").addClass("hidden");return false;}
function go2first()
{laststep=steparray.length;counter=(counter<0)?0:counter;var laststep=steparray.length;counter=(laststep==counter)?counter-1:counter;counter=counter-1;$("#newsmain").animate({"marginTop":((counter==0)?0:steparray[counter])+"px"},speed);if(counter==0)
{$("#up0").removeClass("hidden");}
$("#down0").addClass("hidden");return false;}
function insertnew(condition)
{co=counter+1;$("#downloader").removeClass("hidden");$.post("engine.php",{'act':'next_group','counter':co,'stepcount':stepcount,'condition':condition,'xp':xp},function(data)
{var newsg=jQuery(document.createElement('div'));newsg.html(data);newsg.insertBefore($("#lastnews"));$("#down0").addClass("hidden");if(data=="")
{$("#down0").removeClass("hidden");$("#up0").addClass("hidden");empty=co;}},"json");return false;};var counter=0;var speed=2000;var margin=0;var curtop=0;var steparray=new Array();var laststep=0;var curmargin=0;var empty=0;var co=0;function next_blog_group(condition)
{laststep=steparray.length;counter=(counter<0)?0:counter;counter++;curmargin=$("#blogsmain").css("marginTop");curmargin=curmargin.replace("px","");curmargin=parseInt(curmargin);counter=(steparray[counter]==curmargin)?counter+1:counter;if(steparray[counter]==undefined)
{$("#down0").removeClass("hidden");var firstpos=$("#firstblog").position("");firstpos=firstpos.top;var lastpos=$("#lastblog").position("");lastpos=lastpos.top;margin=margin+((lastpos-(firstpos+overheight))*(-1));steparray[counter]=margin;$("#blogsmain").animate({"marginTop":(margin)+"px"},speed,"",insertnew_blog(condition));}
else
{if(empty!=0&&(counter+1)==empty)
$("#down0").removeClass("hidden");$("#blogsmain").animate({"marginTop":steparray[counter]+"px"},speed);}
$("#up0").addClass("hidden");return false;}
function previews_blog_group()
{laststep=steparray.length;counter=(counter<0)?0:counter;var laststep=steparray.length;counter=(laststep==counter)?counter-1:counter;counter=counter-1;$("#blogsmain").animate({"marginTop":((counter==0)?0:steparray[counter])+"px"},speed);if(counter==0)
{$("#up0").removeClass("hidden");}
$("#down0").addClass("hidden");return false;}
function insertnew_blog(condition)
{co=counter+1;$("#downloader").removeClass("hidden");$.post("engine.php",{'act':'next_blog_group','counter':co,'stepcount':stepcount,'condition':condition,'xp':xp},function(data)
{var blogsj=jQuery(document.createElement('div'));blogsj.html(data);blogsj.insertBefore($("#lastblog"));$("#down0").addClass("hidden");if(data=="")
{$("#down0").removeClass("hidden");$("#up0").addClass("hidden");empty=co;}},"json");return false;};var counter=0;var speed=2000;var margin=0;var curtop=0;var steparray=new Array();var laststep=0;var curmargin=0;var empty=0;var co=0;var condition='AND 1';var overheight=500;var bstepcount=10;function next_group_blogers()
{laststep=steparray.length;counter=(counter<0)?0:counter;counter++;curmargin=$("#newsmain").css("marginTop");curmargin=curmargin.replace("px","");curmargin=parseInt(curmargin);counter=(steparray[counter]==curmargin)?counter+1:counter;if(steparray[counter]==undefined)
{$("#down0").removeClass("hidden");var firstpos=$("#firstnews").position("");firstpos=firstpos.top;var lastpos=$("#lastnews").position("");lastpos=lastpos.top;margin=margin-500;steparray[counter]=margin;$("#newsmain").animate({"marginTop":(margin)+"px"},speed,"",insertnew_blogger());}
else
{if(empty!=0&&(counter+1)==empty)
$("#down0").removeClass("hidden");$("#newsmain").animate({"marginTop":steparray[counter]+"px"},speed);}
$("#up0").addClass("hidden");return false;}
function go2first_blogers()
{laststep=steparray.length;counter=(counter<0)?0:counter;var laststep=steparray.length;counter=(laststep==counter)?counter-1:counter;counter=counter-1;$("#newsmain").animate({"marginTop":((counter==0)?0:steparray[counter])+"px"},speed);if(counter==0)
{$("#up0").removeClass("hidden");}
$("#down0").addClass("hidden");return false;}
function insertnew_blogger(condition)
{co=counter+1;$("#downloader").removeClass("hidden");$.post("engine.php",{'act':'next_group_blogers','counter':co,'bstepcount':bstepcount,'condition':condition,'xp':xp},function(data)
{var newsg=jQuery(document.createElement('div'));newsg.html(data);newsg.insertBefore($("#lastnews"));$("#down0").addClass("hidden");if(data=="")
{$("#down0").removeClass("hidden");$("#up0").addClass("hidden");empty=co;}},"json");return false;};var counter2=0;var speed2=2000;var margin2=0;var curtop2=0;var steparray2=new Array();var laststep2=0;var curmargin2=0;var empty2=0;var co2=0;var condition2='AND 1';var overheight2=470;var bstepcount2=3;function next_group2(condition2)
{laststep2=steparray2.length;counter2=(counter2<0)?0:counter2;counter2++;curmargin2=$("#newsmain2").css("marginTop");curmargin2=curmargin2.replace("px","");curmargin2=parseInt(curmargin2);counter2=(steparray2[counter2]==curmargin2)?counter2+1:counter2;if(steparray2[counter2]==undefined)
{$("#down02").removeClass("hidden");var firstpos=$("#firstnews2").position("");firstpos=firstpos.top;var lastpos=$("#lastnews2").position("");lastpos=lastpos.top;margin2=margin2+((lastpos-(firstpos+overheight2))*(-1));steparray2[counter2]=margin2;$("#newsmain2").animate({"marginTop":(margin2)+"px"},speed2,"",insertnew2(condition2));}
else
{if(empty!=0&&(counter2+1)==empty)
$("#down02").removeClass("hidden");$("#newsmain2").animate({"marginTop":steparray2[counter2]+"px"},speed2);}
$("#up02").addClass("hidden");return false;}
function go2first2()
{laststep2=steparray2.length;counter2=(counter2<0)?0:counter2;var laststep2=steparray2.length;counter2=(laststep2==counter2)?counter2-1:counter2;counter2=counter2-1;$("#newsmain2").animate({"marginTop":((counter2==0)?0:steparray2[counter2])+"px"},speed2);if(counter2==0)
{$("#up02").removeClass("hidden");}
$("#down02").addClass("hidden");return false;}
function insertnew2(condition2)
{co2=counter2+1;$("#downloader").removeClass("hidden");$.post("engine.php",{'act':'next_group2','counter2':co2,'bstepcount2':bstepcount2,'condition2':condition2,'xp':xp},function(data)
{var newsg=jQuery(document.createElement('div'));newsg.html(data);newsg.insertBefore($("#lastnews2"));$("#down02").addClass("hidden");if(data=="")
{$("#down02").removeClass("hidden");$("#up02").addClass("hidden");empty2=co2;}},"json");return false;}
