/**
 * write by flymz 
 * for ajax
 * if someone and function in here,do not write Chinese Language
 *  */
var XMLHttpReq=false;
function createXMLHttpRequest(){
	if(window.XMLHttpRequest){
		XMLHttpReq=new XMLHttpRequest();
	}else if(window.ActiveXObject){
		try{
			XMLHttpReq=new ActiveXObject("Msxml2.XMLHTTP");
			}catch(e){
				try{
					XMLHttpReq=new ActiveXObject("Microsoft.XMLHTTP");
					}catch(e){}
          }
         }
}
function send(url){
	createXMLHttpRequest();
	XMLHttpReq.open("get",url,true);
	XMLHttpReq.onreadystatechange=proce;
	XMLHttpReq.send(null);
}
function proce(){
  if(XMLHttpReq.readyState==4){	
  	if(XMLHttpReq.status==200){
  		}else{
  			// window.alert("wrong with the page");
  		}
  }
}

function goToAndCount(basePath,locat,ggid){
send(basePath+'gggls.do?method=countdjs&ggid='+ggid); 
var locatopen = locat.replace('http://www.eduji.com/',basePath);
locatopen = locatopen.replace('http://124.115.16.208:80/eduji/',basePath);
locatopen = locatopen.replace('http://124.115.16.208:80/',basePath);
locatopen = locatopen.replace('http://124.115.16.208/eduji/',basePath);
locatopen = locatopen.replace('http://124.115.16.208/',basePath);
window.open(locatopen);
}
function goToAndCountThis(locat,ggid){
	//http://www.100class.com:80        http://10.10.10.163:800/100class
send('http://www.100class.com:80/gggls.do?method=countdjs&ggid='+ggid); 
window.open(locat);
}
