var PAGE_ITEM=10;
var PAGE_NUM;
var TOTAL_NUM;
var	PREV_ICON="<img border='0' src='prev_page.gif'>" ;
var	NEXT_ICON="<img border='0' src='next_page.gif'>" ;
var	END_ICON="<img border='0' src='end_page.gif'>" ;
var	FIRST_ICON="<img border='0' src='first_page.gif'>" ;
var	PREV_ICON0="<img border='0' src='prev_page0.gif'>" ;
var	NEXT_ICON0="<img border='0' src='next_page0.gif'>" ;
var	END_ICON0="<img border='0' src='end_page0.gif'>" ;
var	FIRST_ICON0="<img border='0' src='first_page0.gif'>" ;
//var PAGE_DETAIL=4;

function makeRequest(url,content,type,row_num,goto,send_value) 
{	 
	var http_request = false;
	
	if (window.XMLHttpRequest) { // Mozilla, Safari,IE7...
      
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/xml');
        }
    } 
    else if (window.ActiveXObject)  // IE
    {
        try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
    }

    if (!http_request) 
    {
        alert('Giving up :( Cannot create an XMLHTTP instance');
        return false;
    }

	if (content == true)
    { 
		if( type == 1 )			// ../tools/admin.asp	ddns.asp
		{
			http_request.onreadystatechange = function(){show_message(http_request)};
		}
		else if( type == 2 )	// ../home/lan.asp
		{
				http_request.onreadystatechange = function(){chk_set_netmask_status(http_request)};
		}
		else if( type == 3 )	// ../formatHD/raid_wizard4.asp raid_wizard4_1.asp wizard4.asp wizard4_1.asp
		{				
			http_request.onreadystatechange = function(){chk_bar_status(http_request)};
		}
		else if( type == 4 )	//status/log.asp
		{
			http_request.onreadystatechange = function(){show_syslog(http_request,goto)};
		}	
		else if( type == 5 )	// ../tools/scandsk_status.asp
		{
			http_request.onreadystatechange = function(){chk_bar_status(http_request)};
		}	
		else if( type == 6 )	// ../formatHD/raid_wizard0_sync.asp
		{
			http_request.onreadystatechange = function(){chk_raidsyncs(http_request)};
		}	
		else if( type == 7 )	// ../advanced/prescan.asp
		{
			http_request.onreadystatechange = function(){chk_bar_status(http_request)};
		}
		else if( type == 8 )	// ../advanced/iTunesServ_Refresh.asp
		{
			http_request.onreadystatechange = function(){chk_bar_status(http_request)};
		}
	}
		
	url = url + "&" + Random();
	http_request.open('Post', url, true);
    
  	http_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	http_request.setRequestHeader('Content-Type','text/html');
	http_request.setRequestHeader('Content-Type','charset=UTF-8');
	http_request.setRequestHeader('Pragma','no-cache');
	http_request.setRequestHeader('Cache-Control', 'no-cache');
	http_request.send(send_value);
}

function Random()
{
	Random_value=Math.floor(Math.random()*1000000000000000);
	return Random_value;
} 

//

function emulator(){
	alert("This feature has been disabled on this emulator.")	
}

function refresh(){
	history.go(0)
}