//27.10.2012
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=false;
var tmp;
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.cookie_del=function(name,path,domain){
if (this.ookie_get(name)) this.ookie_set(name,"",-1,path,domain);
}//
this.cookie_get=function(name){
var regexp=new RegExp("(?:^"+name+"|;\\s*"+name+")=(.*?)(?:;|$)","g");
var result=regexp.exec(document.cookie);
return (result===null) ? null:result[1];
}//
this.cookie_set=function(name,value,expires,path,domain){
var cookie=name+"="+escape(value)+";";
if (expires){//
if(expires instanceof Date) { if (isNaN(expires.getTime())) expires=new Date(); }//
else expires=new Date(new Date().getTime()+parseInt(expires)*1000*60*60*24);
cookie+="expires="+expires.toGMTString()+";";
}
if (path) cookie+="path="+path+";";
if (domain) cookie+="domain="+domain+";";
document.cookie=cookie;
}//
this.get=function(key,query_string){
if (!query_string) query_string=window.location.href;
if (query_string.search(/\?/)) query_string=query_string.slice(query_string.indexOf('?')+1);
query_string=query_string.split('&');
var vars=[],hash;
for(var i=0; i
this.jquery_init=function(load){//
if (typeof($)!='function'){
var el=document.createElement('script');
el.type="text/javascript";
el.src="?popup=jquery.js";
document.getElementsByTagName('head')[0].appendChild(el);
}
}//
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
var resize=true;
if (
(!window.toolbar || !window.menubar) && //
(!window.toolbar.visible || !window.menubar.visible)
) resize=false;
if (window.name=='axs_popup') resize=true;
if (!resize) 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);
//
this.screen_min=0;
var class_name=document.getElementsByTagName('html')[0].className;
if (/\bscreen_min-[0-9]+\b/.exec(class_name)){
var screen_min=parseInt(class_name.match(/\bscreen_min-[0-9]+\b/)[0].replace(/[^0-9]*/, ''));
if (screen.width*/
}//
axs('axs');
//23.01.2009