<!-- //
function padlength(what){
	var output=(what.toString().length==1)? "0"+what : what
	return output
}

function displaytime(){
	serverdate.setSeconds(serverdate.getSeconds()+1)	;
	var	timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds());
	document.getElementById("servertime").innerHTML='server time: ' +timestring;	
}

function NRC(e) {
  if (document.layers || document.getElementById && !document.all) {
    if ((e.which == 2 || e.which == 3) && e.target.tagName=="IMG") {
      document.captureEvents(Event.MOUSEDOWN);
      return false;
    }
  } else if (document.all && !document.getElementById) {
    if (event.button == 2 && event.srcElement.tagName=="IMG")
      return false;
  }
}

function NCM () {
  return false;
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  setInterval("displaytime()", 1000)
});

function processGetPost(element_id){	
	var myajax		= ajaxpack.ajaxobj;
	var myfiletype	= ajaxpack.filetype;
	
	if (myajax.readyState == 4){ 			
		if (myajax.status==200 || window.location.href.indexOf("http")==-1) { 			
			if (myfiletype=="txt") {
				var obj = document.getElementById(element_id);				
				obj.src = "/images/image_faction_banner.asp?id=" + myajax.responseText
			}			
		}
	}
}


function updateFactionBanner()
{
	processGetPost('faction_banner');
}

function deleteFactionBanner()
{
}

function ajaxUpdateFactionBanner(bannerid)
{
	ajaxpack.getAjaxRequest("/ajax/update_faction_banner.asp","id=" + bannerid + "&a=update", updateFactionBanner, "txt")		
}
function ajaxDeleteFactionBanner(bannerid)
{
	ajaxpack.getAjaxRequest("/ajax/update_faction_banner.asp","id=" + bannerid + "&a=delete", deleteFactionBanner, "txt")		
}







// -->

