/*
 * @(#)ajax_web_v1.3.js 1.0 17-10-2007
 *
 * Copyright (c) 2007-2008 KESDEE Systems(India) PVT. LTD.
 * # 6, 3rd floor,Esteem Regency, Richmond road, Bangalore, India
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of KESDEE Systems(India) PVT. LTD.
 * ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with KESDEE.
 */
 
 /**
*   THIS FILE WAS MOIFIED ON 17-10-2007
*	Functionality : This file is used to display div page
*     
*	@File name	: 	ajax_web_v1.3.js
*	@Author		:	Arjun.S
*	@Version	:	1.0   
*	@Date		:	17-10-2007
*/ 
var xmlHttpContent
var divNameContent
var xmlHttpMenu
var divNameMenu

function displayPageMenu(url,curdiv)
{
 divNameMenu = curdiv;
document.getElementById(divNameMenu).innerHTML = "<strong>Please wait...</strong>";
xmlHttpMenu=GetXmlHttpObject(stateChangedMenu)
xmlHttpMenu.open("GET", url , true)
xmlHttpMenu.send(null)
} 


function stateChangedMenu() 
{ 
if (xmlHttpMenu.readyState==4 || xmlHttpMenu.readyState=="complete")
{ 
//alert("got the response "+xmlHttp.responseText);
document.getElementById(divNameMenu).innerHTML=xmlHttpMenu.responseText 

} 
} 

function displayPageContent(url,curdiv)
{
divNameContent = curdiv;
document.getElementById(divNameContent).innerHTML = "<strong>Please wait...</strong>";
xmlHttpContent=GetXmlHttpObject(stateChangedContent)
xmlHttpContent.open("GET", url , true)
xmlHttpContent.send(null)
} 


function stateChangedContent() 
{ 
if (xmlHttpContent.readyState==4 || xmlHttpContent.readyState=="complete"){ 
//alert("got the response "+xmlHttp.responseText);
document.getElementById(divNameContent).innerHTML=xmlHttpContent.responseText 

} 
} 
function dummy(){
}

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP"
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP"
} 
try
{ 
objXmlHttp=new ActiveXObject(strName)
objXmlHttp.onreadystatechange=handler 
return objXmlHttp
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled") 
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest()
objXmlHttp.onload=handler
objXmlHttp.onerror=handler 
return objXmlHttp
}
} 
