//generic AJAX func
function myAIAS (location, handl, args, postString ) {

	var httphandler = false;

    //initialize HTTP obj
    /*@cc_on @*/
   	/*@if (@_jscript_version >= 5)
    // JScript gives us Conditional compilation, we can cope with old IE versions.
   	// and security blocked creation of the objects.
    try {
   	 httphandler = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
   	  try {
      	httphandler = new ActiveXObject("Microsoft.XMLHTTP");
     	} catch (E) {
         httphandler = false;
     	}
   	}
   	@end @*/
   
   	if (!httphandler && typeof XMLHttpRequest!='undefined')
       	httphandler = new XMLHttpRequest();
   	
	
	if ( postString ) httphandler.open( 'POST', location, true );

	else {
				
		httphandler.open( 'GET', location, true );		
	}
	
	
	httphandler.onreadystatechange = function () {
   		
		if ( httphandler.readyState == 4 )	{
   			
   			//removeDarkLayer ();
   			//removeHourGlass ();
   			document.getElementsByTagName ( "body" )[0].style.cursor="default";
   			
   			if ( handl ) handl ( httphandler, args );
  		}
  		
  		if ( httphandler.readyState == 1 )	{
  			
  			document.getElementsByTagName ( "body" )[0].style.cursor="wait";
  			//showHourGlass ();
  		}
   	};
   	
	httphandler.setRequestHeader("Cache-Control", "no-cache");
	
	if ( postString ) {

		httphandler.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      	httphandler.setRequestHeader("Connection", "close");
		httphandler.setRequestHeader("content-length", postString.length);
		httphandler.send (postString);	
	}
	
	else { 
		
		httphandler.setRequestHeader("content-length", 0);
		httphandler.send ( "" );
	}
	
	
}


