function ajax_creatobj(objnum,myUrl){
	    var ajax_http_object = "ajax_http_"+objnum;
		var ajax_http_request = "";	
		ajax_http_object = false;
        if (window.XMLHttpRequest) { // mozilla , safari.. 
            ajax_http_object = new XMLHttpRequest();
			
            if (ajax_http_object.overrideMimeType) {
                ajax_http_object.overrideMimeType('text/xml');
            }
        } else if (window.ActiveXObject) { // internet explorer
            try {
                ajax_http_object = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    ajax_http_object = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }
        if (!ajax_http_object) {
            alert('AJAX error ');
            return false;
        }
		return ajax_http_object;
	}// ajax_creatobj
	
function PostRequestView(objnum,myUrl,viriables,num,method){
			ajax_http_object=ajax_creatobj(objnum,myUrl);
			ajax_http_object.onreadystatechange = function() {
						display_head_results(ajax_http_object,num); 
				};
		
			if (method == 'get')
			{
		    	ajax_http_object.open("get",myUrl+"?"+viriables);
			    ajax_http_object.send(viriables);  
			}
			else 
			{			 
				ajax_http_object.open("POST",myUrl+"?"+viriables,true);
				ajax_http_object.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
				ajax_http_object.setRequestHeader("Content-length", viriables.length);
				ajax_http_object.setRequestHeader("Connection", "close");
				ajax_http_object.send(viriables);	
			}
	
	}// PostRequest

function display_head_results(ajax_http_object,num){
	
		if(ajax_http_object.readyState==4){	
			
			if(ajax_http_object.status==200){					
				var theDiv="head_pic"+num; 
				var content=ajax_http_object.responseText;
				document.getElementById(theDiv).innerHTML="";
				document.getElementById(theDiv).innerHTML=ajax_http_object.responseText;
				}else {
					
				var loadstatus="<img src='images/top_loader.gif' />";
				var theDiv="head_pic"+num; 
				document.getElementById(theDiv).innerHTML="";
				document.getElementById(theDiv).innerHTML=loadstatus;
				}
		}
		
	}// sdisplay_weather_results			
