
function js()
{this.ns=(document.layers);this.ie=(document.all);this.w3=(document.getElementById&&!this.ie);this.opera=(navigator.userAgent.search("Opera")!=-1);this.safari=(navigator.userAgent.search("AppleWebKit")!=-1);this.mouse_pos_x=0;this.mouse_pos_y=0;this.e=function(id)
{return document.getElementById(id);}
this.n=function(name)
{return document.getElementsByName(name);}
this.tn=function(name)
{return document.getElementsByTagName(name);}
this.replace=function(id,value)
{if(!_idExists(id))
return;this.e(id).innerHTML=value;}
this.toggle=function(id)
{if(!_idExists(id))
return;if(this.e(id).style.display!='none')
this.e(id).style.display='none';else
this.e(id).style.display='';}
this.getType=function(id)
{if(!_idExists(id))
return;return typeof this.e(id);}
this.tagName=function(id)
{if(!_idExists(id))
return;return this.e(id).tagName;}
this.inArray=function(elem,array)
{if(!this.isObject(array))
return false;for(i=0;array[i];++i)
if(array[i]==elem)
return true;return false;}
this.unsetArrayElem=function(elem,array)
{if(!this.isObject(array))
{alert('Als zweiter Parameter wird ein Array erwartet: '+this.getType(array));return;}
var new_array=new Array();for(var i=0;array[i];++i)
if(array[i]!=elem)
new_array.push(array[i]);return new_array;}
this.isString=function(value)
{return(typeof(value)=='string');}
this.isObject=function(value)
{return(typeof(value)=='object');}
this.isNumber=function(value)
{if(js.isString&&value.match(/^\d+$/))
return true;return(typeof(value)=='number');}
this.isBoolean=function(value)
{return(typeof(value)=='boolean');}
this.isUndefined=function(value)
{return(typeof(value)=='undefined');}
this.isEmpty=function(value)
{if(this.isString(value)&&(value==''||value=='undefined'))
return true;if(this.isUndefined(value))
return true;if(this.isBoolean(value))
return!value;if(this.isObject(value)&&value.length==0)
return true;return false;}
this.popup=function(url,name,width,height,scrollbars,resizable,status)
{return _openWindow(url,name,width,height,scrollbars,resizable,status,true);}
this.popunder=function(url,name,width,height,scrollbars,resizable,status)
{return _openWindow(url,name,width,height,scrollbars,resizable,status,false);}
this.contentOverlay=function(display,zindex)
{if(display===true){if(!this.e('content_overlay')){var objBody=document.getElementsByTagName("body").item(0);var objOverlay=document.createElement("div");objOverlay.setAttribute('id','content_overlay');objOverlay.style.display='none';objOverlay.style.position='absolute';objOverlay.style.top='0';objOverlay.style.left='0';objOverlay.style.zIndex=(zindex?zindex:1);objOverlay.style.width='100%';objBody.insertBefore(objOverlay,objBody.firstChild);}
var objOverlay=this.e('content_overlay');var arrayPageSize=this.getPageSize();objOverlay.style.height=(arrayPageSize[1]+'px');objOverlay.style.display='block';}
else{this.e('content_overlay').style.display='none';}
window.onresize=function(){js.contentOverlay(display,zindex);};}
this.showElement=function(id)
{e=this.e(id);if(e.className=='hidden')
e.className='';else if(e.className){var classes_new=new Array();var classes=e.className.split(" ");for(i=0;i<classes.length;i++){if(classes[i]!='hidden')
classes_new.push(classes[i]);}
e.className=classes_new.join(' ');}}
this.hideElement=function(id)
{e=this.e(id);e.style.left='';e.style.top='';if(e.className=='')
e.className='hidden';else{var classes=e.className.split(" ");classes.push('hidden');e.className=classes.join(' ');}}
this.fadeElem=function(id,mode,opacity,delay)
{var elem=this.e(id);var self=this;if(elem.style.display!='block')
elem.style.display='block';if(mode=='in')
{opacity=opacity?opacity+10:1;if(opacity>100)
opacity=100;moz_opacity=opacity/100;elem.style.opacity=moz_opacity;elem.style.mozopacity=moz_opacity;elem.style.khtmlopacity=moz_opacity;elem.style.filter='Alpha(opacity='+opacity+')';if(opacity>=100)
return;}
else if(mode=='out')
{opacity=opacity?opacity-10:100;moz_opacity=opacity/100;elem.style.opacity=moz_opacity;elem.style.mozopacity=moz_opacity;elem.style.khtmlopacity=moz_opacity;elem.style.filter='Alpha(opacity='+opacity+')';if(opacity<=0)
{elem.style.display='none';return;}}
else
alert('Falscher Modus angegeben: '+mode);if(delay>0)
{setTimeout(function(){self.fadeElem(id,mode,opacity,0);},delay);return;}
setTimeout(function(){self.fadeElem(id,mode,opacity);},100);}
this.moveElem=function(id,pos,i,old_xoffset,old_yoffset)
{if(!_idExists(id))
return;elem=this.e(id);if(elem.style.display=='none'||elem.className.match(/\bhidden\b/))
return;var i=(typeof i!='undefined')?i+1:1;elemHeight=elem.offsetHeight;elemWidth=elem.offsetWidth;var yoffset=0;var xoffset=0;var docWidth=0;var docHeight=0;if(this.ie)
{xoffset=_trueBody().scrollLeft;yoffset=_trueBody().scrollTop;docWidth=_trueBody().offsetWidth;docHeight=_trueBody().offsetHeight;}
else
{xoffset=window.pageXOffset;yoffset=window.pageYOffset;docWidth=self.innerWidth;docHeight=self.innerHeight;}
switch(pos)
{case'fixTop':docWidth=(typeof fix_doc_width!='undefined'&&fix_doc_width<docWidth?fix_doc_width:docWidth);docHeight=(typeof fix_doc_height!='undefined'&&fix_doc_height<docHeight?fix_doc_height:docHeight)+elemHeight;if(i>1)
yoffset=old_yoffset;elem.style.top=((docHeight/2)-(elemHeight/2)+yoffset)+'px';if(typeof add_left_size!='undefined')
elem.style.left=((docWidth/2)-(elemWidth/2)+xoffset)+add_left_size+'px';else
elem.style.left=((docWidth/2)-(elemWidth/2)+xoffset)+'px';break;case'topLeft':elem.style.top=yoffset+'px';elem.style.left=xoffset;+'px';break;case'topCenter':elem.style.top=yoffset+'px';elem.style.left=((docWidth/2)-(elemWidth/2)+xoffset)+'px';break;case'leftCenter':elem.style.top=((docHeight/2)-(elemHeight/2)+yoffset)+'px';elem.style.left=xoffset+'px';break;case'center':case'centerCenter':docWidth=(typeof fix_doc_width!='undefined'&&fix_doc_width<docWidth?fix_doc_width:docWidth);docHeight=(typeof fix_doc_height!='undefined'&&fix_doc_height<docHeight?fix_doc_height:docHeight)+elemHeight
elem.style.top=((docHeight/2)-(elemHeight/2)+yoffset)+'px';if(typeof add_left_size!='undefined')
elem.style.left=((docWidth/2)-(elemWidth/2)+xoffset)+add_left_size+'px';else
elem.style.left=((docWidth/2)-(elemWidth/2)+xoffset)+'px';break;}
setTimeout('js.moveElem(\''+id+'\', \''+pos+'\', '+i+', '+xoffset+', '+yoffset+')',300);}
this.getPageSize=function()
{var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;}
this.loadJSFile=function(file)
{if(!this.isString(file))
return;var script_tags=this.tn('script');for(i=0;script_tags[i];++i)
{if(!script_tags[i].src)
continue;if(script_tags[i].src.match(file))
return;}
var head=js.tn('head')[0];var script=document.createElement('script');script.setAttribute('language','JavaScript');script.setAttribute('type','text/javascript');script.setAttribute('src',file);head.appendChild(script);}
this.loadCSSFile=function(file)
{if(!this.isString(file))
return;var tags=this.tn('link');for(i=0;tags[i];++i)
{if(!tags[i].rel!='stylesheet')
continue;if(tags[i].href.match(file))
return;}
var body=js.tn('head')[0];var link=document.createElement('link');link.setAttribute('rel','stylesheet');link.setAttribute('type','text/css');link.setAttribute('href',file);head.appendChild(link);}
this.checkFreeChars=function(src,max,id)
{free_chars=_getFreeChars(src,max);if(free_chars<=0)
{_stopTyping(src,max);free_chars=0;}
js.replace(id,free_chars);}
this.trim=function(string)
{string=string.replace(/^\s*/,'');string=string.replace(/\s*$/,'');return string;}
this.getElementPosition=function(element)
{var elem=element,tagname='',x=0,y=0;while((typeof(elem)=='object')&&(typeof(elem.tagName)!='undefined'))
{y+=elem.offsetTop;x+=elem.offsetLeft;tagname=elem.tagName.toUpperCase();if(tagname=="BODY")
elem=false;if(typeof(elem)=='object'&&typeof(elem.offsetParent)=='object')
elem=elem.offsetParent;}
position=new Object();position.x=x;position.y=y;return position;}
this.locateMousePos=function(e)
{if(e==null)
e=window.event;if(e.pageX||e.pageY){js.mouse_pos_x=e.pageX;js.mouse_pos_y=e.pageY;}else if(e.clientX||e.clientY){if(document.documentElement.scrollTop){js.mouse_pos_x=e.clientX+document.documentElement.scrollLeft;js.mouse_pos_y=e.clientY+document.documentElement.scrollTop;}else{js.mouse_pos_x=e.clientX+document.body.scrollLeft;js.mouse_pos_y=e.clientY+document.body.scrollTop;}}}
this.initMouseLocator=function()
{document.onmousemove=js.locateMousePos;}
this.addCSSClass=function(e,classname)
{if(typeof e=='string')
var e=js.e(e);if(e.className==classname)
return;var classes_new=new Array();var classes=e.className.split(" ");for(var i=0;i<classes[i];i++){if(classes[i]!=classname)
classes_new.push(classes[i]);}
classes_new.push(classname);e.className=classes_new.join(' ');}
this.removeCSSClass=function(e,classname)
{if(typeof e=='string')
var e=js.e(e);if(e.className=='')
return;var classes=new Array();var cur_classes=e.className.split(" ");for(var i=0;i<cur_classes[i];i++){if(cur_classes[i]!=classname)
classes.push(cur_classes[i]);}
e.className=classes.join(' ');}
function _getFreeChars(src,max)
{chars=src.value.length;new_lines=src.value.split('\n').length-1;free_chars=max-chars;if(new_lines>0)
free_chars+=new_lines;return free_chars;}
function _stopTyping(src,max)
{src.value=src.value.substr(0,max);}
function _trueBody()
{return(document.compatMode&&document.compatMode!='BackCompat')?document.documentElement:document.body;}
function _idExists(id)
{if(!js.e(id)){return false;}
return true;}
function _openWindow(url,name,width,height,scrollbars,resizable,status,focus)
{var params=new Array('width='+(width?width:400),'height='+(height?height:300),'scrollbars='+(scrollbars?'yes':'no'),'resizable='+(resizable?'yes':'no'),'status='+(status?'yes':'no'),'menubar=no','toolbar=no');var parameter=params.join(',');var wnd=null;var command="wnd = window.open('"+url+"', '"+name+"', '"+parameter+"');";eval(command);if(focus)
wnd.focus();else
wnd.blur();return wnd;}}
var js=new js();

// Cache: 2010-03-10 09:10:01 | MTime: 2008-10-26 14:16:39 | Packer: JSMin | js.js