function preload(){
	image0 = new Image(); image0.src = "files/wait.jpg";
	image1 = new Image(); image1.src = "files/newstyle/arrowr.jpg";
	image2 = new Image(); image2.src = "files/newstyle/arrowt.jpg";
	image3 = new Image(); image3.src = "files/newstyle/arrowl.jpg";

}

function showimage(str){
		var url="popup.php";
		url=url+"?q="+str;
		popup_window = window.open(url,"","status,scrollbars,resizable=yes");
		}

function ajax(url,place)
{
	setTimeout ( "Effect.Fade('"+place+"', {duration:0.2})", 0 );
	setTimeout ( "ajaxx('"+url+"','"+place+"','')", 200 );
	setTimeout ( "Effect.Appear('"+place+"', {duration:0.2})", 600 );
}

function ajaxx(url, str){
document.getElementById(str).innerHTML="<center><img src=\"files/wait.gif\"></center>";
	var url = "modules/"+url;
  	var xhr; 
    	try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    		catch (e) 
    		{
        		try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');
		}
		catch (e2) 
        	{
	          	try {  xhr = new XMLHttpRequest();
		}
          	catch (e3)
		{
			xhr = false;
		}
       	}
}
  
    	xhr.onreadystatechange  = function()
    	{

		
         	if(xhr.readyState  == 4)
         	{
			document.getElementById(str).innerHTML="wait...";
              	if(xhr.status  == 200) 
				document.getElementById(str).innerHTML=xhr.responseText; 
              	else 
				document.getElementById(str).innerHTML="Error " + xhr.status;
         }
    }; 

   xhr.open("GET", url,  true); 
   xhr.send(null); 
} 