
<!--
// www.wino.ws & script@wino.ws
//_________________________
var $id = "text";
var $img_loading = "images/progressbar_microsoft.gif";
var $msg = '<p align="center">...جاري تحميل الصفحة...</p>'; 
//_________________________
var http_request = false;

include = function($url,$method,$send){
if(!$url)return false;
if(!$method)$method = "GET";
if(!$send)$send = null;
if(!$img_loading)$img_loading = ""; else $img_loading = '<p align="center"><img src="images/progressbar_microsoft.gif"></p>'; 
document.getElementById($id).innerHTML = $img_loading+$msg;
http_request = false;
if (window.XMLHttpRequest) { 
    http_request = new XMLHttpRequest();
    if (http_request.overrideMimeType) {
         http_request.overrideMimeType('text/xml');
        }
    } else if (window.ActiveXObject) { 
    try {
        http_request = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
        try {
        http_request = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
    }
}
if (!http_request) {
        alert('Cannot create XMLHTTP');
        document.getElementById($id).innerHTML = "";
        return false;
    }
    http_request.onreadystatechange = alertContents;
    http_request.open($method, $url, true);
    http_request.setRequestHeader('Content-Type', 'text/html; charset:windows-1256');
    http_request.send($send);
}
function alertContents() {
    if (http_request.readyState == 4) {
        if (http_request.status == 200) {
            document.getElementById($id).innerHTML = http_request.responseText;
        } else {
            alert('حدثت مشكلة اثناء طلب العملية.');
            document.getElementById($id).innerHTML = "";
            return false
        }
    }
}
//-->
