

/**
 * addEvent & removeEvent -- cross-browser event handling
 * Copyright (C) 2006-2007  Dao Gottwald
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * Contact information:
 *   Dao Gottwald  <dao at design-noir.de>
 *
 * @version  1.2.1
 */

function addEvent_1(o, type, fn) {
  o.addEventListener(type, fn, false);
}
function removeEvent_1(o, type, fn) {
  o.removeEventListener(type, fn, false);
}
/*@cc_on if (!window.addEventListener) {
  var addEvent_1 = function (o, type, fn) {
    if (!o._events) o._events = {};
    var queue = o._events[type];
    if (!queue) {
      o._events[type] = [fn];
      if (!o._events._callback)
        o._events._callback = function (e) { Event._callListeners(e, o) };
      o.attachEvent("on" + type, o._events._callback);
    } else if (Event._fnIndex(o, type, fn) == -1)
      queue.push(fn);
    else return;
    Event._mem.push([o, type, fn]);
  };
  var removeEvent = function (o, type, fn) {
    var i = Event._fnIndex(o, type, fn);
    if (i < 0) return;
    var queue = o._events[type];
    if (queue.calling) {
      delete queue[i];
      if (queue.removeListeners)
        queue.removeListeners.push(i);
      else
        queue.removeListeners = [i];
    } else
      if (queue.length == 1)
        Event._detach(o, type);
      else
        queue.splice(i, 1);
  };
  var Event = {
    AT_TARGET: 2,
    BUBBLING_PHASE: 3,
    stopPropagation: function () { this.cancelBubble = true },
    preventDefault: function () { this.returnValue = false },
    _mem: [],
    _callListeners: function (e, o) {
      e.stopPropagation = this.stopPropagation;
      e.preventDefault = this.preventDefault;
      e.currentTarget = o;
      e.target = e.srcElement;
      e.eventPhase = e.currentTarget == e.target ? this.AT_TARGET : this.BUBBLING_PHASE;
      switch (e.type) {
        case "mouseover":
          e.relatedTarget = e.fromElement;
          break;
        case "mouseout":
          e.relatedTarget = e.toElement;
      }
      var queue = o._events[e.type];
      queue.calling = true;
      for (var i = 0, l = queue.length; i < l; i++)
        if (queue[i])
          if ("handleEvent" in queue[i])
            queue[i].handleEvent(e);
          else
            queue[i].call(o,e);
      queue.calling = null;
      if (!queue.removeListeners)
        return;
      if (queue.length == queue.removeListeners.length) {
        this._detach(o, e.type);
        return;
      }
      queue.removeListeners = queue.removeListeners.sort(function(a,b){return a-b});
      var i = queue.removeListeners.length;
      while (i--)
        queue.splice(queue.removeListeners[i], 1);
      if (queue.length == 0)
        this._detach(o, e.type);
      else
        queue.removeListeners = null;
    },
    _detach: function (o, type) {
      o.detachEvent("on" + type, o._events._callback);
      delete o._events[type];
    },
    _fnIndex: function (o, type, fn) {
      var queue = o._events[type];
      if (queue)
        for (var i = 0, l = queue.length; i < l; i++)
          if (queue[i] == fn)
            return i;
      return -1;
    },
    _cleanup: function () {
      for (var m, i = 0; m = Event._mem[i]; i++)
        if (m[1] != "unload" || m[2] == Event._cleanup)
          removeEvent(m[0], m[1], m[2]);
    }
  };
  addEvent_1(window, "unload", Event._cleanup);
} @*/

var land = {
	init: function() {
		var land = document.getElementById("land");
		// console.log(land);
		if (land) {
			addEvent_1(land, "change", this);
		}
	},
	handleEvent: function (event) {
		switch (event.type) {
			case "load":
				this.init();
				break;
			case "change":
				request_select("bundesland", event.target.value);
				if (document.getElementById("grossraum"))
				{
					document.getElementById("grossraum").options.length = null;
				}
				break;
		}
	}
};
addEvent_1(window, "load", land);

var bundesland = {
	init: function() {
		var bundesland = document.getElementById("bundesland");
		if (bundesland) {
			addEvent_1(bundesland, "change", this);
		}
	},
	handleEvent: function (event) {
		switch (event.type) {
			case "load":
				this.init();
				break;
			case "change":
				if (document.getElementById("grossraum"))
				{
					request_select("grossraum", event.target.value);
				}
				break;
		}
	}
};
addEvent_1(window, "load", bundesland);

var studienrichtung = {
	init: function() {
		var studienrichtung = document.getElementById("studienrichtung");
		if (studienrichtung) {
			addEvent_1(studienrichtung, "change", this);
		}
	},
	handleEvent: function (event) {
		switch (event.type) {
			case "load":
				this.init();
				break;
			case "change":
				if (document.getElementById("studiengang")) {
					request_select("studiengang", event.target.value);
				}
				break;
		}
	}
};
addEvent_1(window, "load", studienrichtung);

function request_select(action, value) {
	var xmlhttp = new XMLHttpRequest();
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var response = xmlhttp.responseXML;
			
			var value = response.getElementsByTagName("id");
			var text = response.getElementsByTagName("text");
			if (value.length == text.length) {
				var options = document.getElementById(action).options;
				options.length = null;
				
				for (var i = 0; i < value.length; i++) {
					options[i] = new Option(text[i].firstChild.nodeValue, value[i].firstChild.nodeValue);
				}
			}
		}
	}
	var poststr = 'value='+value;
	
	xmlhttp.open("POST", "/admin/ajax/"+action+".php", true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Content-length", poststr.length);
	xmlhttp.send(poststr);
}

// TODO - nach erfolgreicher umstellung von GET auf POST entfernen
function request2(action, value) {
	var xmlhttp = new XMLHttpRequest();
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var response = xmlhttp.responseXML;
			
			var value = response.getElementsByTagName("id");
			var text = response.getElementsByTagName("text");
			if (value.length == text.length) {
				var options = document.getElementById(action).options;
				options.length = null;
				
				for (var i = 0; i < value.length; i++) {
					options[i] = new Option(text[i].firstChild.nodeValue, value[i].firstChild.nodeValue);
				}
			}
		}
	}
	
	xmlhttp.open("GET", "/admin/ajax/"+action+".php?value=" + value, true);
	xmlhttp.send(null);
}

/**
 * Funktionen, die beim Laden der Seite ausgeführt werden
 */

/**
 * Pfad für die GreyBox
 */
var GB_ROOT_DIR  = "/scripts/greybox/";

/**
 * Pfade für die AnzeigeBox
 */
var PRAKTIKA_BOX_ROOT_DIR  = "/scripts/praktika_box/";
var PRAKTIKA_BOX_IMAGE_DIR = "/gifs/praktika_box/"; 


function jscss(action, object, c1, c2) {
	switch (action) {
		case 'swap':
			object.className = !jscss('check', object, c1)
			? object.className.replace(c2,c1)
			: object.className.replace(c1,c2);
		break;
		case 'add':
			if(!jscss('check',object,c1)) {
				object.className += object.className ? ' '+c1 : c1;
			}
		break;
		case 'remove':
			var rep = object.className.match(' '+c1) ? ' '+c1 : c1;
			object.className = object.className.replace(rep, '');
		break;
		case 'check':
			return new RegExp('\\b'+c1+'\\b').test(object.className)
		break;
	}
}

function clearInput(object) {
	object.value = "";
}

function fillInput(object, text) {
	object.value = (object.value == "" && text) ? text : object.value;
}

// Homeseite praktika, Pulldown Menü
function Go(x) {
	if (x == 'nothing') {
		document.forms[0].reset();
		document.forms[0].elements[0].blur();
		return;
	} else {
		document.location.href = x;
		document.forms[0].reset();
		document.forms[0].elements[0].blur();
	}
}

function Describe() {
	// alert("Bitte Funktion 'Describe' entfernen!");
}

function Stellenausschreibungbasis() {
	if (document.Auswahl.imageanzeigentyp[0].checked == true) {
		location.replace(document.loaction + '?image=true');
	} else if (document.Auswahl.imageanzeigentyp[1].checked == true) {
		location.replace('/home/firmen/commerce/mitgliedschaft/standard/buchen.phtml?pid=15');
	} else { 	 
		alert('Bitte w&auml;hlen Sie mindestens eine Möglichkeit aus.');
		return false;
	}
}
function stelle(url) {
	secwin = window.open(url, "Stellenanzeige", "titelbar=yes,width=770,height=700,screenX=20,screenY=20,left=20,top=20,scrollbars=yes,status=no,menubar=no,location=no,toolbar=no,resizable=yes,hotkeys,resizeable,scrollbars,dependent=no");
    secwin.moveTo(20, 20);
    secwin.focus();
    return false;	
}

function include_track(script_filename) {
	document.write("<" + "script");
	document.write(" language='javascript'");
	document.write(" type='text/javascript'");
	document.write(" src='" + script_filename + "'>");
	document.write("</" + "script" + ">");
}




// MicroAjax -> xhr('rpc.php', 'foo=bar&answer=42', function(text){alert(text)}) (http://pastie.org/52045)
var xmlRequest=null;var xmlRequestID = "";var xmlRequestFkt = ""; var xmlRequestUrl = ""; function xhr(j,a,n,syn){var w=window,r=w.XMLHttpRequest?new XMLHttpRequest():(w.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):0)
if(r){r.onreadystatechange=function(){ if (n != undefined) {
	r.readyState == 4 ? n(r.responseText, r.responseXML) : 0
}}
asyn = (syn==true?0:1);
r.open('POST',j,asyn);
xmlRequestUrl = j;
r.setRequestHeader('Content-type','application/x-www-form-urlencoded; charset=utf-8');
r.setRequestHeader('X-Requested-With','XMLHttpRequest');
if(r.overrideMimeType)r.setRequestHeader('Connection','close');
r.send(a)};return r;}
function initRequest() {
	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		searchHTTP = new XMLHttpRequest();
		if (searchHTTP.overrideMimeType) {
			// set type accordingly to anticipated content type
			//searchHTTP.overrideMimeType('text/xml');
			searchHTTP.overrideMimeType('text/html');
		}
	} else if (window.ActiveXObject) { // IE
		try {
			searchHTTP = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				searchHTTP = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) { }
		}
	}
	if (!searchHTTP) {
		alert('Es konnte mit diesem Browser keine Verbindung aufgebaut werden.');
		return false;
	}
}

function evalScripts(text){
	var A="";
	var C = text.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, function() {
		A += arguments[1] + "\n";
		return "";
	});

	$exec(A);

	return true;
}

function $exec(B){
	if(!B){
		return B;
	}
	
	
	if(window.execScript){
		
		window.execScript(B);
	} else {
		var A=document.createElement("script");
		A.setAttribute("type","text/javascript");
		
		A.innerHTML = B;
		
		document.body.appendChild(A);
		document.body.removeChild(A);
	}
	return B;
}


function containerLoadContent(url, parameter, id, icon, readyFkt, options) {
	if(document.body != undefined) {
		document.body.style.cursor = "wait";
	}
	if(icon == true) {
		$(id).innerHTML = "<div style='height:600px;'><center><img src='/styles/images/greybox/waitingflower.gif' alt='Laden' title='Laden' /></center></div>";
	} else if(icon !== false && icon != undefined) {
		$(icon).style.display='';
	}
	
	// cssNachladen();
	if(xmlRequest != null) return false;
	xmlRequest = initRequest();
	xmlRequestID = id;
	if(readyFkt != undefined) {
		xmlRequestFkt = readyFkt;
	} else {
		xmlRequestFkt = undefined;
	}
	
	if(options == undefined) {
		options = new Array();
	}
	if(options.trackUrl == undefined) {
		options.trackUrl = url;
	}
	
	xmlRequest = xhr(url, parameter, function(text) {
			
			if(text == "login") { window.location.reload(); return; } 
			if(pageTracker != undefined) { 
				pageTracker._trackPageview(this.trackUrl); 
			} 
			
			if(document.body != undefined) { document.body.style.cursor="default"; } 
			
			if(document.getElementById(xmlRequestID) != undefined) { 
				
				if (this.cutBody_Post == true) {
					posA = text.indexOf("<body");
					posB = text.indexOf("</body>");
					
					if(posA != -1) {
						textHTML = text.substr(posA, posB - posA); 
					} else {
						textHTML = text;
					}
					
				} else {
					textHTML = text;
				}
				
				document.getElementById(xmlRequestID).innerHTML = textHTML;
				
				if (this.icon != undefined && $(this.icon) != undefined && this.icon != true) {
					// console.log(this.icon);
					$(this.icon).style.display = 'none';
				}
				
				url = xmlRequestUrl.split("/");
				url = url[url.length-1].split(".");
				url=url[0];
				
				if(window.location.protocol=='http:') {
					var IVW = window.location.protocol+"//praktika.ivwbox.de/cgi-bin/ivw/CP/" + url + ";LoggedIn";
					document.getElementById(xmlRequestID).innerHTML = document.getElementById(xmlRequestID).innerHTML + "<img src=\""+IVW+"?r="+escape(document.referrer)+"&d="+(Math.random()*100000)+"\" width=\"1\" height=\"1\" alt=\"\" align=\"left\" />";
				}			
			}
			xmlRequest = null;
			
			if(xmlRequestFkt != undefined) {
				xmlRequestFkt(text);
			}
			 
			evalScripts(text);
			
	}.bind({
		icon: icon,
		trackUrl: options.trackUrl,
		cutBody_Post: options.cutBody_Post
	}));
}

/**
 * Gibt Element zu vorhandener ID, oder Array von IDs
 */
function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}
function hasClass(ele,cls) {
	return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}
 
function addClass(ele,cls) {
	if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}
 
function removeClass(ele,cls) {
	if (hasClass(ele,cls)) {
    	var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
		ele.className=ele.className.replace(reg,' ');
	}
}

Function.prototype.bind = function(obj) { 
  var method = this, 
   temp = function() { 
    return method.apply(obj, arguments); 
   }; 
  
  return temp; 
}

// JSON-Klasse  -> http://www.json.org/json2.js
if(!this.JSON){JSON={}}(function(){function f(n){return n<10?'0'+n:n}if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(a){return this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z'};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()}}var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(b){escapable.lastIndex=0;return escapable.test(b)?'"'+b.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}function str(a,b){var i,k,v,length,mind=gap,partial,value=b[a];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(a)}if(typeof rep==='function'){value=rep.call(b,a,value)}switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null'}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null'}v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v}if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v}}if(typeof JSON.stringify!=='function'){JSON.stringify=function(a,b,c){var i;gap='';indent='';if(typeof c==='number'){for(i=0;i<c;i+=1){indent+=' '}}else if(typeof c==='string'){indent=c}rep=b;if(b&&typeof b!=='function'&&(typeof b!=='object'||typeof b.length!=='number')){throw new Error('JSON.stringify');}return str('',{'':a})}}  if(typeof JSON.parse!=='function'){ JSON.parse=function(c,d){var j;function walk(a,b){var k,v,value=a[b];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return d.call(a,b,value)}e.lastIndex=0;if(e.test(c)){c=c.replace(e,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+c+')');return typeof d==='function'?walk({'':j},''):j}throw new SyntaxError('JSON.parse');}}}());

function checkBrowser(name){   
   var agent = navigator.userAgent.toLowerCase();   
   if (agent.indexOf(name.toLowerCase())>-1) {   
     return true;   
   }   
   return false;   
 }   

 
  
var tools = {
	removeDubletten:function(a1) {
	   var a2 = new Array();
	   var a3 = new Array();
	   for(var i = 0; i < a1.length; i++)
	    {
	     if(typeof(a2[a1[i]]) == "undefined")
	      {
	       a2[a1[i]] = true;
	       a3[a3.length] = a1[i];
	      }
	    }
	   var a4 = new Array();
	   for(var i = 0; i < a3.length; i++){a4[a4.length] = a3[i]}
	   return a4;
	}
};

var autoCompleter = {
	url:"",
	ele:"",
	ac_ele:"",
	searchWord:"",
	_cache:{},
	_cacheLines:{},
	_callback:{},
	_switchOff:false,
	_selectedLine:0,
	_countLines:0,
	_eleSelector:0,
	_enter:0,
	use:function(value) {
		autoCompleter.ac_ele.style.display = "none";

		if(this._callback != undefined) {
			this._callback(value);
		} else {
			this.ele.value = value
		}
	},
	parse:function(values) {
		if(checkBrowser('MSIE') == true) return;
		
		values = tools.removeDubletten(values);
		var html = "";
		this._countLines = values.length;
		
		for(a = 0; a < values.length; a++) {
			html += "<span class='row' id='Ac_Row_" + (a + 1) + "' onclick='autoCompleter.use(\"" + values[a] + "\");'>" + values[a].replace(this.searchWord, "<b>"+this.searchWord+"</b>") + "</span>";
		}
		
		this._cache[this.searchWord] = html;
		this._cacheLines[this.searchWord] = values.length; 
		
		this.ac_ele.innerHTML = html;
		
	},
	_keypressed : function(e) {
		if(e.keyCode == 13) {
			if(this._selectedLine != 0) 
				this.use($('Ac_Row_' + this._selectedLine).innerHTML);
				this._switchOff = true;
				this._enter = true;
				return false;
		}
		if(e.keyCode == 40) {
			if(this._countLines > this._selectedLine) {
				if($('Ac_Row_' + this._selectedLine) != undefined) 
					$('Ac_Row_' + this._selectedLine).style.backgroundColor = 'inherit';

				$('Ac_Row_' + (this._selectedLine + 1)).style.backgroundColor = '#bbb';
				this._selectedLine += 1
			}
			// Runter
		}
		if(e.keyCode == 38) {
			if(this._selectedLine > 1) {
				if($('Ac_Row_' + this._selectedLine) != undefined) 
					$('Ac_Row_' + this._selectedLine).style.backgroundColor = 'inherit';

				$('Ac_Row_' + (this._selectedLine - 1)).style.backgroundColor = '#bbb';
				this._selectedLine -= 1
			}

			// Hoch
		}
		
		document.getElementById("aC_ele_praktort").scrollTop = $('Ac_Row_' + (this._selectedLine - 1)).offsetTop;
	},
	initAutoComplete:function(ele, url, callback, options) {
		if(checkBrowser('MSIE') == true) return;
		this.url = url;
		this._selectedLine = 0;

		this.ele = ele;
		this._callback = callback;
		
		ele.onkeypress = this._keypressed.bind(this);
		
		if(options == undefined) options = {};
		
		this.ele.onblur = function() {
			// autoCompleter.ac_ele.style.display = "none";
			autoCompleter._switchOff = true;
		};
		var aDiv = document.createElement('div');
		
		aDiv.id = "aC_ele_" + ele.id;
		aDiv.className = "praktikaAutocompleter";
		aDiv.style.top = (ele.offsetTop + ele.offsetHeight) + "px";
		aDiv.style.left = ele.offsetLeft + "px";
		if(options["width"] != undefined) {
			aDiv.style.width = options["width"];
		} else {
			aDiv.style.width = (ele.offsetWidth - 2) + "px";
		}
		
		aDiv.style.display = "none";
		
		aDiv.onmouseout = function() {
			
			if(autoCompleter._switchOff == true) {
				autoCompleter.ac_ele.style.display = "none";
			}
			
		}
		this.ele.onmouseout = function() {
			
			if(autoCompleter._switchOff == true) {
				autoCompleter.ac_ele.style.display = "none";
			}
			
		}
		
		aDiv.style.height = "150px";
		ele.parentNode.appendChild(aDiv);	
		
		this.ac_ele = aDiv;	
	},
	get:function(value) {
		if(checkBrowser('MSIE') == true) return;
		
		if(value == undefined) 
			suchWort = this.ele.value;
		else
			suchWort = value;

		if(this._enter == true) {
			this._enter = false;
			return;
		}
		
		// console.log(this.searchWord);
		// console.log(suchWort);
		
		this._switchOff = false;

		if(this.searchWord != suchWort && suchWort != "") {
			this.searchWord = suchWort;
			if(this._cache[this.searchWord] != undefined) {
				autoCompleter.ac_ele.style.display = "";
				this._countLines = this._cacheLines[this.searchWord]; 
				this.ac_ele.innerHTML = this._cache[this.searchWord];
			} else {
				this._selectedLine = 0;
				xhr(this.url, "value=" + encodeURI(suchWort), function(text) { 
					// Keine Ergebnisse gefunden
					if(text == "null") {
						autoCompleter.ac_ele.innerHTML = "<i class='row'>Keine zutreffenden Einr&auml;ge gefunden.";
						autoCompleter._cache[autoCompleter.searchWord] = autoCompleter.ac_ele.innerHTML;
						return;
	
					}
					
					autoCompleter.ac_ele.style.display = "";
					autoCompleter.parse(JSON.parse(text));
				});	
			}
		}
	}
};
function trim(str, chars) {
	return ltrim(rtrim(str, chars), chars);
}
 

function ltrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
 
function rtrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}

function initAdRotator() {
	
}

function urlencode (str) {
    // URL-encodes string  
    // 
    // version: 910.813
    // discuss at: http://phpjs.org/functions/urlencode
    // +   original by: Philip Peterson
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: AJ
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: travc
    // +      input by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Lars Fischer
    // +      input by: Ratheous
    // +      reimplemented by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Joris
    // %          note 1: This reflects PHP 5.3/6.0+ behavior
    // *     example 1: urlencode('Kevin van Zonneveld!');
    // *     returns 1: 'Kevin+van+Zonneveld%21'
    // *     example 2: urlencode('http://kevin.vanzonneveld.net/');
    // *     returns 2: 'http%3A%2F%2Fkevin.vanzonneveld.net%2F'
    // *     example 3: urlencode('http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a');
    // *     returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a'
    var hexStr = function (dec) {
        return '%' + (dec < 16 ? '0' : '') + dec.toString(16).toUpperCase();
    };

    var ret = '',
            unreserved = /[\w.-]/; // A-Za-z0-9_.- // Tilde is not here for historical reasons; to preserve it, use rawurlencode instead
    str = (str+'').toString();

    for (var i = 0, dl = str.length; i < dl; i++) {
        var ch = str.charAt(i);
        if (unreserved.test(ch)) {
            ret += ch;
        }
        else {
            var code = str.charCodeAt(i);
            if (0xD800 <= code && code <= 0xDBFF) { // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single characters); https://developer.mozilla.org/index.php?title=en/Core_JavaScript_1.5_Reference/Global_Objects/String/charCodeAt
                ret += ((code - 0xD800) * 0x400) + (str.charCodeAt(i+1) - 0xDC00) + 0x10000;
                i++; // skip the next one as we just retrieved it as a low surrogate
            }
            // We never come across a low surrogate because we skip them, unless invalid
            // Reserved assumed to be in UTF-8, as in PHP
            else if (code === 32) {
                ret += '+'; // %20 in rawurlencode
            }
            else if (code < 128) { // 1 byte
                ret += hexStr(code);
            }
            else if (code >= 128 && code < 2048) { // 2 bytes
                ret += hexStr((code >> 6) | 0xC0);
                ret += hexStr((code & 0x3F) | 0x80);
            }
            else if (code >= 2048) { // 3 bytes (code < 65536)
                ret += hexStr((code >> 12) | 0xE0);
                ret += hexStr(((code >> 6) & 0x3F) | 0x80);
                ret += hexStr((code & 0x3F) | 0x80);
            }
        }
    }
    return ret;
}


function Get_Cookie(a){var b=document.cookie.split(';');var c='';var d='';var e='';var f=false;for(i=0;i<b.length;i++){c=b[i].split('=');d=c[0].replace(/^\s+|\s+$/g,'');if(d==a){f=true;if(c.length>1){e=unescape(c[1].replace(/^\s+|\s+$/g,''))}return e;break}c=null;d=''}if(!f){return null}}function Set_Cookie(a,b,c,d,e,f){var g=new Date();g.setTime(g.getTime());if(c){c=c*1000*60*60*24}var h=new Date(g.getTime()+(c));document.cookie=a+"="+escape(b)+((c)?";expires="+h.toGMTString():"")+((d)?";path="+d:"")+((e)?";domain="+e:"")+((f)?";secure":"")}function Delete_Cookie(a,b,c){if(Get_Cookie(a))document.cookie=a+"="+((b)?";path="+b:"")+((c)?";domain="+c:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}
function cutWord(value, length) {
	if(value == undefined) return "";
	if(value.length < length) return value;
	return value.substr(0,length) + "...";
}

var obj_len = function() {
  var ob_len=0;
  for (i in this) ++ob_len;
  return ob_len;
}

var getPos = function(owner){
        if(owner === undefined){
                return {top : 0, left:0 , width : 0, height : 0};
        }
 
        var e = owner;
        var oTop = e.offsetTop;
        var oLeft = e.offsetLeft;
        var oWidth = e.offsetWidth;
        var oHeight = e.offsetHeight;
        while(e = e.offsetParent)
        {
                oTop += e.offsetTop;
                oLeft += e.offsetLeft;
        }
 
        return {
                top : oTop,
                left : oLeft,
                width : oWidth,
                height : oHeight
        };
};
function getScrollHeight(D) {
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}
function getViewport() {
			 if (typeof window.innerWidth != 'undefined')
			 {
				  viewportwidth = window.innerWidth,
				  viewportheight = window.innerHeight
			 }

			// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

			 else if (typeof document.documentElement != 'undefined'
				 && typeof document.documentElement.clientWidth !=
				 'undefined' && document.documentElement.clientWidth != 0)
			 {
				   viewportwidth = document.documentElement.clientWidth,
				   viewportheight = document.documentElement.clientHeight
			 }
			 // older versions of IE
			 else
			 {
				   viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
				   viewportheight = document.getElementsByTagName('body')[0].clientHeight
			 }

			 return {"width":viewportwidth, "height":viewportheight};
}
function getScrollXY() {
    var x = 0, y = 0;
	
    if( typeof( window.pageYOffset ) == 'number' ) {
        // Netscape
        x = window.pageXOffset;
        y = window.pageYOffset;
    } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        // DOM
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
    } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        // IE6 standards compliant mode
        x = document.documentElement.scrollLeft;
        y = document.documentElement.scrollTop;
    }
    return [x, y];
}

//Das Objekt, das gerade bewegt wird.
var dragobjekt = null;

// Position, an der das Objekt angeklickt wurde.
var dragx = 0;
var dragy = 0;

// Mausposition
var posx = 0;
var posy = 0;

function draginit() {
 // Initialisierung der ?berwachung der Events

  document.onmousemove = drag;
  document.onmouseup = dragstop;
}


function dragstart(element) {
   //Wird aufgerufen, wenn ein Objekt bewegt werden soll.

  dragobjekt = element;
  
  dragx = posx - smallbox.box.offsetLeft;
  dragy = posy - smallbox.box.offsetTop;
  smallbox.cDiv.style.visibility='hidden';
  // smallbox.bg.style.visibility="hidden";
}


function dragstop() {
  //Wird aufgerufen, wenn ein Objekt nicht mehr bewegt werden soll.
  // smallbox.bg.style.visibility='visible';
  if(smallbox.box == undefined || smallbox.box == 0) return;

  smallbox.box.style.opacity = '1';
  if (smallbox.cDiv !== 0) {
  	
  	smallbox.cDiv.style.visibility = 'visible';
  }
  dragobjekt=null;
}


function drag(ereignis) {
  //Wird aufgerufen, wenn die Maus bewegt wird und bewegt bei Bedarf das Objekt.

  posx = document.all ? window.event.clientX : ereignis.pageX;
  posy = document.all ? window.event.clientY : ereignis.pageY;
  if(dragobjekt !== null) {
    smallbox.box.style.left = (posx - dragx) + "px";
    smallbox.box.style.top = (posy - dragy) + "px";
	smallbox.box.style.opacity = '0.4';
  }
}


function loadJSFile(url) {
    document.writeln('<script type="text/javascript" src="' + url + '"></script>');
}

var ieMode = false;
var browserName=navigator.appName; 
if (browserName=="Microsoft Internet Explorer")
{
  ieMode = true;
}



smallboxManager = {
	boxes:[],
        contains: function(item) {
            for(p=0;p<smallboxManager.boxes.length;p++) if (item == smallboxManager.boxes[p]) return true;
            return false;
        },
		add:function(value) {
			smallboxManager.boxes.push(value);
		},
		getById:function(id) {

			for(var i in smallboxManager.boxes) {
				if(smallboxManager.boxes[i].id == id) {
					return smallboxManager.boxes[i];
				}
			}

			return false;
		}
}

/**
 * @version 1.2
 */
smallbox = {
	id:'',
	box:0,
	bg:0,
	cDiv:0,
	tDiv:0,
	boxes:{},
	callback:0,
	fadeDirection:"in",
    options:{},
	resize:false,
	loadFrame:function(url, options) {
		
		if(typeof options == 'string') {
			// alert(options);
			options = JSON.parse(options);
		}
		// console.log(options);
		if(options === undefined) options = {};

        this.createBox(options);
		if(options["callback"] !== undefined) {
			this.callback = options["callback"].bind(this);
		}
		document.onmousemove = drag;
		document.onmouseup = dragstop;

		smallboxManager.add(this);
		
		this.setHtml("<iframe src='"+url+"' frameborder='0' style='width:"+options.width+"px; height:"+options.height+"px;'></iframe>");
		this.reSizeBox({width:options.width, height:options.height});
		this.rePosBox(options.width, options.height);

		this.box.style.display="";
		this.tDiv.style.width = (this.cDiv.offsetWidth - 3) + "px";
		
		this.bg.innerHTML = "";
		
		return this;		
	},
	loadLogin:function(callback, params) {
        loginText = "";
		if(callback == undefined) callback = function(e) { };
                
        if(params != undefined && params["loginText"] != undefined) {
			loginText = escape(params["loginText"]);
		}

		smallbox.loadUrl('', '/smallbox/quicklogin.html', 'loginText=' + loginText, {
                        callback: callback,
                        title:'Login auf Praktika.de!',
                        width:400,
						trackingUrl:"/smallbox/login/",
						id:"login"
		});
	},
	loadMerkzettel:function() {
		smallbox.loadUrl("", "/home/stellen/merkzettel.php","",{
			width:620
		});
	},
	loadQuickPicker:function(quickpicker, param, callback) {
		
		if(callback != undefined) {
			this.callback = callback.bind(this);
		}
		
		this.loadUrl("", "/quickpicker/" + quickpicker + ".php", param);
	},
	loadImage:function(url, width, height, options) {
		if(options === undefined) options = {};

		if(width == undefined) width = 0;
		if(height == undefined) height = 0;
		
		this.options.width = width;
		this.options.height = height;
		
		viewport = getViewport();

		if(this.options.height > viewport["height"]) {
			newHeight = viewport["height"] - 50;
			var multi = this.options.height / this.options.width;
			newWidth = viewport["height"] * multi;

			this.options.width = newWidth;
			this.options.height = newHeight;
		}

		if(!smallboxManager.contains(this)) {
			this.createBox({ title:options.title!=undefined?options.title:'' });

			if(options["callback"] !== undefined) {
				this.callback = options["callback"].bind(this);
			}

			smallboxManager.add(this);
		}

		// IMG-Object anlegen
		var tmpImg = document.createElement("img");
		// Wenn Grï¿½ï¿½e unbekannt ist, ein onLoad Event einsetzen, welches die Grï¿½ï¿½e berechnet und Element positioniert
		if(this.options.width == 0 || this.options.height == 0) {
			tmpImg.onload = function(e) { this.reSizeBox();this.options.hideBox = false; this.rePosBox(this.options.width, this.options.height); }.bind(this);
		}
		if(this.options.width > 0) tmpImg.style.width = this.options.width + "px";
		if(this.options.height > 0) tmpImg.style.height = this.options.height + "px";

		this.setHtml(tmpImg);

		// Element wird positioniert
		this.rePosBox(this.options.width, this.options.height, this.options.height==0?200:undefined);

		if(this.options.width != 0) {
			this.reSizeBox({width:this.options.width, height:this.options.height});
		}

		this.bg.innerHTML = "";

		// Bild-SRC darf erst ganz zum Schluss zugewiesen werden, damit offsetWidth im IE erkannt wird!
		tmpImg.src = url;
		return this;
	},
	reSizeBox:function(TMPvalues) {
		viewport = getViewport();

		if(TMPvalues == undefined) TMPvalues = {};
		if(TMPvalues["width"] == undefined || TMPvalues["width"] == 0) {
			
			if(this.cDiv.childNodes[0].childNodes.length > 0) {
				var maxWidth = 0;
				for (var i = 0; i < this.cDiv.childNodes[0].childNodes.length; ++i) {
					if(maxWidth < this.cDiv.childNodes[0].childNodes[i].offsetWidth) {
						maxWidth = this.cDiv.childNodes[0].childNodes[i].offsetWidth;
					}
				}
			}
			TMPvalues["width"] = maxWidth;
			TMPvalues["height"] = this.cDiv.childNodes[0].offsetHeight;
		}
		TMPvalues["width"] = Number(TMPvalues["width"]);
		TMPvalues["height"] = Number(TMPvalues["height"]);
		
		if(TMPvalues["width"] > viewport["width"] - 100) {
			TMPvalues["width"] = viewport["width"] - 100;
		}

		this.cDiv.style.width = TMPvalues["width"] + "px";
		this.tDiv.style.width = (TMPvalues["width"] - 3) + "px";

		this.options.width = TMPvalues["width"];
		this.options.height = TMPvalues["height"];
	},
	rePosBox:function(width, height, topPos) {
		viewport = getViewport();

		if(height >= viewport["height"] - 50) {
			this.box.style.position = "absolute";//setAttribute("style", "position:absolute !important;");
		}

		//this.cDiv.style.width = width + "px";

		if(height == undefined) height = 0;
		if(topPos == undefined) {
			topPos = (viewport["height"] / 2) - (height / 2) - 20;
		//	alert("topPos Calc" + height + "--" + viewport["height"]);
		}
		//alert(topPos);
		if(top != window) {
			topScroll = top.getScrollXY();
			pos = getPos(top.document.getElementById(window.frameElement.id));

			topPos += (topScroll[1] - pos["top"]);
			if(topPos < 100) topPos = 100;
		}
		this.box.style.top = topPos + "px";
		this.box.style.left = ((viewport["width"] / 2) - (width / 2)) + "px";
		// this.tDiv.style.width = width + "px";

		this.box.style.display="";

	},
	// Funktion setzt zentral den HTML-Content der smallbox
	setHtml:function(html) {
		if(typeof(html)=='string' || typeof(html)=='number') {
			var tmpDiv = document.createElement("div");
			tmpDiv.className = (this.options.className != undefined?this.options.className:"");
			tmpDiv.innerHTML = html;
		} else {
			if(typeof(html)=='object') {
				var tmpDiv = document.createElement("div");
				tmpDiv.className = (this.options.className != undefined?this.options.className:"");
				tmpDiv.appendChild(html);
			}
		}
		// console.log(this);
		this.cDiv.innerHTML = "";
		this.cDiv.appendChild(tmpDiv);
	},
	loadUrl : function(ele, url, param, options) {
		// URL wird erstmal aufgerufen, damit Aufruf und smallbox-Init parallel laufen (URL braucht minimal 35 ms und Funktion 3 ms -> Keine Probleme mit Initialisierung)
		xhr(url, param, function(text) {

			if(this.options.buttons != undefined) {
				text = text + "<div class='smallbox_footer' style='text-align:" + (this.buttonDir==undefined?"center":this.buttonDir) + "'>" + smallbox.generateButtonHTML(this.options.buttons) + "</div>";
			}

			// Wenn <title> vorkommt, dann Dies als Box-Title setzen
			var regex = new RegExp('<title>(.*)</title>', 'i');
			var regexResult = regex.exec(text);
			if(regexResult != null && regexResult.length > 1) {
				this.setTitle(regexResult[1]);
			}
			
			// Wenn <body> ausgeschnitten werden soll, dann hier erledigen!
			if(this.options.cutBody != undefined && this.options.cutBody == true) {
				var regex = new RegExp('<body[^>]*>((.|\n|\r)*)</body>', 'i');
				var regexResult = regex.exec(text);
				if(regexResult != null && regexResult.length > 1) text = regexResult[1];
			}

			this.setHtml(text);
			
			this.box.style.display="";
			this.bg.innerHTML = "";

			evalScripts(text);

			// Wenn resize angegeben wurde, dann soll Fenster nicht in der Grï¿½ï¿½e verï¿½ndert werden
			// => Nutzbar bei ï¿½nderbarem Inhalt. Nicht beim ersten Aufruf!
			if(this.options.resize == undefined || this.options.resize != false) {
				BoxWidth = this.options.width == undefined?this.cDiv.offsetWidth:this.options.width;
	//			alert("Client Width:   " + this.cDiv.clientWidth);
				//alert(getPos(this.cDiv)["width"]);
				var boxWidth = parseInt(BoxWidth);

				if(this.options.width == undefined) {
					var maxWidth = 0;
					for (var i = 0; i < this.cDiv.childNodes[0].childNodes.length; ++i) {
						if(maxWidth < this.cDiv.childNodes[0].childNodes[i].offsetWidth) {
							maxWidth = this.cDiv.childNodes[0].childNodes[i].offsetWidth;
						}
					}
				} else {
					maxWidth = Number(this.options.width);
				}
				
				boxHeight = this.cDiv.childNodes[0].offsetHeight;
				// if(maxWidth < boxWidth) maxWidth = boxWidth;
				boxWidth = parseInt(maxWidth);

				//this.cDiv.style.width = boxWidth + "px";

				//this.tDiv.style.width = (boxWidth - 3) + "px";
				
				this.reSizeBox({width:boxWidth, height:boxHeight});
				this.rePosBox(boxWidth, boxHeight, 200);
				
				// this.box.style.left = ((screen.availWidth / 2) - (boxWidth / 2)) + "px";
			}
	
		}.bind(this));
		
		if(options === undefined) options = {};
		if(options.width != undefined) {
			this.options.width = Number(options.width);
		}

		if(this.id == "") {
			if(options.id != undefined) {
				this.id = options.id;
			} else {
				this.id = "sb_" + Math.random();
			}
		}
		
		if(options.className != undefined) {
			this.options.className = options.className;
		}
		if(options.resize != undefined) {
			this.options.resize = options.resize;
		}
		if(options.cutBody != undefined) {
			this.options.cutBody = options.cutBody;
		}
		
		if(options.buttons != undefined) {
			this.options.buttons = options.buttons;
			if(options.buttonDir != undefined) {
				this.options.buttonDir = options.buttonDir;
			}
		}

		if(!smallboxManager.contains(this)) {
			this.createBox({ title:options.title!=undefined?options.title:'', variation: this.options.variation });

			if(options["callback"] !== undefined) {
					this.callback = options["callback"].bind(this);
			}

			document.onmousemove = drag;
			document.onmouseup = dragstop;

			smallboxManager.add(this);
		} else {
			if(options.title !== undefined) {
				this.setTitle(options.title);
			}
		}

        try {
             if(pageTracker != undefined) {
                  pageTracker._trackPageview(options.trackingUrl==undefined?url:options.trackingurl);
             }
		}catch(err) { }

		return this;
	},
	setTitle:function(value) {
		// Version ohne Schlieï¿½en Button
		// tDiv.innerHTML = '<span class="titleText">' + options.title + '</span>';

		if(value === undefined || value == "") {
			value = '&nbsp;';
		}

		this.tDiv.innerHTML = '<img onclick="smallbox.hide(false);" src="/styles/images/smallbox/x.gif" alt="Fenster schlie&szlig;en" title="Fenster schlie&szlig;en" /><span class="titleText">' + value + '</span>';
	},
	confirm : function(text, buttons, callback) {
		if(ieMode) {
			value = confirm(text);
			
			if(callback != undefined) {
				callback.bind(this)(value);
			}
			
			return;
		}
		
		if(smallboxManager.boxes.length > 0) return;
		if(buttons === undefined || buttons === null) {
			buttons = ["<a href='#' alt='Ja' title='Ja' onclick='smallbox.hide(true); return false;'><img src='/styles/images/icons/ok_22.png' alt='ok' title='ok' /></a>","<a href='#' onclick='smallbox.hide(false); return false;' alt='Nein' title='Nein'><img src='/styles/images/icons/cancel_22.png' alt='Abbrechen' title='Abbrechen' /></a>"];
		}
		
		var template = "<div style='padding:10px;' class='smallboxConfirm'><p class='text'>" + text + "</p><p class='buttons'>" + buttons.join("&nbsp;&nbsp;&nbsp;") + "</p></div>";

		this.createBox();

		options = {};
		
		if(callback != undefined) {
			this.callback = callback.bind(this);
		}
		  
		document.onmousemove = drag;
		document.onmouseup = dragstop;
		this.setHtml(template);
		// this.cDiv.innerHTML = template;
		
		
		this.box.style.display="";
		this.bg.innerHTML = "";

		this.reSizeBox();
		this.rePosBox(this.options.width,0);
		/*
		var boxWidth = parseInt(this.box.offsetWidth);
					
		this.box.style.left = ((screen.availWidth / 2) - (boxWidth / 2)) + "px";		
		
                this.tDiv.style.width = (this.cDiv.offsetWidth - 0) + "px";
		*/
		smallboxManager.add(this);
		return this;
	},
    prompt:function(text, std, callback) {
		std = (std==undefined?"":std);
		if(ieMode) {
		   var settings = "dialogWidth: 400px; dialogHeight: 180px; center: yes; edge: raised; scroll: no; status: no;";
		   value = window.showModalDialog("/prompt/iePrompt.html", text + "###" + std, settings);
			
			// value = prompt(text, std);
			
			if(callback != undefined) {
				callback.bind(this)(value);
			}
			
			return;
		}
		
                if(smallboxManager.boxes.length > 0) return;

		buttons = ["<a href='#' alt='ok' title='ok' onclick='smallbox.hide($(\"smallbox_prompt_input\").value); return false;'><img src='/styles/images/icons/ok_22.png' alt='ok' title='ok' /></a>","<a href='#' onclick='smallbox.hide(false); return false;' alt='Nein' title='Nein'><img src='/styles/images/icons/cancel_22.png' alt='Abbrechen' title='Abbrechen' /></a>"];

		var template = "<div style='padding:10px;' class='smallboxConfirm'><p class='text'>" + text + "</p><p><input type='text' class='smallbox_prompt_input' id='smallbox_prompt_input' value='" + std + "' /></p><p class='buttons'>" + buttons.join("&nbsp;&nbsp;&nbsp;") + "</p></div>";

		this.createBox({title:"Eingabe notwendig"});
        this.box.style.width = "480px";
		
		if(callback != undefined) {
			this.callback = callback.bind(this);
		}

		document.onmousemove = drag;
		document.onmouseup = dragstop;
		this.cDiv.innerHTML = template;

		this.box.style.display="";
		this.bg.innerHTML = "";
		var boxWidth = parseInt(this.box.offsetWidth);

        availWidth = window.document.body.offsetWidth;
		this.box.style.left = ((availWidth / 2) - (boxWidth / 2)) + "px";
		this.tDiv.style.width = (boxWidth) + "px";
		
		smallboxManager.add(this);
        document.getElementById("smallbox_prompt_input").onkeyup = smallbox.checkKey;
        document.getElementById('smallbox_prompt_input').focus();
        document.getElementById('smallbox_prompt_input').select();

		return this;
        },
        checkKey:function(e) {
            var keycode;
            
            if (window.event)
            {
                    keycode = window.event.keyCode;
            }
            else if (e)
            {
                    keycode = e.keyCode;
            }
            if(keycode == 13) {
                smallbox.hide(document.getElementById('smallbox_prompt_input').value);
            }
        },
	alert:function(text, buttonText) {
		this.callback = 0;
		if(smallboxManager.boxes.length > 0) return;
		if(buttonText == undefined) buttonText = "ok";
		
		buttons = ['<button type="button" onclick="smallbox.hide()" value="'+buttonText+'"><span><span><span>'+buttonText+'</span></span></span></button>'];

		var template = "<div style='padding:10px;text-align:center;' class='smallboxConfirm'><p class='text'>" + text + "</p><p class='buttons'>" + buttons.join("&nbsp;&nbsp;&nbsp;") + "</p></div>";

		this.createBox();
		
		document.onmousemove = drag;
		document.onmouseup = dragstop;

		this.setHtml(template);

		this.box.style.display="";
		this.bg.innerHTML = "";

		this.reSizeBox();
		this.rePosBox(this.options.width,0);
	
		smallboxManager.add(this);
		return this;		
	},
	_onWindowKey:function(e) {
		if(smallboxManager.boxes.length <= 0) return;
		
		e = (e) ? e : window.event;
		
		if (e.keyCode != undefined && e.keyCode == 27) {
			smallbox.hide(false);
		}
	},
	fade:function() {
		var op = Number(smallbox.bg.style.opacity);		
		if(smallbox.bg.style.opacity < 0.5) {
			newop = Number(op) + 0.2;
		}
		if(smallbox.bg.style.opacity < 1) {
			newop = Number(op) + 0.2;
		}

		smallbox.bg.style.opacity = Number(op) + 0.1;
		smallbox.bg.style.filter = 'alpha(opacity=' + op * 100 + ')';
			
		if(newop < 0.8) {
			window.setTimeout("smallbox.fade();","30");
		} else {
			// Funktion not yet Implemented
			// smallbox.fadeComplete();
		}
	},
	createBG:function() {
		if(this.box != 0 && this.box != undefined) {
			document.body.removeChild(this.box);
		}
		var bg = document.createElement("div");
		// bg.onkeydown = smallbox._onWindowKey; 
		document.onkeydown = smallbox._onWindowKey; 

		bg.className="smallboxBackground";
		bg.id = "smallboxBackground";
		bg.style.zIndex = ((smallboxManager.boxes.length * 3) + 5);
		bg.innerHTML = "<img class='smallbox_loading' src='/styles/images/ajax/loading_2.gif' />";
		bg.style.opacity = 0;
		smallbox.bg = bg;
		smallbox.fadeDirection = "in";
		document.body.appendChild(bg);

		window.setTimeout("smallbox.fade();","30");
		
		this.bg = bg;		
	},
	generateButtonHTML:function(buttons) {
		if(buttons == undefined) return "";
		// Direkter HTML-Code
		if(typeof(buttons)=='string') {
			return buttons;
		}

		// Button-HTML in Array
		if(buttons.length != undefined) {
			return buttons.join("&nbsp;&nbsp;&nbsp;");
		}

		// Object
		var returns = [];
		if(typeof(buttons)=="object") {
			for(var i in returns) {
				returns.push('<button type="button" onclick="smallbox.hide(\'' + i + '\')" value="'+buttons[i]+'"><span><span><span>'+buttons[i]+'</span></span></span></button>');
			}
			return returns.join("&nbsp;&nbsp;&nbsp;");
		}

		return "";
	},
	fadeComplete:function(options) {
        var aDiv = document.createElement("div");
		aDiv.className = 'smallboxContainer';
		aDiv.style.zIndex = ((smallboxManager.boxes.length * 3) + 7);

		//agge: eingefuegt, weil smallbox sonst beim Bewerbung versenden nicht erscheint und beim Fade abbricht
		if (options === undefined) {
			options = {};
		}
		// Wenn kein Titel gesetzt, dann diesen Auf Leerzeichen setzen
		if(options.title === undefined || options.title == "") {
			options.title = '&nbsp;';
		}

		var tDiv = document.createElement("div");
		tDiv.className = 'smallboxTitlebar';
		tDiv.onmousedown = function() { dragstart(this); };
		this.tDiv = tDiv;

		this.setTitle(options.title);
		var cDiv = document.createElement("div");
		cDiv.className = 'smallboxContent';
	
		aDiv.appendChild(tDiv);
		aDiv.appendChild(cDiv);

		var topPos = 200;

		if(this.options != undefined && this.options.height != undefined) {
			topPos = (viewport["height"] / 2) - (this.options.height / 2) - 20;
		}
		
		if(top != window) {
			topScroll = top.getScrollXY();
			pos = getPos(top.document.getElementById(window.frameElement.id));

			topPos += (topScroll[1] - pos["top"]);
			if(topPos < 100) topPos = 100;
		}
		
		aDiv.style.top = topPos + "px";

        availWidth = window.document.body.offsetWidth;
                
		aDiv.style.left = ((availWidth / 2) - 100) + "px";
		aDiv.style.margin = "auto";
		
		aDiv.style.width = "auto";
		cDiv.innerHTML = "";
		aDiv.style.display = "none";

		this.box = aDiv;
		this.cDiv = cDiv;	

		document.onmousemove = drag;
		document.onmouseup = dragstop;

		document.body.appendChild(aDiv);
                
	},
	createBox:function(options) {
		this.createBG();
		this.fadeComplete(options);
	},
	hide:function(param) {
		var tmpBox = smallboxManager.boxes.pop();
		
/*		if(tmpBox == undefined) {
                    alert("ASD");
					document.body.removeChild(tmpBox.box);
                    document.body.removeChild(tmpBox.bg);
                    return;
                }*/
		if(param == undefined) param = {};
		
		if(tmpBox != undefined && tmpBox.callback != 0) {
			tmpBox.callback(param);
		}
		
		if(tmpBox != undefined && tmpBox.box != undefined) {
                    document.body.removeChild(tmpBox.box);
                    document.body.removeChild(tmpBox.bg);
                }
		
		this.box = 0;
		this.options = {};
		
		document.onkeydown = "";
	}
}

AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){
var t;
if(document.documentElement&&document.documentElement.scrollTop){
t=document.documentElement.scrollTop;
}else{
if(document.body){
t=document.body.scrollTop;
}
}
return t;
},addClass:function(){
var _2=AJS.forceArray(arguments);
var _3=_2.pop();
var _4=function(o){
if(!new RegExp("(^|\\s)"+_3+"(\\s|$)").test(o.className)){
o.className+=(o.className?" ":"")+_3;
}
};
AJS.map(_2,function(_6){
_4(_6);
});
},setStyle:function(){
var _7=AJS.forceArray(arguments);
var _8=_7.pop();
var _9=_7.pop();
AJS.map(_7,function(_a){
_a.style[_9]=AJS.getCssDim(_8);
});
},extend:function(_b){
var _c=new this("no_init");
for(k in _b){
var _d=_c[k];
var _e=_b[k];
if(_d&&_d!=_e&&typeof _e=="function"){
_e=this._parentize(_e,_d);
}
_c[k]=_e;
}
return new AJS.Class(_c);
},log:function(o){
if(window.console){
console.log(o);
}else{
var div=AJS.$("ajs_logger");
if(!div){
div=AJS.DIV({id:"ajs_logger","style":"color: green; position: absolute; left: 0"});
div.style.top=AJS.getScrollTop()+"px";
AJS.ACN(AJS.getBody(),div);
}
AJS.setHTML(div,""+o);
}
},setHeight:function(){
var _11=AJS.forceArray(arguments);
_11.splice(_11.length-1,0,"height");
AJS.setStyle.apply(null,_11);
},_getRealScope:function(fn,_13){
_13=AJS.$A(_13);
var _14=fn._cscope||window;
return function(){
var _15=AJS.$FA(arguments).concat(_13);
return fn.apply(_14,_15);
};
},documentInsert:function(elm){
if(typeof (elm)=="string"){
elm=AJS.HTML2DOM(elm);
}
document.write("<span id=\"dummy_holder\"></span>");
AJS.swapDOM(AJS.$("dummy_holder"),elm);
},getWindowSize:function(doc){
doc=doc||document;
var _18,_19;
if(self.innerHeight){
_18=self.innerWidth;
_19=self.innerHeight;
}else{
if(doc.documentElement&&doc.documentElement.clientHeight){
_18=doc.documentElement.clientWidth;
_19=doc.documentElement.clientHeight;
}else{
if(doc.body){
_18=doc.body.clientWidth;
_19=doc.body.clientHeight;
}
}
}
return {"w":_18,"h":_19};
},flattenList:function(_1a){
var r=[];
var _1c=function(r,l){
AJS.map(l,function(o){
if(o==null){
}else{
if(AJS.isArray(o)){
_1c(r,o);
}else{
r.push(o);
}
}
});
};
_1c(r,_1a);
return r;
},isFunction:function(obj){
return (typeof obj=="function");
},setEventKey:function(e){
e.key=e.keyCode?e.keyCode:e.charCode;
if(window.event){
e.ctrl=window.event.ctrlKey;
e.shift=window.event.shiftKey;
}else{
e.ctrl=e.ctrlKey;
e.shift=e.shiftKey;
}
switch(e.key){
case 63232:
e.key=38;
break;
case 63233:
e.key=40;
break;
case 63235:
e.key=39;
break;
case 63234:
e.key=37;
break;
}
},removeElement:function(){
var _22=AJS.forceArray(arguments);
AJS.map(_22,function(elm){
AJS.swapDOM(elm,null);
});
},_unloadListeners:function(){
if(AJS.listeners){
AJS.map(AJS.listeners,function(elm,_25,fn){
AJS.REV(elm,_25,fn);
});
}
AJS.listeners=[];
},join:function(_27,_28){
try{
return _28.join(_27);
}
catch(e){
var r=_28[0]||"";
AJS.map(_28,function(elm){
r+=_27+elm;
},1);
return r+"";
}
},getIndex:function(elm,_2c,_2d){
for(var i=0;i<_2c.length;i++){
if(_2d&&_2d(_2c[i])||elm==_2c[i]){
return i;
}
}
return -1;
},isIn:function(elm,_30){
var i=AJS.getIndex(elm,_30);
if(i!=-1){
return true;
}else{
return false;
}
},isArray:function(obj){
return obj instanceof Array;
},setLeft:function(){
var _33=AJS.forceArray(arguments);
_33.splice(_33.length-1,0,"left");
AJS.setStyle.apply(null,_33);
},appendChildNodes:function(elm){
if(arguments.length>=2){
AJS.map(arguments,function(n){
if(AJS.isString(n)){
n=AJS.TN(n);
}
if(AJS.isDefined(n)){
elm.appendChild(n);
}
},1);
}
return elm;
},getElementsByTagAndClassName:function(_36,_37,_38,_39){
var _3a=[];
if(!AJS.isDefined(_38)){
_38=document;
}
if(!AJS.isDefined(_36)){
_36="*";
}
var els=_38.getElementsByTagName(_36);
var _3c=els.length;
var _3d=new RegExp("(^|\\s)"+_37+"(\\s|$)");
for(i=0,j=0;i<_3c;i++){
if(_3d.test(els[i].className)||_37==null){
_3a[j]=els[i];
j++;
}
}
if(_39){
return _3a[0];
}else{
return _3a;
}
},isOpera:function(){
return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
},isString:function(obj){
return (typeof obj=="string");
},hideElement:function(elm){
var _40=AJS.forceArray(arguments);
AJS.map(_40,function(elm){
elm.style.display="none";
});
},setOpacity:function(elm,p){
elm.style.opacity=p;
elm.style.filter="alpha(opacity="+p*100+")";
},insertBefore:function(elm,_45){
_45.parentNode.insertBefore(elm,_45);
return elm;
},setWidth:function(){
var _46=AJS.forceArray(arguments);
_46.splice(_46.length-1,0,"width");
AJS.setStyle.apply(null,_46);
},createArray:function(v){
if(AJS.isArray(v)&&!AJS.isString(v)){
return v;
}else{
if(!v){
return [];
}else{
return [v];
}
}
},isDict:function(o){
var _49=String(o);
return _49.indexOf(" Object")!=-1;
},isMozilla:function(){
return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);
},removeEventListener:function(elm,_4b,fn,_4d){
var _4e="ajsl_"+_4b+fn;
if(!_4d){
_4d=false;
}
fn=elm[_4e]||fn;
if(elm["on"+_4b]==fn){
elm["on"+_4b]=elm[_4e+"old"];
}
if(elm.removeEventListener){
elm.removeEventListener(_4b,fn,_4d);
if(AJS.isOpera()){
elm.removeEventListener(_4b,fn,!_4d);
}
}else{
if(elm.detachEvent){
elm.detachEvent("on"+_4b,fn);
}
}
},callLater:function(fn,_50){
var _51=function(){
fn();
};
window.setTimeout(_51,_50);
},setTop:function(){
var _52=AJS.forceArray(arguments);
_52.splice(_52.length-1,0,"top");
AJS.setStyle.apply(null,_52);
},_createDomShortcuts:function(){
var _53=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];
var _54=function(elm){
AJS[elm.toUpperCase()]=function(){
return AJS.createDOM.apply(null,[elm,arguments]);
};
};
AJS.map(_53,_54);
AJS.TN=function(_56){
return document.createTextNode(_56);
};
},addCallback:function(fn){
this.callbacks.unshift(fn);
},bindMethods:function(_58){
for(var k in _58){
var _5a=_58[k];
if(typeof (_5a)=="function"){
_58[k]=AJS.$b(_5a,_58);
}
}
},partial:function(fn){
var _5c=AJS.$FA(arguments);
_5c.shift();
return function(){
_5c=_5c.concat(AJS.$FA(arguments));
return fn.apply(window,_5c);
};
},isNumber:function(obj){
return (typeof obj=="number");
},getCssDim:function(dim){
if(AJS.isString(dim)){
return dim;
}else{
return dim+"px";
}
},isIe:function(){
return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);
},removeClass:function(){
var _5f=AJS.forceArray(arguments);
var cls=_5f.pop();
var _61=function(o){
o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");
};
AJS.map(_5f,function(elm){
_61(elm);
});
},setHTML:function(elm,_65){
elm.innerHTML=_65;
return elm;
},map:function(_66,fn,_68,_69){
var i=0,l=_66.length;
if(_68){
i=_68;
}
if(_69){
l=_69;
}
for(i;i<l;i++){
var val=fn(_66[i],i);
if(val!=undefined){
return val;
}
}
},addEventListener:function(elm,_6e,fn,_70,_71){
var _72="ajsl_"+_6e+fn;
if(!_71){
_71=false;
}
AJS.listeners=AJS.$A(AJS.listeners);
if(AJS.isIn(_6e,["keypress","keydown","keyup","click"])){
var _73=fn;
fn=function(e){
AJS.setEventKey(e);
return _73.apply(window,arguments);
};
}
var _75=AJS.isIn(_6e,["submit","load","scroll","resize"]);
var _76=AJS.$A(elm);
AJS.map(_76,function(_77){
if(_70){
var _78=fn;
fn=function(e){
AJS.REV(_77,_6e,fn);
return _78.apply(window,arguments);
};
}
if(_75){
var _7a=_77["on"+_6e];
var _7b=function(){
if(_7a){
fn(arguments);
return _7a(arguments);
}else{
return fn(arguments);
}
};
_77[_72]=_7b;
_77[_72+"old"]=_7a;
elm["on"+_6e]=_7b;
}else{
_77[_72]=fn;
if(_77.attachEvent){
_77.attachEvent("on"+_6e,fn);
}else{
if(_77.addEventListener){
_77.addEventListener(_6e,fn,_71);
}
}
AJS.listeners.push([_77,_6e,fn]);
}
});
},preloadImages:function(){
AJS.AEV(window,"load",AJS.$p(function(_7c){
AJS.map(_7c,function(src){
var pic=new Image();
pic.src=src;
});
},arguments));
},forceArray:function(_7f){
var r=[];
AJS.map(_7f,function(elm){
r.push(elm);
});
return r;
},update:function(l1,l2){
for(var i in l2){
l1[i]=l2[i];
}
return l1;
},getBody:function(){
return AJS.$bytc("body")[0];
},HTML2DOM:function(_85,_86){
var d=AJS.DIV();
d.innerHTML=_85;
if(_86){
return d.childNodes[0];
}else{
return d;
}
},getElement:function(id){
if(AJS.isString(id)||AJS.isNumber(id)){
return document.getElementById(id);
}else{
return id;
}
},showElement:function(){
var _89=AJS.forceArray(arguments);
AJS.map(_89,function(elm){
elm.style.display="";
});
},bind:function(fn,_8c,_8d){
fn._cscope=_8c;
return AJS._getRealScope(fn,_8d);
},createDOM:function(_8e,_8f){
var i=0,_91;
var elm=document.createElement(_8e);
var _93=_8f[0];
if(AJS.isDict(_8f[i])){
for(k in _93){
_91=_93[k];
if(k=="style"||k=="s"){
elm.style.cssText=_91;
}else{
if(k=="c"||k=="class"||k=="className"){
elm.className=_91;
}else{
elm.setAttribute(k,_91);
}
}
}
i++;
}
if(_93==null){
i=1;
}
for(var j=i;j<_8f.length;j++){
var _91=_8f[j];
if(_91){
var _95=typeof (_91);
if(_95=="string"||_95=="number"){
_91=AJS.TN(_91);
}
elm.appendChild(_91);
}
}
return elm;
},swapDOM:function(_96,src){
_96=AJS.getElement(_96);
var _98=_96.parentNode;
if(src){
src=AJS.getElement(src);
_98.replaceChild(src,_96);
}else{
_98.removeChild(_96);
}
return src;
},isDefined:function(o){
return (o!="undefined"&&o!=null);
}};
AJS.$=AJS.getElement;
AJS.$$=AJS.getElements;
AJS.$f=AJS.getFormElement;
AJS.$p=AJS.partial;
AJS.$b=AJS.bind;
AJS.$A=AJS.createArray;
AJS.DI=AJS.documentInsert;
AJS.ACN=AJS.appendChildNodes;
AJS.RCN=AJS.replaceChildNodes;
AJS.AEV=AJS.addEventListener;
AJS.REV=AJS.removeEventListener;
AJS.$bytc=AJS.getElementsByTagAndClassName;
AJS.$AP=AJS.absolutePosition;
AJS.$FA=AJS.forceArray;
AJS.addEventListener(window,"unload",AJS._unloadListeners);
AJS._createDomShortcuts();
AJS.Class=function(_9a){
var fn=function(){
if(arguments[0]!="no_init"){
return this.init.apply(this,arguments);
}
};
fn.prototype=_9a;
AJS.update(fn,AJS.Class.prototype);
return fn;
};
AJS.Class.prototype={extend:function(_9c){
var _9d=new this("no_init");
for(k in _9c){
var _9e=_9d[k];
var cur=_9c[k];
if(_9e&&_9e!=cur&&typeof cur=="function"){
cur=this._parentize(cur,_9e);
}
_9d[k]=cur;
}
return new AJS.Class(_9d);
},implement:function(_a0){
AJS.update(this.prototype,_a0);
},_parentize:function(cur,_a2){
return function(){
this.parent=_a2;
return cur.apply(this,arguments);
};
}};
script_loaded=true;


script_loaded=true;

AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(_1,_2){
var _3=new AJS.fx.Base();
_3.elm=AJS.$(_1);
_3.options.duration=600;
_3.setOptions(_2);
AJS.update(_3,{increase:function(){
if(this.now==7){
_1.style.backgroundColor="#fff";
}else{
_1.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)];
}
}});
return _3.custom(6,0);
},fadeIn:function(_4,_5){
_5=_5||{};
if(!_5.from){
_5.from=0;
AJS.setOpacity(_4,0);
}
if(!_5.to){
_5.to=1;
}
var s=new AJS.fx.Style(_4,"opacity",_5);
return s.custom(_5.from,_5.to);
},fadeOut:function(_7,_8){
_8=_8||{};
if(!_8.from){
_8.from=1;
}
if(!_8.to){
_8.to=0;
}
_8.duration=300;
var s=new AJS.fx.Style(_7,"opacity",_8);
return s.custom(_8.from,_8.to);
},setWidth:function(_a,_b){
var s=new AJS.fx.Style(_a,"width",_b);
return s.custom(_b.from,_b.to);
},setHeight:function(_d,_e){
var s=new AJS.fx.Style(_d,"height",_e);
return s.custom(_e.from,_e.to);
}};
AJS.fx.Base=new AJS.Class({init:function(_10){
this.options={onStart:function(){
},onComplete:function(){
},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};
AJS.update(this.options,_10);
AJS.bindMethods(this);
},setOptions:function(_11){
AJS.update(this.options,_11);
},step:function(){
var _12=new Date().getTime();
if(_12<this.time+this.options.duration){
this.cTime=_12-this.time;
this.setNow();
}else{
setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);
this.clearTimer();
this.now=this.to;
}
this.increase();
},setNow:function(){
this.now=this.compute(this.from,this.to);
},compute:function(_13,to){
var _15=to-_13;
return this.options.transition(this.cTime,_13,_15,this.options.duration);
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
return this;
},_start:function(_16,to){
if(!this.options.wait){
this.clearTimer();
}
if(this.timer){
return;
}
setTimeout(AJS.$p(this.options.onStart,this.elm),10);
this.from=_16;
this.to=to;
this.time=new Date().getTime();
this.timer=setInterval(this.step,Math.round(1000/this.options.fps));
return this;
},custom:function(_18,to){
return this._start(_18,to);
},set:function(to){
this.now=to;
this.increase();
return this;
},setStyle:function(elm,_1c,val){
if(this.property=="opacity"){
AJS.setOpacity(elm,val);
}else{
AJS.setStyle(elm,_1c,val);
}
}});
AJS.fx.Style=AJS.fx.Base.extend({init:function(elm,_1f,_20){
this.parent();
this.elm=elm;
this.setOptions(_20);
this.property=_1f;
},increase:function(){
this.setStyle(this.elm,this.property,this.now);
}});
AJS.fx.Styles=AJS.fx.Base.extend({init:function(elm,_22){
this.parent();
this.elm=AJS.$(elm);
this.setOptions(_22);
this.now={};
},setNow:function(){
for(p in this.from){
this.now[p]=this.compute(this.from[p],this.to[p]);
}
},custom:function(obj){
if(this.timer&&this.options.wait){
return;
}
var _24={};
var to={};
for(p in obj){
_24[p]=obj[p][0];
to[p]=obj[p][1];
}
return this._start(_24,to);
},increase:function(){
for(var p in this.now){
this.setStyle(this.elm,p,this.now[p]);
}
}});
AJS.fx.Transitions={linear:function(t,b,c,d){
return c*t/d+b;
},sineInOut:function(t,b,c,d){
return -c/2*(Math.cos(Math.PI*t/d)-1)+b;
}};
script_loaded=true;


script_loaded=true;

function close_del(){if(http.readyState==4){if(http.status==200){}else{alert(http.status);alert('There was a problem with the request.');}}}
var GB_CURRENT=null;
GB_hide=function(cb){
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http = new XMLHttpRequest();
if (http.overrideMimeType) {
// set type accordingly to anticipated content type
//http.overrideMimeType('text/xml');
http.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) { }
}
}
if (!http) {
alert('Cannot create XMLHTTP instance');
return false;
}
var poststr = 'session_delete=1';
http.onreadystatechange = close_del;
http.open('POST', window.location.protocol + '//' + window.location.host + '/home/firmen/bcenter/session_del.phtml', true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", poststr.length);
http.setRequestHeader("Connection", "close");
http.send(poststr);
	
GB_CURRENT.hide(cb);
};
GreyBox=new AJS.Class({init:function(_2){
this.use_fx=AJS.fx;
this.type="page";
this.overlay_click_close=false;
this.salt=0;
this.root_dir=GB_ROOT_DIR;
this.callback_fns=[];
this.reload_on_close=false;
this.src_loader=this.root_dir+"loader_frame.html";
var _3=window.location.hostname.indexOf("www");
var _4=this.src_loader.indexOf("www");
if(_3!=-1&&_4==-1){
this.src_loader=this.src_loader.replace("://","://www.");
}
if(_3==-1&&_4!=-1){
this.src_loader=this.src_loader.replace("://www.","://");
}
this.show_loading=true;
AJS.update(this,_2);
},addCallback:function(fn){
if(fn){
this.callback_fns.push(fn);
}
},show:function(_6){
GB_CURRENT=this;
this.url=_6;
var _7=[AJS.$bytc("object"),AJS.$bytc("select")];
AJS.map(AJS.flattenList(_7),function(_8){
_8.style.visibility="hidden";
});
this.createElements();
return false;
},hide:function(cb){
var me=this;
AJS.callLater(function(){
var _b=me.callback_fns;
if(_b!=[]){
AJS.map(_b,function(fn){
fn();
});
}
me.onHide();
if(me.use_fx){
var _d=me.overlay;
AJS.fx.fadeOut(me.overlay,{onComplete:function(){
AJS.removeElement(_d);
_d=null;
},duration:300});
AJS.removeElement(me.g_window);
}else{
AJS.removeElement(me.g_window,me.overlay);
}
me.removeFrame();
AJS.REV(window,"scroll",_GB_setOverlayDimension);
AJS.REV(window,"resize",_GB_update);
var _e=[AJS.$bytc("object"),AJS.$bytc("select")];
AJS.map(AJS.flattenList(_e),function(_f){
_f.style.visibility="visible";
});
GB_CURRENT=null;
if(me.reload_on_close){
window.location.reload();
}
if(AJS.isFunction(cb)){
cb();
}
},10);
},update:function(){
this.setOverlayDimension();
this.setFrameSize();
this.setWindowPosition();
},createElements:function(){
this.initOverlay();
this.g_window=AJS.DIV({"id":"GB_window"});
AJS.hideElement(this.g_window);
AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);
this.initFrame();
this.initHook();
this.update();
var me=this;
if(this.use_fx){
AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){
me.onShow();
AJS.showElement(me.g_window);
me.startLoading();
}});
}else{
AJS.setOpacity(this.overlay,0.7);
AJS.showElement(this.g_window);
this.onShow();
this.startLoading();
}
AJS.AEV(window,"scroll",_GB_setOverlayDimension);
AJS.AEV(window,"resize",_GB_update);
},removeFrame:function(){
try{
AJS.removeElement(this.iframe);
}
catch(e){
}
this.iframe=null;
},startLoading:function(){
this.iframe.src=this.src_loader+"?s="+this.salt++;
AJS.showElement(this.iframe);
},setOverlayDimension:function(){
var _11=AJS.getWindowSize();
if(AJS.isMozilla()||AJS.isOpera()){
AJS.setWidth(this.overlay,"100%");
}else{
AJS.setWidth(this.overlay,_11.w);
}
var _12=Math.max(AJS.getScrollTop()+_11.h,AJS.getScrollTop()+this.height);
if(_12<AJS.getScrollTop()){
AJS.setHeight(this.overlay,_12);
}else{
AJS.setHeight(this.overlay,AJS.getScrollTop()+_11.h);
}
},initOverlay:function(){
this.overlay=AJS.DIV({"id":"GB_overlay"});
if(this.overlay_click_close){
AJS.AEV(this.overlay,"click",GB_hide);
}
AJS.setOpacity(this.overlay,0);
AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild);
},initFrame:function(){
if(!this.iframe){
var d={"name":"GB_frame","class":"GB_frame","frameBorder":0};
if(AJS.isIe()){
d.src="javascript:false;document.write(\"\");";
}
this.iframe=AJS.IFRAME(d);
this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);
this.top_cnt=AJS.DIV();
this.bottom_cnt=AJS.DIV();
AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt);
}
},onHide:function(){
},onShow:function(){
},setFrameSize:function(){
},setWindowPosition:function(){
},initHook:function(){
}});
_GB_update=function(){
if(GB_CURRENT){
GB_CURRENT.update();
}
};
_GB_setOverlayDimension=function(){
if(GB_CURRENT){
GB_CURRENT.setOverlayDimension();
}
};
AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");
script_loaded=true;
var GB_SETS={};
function decoGreyboxLinks(){
var as=AJS.$bytc("a");
AJS.map(as,function(a){
if(a.getAttribute("href")&&a.getAttribute("rel")){

var rel=a.getAttribute("rel");
if(rel.indexOf("gb_")==0){
var _17=rel.match(/\w+/)[0];
var _18=rel.match(/\[(.*)\]/)[1];
var _19=0;
var _1a={"caption":a.title||"","url":a.href};
if(_17=="gb_pageset"||_17=="gb_imageset"){
if(!GB_SETS[_18]){
GB_SETS[_18]=[];
}
GB_SETS[_18].push(_1a);
_19=GB_SETS[_18].length;
}
if(_17=="gb_pageset"){
a.onclick=function(){
GB_showFullScreenSet(GB_SETS[_18],_19);
return false;
};
}
if(_17=="gb_imageset"){
a.onclick=function(){
GB_showImageSet(GB_SETS[_18],_19);
return false;
};
}
if(_17=="gb_image"){
a.onclick=function(){
GB_showImage(_1a.caption,_1a.url);
return false;
};
}
if(_17=="gb_page"){
a.onclick=function(){
var sp=_18.split(/, ?/);
GB_show(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));
return false;
};
}
if(_17=="gb_page_fs"){
a.onclick=function(){
GB_showFullScreen(_1a.caption,_1a.url);
return false;
};
}
if(_17=="gb_page_center"){
a.onclick=function(){
var sp=_18.split(/, ?/);
GB_showCenter(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));
return false;
};
}
}
}
});
}
AJS.AEV(window,"load",decoGreyboxLinks);
GB_showImage=function(_1d,url,_1f){
var _20={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1d,callback_fn:_1f};
var win=new GB_Gallery(_20);
return win.show(url);
};
GB_showPage=function(_22,url,_24){
var _25={type:"page",caption:_22,callback_fn:_24,fullscreen:true,center_win:false};
var win=new GB_Gallery(_25);
return win.show(url);
};
GB_Gallery=GreyBox.extend({init:function(_27){
this.parent({});
this.img_close=this.root_dir+"g_close.gif";
AJS.update(this,_27);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS.addClass(this.g_window,"GB_Gallery");
var _28=AJS.DIV({"class":"inner"});
this.header=AJS.DIV({"class":"GB_header"},_28);
AJS.setOpacity(this.header,0);
AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);
var _29=AJS.TD({"id":"GB_caption","class":"caption","width":"40%"},this.caption);
var _2a=AJS.TD({"id":"GB_middle","class":"middle","width":"20%"});
var _2b=AJS.IMG({"src":this.img_close});
AJS.AEV(_2b,"click",GB_hide);
var _2c=AJS.TD({"class":"close","width":"40%"},_2b);
var _2d=AJS.TBODY(AJS.TR(_29,_2a,_2c));
var _2e=AJS.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2d);
AJS.ACN(_28,_2e);
if(this.fullscreen){
AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));
}else{
AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this));
}
},setFrameSize:function(){
var _2f=this.overlay.offsetWidth;
var _30=AJS.getWindowSize();
if(this.fullscreen){
this.width=_2f-40;
this.height=_30.h-80;
}
AJS.setWidth(this.iframe,this.width);
AJS.setHeight(this.iframe,this.height);
AJS.setWidth(this.header,_2f);
},_setHeaderPos:function(){
AJS.setTop(this.header,AJS.getScrollTop()+10);
},setWindowPosition:function(){
var _31=this.overlay.offsetWidth;
var _32=AJS.getWindowSize();
AJS.setLeft(this.g_window,((_31-50-this.width)/2));
var _33=AJS.getScrollTop()+55;
if(!this.center_win){
AJS.setTop(this.g_window,_33);
}else{
var fl=((_32.h-this.height)/2)+20+AJS.getScrollTop();
if(fl<0){
fl=0;
}
if(_33>fl){
fl=_33;
}
AJS.setTop(this.g_window,fl);
}
this._setHeaderPos();
},onHide:function(){
AJS.removeElement(this.header);
AJS.removeClass(this.g_window,"GB_Gallery");
},onShow:function(){
if(this.use_fx){
AJS.fx.fadeIn(this.header,{to:1});
}else{
AJS.setOpacity(this.header,1);
}
}});
AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");
GB_showFullScreenSet=function(set,_36,_37){
var _38={type:"page",fullscreen:true,center_win:false};
var _39=new GB_Sets(_38,set);
_39.addCallback(_37);
_39.showSet(_36-1);
return false;
};
GB_showImageSet=function(set,_3b,_3c){
var _3d={type:"image",fullscreen:false,center_win:true,width:300,height:300};
var _3e=new GB_Sets(_3d,set);
_3e.addCallback(_3c);
_3e.showSet(_3b-1);
return false;
};
GB_Sets=GB_Gallery.extend({init:function(_3f,set){
this.parent(_3f);
if(!this.img_next){
this.img_next=this.root_dir+"next.gif";
}
if(!this.img_prev){
this.img_prev=this.root_dir+"prev.gif";
}
this.current_set=set;
},showSet:function(_41){
this.current_index=_41;
var _42=this.current_set[this.current_index];
this.show(_42.url);
this._setCaption(_42.caption);
this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});
this.btn_next=AJS.IMG({"class":"right",src:this.img_next});
AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));
AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));
GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});
AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);
this.updateStatus();
},updateStatus:function(){
AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);
if(this.current_index==0){
AJS.addClass(this.btn_prev,"disabled");
}else{
AJS.removeClass(this.btn_prev,"disabled");
}
if(this.current_index==this.current_set.length-1){
AJS.addClass(this.btn_next,"disabled");
}else{
AJS.removeClass(this.btn_next,"disabled");
}
},_setCaption:function(_43){
AJS.setHTML(AJS.$("GB_caption"),_43);
},updateFrame:function(){
var _44=this.current_set[this.current_index];
this._setCaption(_44.caption);
this.url=_44.url;
this.startLoading();
},switchPrev:function(){
if(this.current_index!=0){
this.current_index--;
this.updateFrame();
this.updateStatus();
}
},switchNext:function(){
if(this.current_index!=this.current_set.length-1){
this.current_index++;
this.updateFrame();
this.updateStatus();
}
}});
AJS.AEV(window,"load",function(){
AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif");
});
GB_show=function(_45,url,_47,_48,_49){
var _4a={caption:_45,height:_47||500,width:_48||500,fullscreen:false,callback_fn:_49};
var win=new GB_Window(_4a);
return win.show(url);
};
GB_showCenter=function(_4c,url,_4e,_4f,_50){
var _51={caption:_4c,center_win:true,height:_4e||500,width:_4f||500,fullscreen:false,callback_fn:_50};
var win=new GB_Window(_51);
return win.show(url);
};
GB_showFullScreen=function(_53,url,_55){
var _56={caption:_53,fullscreen:true,callback_fn:_55};
var win=new GB_Window(_56);
return win.show(url);
};
GB_Window=GreyBox.extend({init:function(_58){
this.parent({});
this.img_close="/styles/images/greybox/close.gif";
this.show_close_img=true;
AJS.update(this,_58);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS.addClass(this.g_window,"GB_Window");
this.header=AJS.TABLE({"class":"header"});
var _59=AJS.TD({"class":"caption"},this.caption);
var _5a=AJS.TD({"class":"close"});
if(this.show_close_img){
var _5b=AJS.IMG({"src":this.img_close});
var _5c=AJS.SPAN("Fenster schließen");
//var btn=AJS.DIV(_5b,_5c);
var btn=AJS.DIV(_5b);
AJS.AEV([_5b,_5c],"mouseover",function(){
AJS.addClass(_5c,"on");
});
AJS.AEV([_5b,_5c],"mouseout",function(){
AJS.removeClass(_5c,"on");
});
AJS.AEV([_5b,_5c],"mousedown",function(){
AJS.addClass(_5c,"click");
});
AJS.AEV([_5b,_5c],"mouseup",function(){
AJS.removeClass(_5c,"click");
});
AJS.AEV([_5b,_5c],"click",GB_hide);
AJS.ACN(_5a,btn);
}
tbody_header=AJS.TBODY();
AJS.ACN(tbody_header,AJS.TR(_59,_5a));
AJS.ACN(this.header,tbody_header);
AJS.ACN(this.top_cnt,this.header);
if(this.fullscreen){
AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));
}
},setFrameSize:function(){
if(this.fullscreen){
var _5e=AJS.getWindowSize();
overlay_h=_5e.h;
this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);
this.height=Math.round(overlay_h-(overlay_h/100)*10);
}
AJS.setWidth(this.header,this.width+16);
AJS.setWidth(this.iframe,this.width);
AJS.setHeight(this.iframe,this.height);
},setWindowPosition:function(){
var _5f=AJS.getWindowSize();
AJS.setLeft(this.g_window,((_5f.w-this.width)/2)-13);
if(!this.center_win){
AJS.setTop(this.g_window,AJS.getScrollTop());
}else{
var fl=((_5f.h-this.height)/2)-20+AJS.getScrollTop();
if(fl<0){
fl=0;
}
AJS.setTop(this.g_window,fl);
}
}});

AJS.preloadImages("/styles/images/greybox/close.gif");

script_loaded=true;

AJS2={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){
var t;
if(document.documentElement&&document.documentElement.scrollTop){
t=document.documentElement.scrollTop;
}else{
if(document.body){
t=document.body.scrollTop;
}
}
return t;
},addClass:function(){
var _2=AJS2.forceArray(arguments);
var _3=_2.pop();
var _4=function(o){
if(!new RegExp("(^|\\s)"+_3+"(\\s|$)").test(o.className)){
o.className+=(o.className?" ":"")+_3;
}
};
AJS2.map(_2,function(_6){
_4(_6);
});
},setStyle:function(){
var _7=AJS2.forceArray(arguments);
var _8=_7.pop();
var _9=_7.pop();
AJS2.map(_7,function(_a){
	try{_a.style[_9] = AJS2.getCssDim(_8);} catch(e) {}
});
},extend:function(_b){
var _c=new this("no_init");
for(k in _b){
var _d=_c[k];
var _e=_b[k];
if(_d&&_d!=_e&&typeof _e=="function"){
_e=this._parentize(_e,_d);
}
_c[k]=_e;
}
return new AJS2.Class(_c);
},log:function(o){
if(window.console){
console.log(o);
}else{
var div=AJS2.$("AJS2_logger");
if(!div){
div=AJS2.DIV({id:"AJS2_logger","style":"color: green; position: absolute; left: 0"});
div.style.top=AJS2.getScrollTop()+"px";
AJS2.ACN(AJS2.getBody(),div);
}
AJS2.setHTML(div,""+o);
}
},setHeight:function(){
var _11=AJS2.forceArray(arguments);
_11.splice(_11.length-1,0,"height");
AJS2.setStyle.apply(null,_11);
},_getRealScope:function(fn,_13){
_13=AJS2.$A(_13);
var _14=fn._cscope||window;
return function(){
var _15=AJS2.$FA(arguments).concat(_13);
return fn.apply(_14,_15);
};
},documentInsert:function(elm){
if(typeof (elm)=="string"){
elm=AJS2.HTML2DOM(elm);
}
document.write("<span id=\"dummy_holder\"></span>");
AJS2.swapDOM(AJS2.$("dummy_holder"),elm);
},getWindowSize:function(doc){
doc=doc||document;
var _18,_19;
if(self.innerHeight){
_18=self.innerWidth;
_19=self.innerHeight;
}else{
if(doc.documentElement&&doc.documentElement.clientHeight){
_18=doc.documentElement.clientWidth;
_19=doc.documentElement.clientHeight;
}else{
if(doc.body){
_18=doc.body.clientWidth;
_19=doc.body.clientHeight;
}
}
}
return {"w":_18,"h":_19};
},flattenList:function(_1a){
var r=[];
var _1c=function(r,l){
AJS2.map(l,function(o){
if(o==null){
}else{
if(AJS2.isArray(o)){
_1c(r,o);
}else{
r.push(o);
}
}
});
};
_1c(r,_1a);
return r;
},isFunction:function(obj){
return (typeof obj=="function");
},setEventKey:function(e){
e.key=e.keyCode?e.keyCode:e.charCode;
if(window.event){
e.ctrl=window.event.ctrlKey;
e.shift=window.event.shiftKey;
}else{
e.ctrl=e.ctrlKey;
e.shift=e.shiftKey;
}
switch(e.key){
case 63232:
e.key=38;
break;
case 63233:
e.key=40;
break;
case 63235:
e.key=39;
break;
case 63234:
e.key=37;
break;
}
},removeElement:function(){
var _22=AJS2.forceArray(arguments);
AJS2.map(_22,function(elm){
AJS2.swapDOM(elm,null);
});
},_unloadListeners:function(){
if(AJS2.listeners){
AJS2.map(AJS2.listeners,function(elm,_25,fn){
AJS2.REV(elm,_25,fn);
});
}
AJS2.listeners=[];
},join:function(_27,_28){
try{
return _28.join(_27);
}
catch(e){
var r=_28[0]||"";
AJS2.map(_28,function(elm){
r+=_27+elm;
},1);
return r+"";
}
},getIndex:function(elm,_2c,_2d){
for(var i=0;i<_2c.length;i++){
if(_2d&&_2d(_2c[i])||elm==_2c[i]){
return i;
}
}
return -1;
},isIn:function(elm,_30){
var i=AJS2.getIndex(elm,_30);
if(i!=-1){
return true;
}else{
return false;
}
},isArray:function(obj){
return obj instanceof Array;
},setLeft:function(){
var _33=AJS2.forceArray(arguments);
_33.splice(_33.length-1,0,"left");
AJS2.setStyle.apply(null,_33);
},appendChildNodes:function(elm){
if(arguments.length>=2){
AJS2.map(arguments,function(n){
if(AJS2.isString(n)){
n=AJS2.TN(n);
}
if(AJS2.isDefined(n)){
elm.appendChild(n);
}
},1);
}
return elm;
},getElementsByTagAndClassName:function(_36,_37,_38,_39){
var _3a=[];
if(!AJS2.isDefined(_38)){
_38=document;
}
if(!AJS2.isDefined(_36)){
_36="*";
}
var els=_38.getElementsByTagName(_36);
var _3c=els.length;
var _3d=new RegExp("(^|\\s)"+_37+"(\\s|$)");
for(i=0,j=0;i<_3c;i++){
if(_3d.test(els[i].className)||_37==null){
_3a[j]=els[i];
j++;
}
}
if(_39){
return _3a[0];
}else{
return _3a;
}
},isOpera:function(){
return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
},isString:function(obj){
return (typeof obj=="string");
},hideElement:function(elm){
var _40=AJS2.forceArray(arguments);
AJS2.map(_40,function(elm){
elm.style.display="none";
});
},setOpacity:function(elm,p){
elm.style.opacity=p;
elm.style.filter="alpha(opacity="+p*100+")";
},insertBefore:function(elm,_45){
_45.parentNode.insertBefore(elm,_45);
return elm;
},setWidth:function(){
var _46=AJS2.forceArray(arguments);
_46.splice(_46.length-1,0,"width");
AJS2.setStyle.apply(null,_46);
},createArray:function(v){
if(AJS2.isArray(v)&&!AJS2.isString(v)){
return v;
}else{
if(!v){
return [];
}else{
return [v];
}
}
},isDict:function(o){
var _49=String(o);
return _49.indexOf(" Object")!=-1;
},isMozilla:function(){
return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);
},removeEventListener:function(elm,_4b,fn,_4d){
var _4e="AJS2l_"+_4b+fn;
if(!_4d){
_4d=false;
}
fn=elm[_4e]||fn;
if(elm["on"+_4b]==fn){
elm["on"+_4b]=elm[_4e+"old"];
}
if(elm.removeEventListener){
elm.removeEventListener(_4b,fn,_4d);
if(AJS2.isOpera()){
elm.removeEventListener(_4b,fn,!_4d);
}
}else{
if(elm.detachEvent){
elm.detachEvent("on"+_4b,fn);
}
}
},callLater:function(fn,_50){
var _51=function(){
fn();
};
window.setTimeout(_51,_50);
},setTop:function(){
var _52=AJS2.forceArray(arguments);
_52.splice(_52.length-1,0,"top");
AJS2.setStyle.apply(null,_52);
},_createDomShortcuts:function(){
var _53=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];
var _54=function(elm){
AJS2[elm.toUpperCase()]=function(){
return AJS2.createDOM.apply(null,[elm,arguments]);
};
};
AJS2.map(_53,_54);
AJS2.TN=function(_56){
return document.createTextNode(_56);
};
},addCallback:function(fn){
this.callbacks.unshift(fn);
},bindMethods:function(_58){
for(var k in _58){
var _5a=_58[k];
if(typeof (_5a)=="function"){
_58[k]=AJS2.$b(_5a,_58);
}
}
},partial:function(fn){
var _5c=AJS2.$FA(arguments);
_5c.shift();
return function(){
_5c=_5c.concat(AJS2.$FA(arguments));
return fn.apply(window,_5c);
};
},isNumber:function(obj){
return (typeof obj=="number");
},getCssDim:function(dim){
if(AJS2.isString(dim)){
return dim;
}else{
return dim+"px";
}
},isIe:function(){
return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);
},removeClass:function(){
var _5f=AJS2.forceArray(arguments);
var cls=_5f.pop();
var _61=function(o){
o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");
};
AJS2.map(_5f,function(elm){
_61(elm);
});
},setHTML:function(elm,_65){
elm.innerHTML=_65;
return elm;
},map:function(_66,fn,_68,_69){
var i=0,l=_66.length;
if(_68){
i=_68;
}
if(_69){
l=_69;
}
for(i;i<l;i++){
var val=fn(_66[i],i);
if(val!=undefined){
return val;
}
}
},addEventListener:function(elm,_6e,fn,_70,_71){
var _72="AJS2l_"+_6e+fn;
if(!_71){
_71=false;
}
AJS2.listeners=AJS2.$A(AJS2.listeners);
if(AJS2.isIn(_6e,["keypress","keydown","keyup","click"])){
var _73=fn;
fn=function(e){
AJS2.setEventKey(e);
return _73.apply(window,arguments);
};
}
var _75=AJS2.isIn(_6e,["submit","load","scroll","resize"]);
var _76=AJS2.$A(elm);
AJS2.map(_76,function(_77){
if(_70){
var _78=fn;
fn=function(e){
AJS2.REV(_77,_6e,fn);
return _78.apply(window,arguments);
};
}
if(_75){
var _7a=_77["on"+_6e];
var _7b=function(){
if(_7a){
fn(arguments);
return _7a(arguments);
}else{
return fn(arguments);
}
};
_77[_72]=_7b;
_77[_72+"old"]=_7a;
elm["on"+_6e]=_7b;
}else{
_77[_72]=fn;
if(_77.attachEvent){
_77.attachEvent("on"+_6e,fn);
}else{
if(_77.addEventListener){
_77.addEventListener(_6e,fn,_71);
}
}
AJS2.listeners.push([_77,_6e,fn]);
}
});
},preloadImages:function(){
AJS2.AEV(window,"load",AJS2.$p(function(_7c){
AJS2.map(_7c,function(src){
var pic=new Image();
pic.src=src;
});
},arguments));
},forceArray:function(_7f){
var r=[];
AJS2.map(_7f,function(elm){
r.push(elm);
});
return r;
},update:function(l1,l2){
for(var i in l2){
l1[i]=l2[i];
}
return l1;
},getBody:function(){
return AJS2.$bytc("body")[0];
},HTML2DOM:function(_85,_86){
var d=AJS2.DIV();
d.innerHTML=_85;
if(_86){
return d.childNodes[0];
}else{
return d;
}
},getElement:function(id){
if(AJS2.isString(id)||AJS2.isNumber(id)){
return document.getElementById(id);
}else{
return id;
}
},showElement:function(){
var _89=AJS2.forceArray(arguments);
AJS2.map(_89,function(elm){
elm.style.display="";
});
},bind:function(fn,_8c,_8d){
fn._cscope=_8c;
return AJS2._getRealScope(fn,_8d);
},createDOM:function(_8e,_8f){
var i=0,_91;
var elm=document.createElement(_8e);
var _93=_8f[0];
if(AJS2.isDict(_8f[i])){
for(k in _93){
_91=_93[k];
if(k=="style"||k=="s"){
elm.style.cssText=_91;
}else{
if(k=="c"||k=="class"||k=="className"){
elm.className=_91;
}else{
elm.setAttribute(k,_91);
}
}
}
i++;
}
if(_93==null){
i=1;
}
for(var j=i;j<_8f.length;j++){
var _91=_8f[j];
if(_91){
var _95=typeof (_91);
if(_95=="string"||_95=="number"){
_91=AJS2.TN(_91);
}
elm.appendChild(_91);
}
}
return elm;
},swapDOM:function(_96,src){
_96=AJS2.getElement(_96);
var _98=_96.parentNode;
if(src){
src=AJS2.getElement(src);
_98.replaceChild(src,_96);
}else{
_98.removeChild(_96);
}
return src;
},isDefined:function(o){
return (o!="undefined"&&o!=null);
}};
AJS2.$=AJS2.getElement;
AJS2.$$=AJS2.getElements;
AJS2.$f=AJS2.getFormElement;
AJS2.$p=AJS2.partial;
AJS2.$b=AJS2.bind;
AJS2.$A=AJS2.createArray;
AJS2.DI=AJS2.documentInsert;
AJS2.ACN=AJS2.appendChildNodes;
AJS2.RCN=AJS2.replaceChildNodes;
AJS2.AEV=AJS2.addEventListener;
AJS2.REV=AJS2.removeEventListener;
AJS2.$bytc=AJS2.getElementsByTagAndClassName;
AJS2.$AP=AJS2.absolutePosition;
AJS2.$FA=AJS2.forceArray;
AJS2.addEventListener(window,"unload",AJS2._unloadListeners);
AJS2._createDomShortcuts();
AJS2.Class=function(_9a){
var fn=function(){
if(arguments[0]!="no_init"){
return this.init.apply(this,arguments);
}
};
fn.prototype=_9a;
AJS2.update(fn,AJS2.Class.prototype);
return fn;
};
AJS2.Class.prototype={extend:function(_9c){
var _9d=new this("no_init");
for(k in _9c){
var _9e=_9d[k];
var cur=_9c[k];
if(_9e&&_9e!=cur&&typeof cur=="function"){
cur=this._parentize(cur,_9e);
}
_9d[k]=cur;
}
return new AJS2.Class(_9d);
},implement:function(_a0){
AJS2.update(this.prototype,_a0);
},_parentize:function(cur,_a2){
return function(){
this.parent=_a2;
return cur.apply(this,arguments);
};
}};
script_loaded=true;


script_loaded=true;

AJS2.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(_1,_2){
var _3=new AJS2.fx.Base();
_3.elm=AJS2.$(_1);
_3.options.duration=600;
_3.setOptions(_2);
AJS2.update(_3,{increase:function(){
if(this.now==7){
_1.style.backgroundColor="#fff";
}else{
_1.style.backgroundColor="#"+AJS2.fx._shades[Math.floor(this.now)];
}
}});
return _3.custom(6,0);
},fadeIn:function(_4,_5){
_5=_5||{};
if(!_5.from){
_5.from=0;
AJS2.setOpacity(_4,0);
}
if(!_5.to){
_5.to=1;
}
var s=new AJS2.fx.Style(_4,"opacity",_5);
return s.custom(_5.from,_5.to);
},fadeOut:function(_7,_8){
_8=_8||{};
if(!_8.from){
_8.from=1;
}
if(!_8.to){
_8.to=0;
}
_8.duration=300;
var s=new AJS2.fx.Style(_7,"opacity",_8);
return s.custom(_8.from,_8.to);
},setWidth:function(_a,_b){
var s=new AJS2.fx.Style(_a,"width",_b);
return s.custom(_b.from,_b.to);
},setHeight:function(_d,_e){
var s=new AJS2.fx.Style(_d,"height",_e);
return s.custom(_e.from,_e.to);
}};
AJS2.fx.Base=new AJS2.Class({init:function(_10){
this.options={onStart:function(){
},onComplete:function(){
},transition:AJS2.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};
AJS2.update(this.options,_10);
AJS2.bindMethods(this);
},setOptions:function(_11){
AJS2.update(this.options,_11);
},step:function(){
var _12=new Date().getTime();
if(_12<this.time+this.options.duration){
this.cTime=_12-this.time;
this.setNow();
}else{
setTimeout(AJS2.$b(this.options.onComplete,this,[this.elm]),10);
this.clearTimer();
this.now=this.to;
}
this.increase();
},setNow:function(){
this.now=this.compute(this.from,this.to);
},compute:function(_13,to){
var _15=to-_13;
return this.options.transition(this.cTime,_13,_15,this.options.duration);
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
return this;
},_start:function(_16,to){
if(!this.options.wait){
this.clearTimer();
}
if(this.timer){
return;
}
setTimeout(AJS2.$p(this.options.onStart,this.elm),10);
this.from=_16;
this.to=to;
this.time=new Date().getTime();
this.timer=setInterval(this.step,Math.round(1000/this.options.fps));
return this;
},custom:function(_18,to){
return this._start(_18,to);
},set:function(to){
this.now=to;
this.increase();
return this;
},setStyle:function(elm,_1c,val){
if(this.property=="opacity"){
AJS2.setOpacity(elm,val);
}else{
AJS2.setStyle(elm,_1c,val);
}
}});
AJS2.fx.Style=AJS2.fx.Base.extend({init:function(elm,_1f,_20){
this.parent();
this.elm=elm;
this.setOptions(_20);
this.property=_1f;
},increase:function(){
this.setStyle(this.elm,this.property,this.now);
}});
AJS2.fx.Styles=AJS2.fx.Base.extend({init:function(elm,_22){
this.parent();
this.elm=AJS2.$(elm);
this.setOptions(_22);
this.now={};
},setNow:function(){
for(p in this.from){
this.now[p]=this.compute(this.from[p],this.to[p]);
}
},custom:function(obj){
if(this.timer&&this.options.wait){
return;
}
var _24={};
var to={};
for(p in obj){
_24[p]=obj[p][0];
to[p]=obj[p][1];
}
return this._start(_24,to);
},increase:function(){
for(var p in this.now){
this.setStyle(this.elm,p,this.now[p]);
}
}});
AJS2.fx.Transitions={linear:function(t,b,c,d){
return c*t/d+b;
},sineInOut:function(t,b,c,d){
return -c/2*(Math.cos(Math.PI*t/d)-1)+b;
}};
script_loaded=true;


script_loaded=true;

var PB_CURRENT=null;
PB_hide=function(cb){
PB_CURRENT.hide(cb);
};
PraktikaBox=new AJS2.Class({init:function(_2){
this.use_fx=AJS2.fx;
this.type="page";
this.overlay_click_close=false;
this.salt=0;
this.root_dir=PRAKTIKA_BOX_ROOT_DIR;
this.image_dir=PRAKTIKA_BOX_IMAGE_DIR;
this.callback_fns=[];
this.reload_on_close=false;
this.src_loader=this.root_dir+"loader_frame.html";
var _3=window.location.hostname.indexOf("www");
var _4=this.src_loader.indexOf("www");
if(_3!=-1&&_4==-1){
this.src_loader=this.src_loader.replace("://","://www.");
}
if(_3==-1&&_4!=-1){
this.src_loader=this.src_loader.replace("://www.","://");
}
this.show_loading=true;
AJS2.update(this,_2);
},addCallback:function(fn){
if(fn){
this.callback_fns.push(fn);
}
},show:function(_6){
PB_CURRENT=this;
this.url=_6;
var _7=[AJS2.$bytc("object"),AJS2.$bytc("select")];
AJS2.map(AJS2.flattenList(_7),function(_8){
// _8.style.visibility="hidden";
});
this.createElements();
return false;
},hide:function(cb){
var me=this;
AJS2.callLater(function(){
var _b=me.callback_fns;
if(_b!=[]){
AJS2.map(_b,function(fn){
fn();
});
}
me.onHide();
if(me.use_fx){
var _d=me.overlay;
AJS2.fx.fadeOut(me.overlay,{onComplete:function(){
AJS2.removeElement(_d);
_d=null;
},duration:300});
AJS2.removeElement(me.g_window);
}else{
AJS2.removeElement(me.g_window,me.overlay);
}
me.removeFrame();
AJS2.REV(window,"scroll",_PB_setOverlayDimension);
AJS2.REV(window,"resize",_PB_update);
var _e=[AJS2.$bytc("object"),AJS2.$bytc("select")];
AJS2.map(AJS2.flattenList(_e),function(_f){
// _f.style.visibility="visible";
});
PB_CURRENT=null;
if(me.reload_on_close){
window.location.reload();
}
if(AJS2.isFunction(cb)){
cb();
}
},10);
},update:function(){
this.setOverlayDimension();
this.setFrameSize();
this.setWindowPosition();
},createElements:function(){
this.initOverlay();
this.g_window=AJS2.DIV({"id":"praktika_window"});
AJS2.hideElement(this.g_window);
AJS2.getBody().insertBefore(this.g_window,this.overlay.nextSibling);
this.initFrame();
this.initHook();
this.update();
var me=this;
if(this.use_fx){
AJS2.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){
me.onShow();
AJS2.showElement(me.g_window);
me.startLoading();
}});
}else{
AJS2.setOpacity(this.overlay,0.7);
AJS2.showElement(this.g_window);
this.onShow();
this.startLoading();
}
AJS2.AEV(window,"scroll",_PB_setOverlayDimension);
AJS2.AEV(window,"resize",_PB_update);
},removeFrame:function(){
try{
AJS2.removeElement(this.iframe);
}
catch(e){
}
this.iframe=null;
},startLoading:function(){
this.iframe.src=this.src_loader+"?s="+this.salt++;
AJS2.showElement(this.iframe);
},setOverlayDimension:function(){
var _11=AJS2.getWindowSize();
if(AJS2.isMozilla()||AJS2.isOpera()){
AJS2.setWidth(this.overlay,"100%");
}else{
AJS2.setWidth(this.overlay,_11.w);
}
var _12=Math.max(AJS2.getScrollTop()+_11.h,AJS2.getScrollTop()+this.height);
if(_12<AJS2.getScrollTop()){
AJS2.setHeight(this.overlay,_12);
}else{
AJS2.setHeight(this.overlay,AJS2.getScrollTop()+_11.h);
}
},initOverlay:function(){
this.overlay=AJS2.DIV({"id":"praktika_overlay"});
if(this.overlay_click_close){
AJS2.AEV(this.overlay,"click",PB_hide);
}
AJS2.setOpacity(this.overlay,0);
AJS2.getBody().insertBefore(this.overlay,AJS2.getBody().firstChild);
},initFrame:function(){
if(!this.iframe){
var d={"allowTransparency":"true","name":"praktika_frame","class":"praktika_frame","frameBorder":0,"scrolling":"no"};
if(AJS2.isIe()){
d.src="javascript:false;document.write(\"\");";
}
this.iframe=AJS2.IFRAME(d);
this.middle_cnt=AJS2.DIV({"class":"content"},this.iframe);
this.top_cnt=AJS2.DIV();
this.bottom_cnt=AJS2.DIV();
AJS2.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt);
}
},onHide:function(){
},onShow:function(){
},setFrameSize:function(){
},setWindowPosition:function(){
},initHook:function(){
}});
_PB_update=function(){
if(PB_CURRENT){
PB_CURRENT.update();
}
};
_PB_setOverlayDimension=function(){
if(PB_CURRENT){
PB_CURRENT.setOverlayDimension();
}
};
AJS2.preloadImages(PRAKTIKA_BOX_IMAGE_DIR+"indicator.gif");
script_loaded=true;
var PB_SETS={};
function decoGreyboxLinks(){
var as=AJS2.$bytc("a");
AJS2.map(as,function(a){
if(a.getAttribute("href")&&a.getAttribute("rel")){
var rel=a.getAttribute("rel");
if(rel.indexOf("pb_")==0){
var _17=rel.match(/\w+/)[0];
var _18=rel.match(/\[(.*)\]/)[1];
var _19=0;
var _1a={"caption":a.title||"","url":a.href};
if(_17=="pb_pageset"||_17=="pb_imageset"){
if(!PB_SETS[_18]){
PB_SETS[_18]=[];
}
PB_SETS[_18].push(_1a);
_19=PB_SETS[_18].length;
}
if(_17=="pb_pageset"){
a.onclick=function(){
PB_showFullScreenSet(PB_SETS[_18],_19);
return false;
};
}
if(_17=="pb_imageset"){
a.onclick=function(){
PB_showImageSet(PB_SETS[_18],_19);
return false;
};
}
if(_17=="pb_image"){
a.onclick=function(){
PB_showImage(_1a.caption,_1a.url);
return false;
};
}
if(_17=="pb_page"){
a.onclick=function(){
var sp=_18.split(/, ?/);
PB_show(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));
return false;
};
}
if(_17=="pb_page_fs"){
	window.scrollTop = 0;
a.onclick=function(){
PB_showFullScreen(_1a.caption,_1a.url);
return false;
};
}
if(_17=="pb_page_center"){
a.onclick=function(){
var sp=_18.split(/, ?/);
PB_showCenter(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));
return false;
};
}
}
}
});
}
AJS2.AEV(window,"load",decoGreyboxLinks);
PB_showImage=function(_1d,url,_1f){
var _20={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1d,callback_fn:_1f};
var win=new PB_Gallery(_20);
return win.show(url);
};
PB_showPage=function(_22,url,_24){
var _25={type:"page",caption:_22,callback_fn:_24,fullscreen:true,center_win:false};
var win=new PB_Gallery(_25);
return win.show(url);
};
PB_Gallery=PraktikaBox.extend({init:function(_27){
this.parent({});
this.img_close=this.root_dir+"g_close.gif";
AJS2.update(this,_27);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS2.addClass(this.g_window,"PB_Gallery");
var _28=AJS2.DIV({"class":"inner"});
this.header=AJS2.DIV({"class":"PB_header"},_28);
AJS2.setOpacity(this.header,0);
AJS2.getBody().insertBefore(this.header,this.overlay.nextSibling);
var _29=AJS2.TD({"id":"PB_caption","class":"caption","width":"40%"},this.caption);
var _2a=AJS2.TD({"id":"PB_middle","class":"middle","width":"20%"});
var _2b=AJS2.IMG({"src":this.img_close});
AJS2.AEV(_2b,"click",PB_hide);
var _2c=AJS2.TD({"class":"close","width":"40%"},_2b);
var _2d=AJS2.TBODY(AJS2.TR(_29,_2a,_2c));
var _2e=AJS2.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2d);
AJS2.ACN(_28,_2e);
if(this.fullscreen){
AJS2.AEV(window,"scroll",AJS2.$b(this.setWindowPosition,this));
}else{
AJS2.AEV(window,"scroll",AJS2.$b(this._setHeaderPos,this));
}
},setFrameSize:function(){
var _2f=this.overlay.offsetWidth;
var _30=AJS2.getWindowSize();
if(this.fullscreen){
this.width=_2f-40;
this.height=_30.h-80;
}alert(this.width);
AJS2.setWidth(this.iframe,this.width);
AJS2.setHeight(this.iframe,this.height);
AJS2.setWidth(this.header,_2f);
},_setHeaderPos:function(){
AJS2.setTop(this.header,AJS2.getScrollTop()+10);
},setWindowPosition:function(){
var _31=this.overlay.offsetWidth;
var _32=AJS2.getWindowSize();
AJS2.setLeft(this.g_window,((_31-50-this.width)/2));
var _33=AJS2.getScrollTop()+55;
if(!this.center_win){
AJS2.setTop(this.g_window,_33);
}else{
var fl=((_32.h-this.height)/2)+20+AJS2.getScrollTop();
if(fl<0){
fl=0;
}
if(_33>fl){
fl=_33;
}
AJS2.setTop(this.g_window,fl);
}
this._setHeaderPos();
},onHide:function(){
AJS2.removeElement(this.header);
AJS2.removeClass(this.g_window,"PB_Gallery");
},onShow:function(){
if(this.use_fx){
AJS2.fx.fadeIn(this.header,{to:1});
}else{
AJS2.setOpacity(this.header,1);
}
}});
AJS2.preloadImages(PRAKTIKA_BOX_ROOT_DIR+"g_close.gif");
PB_showFullScreenSet=function(set,_36,_37){
var _38={type:"page",fullscreen:true,center_win:false};
var _39=new PB_Sets(_38,set);
_39.addCallback(_37);
_39.showSet(_36-1);
return false;
};
PB_showImageSet=function(set,_3b,_3c){
var _3d={type:"image",fullscreen:false,center_win:true,width:300,height:300};
var _3e=new PB_Sets(_3d,set);
_3e.addCallback(_3c);
_3e.showSet(_3b-1);
return false;
};
PB_Sets=PB_Gallery.extend({init:function(_3f,set){
this.parent(_3f);
if(!this.img_next){
this.img_next=this.image_dir+"next.gif";
}
if(!this.img_prev){
this.img_prev=this.image_dir+"prev.gif";
}
this.current_set=set;
},showSet:function(_41){
this.current_index=_41;
var _42=this.current_set[this.current_index];
this.show(_42.url);
this._setCaption(_42.caption);
this.btn_prev=AJS2.IMG({"class":"left",src:this.img_prev});
this.btn_next=AJS2.IMG({"class":"right",src:this.img_next});
AJS2.AEV(this.btn_prev,"click",AJS2.$b(this.switchPrev,this));
AJS2.AEV(this.btn_next,"click",AJS2.$b(this.switchNext,this));
PB_STATUS=AJS2.SPAN({"class":"PB_navStatus"});
AJS2.ACN(AJS2.$("PB_middle"),this.btn_prev,PB_STATUS,this.btn_next);
this.updateStatus();
},updateStatus:function(){
AJS2.setHTML(PB_STATUS,(this.current_index+1)+" / "+this.current_set.length);
if(this.current_index==0){
AJS2.addClass(this.btn_prev,"disabled");
}else{
AJS2.removeClass(this.btn_prev,"disabled");
}
if(this.current_index==this.current_set.length-1){
AJS2.addClass(this.btn_next,"disabled");
}else{
AJS2.removeClass(this.btn_next,"disabled");
}
},_setCaption:function(_43){
AJS2.setHTML(AJS2.$("PB_caption"),_43);
},updateFrame:function(){
var _44=this.current_set[this.current_index];
this._setCaption(_44.caption);
this.url=_44.url;
this.startLoading();
},switchPrev:function(){
if(this.current_index!=0){
this.current_index--;
this.updateFrame();
this.updateStatus();
}
},switchNext:function(){
if(this.current_index!=this.current_set.length-1){
this.current_index++;
this.updateFrame();
this.updateStatus();
}
}});
AJS2.AEV(window,"load",function(){
//AJS2.preloadImages(PRAKTIKA_BOX_ROOT_DIR+"next.gif",PRAKTIKA_BOX_ROOT_DIR+"prev.gif");
});
PB_show=function(_45,url,_47,_48,_49){
var _4a={caption:_45,height:_47||500,width:_48||500,fullscreen:false,callback_fn:_49};
var win=new praktika_window(_4a);
return win.show(url);
};
PB_showCenter=function(_4c,url,_4e,_4f,_50){
var _51={caption:_4c,center_win:true,height:_4e||500,width:_4f||500,fullscreen:false,callback_fn:_50};
var win=new praktika_window(_51);
return win.show(url);
};
PB_showFullScreen=function(_53,url,_55){window.scrollTo(0, 0);
var _56={caption:_53,fullscreen:true,callback_fn:_55};
var win=new praktika_window(_56);
return win.show(url);
};
praktika_window=PraktikaBox.extend({init:function(_58){
this.parent({});
this.img_header=this.root_dir+"header_bg.gif";
this.img_close=this.image_dir+"w_close.gif";
this.show_close_img=true;
AJS2.update(this,_58);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS2.addClass(this.g_window,"PB_Window");
this.header=AJS2.TABLE({"class":"header"});
this.header.style.backgroundImage="url("+this.img_header+")";
var _59=AJS2.TD({"class":"caption"},this.caption);
var _5a=AJS2.TD({"class":"close"});
if(this.show_close_img){
var _5b=AJS2.IMG({"src":this.img_close});
var _5c=AJS2.SPAN("Close");
var btn=AJS2.DIV(_5b,_5c);
AJS2.AEV([_5b,_5c],"mouseover",function(){
AJS2.addClass(_5c,"on");
});
AJS2.AEV([_5b,_5c],"mouseout",function(){
AJS2.removeClass(_5c,"on");
});
AJS2.AEV([_5b,_5c],"mousedown",function(){
AJS2.addClass(_5c,"click");
});
AJS2.AEV([_5b,_5c],"mouseup",function(){
AJS2.removeClass(_5c,"click");
});
AJS2.AEV([_5b,_5c],"click",PB_hide);
AJS2.ACN(_5a,btn);
}
//tbody_header=AJS2.TBODY();
/*AJS2.ACN(tbody_header,AJS2.TR(_59,_5a));
AJS2.ACN(this.header,tbody_header);
AJS2.ACN(this.top_cnt,this.header);*/
if(this.fullscreen){
AJS2.AEV(window,"scroll",AJS2.$b(this.setWindowPosition,this));
}
},setFrameSize:function(){
if(this.fullscreen){
var _5e=AJS2.getWindowSize();
overlay_h=_5e.h;
//this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);
//this.height=Math.round(overlay_h-(overlay_h/100)*10);
this.width = this.overlay.offsetWidth;
//this.height = document.documentElement.scrollHeight;alert(this.height);
//this.height = (document.all || navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Opera") != -1) ? document.documentElement.scrollHeight : document.height;alert(this.height);
this.height = 4000;
}
AJS2.setWidth(this.header,this.width+6);
AJS2.setWidth(this.iframe,this.width);
AJS2.setHeight(this.iframe,this.height);
},setWindowPosition:function(){
var _5f=AJS2.getWindowSize();
AJS2.setLeft(this.g_window,((_5f.w-this.width)/2)-13);
if(!this.center_win){
//AJS2.setTop(this.g_window,document.documentElement.offsetTop);
AJS2.setTop(this.g_window,0);
//AJS2.setTop(this.g_window,AJS2.getScrollTop());
}else{
var fl=((_5f.h-this.height)/2)-20+AJS2.getScrollTop();
if(fl<0){
fl=0;
}
AJS2.setTop(this.g_window,fl);
}
}});
//AJS2.preloadImages(PRAKTIKA_BOX_ROOT_DIR+"w_close.gif",PRAKTIKA_BOX_ROOT_DIR+"header_bg.gif");

script_loaded=true;