function get_free_script22(js, div, id, par, act, mssage)
{   	
	var f = 'id='+id+'&par='+par+'&JsHttpRequest=' + new Date().getTime() + '-xml';
    $.ajax(
        {
            type: "GET",
            url: js,
            data: f,
            dataType:"json",
            timeout: "10000",
            success: function(msg) 
            {
			    var req  = msg.js;
                if (req.code == 2)
                {
                	if (mssage == 1) $('#msg').empty().append(req.msg);
                	if (act == 2) $('#'+div).empty();
                	if (act == 2 || act == 1) $('#'+div).append(req.content);
                	if (act == 3) $('#'+div).remove();
               }
            },
            error:    function(XMLHttpRequest, textStatus, errorThrown) {
                    this;
            }
        });
}

function get_free_script(js, div, id, par, act, mssage)
{   	
    var req = new JsHttpRequest();
    req.onreadystatechange = function()
    {
        if (req.readyState == 4) 
        {            
	       var req2  = req.responseJS;
           if (req2.code == 2)
           {
              	if (mssage == 1) $('#msg').empty().append(req2.msg);
               	if (act == 22)
               	{
               		$('#'+div).empty();
               		$('#'+div).append(req2.content);
               		if($('#uni_city1').html() == '')
               		{
               			$('#uni_cityDisabled1').removeClass('city_viz');
               			$('#uni_cityDisabled1').addClass('city_noviz');
               		}
               		else
               		{
               			$('#uni_cityDisabled1').removeClass('city_noviz');
               			$('#uni_cityDisabled1').addClass('city_viz');
               		}
               	}
               	
               	if (act == 33)
               	{
               		$('#'+div).empty();
               		$('#'+div).append(req2.content);
               		if($('#uni_city2').html() == '')
               		{
               			$('#uni_cityDisabled2').removeClass('city_viz');
               			$('#uni_cityDisabled2').addClass('city_noviz');
               		}
               		else
               		{
               			$('#uni_cityDisabled2').removeClass('city_noviz');
               			$('#uni_cityDisabled2').addClass('city_viz');
               		}
               	}
               	
               	if (act == 77)
               	{
               		$('#'+div).empty();
               		$('#'+div).append(req2.content);
               		$('#fade').css('visibility', 'visible');
               		$('#popup-box').css('visibility', 'visible');
               		$('#fade').css('z-index', '100');
               		
               		var pos134 = $('#footer').position();
               		$('#fade').css('height', pos134.top);
               		
               		var w = $(window);
               		$('#popup-box').css("position","absolute");
               		$('#popup-box').css("top",(w.height()-$('#popup').height())/2+w.scrollTop() + "px");
               		$('#popup-box').css("left",(w.width()-$('#popup-box').width())/2+w.scrollLeft() + "px");
               		
               		$('#popup-box').css('z-index', '110');
               	}
               	
               	if (act == 2) $('#'+div).empty();
               	if (act == 2 || act == 1) $('#'+div).append(req2.content);
               	if (act == 3) $('#'+div).remove();
           }
           else if(req.responseJS.code == 1)
                $('#'+msg).empty().append(req.responseJS.msg);
        }
    }

    req.open(null, js, true);
    req.send( { 'id': id, 'par': par } ); 
	
}

