//22.12.2010
/*var AXS_SITE_ROOT='/';
var AXS_PATH_CMS='/axiscms/';
var AXS_PATH_EXT='/admin/';*/
function axs(global_name){
this.global_name=global_name;
window[this.global_name]=this;
var THIS=this;
this.SITE_ROOT='/';
this.PATH_CMS='/axiscms/';
this.PATH_EXT='/admin/';
var e=document.getElementsByTagName('html')[0];//
if (e) { e.className=(e.className) ? e.className+' javascript':'javascript'; }
this.add_event=function(obj,type,fn){//add_event function from http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html
if (obj.addEventListener) obj.addEventListener(type,fn,false);
else if (obj.attachEvent) {
obj["e"+type+fn]=fn;
obj[type+fn]=function() { obj["e"+type+fn](window.event); }
obj.attachEvent("on"+type,obj[type+fn]);
}
}//
this.get=function(key, query_string){
if (!query_string) query_string=window.location.href.slice(window.location.href.indexOf('?')+1).split('&');
var vars=[],hash;
for(var i=0; i
this.links_action=function() {//
var links=document.getElementsByTagName('a');
for (var i=0; i
this.window_open=function() { //Create the new window
// Change "_blank" to something like "newWindow" to load all links in the same new window
this.window_open_ref=window.open(this.getAttribute('href'), '_blank');
this.window_open_ref.focus();
return false;
}//
this.window_popup=function() {
//Change "_blank" to something like "newWindow" to load all links in the same new window
this.window_popup_ref=window.open(this.getAttribute('href'), 'axs_popup', 'scrollbars=1,location=0,resizable=1,toolbar=0,status=1,width=750,height=500,top=50,left=40');
this.window_popup_ref.focus();
return false;
}//
this.window_resize=function(pad_t, pad_r, pad_b, pad_l, max_width) { //top, right, bottom, left
if (window.name!='axs_popup') return;
if (pad_l==0) pad_l=pad_r;
if (pad_b==0) pad_b=pad_t;
window.moveTo(pad_l, pad_t);
var w=screen.width-(pad_l+pad_r);
if (max_width>0) { if (w>max_width) w=max_width; }
window.resizeTo(w, screen.height-(pad_t+pad_b));
}//
this.add_event(window, 'load', window[this.global_name].links_action);
}//
axs('axs');
//23.01.2009