var effect_flag=0;  	
var mpshw=0;
function requestMake(url) {
         var http_request =false;
        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            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;
        }
        http_request.onreadystatechange= function () {alertContents(http_request)}; 
        http_request.open('GET', url, true);
        http_request.send(null);

    }

  function alertContents(http_request) {
        if (http_request.readyState == 4) 
			{	  
				respnse=http_request.responseText
				//document.getElementById('imgid').style.display="none";
			    cont(respnse);
				
			}
	   }
	   
	var container;
	 
  function cont(content){
		
	container=document.getElementById('divid');
		container.innerHTML=content;
	
	//shwdiv('show');
	
	}
  function shwdiv(flg,url,fl) // For Mailbox
  {
			var st;
			st="";
			if(navigator.userAgent.indexOf("Firefox")!=-1){
			// Keep the code for Firefox
			st=st + "Firefox";
			}
			else if (navigator.appName.indexOf("Internet Explorer")!=-1){
			st=st + "Internet Explorer";
			// Keep the code for Internet Explorer
			}
			else if(navigator.userAgent.indexOf("Opera")!=-1){
			st=st + "Opera";
			// Keep the code for Opera
			}
			else if(navigator.userAgent.indexOf("Netscape")!=-1){
			st=st + "Netscape";
			// Keep the code for Netscape Browser
			}
			else if(navigator.userAgent.indexOf("Mozilla")!=-1){
			st=st + "Mozilla";
			// Keep the code for  Mozilla
			}
  
		distanceFlag=fl;
		var imghtml="";
		container=document.getElementById('divid');
		if(flg=="show" && effect_flag==0){
			if(distanceFlag==1){
				imghtml='<img src="images/loading.gif" id="imgid" style="padding-left:105px;padding-top:80px;" />';
				sh(container);
			}
	  		else{
		  		document.getElementById('divCont').style.left="215px";
		  		document.getElementById('divCont').style.top="200px";
				container.style.width="576px";
				container.style.height="220px";
				container.style.overflow="auto";
				imghtml='<img src="images/loading.gif" id="imgid" style="padding-left:205px;padding-top:80px;" />';
	 		}
			if(st=="Internet Explorer" || st=="Netscape" || st=="Mozilla")
 				$(container).BlindDown();
			if(st=="Firefox")
 				$(container).DropIn();
			effect_flag=1;	
			container.innerHTML=imghtml;//img 
			//setTimeout('requestMake("'+url+'")',1000);
			requestMake(url);
		}
		if(flg=="hide" && effect_flag==1){
			if(st=="Internet Explorer")
 				$(container).BlindUp();
			if(st=="Firefox" || st=="Netscape" || st=="Mozilla")
 				$(container).DropOut();
			effect_flag=0;	
			
		}
	}
	 
  function sh(obj) // For Location Setting
  {

	var divC=document.getElementById('divCont');
	var scrolly = typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement.scrollTop;
    var scrollx = typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement.scrollLeft;
	
	var innerWidth=document.documentElement.clientWidth;
	var innerHeight=document.documentElement.clientHeight;
	
	obj.style.width="280px";
	obj.style.height="162px";
	divC.style.left=parseInt(scrollx)+195+"px";	 
	divC.style.top=parseInt(scrolly)+40+"px";
	
}
 
 function shwmap()
 {
	 
	 
 }
