var p_menu = 1;

jQuery(document).ready(function(){
	jQuery('#stopka1').corner('tl tr 8px');
	jQuery('.panelpole').corner('2px');

});
iens6=document.all||document.getElementById;
ns4=document.layers;
var speed=5;


function movedown(){
if (parseInt(crossobj.style.top)>(crossobj.offsetHeight*(-1))){
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px";
}

movedownvar=setTimeout("movedown()",20);
}

function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px";
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed;
moveupvar=setTimeout("moveup()",20);

}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight;
else if (ns4)
document.nscontainer.document.nscontent.visibility="show";
}
window.onload=getcontent_height;

window.dodaj_sb=0;
function load_post(id) {
var req =  mint.Request();
req.method = "POST";
req.AddParam("id", id);
req.AddParam("a",1);
req.OnSuccess = function() {
$('posty').innerHTML = this.responseText;
}
req.OnError = function () { $('posty').innerHTML = "Spróbuj ponownie"; }
req.Send(BASE+ "themes/anime_cinema_egrafix_pl/panels/shoutbox_ajax.php");
};

function add_sb(){
document.sb.sb_p.disabled=true;
var req=mint.Request();
var sbm=document.sb.sb_m.value;
req.method="POST";
req.AddParam("a",2);
req.AddParam("b",sbm);
req.AddParam("id",window.dodaj_sb);
req.OnSuccess=function(){
load_post(0);
document.sb.sb_m.value="";
if(window.dodaj_sb!=0){
window.dodaj_sb=0;
}
document.sb.sb_p.disabled=false;
};
req.Send(BASE+ "themes/anime_cinema_egrafix_pl/panels/shoutbox_ajax.php");
};
function edit_sb(id){
var req=mint.Request();
req.method="POST";
req.AddParam("a",3);
req.AddParam("id",id);
req.OnSuccess=function(){
if(this.responseText!=""){
document.sb.sb_m.value=this.responseText;
window.dodaj_sb=id;
}
};
req.Send(BASE+ "themes/anime_cinema_egrafix_pl/panels/shoutbox_ajax.php");
};
function delete_sb(id){
var req=mint.Request();
req.method="POST";
req.AddParam("a",4);
req.AddParam("id",id);
req.OnSuccess=function(){
load_post(0);
};
req.Send(BASE+ "themes/anime_cinema_egrafix_pl/panels/shoutbox_ajax.php");
};

