/**
* @file      conecto.lib.js
* @author    Alexander Dick <a.dick@conecto.at>
* @generated 2009/08/18, 9:33am
*/
CONECTO={getWindowHeight:function(){var de=document.documentElement;return self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight},getWindowWidth:function(){var de=document.documentElement;return self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth},getScrollX:function(){var de=document.documentElement;return self.pageXOffset||(de&&de.scrollLeft)||document.body.scrollLeft},getScrollY:function(){var de=document.documentElement;return self.pageYOffset||(de&&de.scrollTop)||document.body.scrollTop},css:{getStyle:function(el,name){if(el.style[name])return el.style[name];else if(el.currentStyle)return el.currentStyle[name];else if(document.defaultView&&document.defaultView.getComputedStyle){name=name.replace(/([A-Z])/g,"-$1");name=name.toLowerCase();var s=document.defaultView.getComputedStyle(el,"");return s&&s.getPropertyValue(name)}else return null},resetCSS:function(el,prop){var alt={};for(var i in prop){alt[i]=el.style[i];el.style[i]=prop[i]}return alt},restoreCSS:function(el,prop){for(var i in prop)el.style[i]=prop[i]},getHeight:function(el){return parseInt(this.getStyle(el,"height"))},getWidth:function(el){return parseInt(this.getStyle(el,"width"))},getFullHeight:function(el){if(this.getStyle(el,"display")!="none")return el.offsetHeight||this.getHeight(el);var alt=this.resetCSS(el,{display:"",visibility:"hidden",position:"absolute"});var h=el.clientHeight||this.getHeight(el);this.restoreCSS(el,alt);return h},getFullWidth:function(el){if(this.getStyle(el,"display")!="none")return el.offsetWidth||this.getWidth(el);var alt=this.resetCSS(el,{display:"",visibility:"hidden",position:"absolute"});var w=el.clientWidth||this.getWidth(el);this.restoreCSS(el,alt);return w},hide:function(el){var curDisplay=this.getStyle(el,"display");if(curDisplay!="none")el.$oldDisplay=curDisplay;el.style.display="none"},show:function(el){el.style.display=el.$oldDisplay||"block"},setOpacity:function(el,level){if(el.filters)el.filters.alpha.opacity=level;else el.style.opacity=(level/100)},fadeIn:function(el,duration,callback){this.setOpacity(el,0);cb=callback||function(){};duration=duration||1000;var speed=(duration/100);this.show(el);for(var i=0;i<=100;i+=5){(function(){var pos=i;setTimeout(function(){CONECTO.css.setOpacity(el,pos);if(pos==100)cb()},(pos+1)*speed)})()}},fadeOut:function(el,duration,callback){this.setOpacity(el,100);cb=callback||function(){};duration=duration||1000;var speed=(duration/100);for(var i=0;i<=100;i+=5){(function(){var pos=i;setTimeout(function(){CONECTO.css.setOpacity(el,(100-pos));if(pos==100)cb()},pos*speed)})()}},posX:function(el){var p=0;while(el.offsetParent){p+=el.offsetLeft;el=el.offsetParent}return p},posY:function(el){var p=0;while(el.offsetParent){p+=el.offsetTop;el=el.offsetParent}return p}},dom:{parent:function(el,num){num=num||1;for(var i=0;i<num;i++)if(el!=null)el=el.parentNode;return el},prev:function(el){do{el=el.previousSibling}while(el&&el.nodeType!=1);return el},next:function(el){do{el=el.nextSibling}while(el&&el.nodeType!=1);return el},children:function(el){var nodes=[];var node=el.firstChild;while(node){if(node.nodeType!=3&&node.nodeType!=8)nodes.push(node);node=node.nextSibling}return nodes},firstChild:function(el){var node=el.firstChild;while(node){if(node.nodeType!=3&&node.nodeType!=8)return node;node=node.nextSibling}return null},remove:function(el){if(el)el.parentNode.removeChild(el)},empty:function(el){while(el.firstChild)this.remove(el.firstChild)},setAttr:function(el,name,value){if(!name||name.constructor!=String)return;name={"for":"htmlFor","class":"className"}[name]||name;if(value!=null){if(name=="className"){if(!this.hasAttr(el,"class"))el.className=value;else el.className+=" "+value;return}el[name]=value;if(el.setAttribute)el.setAttribute(name,value)}return el[name]||el.getAttribute(name)||''},getAttr:function(el,name){if(!name||name.constructor!=String)return;name={"for":"htmlFor","class":"className"}[name]||name;return el[name]||el.getAttribute(name)||null},hasAttr:function(el,name){return(this.getAttr(el,name)!=null)},hasClass:function(el,name){var regexp=new RegExp("(^|\\s)"+name+"(\\s|$)");return regexp.test(el.className)},addClass:function(el,name){return this.setAttr(el,"class",name)}},div:{fixPng:function(){if(CONECTO.browser.isIE6()&&(document.body.filters)){for(var i=0;i<document.images.length;i++){var img=document.images[i];var imgName=img.src.toUpperCase();if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){var imgID=(img.id)?'id="'+img.id+'" ':'';var imgClass=(img.className)?'class="'+img.className+'" ':'';var imgTitle=(img.title)?'title="'+img.title+'" ':'title="'+img.alt+'" ';var imgStyle='display:inline-block;'+img.style.cssText;if(img.align=='left')imgStyle='float:left;'+imgStyle;if(img.align=='right')imgStyle='float:right;'+imgStyle;if(img.parentElement.href)imgStyle='cursor:hand;'+imgStyle;var strNewHTML='<span '+imgID+imgClass+imgTitle+' style="width:'+img.width+'px; height:'+img.height+'px;'+imgStyle+';'+'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+img.src+'\', sizingMethod=\'scale\');"></span>';img.outerHTML=strNewHTML;i=i-1}}}},zebraTables:function(){var bodies=document.getElementsByTagName("tbody");for(var i in bodies){var rows=CONECTO.dom.children(bodies[i]);var x=0;for(var j in rows){if(x%2==0)var className="even";else var className="odd";CONECTO.dom.addClass(rows[j],className);x++}}return},parseQueryString:function(){var str=window.location.search;var objURL={};str.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function($0,$1,$2,$3){objURL[$1]=$3});return objURL},addQueryStringParam:function(key,value){key=escape(key);value=escape(value);var kvp=window.location.search.substr(1).split('&');var i=kvp.length;var x;while(i--){x=kvp[i].split('=');if(x[0]==key){x[1]=value;kvp[i]=x.join('=');break}}if(i<0)kvp[kvp.length]=[key,value].join('=');window.location.search=kvp.join('&')}},browser:{isIE:function(){return(/MSIE (\d+\.\d+);/.test(navigator.userAgent))},isIE6:function(){return(this.isIE()&&this.ieVersion()==6)},ieVersion:function(){var rv=-1;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)rv=parseFloat(RegExp.$1)}return rv}},cookie:{create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else{var expires=""}document.cookie=name+"="+value+expires+"; path=/"},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)}return null},erase:function(name){this.create(name,"",-1)}}};
