var login_form = 'no';
function login_div(){

 obj = document.getElementById('login_box'); 

   if(login_form == 'no'){       
      obj.style.display = 'block';
      login_form = 'yes';
      document.forms['loginform'].login.focus();
   } else {
      obj.style.display = 'none';
      login_form = 'no';
   }
   return false;
}

function ch_index(obj_id,zindex){
   obj = document.getElementById(obj_id);
   obj.style.zIndex = zindex;
}

function confirm_form(Query){
    
    var is_confirmed = confirm(Query);
    if (is_confirmed) {
    	return true;        
    }
    return false;
} 

function main_vote(post_id,type){
	num = vote_obj.ajax_vote(post_id,type);
	return false;
}

function small_vote(post_id,type){

	num = vote_obj.ajax_small_vote(post_id,type);
	return false;
}

function login_validate(){
    var formData = xoad.html.exportForm('loginData');
    return user_validate.ajax_login(formData);    
}
function popup(url, width, height)
{
  wx = (screen.availWidth - width)/2;
  wy = (screen.availHeight - height)/2;

  return window.open(url, "_blank", "width="+width+",height="+height+",status=no,resizable=0,scrollbars=1,toolbar=no,menubar=no,left="+wx+",top="+wy);
}

function popupr(url, width, height)
{
  wx = (screen.availWidth - width)/2;
  wy = (screen.availHeight - height)/2;

  return window.open(url, "_blank", "width="+width+",height="+height+",status=no,resizable=1,scrollbars=1,toolbar=no,menubar=no,left="+wx+",top="+wy);
}

function id_showsave(id){
	save_obj = document.getElementById(id); 
	save_obj.disabled = true;
};
function id_hidesave(id){
	save_obj = document.getElementById(id); 
	save_obj.disabled = false;
};
