/*  
 *
 *
 */
function getSiteList(f){
    var filename = "report_get_site_list.php";
    new Ajax.Request(
	    filename, 
		{ method: 'get',
          parameters: "ar=" + f.p2.value + "&sid=" + f.p3.value,
	      onComplete: displaySiteSelect 
	    }
    );
}

function displaySiteSelect(httpObj){
    var node = document.getElementById("f_ski");
    node.innerHTML = httpObj.responseText;
}

function getResult(pg){

    var filename = "report_get_search_result.php?pg=" + pg ;
    new Ajax.Request(
	    filename, 
		{ method: 'post',
		  parameters:Form.serialize("searchForm"),
	      onComplete: displayResult 
	    }
    );
}

function displayResult(httpObj){
    var node = document.getElementById("result");
    node.innerHTML = httpObj.responseText;
}

window.onload = function() {
    getSiteList(document.form1);
	getResult(1);
}


