// JavaScript Document
function getXMLHTTP() {
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	
		{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
		}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
					print("there is problem in ur browser");
				}
			}
		}		 	
		return xmlhttp;
	}	
function ajax_show_news(strURL)
	{  
		var req = getXMLHTTP();
		document.getElementById('news').innerHTML='<img style="padding-left:300px; padding-top:50px;" src="../images/ajax-loader.gif" />';	
		if (req) 
		{
			//req.onreadystatechange = processReqChange;
			req.onreadystatechange = function() {
				if (req.readyState == 4) 
				{	// only if "OK"
					if (req.status == 200) 
					    
					{	document.getElementById('news').innerHTML=req.responseText;	
					} 
					else 
					{   alert("There was a problem while using XMLHTTP:\n" + req.statusText);	
					}
				}	
			}			
			req.open("GET",strURL, true);
			req.send(null);	
		}
	}	
function ajax_show_portfolio(strURL)
{   var req = getXMLHTTP();
document.getElementById('showportfolio').innerHTML='<img padding-top:80px;" src="../../images/ajax-loader_portfolio.gif" />';	
		if (req) 
		{	req.onreadystatechange = function() {
				if (req.readyState == 4) 
				{	if (req.status == 200) 
					{ document.getElementById('showportfolio').innerHTML=req.responseText;  } 
					else 
					{ alert("There was a problem while using XMLHTTP:\n" + req.statusText);	}
				}				
			}			
			req.open("GET",strURL, true);
			req.send(null);	
		}	
}

function ajax_show_services(strURL)
{   var req = getXMLHTTP();
    document.getElementById('shownews').innerHTML='<img style="padding-left:300px; padding-top:50px;" src="../../images/ajax-loader.gif" />';	
		if (req) 
		{	req.onreadystatechange = function() {
				if (req.readyState == 4) 
				{	if (req.status == 200) 
					{ document.getElementById('shownews').innerHTML=req.responseText;  } 
					else 
					{ alert("There was a problem while using XMLHTTP:\n" + req.statusText);	}
				}				
			}			
			req.open("GET",strURL, true);
			req.send(null);	
		}	
}

function ajax_show_offshoreit(strURL)
{   var req = getXMLHTTP();
       document.getElementById('showofshoreit').innerHTML='<img style="padding-left:300px; padding-top:50px;" src="../../images/ajax-loader.gif" />';	
	  if (req) 
		{	req.onreadystatechange = function() {
				if (req.readyState == 4) 
				{	if (req.status == 200) 
					{ document.getElementById('showofshoreit').innerHTML=req.responseText;  } 
					else 
					{ alert("There was a problem while using XMLHTTP:\n" + req.statusText);	}
				}				
			}			
			req.open("GET",strURL, true);
			req.send(null);	
		}	
}