function articleUpd(id,page,classId,categoryId){
  openWin("articleUpd.asp?id="+id+"&page="+page+"&classId="+classId+"&categoryId="+categoryId,"Article",700,520);
}

function articleDel(id,page,classId,categoryId){
  if(confirm("È·¶¨É¾³ý?")){
    location.href="articlesAdm.asp?action=delete&id="+id+"&page="+page+"&classId="+classId+"&categoryId="+categoryId;
  }
}

function userUpd(id){
  openWindow("userUpd.asp?id="+id,"User",400,300);
}

function userDel(id){
  if(confirm("È·¶¨É¾³ý£¿")){
    location.href="userAdm.asp?action=delete&id="+id;
  }
}

function openWindow(url,title,w,h){
  var winX = screen.availWidth/2-w/2;
  var winY= screen.availHeight/2-h/2;
  newWin=window.open(url,title,"left="+winX+",top="+winY+",width="+w+",height="+h+",toolbar=no,status=no,scrollbars=no,resizable=no");
  newWin.focus();
}

function openWin(url,title,w,h){
  var winX = screen.availWidth/2-w/2;
  var winY= screen.availHeight/2-h/2;
  newWin=window.open(url,title,"left="+winX+",top="+winY+",width="+w+",height="+h+",toolbar=no,status=no,scrollbars=yes,resizable=no");
  newWin.focus();
}

function redirect(url){
  window.location.href=url;
}

function isInteger(str) {
  var i
  for (i = 0; i < str.length; i++) {
	mychar = str.charAt(i)
	if (mychar < "0" || mychar > "9") return false
  }
  return true
}


function saveProdImg(id){
  window.location.href="imgsave.asp?id="+id;
}

 function changeEdit(option) {
   if(option==6||option==7){
     document.getElementById("outline").style.display = "";
   }
   else{
     document.getElementById("outline").style.display = "none";
   }
}