/*function popupWin(fileName, windowName, winWidth, winHeight) {*/
function popupWin() {
  /* var nn4 = (document.layers)? true : false;
   var ie4 = (document.all)? true : false;
   var nn6 = (document.getElementById && !ie4)? true : false;
   if (nn4 || ie4 || nn6) {
      posX = Math.round((screen.width - winWidth) / 2);
	  posY = Math.round((screen.height - winHeight) / 2);
	  posCode = (nn4 || nn6)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
	  } 
   else {
      posCode = "";
	}
	newWindow = window.open(fileName,windowName,'menubar=no,toolbar=no,scrollbars=yes,status=yes,width='+winWidth+',height='+winHeight+','+posCode);
	newWindow.focus();*/
	alert('ZZZZ');
}

function buy(blog_id) {
    var strURL='/buy/index.php';
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText, blog_id);
        }
    }
   self.xmlHttpReq.send('blog_id='+blog_id);
}

function updatepage(str){
    document.getElementById("map").innerHTML = str;
}

function move(direction, menu_id) {
    var strURL='/admin/move/menu.php';
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
   self.xmlHttpReq.send('menu_id='+menu_id+'&direction='+direction);
}
				