var mainHttp;

function showMap() {
myRef = window.open('gmapview.jsp','mywin','left=20,top=20,width=1500,height=800,toolbar=1,resizable=0');
}

function showUser(str) { 
//alert (str);
if(str =='refresh') {
document.getElementById("ajaxRefresh").style.display='none';
document.getElementById("ajaxLoader").style.display='';

mainHttp=GetXmlHttpObject();
if (mainHttp==null) {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="followers.jsp";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
mainHttp.onreadystatechange=function() { 
if (mainHttp.readyState==4 || mainHttp.readyState=="complete") { 
//alert (mainHttp.responseText);
document.getElementById("ajaxLoader").style.display='none';
 document.getElementById("ajaxRefresh").style.display='';
 document.getElementById("ajaxRefresh").innerHTML=mainHttp.responseText;
 } 
}
mainHttp.open("GET",url,true);
mainHttp.send(null);

}else if(str =='vote') {
document.getElementById("ajaxRefresh").style.display='none';
document.getElementById("ajaxLoader").style.display='none';
document.getElementById("ajaxLoader").style.display='';
mainHttp=GetXmlHttpObject();
if (mainHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="setcookie.jsp";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
mainHttp.onreadystatechange=function() { 
if (mainHttp.readyState==4 || mainHttp.readyState=="complete") { 
 document.getElementById("ajaxLoader").style.display='none';
 document.getElementById("ajaxRefresh").style.display='';
 document.getElementById("ajaxRefresh").innerHTML=mainHttp.responseText;
 } 
}
mainHttp.open("GET",url,true);
mainHttp.send(null);
}else{
document.getElementById("ajaxRefresh").style.display='none';
document.getElementById("ajaxLoader").style.display='';
mainHttp=GetXmlHttpObject();

var url = "followers.jsp?page="+str;
mainHttp.onreadystatechange = function() {
if(mainHttp.readyState == 4) {
 document.getElementById("ajaxLoader").style.display='none';
 document.getElementById("ajaxRefresh").style.display='';
 document.getElementById("ajaxRefresh").innerHTML= mainHttp.responseText;
}
}
mainHttp.open("GET",url,true);
mainHttp.send(null);
}

}

function GetXmlHttpObject() {
var mainHttp=null;
try {
 // Firefox, Opera 8.0+, Safari
 mainHttp=new XMLHttpRequest();
 }
catch (e) {
 //Internet Explorer
 try  {
  mainHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)  {
  mainHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return mainHttp;
}