if('undefined'==typeof(GI)){var GI=function(){var c=this;this.isIE=function(){if((/Microsoft/).test(window.navigator.appName)){return true}return false};this.getIEVersion=function(){var a=window.navigator.userAgent;var b=a.indexOf("MSIE ");if(b==-1){return 0}else{return parseFloat(a.substring(b+5,a.indexOf(";",b)))}};return this}}GI.Element=function(){var e=this;this.defaultElementOptions={duration:1,interval:100,onComplete:null};this.getPosX=function(a){var b=0;if(a.offsetParent){b=a.offsetLeft;while(null!=(a=a.offsetParent)){var c=b;b+=a.offsetLeft;if(0>b){b=c}}}else if(a.x)b=a.x;return b};this.getPosY=function(a){var b=0;if(a.offsetParent){b+=a.offsetTop;while(null!=(a=a.offsetParent)){var c=b;b+=a.offsetTop;if(0>b){b=c}}}else if(a.y)b=a.y;return b};this.getPos=function(a){var b=null;if('string'==typeof(a)){b=document.getElementById(a)}else if('object'==typeof(a)){b=a}var c={x:0,y:0};c.x=this.getPosX(b);c.y=this.getPosY(b);return c};this.moveToElement=function(a,b,c,d){if('string'==typeof(a)){a=document.getElementById(a)}if('string'==typeof(b)){b=document.getElementById(b)}if('object'!=typeof(a)||'object'!=typeof(b)){throw'Need 2 valid elements to move one over the other!';}if(!a.style.position||'absolute'!=a.style.position){a.style.position='absolute'}a.style.top=this.getPosY(b);a.style.left=this.getPosX(b);if('undefined'!=typeof(d)){d=parseInt(d);if(d){a.style.zIndex=d}}if(c){this.elementToggleShow(elem,false)}return e};this.initElement=function(a,b,c){if('undefined'==typeof(a.elementOptions)){a.elementOptions=this.defaultElementOptions}if('object'==typeof(c)){for(var d in c){a.elementOptions[d]=c[d]}}if('string'==typeof(b)){a.containableElement=document.getElementById(b)}else if('object'==typeof(b)){a.containableElement=b}if('undefined'==typeof(a.containableElement)||null==a.containableElement){throw('Need a valide dom object to initialize element (Can be id of or object itself)');}return a};this.getFullHeight=function(a){var b=a.style.clip;if(b){if(GI().isIE()){a.style.clip='rect( auto auto auto auto)'}else{a.style.clip='rect( auto, auto, auto, auto)'}}var c=a.offsetHeight;if(b){a.style.clip=b}return c};this.elementToggleShow=function(a,b){var c=false;if(a.style.display){if('block'!=a.style.display){c=true;a.style.display='block'}}else if(a.style.visibility){if('visible'!=a.style.visibility){c=true;a.style.visibility='visible'}}else if('undefined'!=typeof(b)&&b){c=true;a.style.display='block'}return c};this.elementToggleHide=function(a,b){var c=false;if(a.style.display){if('block'!=a.style.display){c=true;a.style.display='block'}}else if(a.style.visibility){if('visible'!=a.style.visibility){c=true;a.style.visibility='visible'}}else if('undefined'!=typeof(b)&&b){a.style.display='none';c=true}return c};return this};GI.Element.prototype.getElementHeight=function(){var a=this.elementToggleShow(this.containableElement,false);var b=this.getFullHeight(this.containableElement);if(a){this.elementToggleHide(this.containableElement,false)}return b};GI.Element.prototype.elementShow=function(a){this.elementToggleShow(this.containableElement,a);return this};GI.Element.prototype.elementHide=function(a){this.elementToggleHide(this.containableElement,a);return this};GI.Element.Fade=function(a,b){var c=this;GI.Element().initElement(this,a,b);this.runElement();return this};GI.Element.Fade.prototype=new GI.Element();GI.Element.Fade.prototype.runElement=function(){var a=this;if('object'==typeof(this.containableElement)){var b=100;if(GI().isIE()){var c=/(\D+)(\d+)\)$/;if(this.containableElement.style.filter){var d=c.exec(this.containableElement.style.filter);if(d&&(1<d.length)){b=parseFloat(d[2])}}}else if(this.containableElement.style.opacity){b=100*parseFloat(this.containableElement.style.opacity)}var e=100/((this.elementOptions.duration*1000)/this.elementOptions.interval);var f=Math.floor(b-e);if(0>f){f=0}if(GI().isIE()){this.containableElement.style.filter='progid:DXImageTransform.Microsoft.Alpha(Opacity='+f+')'}else{this.containableElement.style.opacity=f/100}if(0==f){this.elementHide(true);if(null!=this.elementOptions.onComplete){this.elementOptions.onComplete()}return a}this.elementShow(false);window.setTimeout(function(){a.runElement()},this.elementOptions.interval)}return a};GI.Element.Appear=function(a,b){GI.Element().initElement(this,a,b);this.runElement();return this};GI.Element.Appear.prototype=new GI.Element();GI.Element.Appear.prototype.runElement=function(){var a=this;var b=0;if(GI().isIE()){var c=/(\D+)(\d+)\)$/;if(this.containableElement.style.filter){var d=c.exec(this.containableElement.style.filter);if(d&&(1<d.length)){b=parseFloat(d[2])}}}else if(this.containableElement.style.opacity){b=100*parseFloat(this.containableElement.style.opacity)}var e=100/((this.elementOptions.duration*1000)/this.elementOptions.interval);var f=Math.ceil(b+e);if(100<f){f=100}if(GI().isIE()){this.containableElement.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+f+')'}else{this.containableElement.style.opacity=f/100}this.elementShow(false);if(100==f){if(null!=this.elementOptions.onComplete){this.elementOptions.onComplete()}return a}window.setTimeout(function(){a.runElement()},this.elementOptions.interval);return this};GI.Element.Slide=function(){return this};GI.Element.Slide.prototype=new GI.Element();GI.Element.Slide.prototype.storeHeight=function(){this.origHeight=this.getElementHeight();return this};GI.Element.SlideOpen=function(a,b){GI.Element().initElement(this,a,b);this.storeHeight();this.curClip=null;this.runElement();return this};GI.Element.SlideOpen.prototype=new GI.Element.Slide();GI.Element.SlideOpen.prototype.runElement=function(){var a=this;if(!this.containableElement.style.position||'absolute'!=this.containableElement.style.position){this.containableElement.style.position='absolute';this.containableElement.style.top=GI.Element().getPosY(this.containableElement)+'px';this.containableElement.style.left=GI.Element().getPosX(this.containableElement)+'px'}if(!this.containableElement.style.overflow||'hidden'!=this.containableElement.style.overflow){this.containableElement.style.overflow='hidden'}var b=this.origHeight/((this.elementOptions.duration*1000)/this.elementOptions.interval);if(null==this.curClip){this.curClip=0}else{this.curClip+=b}this.curClip=Math.ceil(this.curClip);var c=this.curClip+'px';if(this.origHeight<=this.curClip){this.curClip=this.origHeight;c='auto'}if(GI().isIE()){this.containableElement.style.clip='rect(auto auto '+c+' auto)'}else{this.containableElement.style.clip='rect(auto, auto, '+c+', auto)'}this.elementShow(false);if(this.origHeight==this.curClip){if(null!=this.elementOptions.onComplete){this.elementOptions.onComplete()}return a}window.setTimeout(function(){a.runElement()},this.elementOptions.interval);return a};GI.Element.SlideClose=function(a,b){var c=this;GI.Element().initElement(this,a,b);this.storeHeight();this.curClip=null;this.runElement();return this};GI.Element.SlideClose.prototype=new GI.Element.Slide();GI.Element.SlideClose.prototype.runElement=function(){var a=this;if(!this.containableElement.style.position||'absolute'!=this.containableElement.style.position){this.containableElement.style.position='absolute';this.containableElement.style.top=this.getPosY(this.containableElement)+'px';this.containableElement.style.left=this.getPosX(this.containableElement)+'px'}if(!this.containableElement.style.overflow||'hidden'!=this.containableElement.style.overflow){this.containableElement.style.overflow='hidden'}var b=this.origHeight/((this.elementOptions.duration*1000)/this.elementOptions.interval);if(null==this.curClip){this.elementShow(false);this.curClip=this.getFullHeight(this.containableElement)}else{this.curClip-=b}this.curClip=Math.floor(this.curClip);if(0>this.curClip){this.curClip=0}if(GI().isIE()){this.containableElement.style.clip='rect(auto auto '+this.curClip+'px auto)'}else{this.containableElement.style.clip='rect(auto, auto, '+this.curClip+'px, auto)'}if(0==this.curClip){this.elementHide(true);if(null!=this.elementOptions.onComplete){this.elementOptions.onComplete()}return a}window.setTimeout(function(){a.runElement()},this.elementOptions.interval);return a};GI.Element.RemoteLayer=function(d,f){var g=this;var h=null;var i=null;var j=null;var k=true;var l={width:120,height:120,posX:0,posY:0,oneTimeType:null,element:null,cookieName:'giremlayer',visible:'hidden',zIndex:10};var m=function(){var a=null;if(g.elementOptions.element){var b=null;if('object'==typeof(g.elementOptions.element)){b=g.elementOptions.element}else if('string'==typeof(g.elementOptions.element)){b=document.getElementById(g.elementOptions.element)}if(null!=b){if(b.parentNode){a=b.parentNode}else{a=b}}}return a};var n=function(){if(null!=g._layerElement){new GI.Element.Fade(g._layerElement,{onComplete:function(){var a=m();if(a){a.removeChild(g._layerElement)}else{document.body.removeChild(g._layerElement)}}})}return g};var o=function(){var a={x:0,y:0};if(g.elementOptions.element){a=GI.Element().getPos(g.elementOptions.element)}return a};var p=function(){if(null!=g._layerContent){n();g._layerElement=document.createElement('div');g._layerElement.style.position='absolute';var a=o();g._layerElement.style.top=String(a.y+g.elementOptions.posY)+'px';g._layerElement.style.left=String(a.x+g.elementOptions.posX)+'px';switch((g.elementOptions.visible+'').toLowerCase()){case'visible':case'shown':case'show':case'yes':case'1':case'true':g._layerElement.style.display='block';break;default:g._layerElement.style.display='none'}g._layerElement.style.width=g.elementOptions.width+'px';g._layerElement.style.height=g.elementOptions.height+'px';g._layerElement.style.zIndex=g.elementOptions.zIndex;g._layerElement.style.overflow='hidden';g._layerElement.innerHTML=g._layerContent;var b=m();if(b){b.appendChild(g._layerElement)}else{document.body.appendChild(g._layerElement)}new GI.Element.Appear(g._layerElement)}return g};var q=function(a){if(4==a.readyState){if(200==a.status){g._layerContent=a.responseText;p()}}return g};var r=function(){var a=null;if('undefined'!=typeof(window.XMLHttpRequest)){a=new XMLHttpRequest()}else if(window.ActiveXObject){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){a=null}}}if(null!=a){a.onreadystatechange=function(){q(a)};a.open('GET',g._targetUrl,true);a.send(null)}return g};var s=function(a){var b=l;if('object'==typeof(a)){for(var c in a){b[c]=a[c]}}return b};var t=function(){var a=false;if(document.cookie){if(0<=(document.cookie+'').indexOf(g.elementOptions.cookieName,0)){a=true}}return a};var u=function(){if(null!=g.elementOptions.oneTimeType){var a=g.elementOptions.cookieName+'=1;';switch((g.elementOptions.oneTimeType+'').toLowerCase()){case'session':break;case'user':var b=new Date();var c=new Date(b.getTime()+2000*60*60*24*365);a+='expires='+c.toGMTString()+';';break}document.cookie=a}return g};var v=function(a,b){if('undefined'==typeof(a)||'string'!=typeof(a)){throw'Need a valid url to use for a remote layer';}g.elementOptions=s(b);if(null==g.elementOptions.element||'undefined'==typeof(g.elementOptions.element)){throw'Need an element to orientate';}g._targetUrl=a;if(null!=g.elementOptions.oneTimeType){switch((g.elementOptions.oneTimeType+'').toLowerCase()){case'session':case'user':if(t()){k=false}break}}return g};this.show=function(){if(!k){return this}if(null==g._layerElement){r()}else{p()}u();return this};this.hide=function(){n();return this};v(d,f);return this};GI.Element.RemoteLayer.prototype=new GI.Element();