function start_ajax(lang)
{
if(location.href.indexOf("escort-service") != -1 && location.href.indexOf("girl") == -1)
{
girls("",lang,2);
}

}

function girls(start,lang,onorder) {
        if(onorder == 2)
        {
        var url = "girls.php?start="+start+"&lang="+lang;
        //alert(url);
        }
        else
        {
        var url = "girls.php?start="+start+"&lang="+lang+"&onorder="+onorder;
        //alert(url);
        }
        //alert(url);
        if(window.XMLHttpRequest) {
                req = new XMLHttpRequest();
        } else if(window.ActiveXObject) {
                req = new ActiveXObject("Microsoft.XMLHTTP");
        }
        
        req.open("GET", url, true);
        req.onreadystatechange = callback;
        req.send(null);
        
}

function callback() {
        if(req.readyState == 4) {
                if(req.status == 200) {
                        response = req.responseText;
                        document.getElementById("girls-container").innerHTML = response;
                } else {
                        alert("There was a problem retrieving the data:\n" + req.statusText);
                }
        }
}
function forum_add(nick,obsah) {
    if(obsah.length > 0)
    {
        var url = "audit_plus.php?nick="+nick+"&obsah="+obsah;
        if(window.XMLHttpRequest) {
                req = new XMLHttpRequest();
        } else if(window.ActiveXObject) {
                req = new ActiveXObject("Microsoft.XMLHTTP");
        }
        
        req.open("POST", url, true);
        req.onreadystatechange = callback2;
        req.send(null);
    }    
}

function callback2() {
        if(req.readyState == 4) {
                if(req.status == 200) {
                        response = req.responseText;
                        //document.getElementById("girls-container").innerHTML = response;
                        location.reload(true);
                } else {
                        alert("There was a problem retrieving the data:\n" + req.statusText);
                }
        }
}

function openImgWinen(what,title, x, y)
			{
					   wokno = window.open('', 'window', 'menubar=no, scrollbars=no, resizable=no, statusbar=no, width='+x+', height='+y);
					   wokno.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE>'+title+'</TITLE></HEAD><BODY style="margin-top:0px; margin-left:0px;" bgcolor="#FFFFFF"><a href="#" onclick="window.close()"><img src="'+what+'" border="0" alt="Kliknutím okno zavøete"></a></BODY></HTML>');
			}





