function index_startajax(val){
    var result;	
    var xmlHttp=null;
	try{    xmlHttp=new XMLHttpRequest();  }// Firefox, Opera 8.0+, Safari
	catch (e) { 														// Internet Explorer
	    try {	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
		catch (e){	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
  		}
	if (xmlHttp==null){ alert("Your browser does not support AJAX!"); exit; } 
    else { 
	myurl = 'index_rss.php?type=' + encodeURI(val);
	xmlHttp.open("GET", myurl, true);
        xmlHttp.onreadystatechange =  function (){ 
            if (xmlHttp.readyState==4 && xmlHttp.status == 200){ 
                result_dn =  xmlHttp.responseText;
                inobj = document.getElementById('rss_text');
                inobj.innerHTML = "<div style='padding:10px;' class='rss_link'>" + result_dn + "</div>";

            }
        }
        xmlHttp.send(null);
    }
}
function index_init(){
 index_startajax(page_feed);
}


document.write("<div id='test_box' style='position:absolute;padding:5px;z-index:-100;margin-left:-1000;width:340px;font-size:11px;line-height:13px;'></div>");

opened_result_box = -1;


function view_result(id){
   
    if (opened_result_box != -1){
       
        document.getElementById("sub_result_" + opened_result_box ).style.height = "1px";
        document.getElementById("sub_result_" + opened_result_box ).style.display = "none";
        document.getElementById("result_" + opened_result_box ).style.backgroundColor = "#efefef";
        document.getElementById("linky_" + opened_result_box).style.color = "black";
        
    }
    opened_result_box = id;
    var result_obj = document.getElementById("result_" + id);
    result_obj.style.backgroundColor="white";
    document.getElementById("linky_" + id).style.color = "#9d1014";
    var sub_result_obj = document.getElementById("sub_result_" + id);
    var test_obj  = document.getElementById("test_box");

    test_obj.innerHTML = sub_result_obj.innerHTML;
    sub_result_obj.innerHTML = "";

    var final_height = test_obj.offsetHeight;
    sub_result_obj.style.height = "1px";
    sub_result_obj.style.display="block";
    sub_result_obj.innerHTML = test_obj.innerHTML;
    go(sub_result_obj,final_height);
}

function go(obj, h){
    divobj = obj;
    fh = h;
    var curH = divobj.offsetHeight;
    if (curH < fh){
        divobj.style.height = (curH + 10) + "px";
        setTimeout("go(divobj,fh)",1);
    }

}
