var _ms_XMLHttpRequest_ActiveX="";var _ajax;var _logger=false;var _status_area;if(!window.Node||!window.Node.ELEMENT_NODE){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};} function $(){var elements=new Array();for(var i=0;i127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);} else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}} return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;} else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}} return string;}} function FormCollect(oForm){var sRetval='',sTemp='',sCTName='',sCName='',sCType='',arrElts=[],oCurrent=null;for(var i=oForm.elements.length-1;i>=0;i--){oCurrent=oForm.elements[i];if(oCurrent.name&&!oCurrent.disabled)arrElts.push(oCurrent);} arrElts.sort(function(a,b){return((a.name3){if(navigator.appName=="Netscape"){window.innerWidth=cx;window.innerHeight=cy;}else{if(size[0]!=cx-16||size[1]!=cy){window.resizeBy(cx-size[0]-16,cy-size[1]);}}}} function setWindowHeight(cy){var size=getWindowSize();if(parseInt(navigator.appVersion)>3){if(navigator.appName=="Netscape"){window.innerHeight=cy;}else{if(size[1]!=cy){window.resizeBy(0,cy-size[1]);}}}} function getPageHeight(){return document.documentElement.scrollHeight||document.body.scrollHeight;} function getPageWidth(){return document.documentElement.scrollWidth;} function getPageScrollTop(){var yScrolltop;var xScrollleft;if(self.pageYOffset||self.pageXOffset){yScrolltop=self.pageYOffset;xScrollleft=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop||document.documentElement.scrollLeft){yScrolltop=document.documentElement.scrollTop;xScrollleft=document.documentElement.scrollLeft;}else if(document.body){yScrolltop=document.body.scrollTop;xScrollleft=document.body.scrollLeft;} arrayPageScroll=new Array(xScrollleft,yScrolltop) return arrayPageScroll;} function scrollToElement(theElement,wndElement,wndHeight){var selectedPosX=0;var selectedPosY=0;var y=wndElement.document.documentElement.scrollTop||wndElement.document.body.scrollTop;if(wndElement.pageYOffset) y=wndElement.pageYOffset;var elHeight=theElement.offsetHeight;while(theElement!=null){selectedPosX+=theElement.offsetLeft;selectedPosY+=theElement.offsetTop;theElement=theElement.offsetParent;} if(selectedPosY!=0){if(selectedPosYy+wndHeight-(elHeight+12)){wndElement.scrollTo(selectedPosX,selectedPosY-(wndHeight-(elHeight+12)));}}} function scrollToWindowElement(el){scrollToElement(el,window,getWindowSize()[1]);} function redirTo(url){window.location=url;} function trimLeft(s){var whitespaces=" \t\n\r";for(n=0;n0)?s.substring(n,s.length):s;} return("");} function trimRight(s){var whitespaces=" \t\n\r";for(n=s.length-1;n>-1;n=n-1){if(whitespaces.indexOf(s.charAt(n))==-1)return(n<(s.length-1))?s.substring(0,n+1):s;} return("");} function trim(s){return((s==null)?"":trimRight(trimLeft(s)));} function setElementsByIdsVisible(){for(var i=0;i=4));this.ns6up=(this.ns&&(this.major_version>=5));this.ns7up=(this.ns&&this.major_version==5&&(loc_usragt.indexOf("netscape 7")!=-1||loc_usragt.indexOf("netscape/7")!=-1));this.nsonly=(this.ns&&((loc_usragt.indexOf(";nav")!=-1)||(loc_usragt.indexOf("; nav")!=-1)));this.gecko=(loc_usragt.indexOf("gecko")!=-1&&loc_usragt.indexOf("safari")!=-1);this.ie=((loc_usragt.indexOf("msie")!=-1)&&(loc_usragt.indexOf("opera")==-1));this.ie3=(this.ie&&(this.major_version<4));this.ie4=(this.ie&&(this.major_version==4)&&(loc_usragt.indexOf("msie 4")!=-1));this.ie5=(this.ie&&(this.major_version==4)&&(loc_usragt.indexOf("msie 5.0")!=-1));this.ie5_5=(this.ie&&(this.major_version==4)&&(loc_usragt.indexOf("msie 5.5")!=-1));this.ie6=(this.ie&&(this.major_version==4)&&(loc_usragt.indexOf("msie 6.")!=-1));this.ie4up=(this.ie&&(this.major_version>=4));this.ie5up=(this.ie&&!this.ie3&&!this.ie4);this.ie5_5up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5);this.ie6up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5&&!this.ie5_5);this.ie7up=(this.ie&&!this.ie3&&!this.ie4&&!this.ie5&&!this.ie5_5&&!this.ie6);this.opera=(loc_usragt.indexOf("opera")!=-1);this.opera2=(loc_usragt.indexOf("opera 2")!=-1||loc_usragt.indexOf("opera/2")!=-1);this.opera3=(loc_usragt.indexOf("opera 3")!=-1||loc_usragt.indexOf("opera/3")!=-1);this.opera4=(loc_usragt.indexOf("opera 4")!=-1||loc_usragt.indexOf("opera/4")!=-1);this.opera5=(loc_usragt.indexOf("opera 5")!=-1||loc_usragt.indexOf("opera/5")!=-1);this.opera6=(loc_usragt.indexOf("opera 6")!=-1||loc_usragt.indexOf("opera/6")!=-1);this.opera7=(loc_usragt.indexOf("opera 7")!=-1||loc_usragt.indexOf("opera/7")!=-1);this.opera5up=(this.opera&&!this.opera2&&!this.opera3&&!this.opera4);this.opera6up=(this.opera&&!this.opera2&&!this.opera3&&!this.opera4&&!this.opera5);this.opera7up=(this.opera&&!this.opera2&&!this.opera3&&!this.opera4&&!this.opera5&&!this.opera6);this.safari=(loc_usragt.indexOf("safari")!=-1);this.ffmac=(loc_usragt.indexOf("firefox")!=-1&&loc_usragt.indexOf("macintosh")!=-1);} var browser=new detectBrowser();var articlewnd='';function openArticle(key,altWndName){var wndName="articlewnd";if(altWndName) wndName=altWndName;articlewnd=openWindowAt(500,50,1000,568,680,"/"+"artiklar/"+key+".html?popup",articlewnd,wndName,true,"1","1");} function ImagePreloader(callback,data){this.callback=callback;this.oImage="";this.oData=data;} ImagePreloader.prototype.preload=function(image){this.oImage=new Image;var self=this;this.oImage.onload=function(){self.onload();} this.oImage.onerror=function(){self.onerror();} this.oImage.onabort=function(){self.onabort();} this.oImage.src=image;} ImagePreloader.prototype.onComplete=function(fLoaded){this.callback(fLoaded,this.oImage,this.oData);} ImagePreloader.prototype.onload=function(){this.onComplete(true);} ImagePreloader.prototype.onerror=function(){this.onComplete(false);} ImagePreloader.prototype.onabort=function(){this.onComplete(false);} if(!window.JSFX) JSFX=new Object();JSFX.FadeElemMinOpacity=50;JSFX.FadeElemMaxOpacity=100;JSFX.FadeElemAutoUp=5;JSFX.FadeElemAutoDown=5;JSFX.FadeElemSavedOver=null;JSFX.FadeElemSavedOut=null;JSFX.FadeElemIdIndex=0;JSFX.FadeElemLockList=null;JSFX.FadeElemLockListMouseOverNow=null;document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');JSFX.fadeElem_actionOnMouseOver=function(e) {srcElement=e?e.target:event.srcElement;if(srcElement.className&&srcElement.className.indexOf("elemFader")!=-1){var fMatch=false;if(JSFX.FadeElemLockList!=null){for(var i=0;ielem.fade.maxOpacity) elem.fade.index=elem.fade.maxOpacity;if(elem.filters) elem.filters.alpha.opacity=elem.fade.index;else{elem.style.opacity=elem.fade.index/101;} if(elem.fade.index==elem.fade.maxOpacity) elem.fade.state="ON";else fadeElemRunning=true;} else if(elem.fade.state=="FADE_UP_DOWN") {elem.fade.index+=elem.fade.upStep;if(elem.fade.index>elem.fade.maxOpacity) elem.fade.index=elem.fade.maxOpacity;if(elem.filters) elem.filters.alpha.opacity=elem.fade.index;else{elem.style.opacity=elem.fade.index/101;} if(elem.fade.index==elem.fade.maxOpacity) elem.fade.state="FADE_DOWN";fadeElemRunning=true;} else if(elem.fade.state=="FADE_DOWN") {elem.fade.index-=elem.fade.downStep;if(elem.fade.index=0){var optar=opt.split(" ");for(i=0;i=0)ecolor=optar[i];if(ecolor=="")ecolor="#666";cn+="e";edges=true;} else if(opt&&opt.indexOf("smooth")>=0){cn+="a";ecolor=Mix(bk,color);} if(opt&&opt.indexOf("small")>=0)cn+="s";prefixt=cn;prefixb=cn;if(wich.indexOf("all")>=0){t=true;b=true} else if(wich.indexOf("top")>=0)t="true";else if(wich.indexOf("tl")>=0){t="true";if(wich.indexOf("tr")<0)prefixt+="l";} else if(wich.indexOf("tr")>=0){t="true";prefixt+="r";} if(wich.indexOf("bottom")>=0)b=true;else if(wich.indexOf("bl")>=0){b="true";if(wich.indexOf("br")<0)prefixb+="l";} else if(wich.indexOf("br")>=0){b="true";prefixb+="r";} var v=getElementsBySelector(selector);var l=v.length;for(i=0;i=0)lim=2;if(bc)d.className="artop";else d.className="rtop";d.style.backgroundColor=bk;for(i=1;i<=lim;i++){var x=CreateEl("b");x.className=cn+i;x.style.backgroundColor=color;if(bc)x.style.borderColor=bc;d.appendChild(x);} el.style.paddingTop=0;el.insertBefore(d,el.firstChild);} function AddBottom(el,bk,color,bc,cn){var i,lim=4,d=CreateEl("b");if(cn.indexOf("s")>=0)lim=2;if(bc)d.className="artop";else d.className="rtop";d.style.backgroundColor=bk;for(i=lim;i>0;i--){var x=CreateEl("b");x.className=cn+i;x.style.backgroundColor=color;if(bc)x.style.borderColor=bc;d.appendChild(x);} el.style.paddingBottom=0;el.appendChild(d);} function CreateEl(x){if(isXHTML)return(document.createElementNS('http://www.w3.org/1999/xhtml',x));else return(document.createElement(x));} function getElementsBySelector(selector){var i,selid="",selclass="",tag=selector,f,s=[],objlist=[];if(selector.indexOf(" ")>0){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f)return(f.getElementsByTagName(s[1]));return(objlist);} if(selector.indexOf("#")>0){s=selector.split("#");tag=s[0];selid=s[1];} if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);} if(selector.indexOf(".")>0){s=selector.split(".");tag=s[0];selclass=s[1];} var v=document.getElementsByTagName(tag);if(selclass=="") return(v);for(i=0;i=0){objlist.push(v[i]);}} return(objlist);} function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);} return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16));} Function.prototype.inherits=function(baseClass) {function Blank(){} this.base=Blank.prototype=baseClass.prototype;this.prototype=new Blank();this.prototype.constructor=this;};function BaseEffect(){this.effectCurrentFrame=0;this.effectStartOnTime=0;this.effectFinishOnTime=0;this.effectFPS=25.0;this.effectDelay=0.0;this.effectDuration=0.5;this.effectInterval=null;this.effectFrom=0.0;this.effectTo=1.0;this.effectRenderedFramesCount=0;this.effectEndFunction=null;} BaseEffect.prototype.startEffect=function(){if(this.effectInterval){clearInterval(this.effectInterval);} var timestamp=new Date().getTime();this.effectCurrentFrame=0;this.effectStartOnTime=this.effectDelay*1000;this.effectFinishOnTime=this.effectStartOnTime+(this.effectDuration*1000);this.effectStartOnTime+=timestamp;this.effectFinishOnTime+=timestamp;this.effectRenderedFramesCount=0;var self=this;this.effectInterval=setInterval(function(){self.loop();},40);} BaseEffect.prototype.loop=function(){var timePos=new Date().getTime();if(timePos>=this.effectStartOnTime){if(timePos>=this.effectFinishOnTime){this.effectRenderedFramesCount++;this.renderFrame(1.0,this.effectRenderedFramesCount);clearInterval(this.effectInterval);this.effectInterval=null;this.renderEffectDone();return;} var pos=(timePos-this.effectStartOnTime)/(this.effectFinishOnTime-this.effectStartOnTime);var frame=Math.round(pos*this.effectFPS*this.effectDuration);if(frame>this.effectCurrentFrame){this.effectRenderedFramesCount++;this.renderFrame(pos,this.effectRenderedFramesCount);this.effectCurrentFrame=frame;}}} BaseEffect.prototype.renderFrame=function(pos,cFrame){pos*=(this.effectTo-this.effectFrom);pos+=this.effectFrom;this.renderEffect(pos,cFrame);} BaseEffect.prototype.renderEffect=function(pos,cFrame){} BaseEffect.prototype.renderEffectDone=function(){if(this.effectEndFunction) this.effectEndFunction();} BaseEffect.prototype.isRunning=function(){return(this.effectInterval!=null);} BaseEffect.prototype.setDuration=function(sDuration){this.effectDuration=sDuration;} function OpacityFadeEffect(secDuration){this.maxOpacity=1.0;OpacityFadeEffect.base.constructor.call(this);if(secDuration) this.effectDuration=secDuration;} OpacityFadeEffect.inherits(BaseEffect);OpacityFadeEffect.prototype.startFadeEffect=function(el,image,fadeOut,callback,maxOpacity){this.el=el;this.effectImg=image;this.effectEndFunction=callback;this.fadeOut=fadeOut;if(maxOpacity) this.maxOpacity=maxOpacity;this.startEffect();} OpacityFadeEffect.prototype.renderEffect=function(pos,cFrame){var el=this.el;if(cFrame==1&&this.effectImg){el.width=this.effectImg.width;el.height=this.effectImg.height;el.src=this.effectImg.src;} var opacity=this.fadeOut?1.0-pos*this.maxOpacity:pos*this.maxOpacity;if(opacity==1.0){opacity=0.999999;} if(el.filters) el.filters.alpha.opacity=opacity*100;el.style.opacity=opacity;} function OpacityCrossFadeEffect(){OpacityCrossFadeEffect.base.constructor.call(this);} OpacityCrossFadeEffect.inherits(BaseEffect);OpacityCrossFadeEffect.prototype.startFadeEffect=function(el,el2,image,callback){this.el=el;this.el2=el2;this.effectImg=image;this.effectElement2Hidden=false;this.effectEndFunction=callback;this.startEffect();} OpacityCrossFadeEffect.prototype.renderEffect=function(pos,cFrame){var el=this.el;var el2=this.el2;if(cFrame==1&&this.effectImg){el.width=this.effectImg.width;el.height=this.effectImg.height;el.src=this.effectImg.src;} var opacity=pos;var fEnd=false;if(opacity==1.0){opacity=0.999999;fEnd=true;} if(!this.effectElement2Hidden&&!fEnd&&opacity>0.9){el2.style.visibility="hidden";if(this.effectImg){el2.width=this.effectImg.width;el2.height=this.effectImg.height;el2.src=this.effectImg.src;} this.effectElement2Hidden=true;} if(fEnd){if(!this.effectElement2Hidden&&this.effectImg){el2.width=this.effectImg.width;el2.height=this.effectImg.height;el2.src=this.effectImg.src;} if(el2.filters){el2.filters.alpha.opacity=100;} el2.style.opacity="0.999999";el2.style.visibility="visible";el.style.visibility="hidden";el.style.opacity="0";if(el.filters){el.filters.alpha.opacity=0;}}else{if(el.filters){el.filters.alpha.opacity=opacity*100;} el.style.opacity=opacity;if(!this.effectElement2Hidden){opacity=1.0-opacity;if(el2.filters){el2.filters.alpha.opacity=opacity*100;} el2.style.opacity=opacity;}}} function OpacityCrossFadeEffectTest(){OpacityCrossFadeEffectTest.base.constructor.call(this);} OpacityCrossFadeEffectTest.inherits(BaseEffect);OpacityCrossFadeEffectTest.prototype.startFadeEffect=function(el,el2,callback){this.el=el;this.el2=el2;this.effectElement2Hidden=false;this.effectEndFunction=callback;this.startEffect();} OpacityCrossFadeEffectTest.prototype.renderEffect=function(pos,cFrame){var el=this.el;var el2=this.el2;var opacity=pos;var fEnd=false;if(opacity==1.0){opacity=0.999999;fEnd=true;} if(!this.effectElement2Hidden&&!fEnd&&opacity>0.9){el2.style.visibility="hidden";this.effectElement2Hidden=true;} if(fEnd){if(el.filters){el.filters.alpha.opacity=100;} el.style.opacity="0.999999";el2.style.visibility="hidden";el2.style.opacity="0";if(el2.filters){el2.filters.alpha.opacity=0;}}else{if(el.filters){el.filters.alpha.opacity=opacity*100;} el.style.opacity=opacity;if(!this.effectElement2Hidden){opacity=1.0-opacity;if(el2.filters){el2.filters.alpha.opacity=opacity*100;} el2.style.opacity=opacity;}}} function SlideElementEffect(el,from,to,callback){SlideElementEffect.base.constructor.call(this);this.effectEndFunction=callback;this.effectDuration=0.3;this.el=el;this.from=from;this.to=to;} SlideElementEffect.inherits(BaseEffect);SlideElementEffect.prototype.renderEffect=function(pos,cFrame){var scrollTop=document.body.scrollTop;if(scrollTop==0){if(window.pageYOffset) scrollTop=window.pageYOffset;else scrollTop=(document.body.parentElement)?document.body.parentElement.scrollTop:0;} this.el.style.top=this.from+Math.round(pos*(this.to-this.from+scrollTop))+document.body.scrollTop+"px";} function ScrollElementEffect(el,from,to,callback,callbackPostRender,fHasScrollTo){ScrollElementEffect.base.constructor.call(this);this.effectEndFunction=callback;this.callbackPostRender=callbackPostRender;this.effectDuration=0.5;this.el=el;this.from=from;this.to=to;this.fHasScrollTo=fHasScrollTo;} ScrollElementEffect.inherits(BaseEffect);ScrollElementEffect.prototype.startScrollEffect=function(from,to,callback){this.from=from;this.to=to;if(callback) this.effectEndFunction=callback;this.startEffect();} ScrollElementEffect.prototype.renderEffect=function(pos,cFrame){var y=this.from+Math.round(pos*(this.to-this.from));if(this.fHasScrollTo) this.el.scrollTo(0,y);else this.el.style.marginTop=(-1*y)+"px";if(this.callbackPostRender){this.callbackPostRender();}} function SetHeightDoubleElementEffect(el,fromHeight,toHeight,el2,fromHeight2,toHeight2,callback,setHidden,duration,setDisplayNone,keepCenteredWinHeight,centerOffsetTop){SetHeightDoubleElementEffect.base.constructor.call(this);this.effectDuration=duration?duration:0.3;this.el=el;this.el2=el2;this.fromHeight=fromHeight;this.toHeight=toHeight;this.fromHeight2=fromHeight2;this.toHeight2=toHeight2;this.effectEndFunction=callback;this.setHidden=setHidden;this.expanded=false;this.setDisplayNone=setDisplayNone;this.keepCenteredWinHeight=keepCenteredWinHeight;this.centerOffsetTop=centerOffsetTop;} SetHeightDoubleElementEffect.inherits(BaseEffect);SetHeightDoubleElementEffect.prototype.setExpandedState=function(state){this.expanded=state;} SetHeightDoubleElementEffect.prototype.isExpanded=function(){return this.expanded;} SetHeightDoubleElementEffect.prototype.getElement=function(){return this.el;} SetHeightDoubleElementEffect.prototype.quickCollapse=function(){if(this.expanded||this.effectInterval){if(this.effectInterval){clearInterval(this.effectInterval);this.effectInterval=null;} if(this.setHidden) this.el.style.visibility='hidden';if(this.setDisplayNone) this.el.style.display="none";this.expanded=false;}} SetHeightDoubleElementEffect.prototype.toggleExpansion=function(){if(this.effectInterval) return;this.el.style.height=(this.expanded?this.toHeight:this.fromHeight)+"px";if(this.setHidden) this.el.style.visibility='visible';var _expanded=this.expanded;this.startEffect();return _expanded;} SetHeightDoubleElementEffect.prototype.renderEffect=function(pos,cFrame){if(this.expanded){this.el.style.height=this.toHeight+Math.round(pos*(this.fromHeight-this.toHeight))+"px";if(this.el2) this.el2.style.height=this.toHeight2+Math.round(pos*(this.fromHeight2-this.toHeight2))+"px";}else{var height=this.fromHeight+Math.round(pos*(this.toHeight-this.fromHeight));this.el.style.height=height+"px";if(this.keepCenteredWinHeight){var y=Math.floor((this.keepCenteredWinHeight-height)/2);if(y<0) y=0;this.el.style.top=(y+this.centerOffsetTop)+"px";} if(this.el2) this.el2.style.height=this.fromHeight2+Math.round(pos*(this.toHeight2-this.fromHeight2))+"px";}} SetHeightDoubleElementEffect.prototype.renderEffectDone=function(){this.expanded=!this.expanded;if(this.setHidden&&!this.expanded){this.el.style.visibility='hidden';} var self=this;if(this.effectEndFunction) this.effectEndFunction(self);} function SetWidthElementEffect(el,fromWidth,toWidth,callback,duration,keepCenteredWinWidth,centerOffsetLeft){SetWidthElementEffect.base.constructor.call(this);this.effectDuration=duration?duration:0.3;this.el=el;this.fromWidth=fromWidth;this.toWidth=toWidth;this.effectEndFunction=callback;this.expanded=false;this.keepCenteredWinWidth=keepCenteredWinWidth;this.centerOffsetLeft=centerOffsetLeft;} SetWidthElementEffect.inherits(BaseEffect);SetWidthElementEffect.prototype.setExpandedState=function(state){this.expanded=state;} SetWidthElementEffect.prototype.isExpanded=function(){return this.expanded;} SetWidthElementEffect.prototype.getElement=function(){return this.el;} SetWidthElementEffect.prototype.quickCollapse=function(){if(this.expanded||this.effectInterval){if(this.effectInterval){clearInterval(this.effectInterval);this.effectInterval=null;} this.expanded=false;}} SetWidthElementEffect.prototype.toggleExpansion=function(){if(this.effectInterval) return;this.el.style.width=(this.expanded?this.toWidth:this.fromWidth)+"px";if(this.setHidden) this.el.style.visibility='visible';var _expanded=this.expanded;this.startEffect();return _expanded;} SetWidthElementEffect.prototype.renderEffect=function(pos,cFrame){if(this.expanded){this.el.style.width=this.toWidth+Math.round(pos*(this.fromWidth-this.toWidth))+"px";}else{var width=this.fromWidth+Math.round(pos*(this.toWidth-this.fromWidth));this.el.style.width=width+"px";if(this.keepCenteredWinWidth){var left=Math.floor((this.keepCenteredWinWidth-(width))/2)+this.centerOffsetLeft;if(left<0) left=0;this.el.style.marginLeft=left+"px";}}} SetWidthElementEffect.prototype.renderEffectDone=function(){var self=this;if(this.effectEndFunction) this.effectEndFunction(self);} function ElementShaker(idElement,repeats,arrayMovements,shakerDoneCallback,fSkipHorizontal){this.element=document.getElementById(idElement);this.repeats=repeats;this.arrayMovements=arrayMovements;this.fSkipHorizontal=fSkipHorizontal;this.cLength=arrayMovements.length/3;this.counter=-1;this.cCycle=0;this.shakerDoneCallback=shakerDoneCallback;this.callback();} ElementShaker.prototype.callback=function(){this.counter++;if(this.counter*3>=this.arrayMovements.length){if(this.repeats!=0){this.cCycle++;if(this.cCycle==this.repeats){if(this.shakerDoneCallback) this.shakerDoneCallback();return;}} this.counter=0;} var dx=this.arrayMovements[this.counter*3];var dy=this.arrayMovements[this.counter*3+1];var timeout=this.arrayMovements[this.counter*3+2];var oldX=this.element.offsetLeft;var oldY=this.element.offsetTop;if(!this.fSkipHorizontal) this.element.style.marginLeft=(oldX+dx)+"px";this.element.style.top=(oldY+dy)+"px";var self=this;setTimeout(function(){self.callback();},timeout);} var registerformloaded=false;var fSubmittingRegisterData=false;function closeRegisterBox(){setElementsByIdsHidden('registerbox','registerbox_bg','registerbox_content');var el=document.getElementById("rusername");if(el) el.blur();} function openRegisterForm(){if(typeof closeForgotPasswdBox!="undefined") closeForgotPasswdBox();if(registerformloaded){toggleVisibilityOfElementsByIds('registerbox','registerbox_bg','registerbox_content');var el=document.getElementById("rusername");if(el) el.blur();}else return new AJAXRequest("POST","/register.jspax","","http://www.vaxjopuls.se/",processGetRegisterFormXML);} function submitRegisterForm(el){if(fSubmittingRegisterData) return;fSubmittingRegisterData=true;var el=document.getElementById("registersubmitindicator");if(el){el.innerHTML="Skickar...";el.style.color="white";el.style.visibility="visible";} var agegroup="";for(var i=0;i";if(!fFocused){el.focus();fFocused=true;}} el=document.getElementById("registererrors");el.innerHTML=errorsText;}}}}} var conditionswnd='';function openConditionsWindow(){conditionswnd=openWindow(466,600,"/conditions.jsp",conditionswnd,"conditionswnd",true,"1","1");} var loginformloaded=null;var onLoggedInCallback=null;var loginShaker=null;var idLoginBoxBg='loginbox_bg';var idLoginBoxContent='loginbox_content';var fRetriedSession=false;var hasForgotPasswdForm=false;function closeLoginBox(){setElementsByIdsHidden('loginbox',idLoginBoxBg,idLoginBoxContent);var el=document.getElementById("lusername");if(el) el.blur();} function openLoginForm(_onLoggedInCallback,type,toggle,shake){onLoggedInCallback=_onLoggedInCallback;if(loginformloaded==type){if(toggle){var el=document.getElementById("lusername");if(toggleVisibilityOfElementsByIds('loginbox',idLoginBoxBg,idLoginBoxContent)){el.focus();}else{el.blur();}}else if(shake){var el=document.getElementById("loginbox");if(el.style.visibility!='visible'){slideDownLoginBox();}else{el=document.getElementById("lusername");el.focus();if(!loginShaker){loginShaker=new ElementShaker("loginbox",1,new Array(0,10,30,0,-10,30,0,-10,30,0,10,30,0,10,30,0,-10,30,0,-10,30,0,10,30,0,5,30,0,-5,30,0,-5,30,0,5,30,0,1,30,0,-1,30,0,-1,30,0,1,30),loginShakerCallback);}}}else{setElementsByIdsVisible('loginbox',idLoginBoxBg,idLoginBoxContent);var el=document.getElementById("lusername");el.focus();}}else return new AJAXRequest("POST","/login.jspax","type="+type,"http://www.vaxjopuls.se/index.jsp",processGetLoginFormXML);} function loginShakerCallback(){loginShaker=null;} function submitLoginForm(el){var el=document.getElementById("loginsubmitindicator");if(el){el.innerHTML="Skickar...";el.style.color="white";el.style.visibility="visible";} var poststr="login&user="+ajaxEscape(document.loginForm.user.value)+"&passwd="+ajaxEscape(document.loginForm.passwd.value);if(!hasForgotPasswdForm) poststr+="&loadforgotpasswdform";return new AJAXRequest("POST","/login.jspax",poststr,"http://www.vaxjopuls.se/index.jsp",processSubmitLoginFormXML);} function processGetLoginFormXML(myAJAX){if(myAJAX.readyState==4){if(myAJAX.status==200){var xml=myAJAX.responseXML;if(xml.documentElement){var html=xml.documentElement.getElementsByTagName("html")[0].firstChild.nodeValue;var type=xml.documentElement.getElementsByTagName("type")[0].firstChild.nodeValue;if(type=='mg'){idLoginBoxContent='loginbox_mg_content';idLoginBoxBg='loginbox_mg_bg';setElementsByIdsHidden('loginbox_bg','loginbox_content');var el=document.getElementById('loginbox_content');el.innerHTML="";}else{idLoginBoxContent='loginbox_content';idLoginBoxBg='loginbox_bg';setElementsByIdsHidden('loginbox_mg_bg','loginbox_mg_content');var el=document.getElementById('loginbox_mg_content');el.innerHTML="";} var el=document.getElementById(idLoginBoxContent);el.innerHTML=html;loginformloaded=type;slideDownLoginBox();}}}} function slideDownLoginBox(){var el=document.getElementById('loginbox');el.style.top="-300px";setElementsByIdsVisible('loginbox',idLoginBoxBg,idLoginBoxContent);var effect=new SlideElementEffect(el,-200,107,slideCallbackFocusUsername);effect.startEffect();} function slideCallbackFocusUsername(){loginShaker=new ElementShaker("loginbox",1,new Array(0,-6,30,0,-6,30,0,-6,30,0,6,30,0,4,30,0,-4,30,0,-4,30,0,4,30),loginShakerCallback);var elUser=document.getElementById('lusername');elUser.focus();} function processSubmitLoginFormXML(myAJAX){if(myAJAX.readyState==4){if(myAJAX.status==200){var xml=myAJAX.responseXML;setElementsByIdsHidden('loginsubmitindicator');document.loginForm.user.style.border="1px solid black";document.loginForm.passwd.style.border="1px solid black";if(xml.documentElement){var status=xml.documentElement.getElementsByTagName("status")[0].firstChild.nodeValue;if(status=='OK'){fRetriedSession=false;if(onLoggedInCallback){onLoggedInCallback();}}else if(status=='nosession'){if(!fRetriedSession){fRetriedSession=true;submitLoginForm();}else{fRetriedSession=false;alert("För att kunna logga in på VäxjöPuls måste du låta din webbläsare acceptera cookies!");}}else{fRetriedSession=false;document.loginForm.user.style.border="1px solid red";document.loginForm.passwd.style.border="1px solid red";var data=xml.documentElement.getElementsByTagName("forgotpasswdform")[0];if(data){var el=document.getElementById("forgotpasswdbox_content");if(el){el.innerHTML=data.firstChild.nodeValue;hasForgotPasswdForm=true;}} setElementsByIdsDisplayInline("forgotpasswdlink");}}}}} var pgid=0;var pgidAlt=0;var pid=0;var pidNext=0;var pidPrev=0;var pidCommentsLoaded=0;var seqNum=0;var fSlideshowEnabled=false;var fSuperHighResEnabled=false;var timerSlideshow=null;var cMaxSlides=400;var cSlide=0;var fHighResMode=false;var roundedBorderColor="black";var thumbnailHeight=44;var thumbnailBorder="";var fResizeEnabled=false;var galleryKey="";var commentPoster="";var commentDateTime="";var commentText="";var cComments=0;var fShowCommentFormOnLoad=false;var fScrollToBottomOnLoad=false;var fWinEnlarged=false;var fMemberGallery=false;var elEditForm=null;var elReportForm=null;var elReportChangedBorder=null;var fSubmitting=false;var loader=new ImagePreloader(imageLoaderCallBack);var opacityFadeEffect=null;var pgExtCallbackPhotoChangePre=null;var pgExtCallbackPhotoChangePost=null;function initGallery(_galleryKey,_pgid,_pid,_pidPrev,_pidNext,_roundedBorderColor,_pidCommentsLoaded,_fResizeEnabled,_fMemberGallery,_thumbnailHeight,_fSuperHighResEnabled){galleryKey=_galleryKey;pgid=_pgid;pid=_pid;pidNext=_pidNext;pidPrev=_pidPrev;roundedBorderColor=_roundedBorderColor;pidCommentsLoaded=_pidCommentsLoaded;fResizeEnabled=_fResizeEnabled;fMemberGallery=_fMemberGallery;if(_thumbnailHeight) thumbnailHeight=_thumbnailHeight;if(_fSuperHighResEnabled) fSuperHighResEnabled=_fSuperHighResEnabled;} function keyPress(e){var srcElement=e?(e.target?e.target:e.srcElement):event.srcElement;var keyCode=getKeyCode(e);if(srcElement&&srcElement.nodeName!='TEXTAREA'&&srcElement.nodeName!='INPUT'){if(keyCode==37){getPreviousPhoto();return false;}else if(keyCode==32||keyCode==39){getNextPhoto();return false;}} return true;} function enablePlayState(fSkipButtonToggle){setElementsByIdsDisplayInline('slideplaying');if(!fSkipButtonToggle){var el=document.getElementById('imgslidestart');el.src="/images/cardpres/slidestart.gif";setElementsByIdsDisplayInline('imgslidestart');fPlayButtonState=true;}} function disablePlayState(fSkipButtonToggle){setElementsByIdsDisplayNone('slideplaying');if(!fSkipButtonToggle){var el=document.getElementById('imgslidestart');el.src="/images/cardpres/slidepause.gif";fPlayButtonState=false;cClicks=0;}} function enableSlideshow(fSkipButtonToggle){if(!fSlideshowEnabled){if(timerSlideshow!=null) clearTimeout(timerSlideshow);fSlideshowEnabled=true;cSlide=0;enablePlayState(fSkipButtonToggle);getNextPhotoSlideshow();}} function disableSlideshow(fSkipButtonToggle){if(fSlideshowEnabled){fSlideshowEnabled=false;} if(timerSlideshow!=null){clearTimeout(timerSlideshow);timerSlideshow=null;} disablePlayState(fSkipButtonToggle);} function getNextPhotoSlideshow(){if(pidNext>0&&fSlideshowEnabled){cSlide++;closeMailTipBox();hideGalleryVideo();return new AJAXRequest("POST","/photo2.jspax","slide&pgid="+pgid+"&pid="+(pidNext)+(fHighResMode?"&hres":""),"http://www.vaxjopuls.se/photogallery.jsp",processGetPhoto);}} function getNextPhoto(){if(pidNext>0){return getPhotoWithPid(pidNext);}} function getPhoto(){return getPhotoWithPid(pid);} function getPhotoWithPid(id){if(fSlideshowEnabled){disableSlideshow();} closeMailTipBox();hideGalleryVideo();if(window.name&&window.name=="gallerywnd") window.scrollTo(0,0);if(window.focus) window.focus();return new AJAXRequest("POST","/photo2.jspax","pgid="+pgid+"&pid="+(id)+(fHighResMode?"&hres":"")+(fSuperHighResEnabled?"&shres":""),"http://www.vaxjopuls.se/photogallery.jsp",processGetPhoto);} function getPhotoWithPidFromAltGallery(_pgid,id){if(fSlideshowEnabled){disableSlideshow();} closeMailTipBox();hideGalleryVideo();if(window.name&&window.name=="gallerywnd") window.scrollTo(0,0);if(window.focus) window.focus();pgidAlt=_pgid;return new AJAXRequest("POST","/photo2.jspax","pgid="+_pgid+"&pid="+(id)+(fHighResMode?"&hres":"")+(fSuperHighResEnabled?"&shres":""),"http://www.vaxjopuls.se/photogallery.jsp",processGetPhoto);} function getPreviousPhoto(){if(pidPrev>=0){return getPhotoWithPid(pidPrev);}} function processGetPhoto(myAJAX){if(myAJAX.readyState==4){if(myAJAX.status==200){closeStaffInfoBox();closeRegisterBox();if(typeof closeForgotPasswdBox!="undefined") closeForgotPasswdBox();var xml=myAJAX.responseXML;if(xml.documentElement){var status=xml.documentElement.getAttributeNode("status").nodeValue;if(status=="OK"){closeLoginBox();setElementsByIdsDisplayNone('divBelowThumbnails');removeCommentEditForm();removeCommentReportForm();setElementsByIdsDisplayNone("tableallcomments");setElementsByIdsDisplayNone("allcomments");pidCommentsLoaded=0;var _pgid=xml.documentElement.getAttributeNode("pgid").nodeValue;if(_pgid!=pgid){pgidAlt=_pgid;}else{pgidAlt=0;pidNext=xml.documentElement.getAttributeNode("next").nodeValue;pidPrev=xml.documentElement.getAttributeNode("prev").nodeValue;} pid=xml.documentElement.getAttributeNode("pid").nodeValue;if(fSuperHighResEnabled){var filename=xml.documentElement.getElementsByTagName("filename")[0].firstChild.nodeValue;var el=document.getElementById("photo");var numStr="";for(var i=0;i=48&&c<=57){numStr+=filename.charAt(i);}} el=document.getElementById("sel_photo_num");el.innerHTML=numStr;} if(isCommentsModeEnabled()){document.photoCommentForm.pid.value=pid;} if(!pgidAlt) highlightPhotoThumbnail(xml.documentElement.getAttributeNode("seqnum").nodeValue);var photoURI=xml.documentElement.getElementsByTagName("uri")[0].firstChild.nodeValue;if(photoURI){loader.preload(photoURI);if(fSlideshowEnabled){if(timerSlideshow!=null){clearTimeout(timerSlideshow);} if(cSlide>cMaxSlides) disableSlideshow();else timerSlideshow=setTimeout('getNextPhotoSlideshow()',4000);}} if(isCommentsModeEnabled()){var comment=xml.documentElement.getElementsByTagName("firstcomment");if(comment&&comment[0]){cComments=comment[0].getAttributeNode("totalcount").nodeValue;commentDateTime=comment[0].getAttributeNode("datetime").nodeValue;commentText=comment[0].getElementsByTagName("text")[0].firstChild.nodeValue;var el=document.getElementById("firstcomment");if(comment[0].getAttributeNode("poster")){commentPoster=comment[0].getAttributeNode("poster").nodeValue;el.innerHTML=""+commentPoster+" skrev: "+commentText+"";}else{commentPoster=null;el.innerHTML=""+commentText+"";} updateCommentCount();checkFirstCommentSize();setElementsByIdsEmpty("allcomments");setElementsByIdsDisplayNone("writecomment");}else{cComments=0;setElementsByIdsEmpty("firstcomment","allcomments","commentcount");setElementsByIdsDisplayNone("writecomment","showcommentslink");var el=document.getElementById("tdcommentscontrols");el.style.width="92px";}}}else if(status=="login"){openLoginForm(loggedInNowCallback,"mg",false,1);} if(fWinEnlarged) shrinkWindow();}}}} function scrollToThumbnail(theElement,wndElement,wndHeight){var selectedPosX=0;var selectedPosY=0;var y=wndElement.document.documentElement.scrollTop||wndElement.document.body.scrollTop;if(wndElement.pageYOffset) y=wndElement.pageYOffset;while(theElement!=null){selectedPosX+=theElement.offsetLeft;selectedPosY+=theElement.offsetTop;theElement=theElement.offsetParent;} if(selectedPosY!=0){if(selectedPosYy+wndHeight-(thumbnailHeight+12)){wndElement.scrollTo(selectedPosX,selectedPosY-(wndHeight-(thumbnailHeight+12)));if(typeof photoListScrollHandler!='undefined'&&photoListScrollHandler!=null) photoListScrollHandler();}}} function highlightPhotoThumbnail(num){if(seqNum!=num){var iframe=document.getElementById("thumbnailiframe");if(iframe){if(iframe.contentWindow.document.getElementById){var el;var elOpacityDiv=iframe.contentWindow.document.getElementById("div_th_1");if(seqNum!=0){el=iframe.contentWindow.document.getElementById("td_th_"+seqNum);if(!thumbnailBorder) thumbnailBorder=el.style.borderColor;el.style.borderColor=thumbnailBorder;if(elOpacityDiv){el=iframe.contentWindow.document.getElementById("a_th_"+seqNum);el.removeChild(elOpacityDiv);}} seqNum=num;if(elOpacityDiv){el=iframe.contentWindow.document.getElementById("img_th_"+num);elOpacityDiv.title=el.title;elOpacityDiv.style.height=el.height+"px";if(elOpacityDiv.filter||elOpacityDiv.style.opacity){elOpacityDiv.style.visibility="visible";} el=iframe.contentWindow.document.getElementById("a_th_"+num);el.appendChild(elOpacityDiv);} el=iframe.contentWindow.document.getElementById("td_th_"+num);if(!thumbnailBorder) thumbnailBorder=el.style.borderColor;el.style.borderColor="#CC0000";scrollToThumbnail(el,iframe.contentWindow,iframe.clientHeight);}}}} function scrollThumbnailsPageUp(){scrollThumbnailsPage(true);} function scrollThumbnailsPageDown(){scrollThumbnailsPage(false);} function imageLoaderCallBack(bLoaded,image){if(pgExtCallbackPhotoChangePre) pgExtCallbackPhotoChangePre(image);var elPhoto=document.getElementById(fHighResMode?"photo_highres":"photo");if(elPhoto.filters) elPhoto.filters.alpha.opacity=0;elPhoto.style.opacity=0;if(opacityFadeEffect==null){opacityFadeEffect=new OpacityFadeEffect();if(fSuperHighResEnabled){opacityFadeEffect.setDuration(0.8);}} if(fHighResMode){if(elPhoto.parentNode.parentNode.nodeName=="DIV"){elPhoto.parentNode.parentNode.style.width=((image.width)+22)+"px";elPhoto.parentNode.style.width=image.width+"px";elPhoto.parentNode.parentNode.style.height=((image.height)+22)+"px";elPhoto.parentNode.style.height=(image.height)+"px";} doNifty();} opacityFadeEffect.startFadeEffect(elPhoto,image,false,imageFadeInCallback);} function imageFadeInCallback(){if(pgExtCallbackPhotoChangePost) pgExtCallbackPhotoChangePost();} function toggleMailTipBox(){if(toggleVisibilityOfElementsByIds('mailtip_box')){if(fSlideshowEnabled){disableSlideshow();} setElementsByIdsVisible('mailtip_box_bg','mailtip_box_text','mailtip_form');setElementsByIdsDisplayNone('mailtipSuccess');document.mailtipForm.fromName.focus();}else{setElementsByIdsHidden('mailtip_box_bg','mailtip_box_text','mailtip_form','submitindicator');}} function closeMailTipBox(){if(document.mailtipForm){var el=document.mailtipForm.fromName;if(el&&el.blur) el.blur();setElementsByIdsHidden('mailtip_box','mailtip_box_bg','mailtip_box_text','mailtip_form','submitindicator');}} function processSubmitMailTip(myAJAX){if(myAJAX.readyState==4){document.mailtipForm.fromName.style.border="1px solid black";document.mailtipForm.toEMail.style.border="1px solid black";document.mailtipForm.message.style.border="1px solid black";if(myAJAX.status==200){var response=trim(myAJAX.responseText);var returnParms=response.split('&');if(returnParms.length>0){for(var i=0;i0){cComments=commentCount;updateCommentCount();} document.getElementById("tableallcomments").style.display="";if(commentCount>0){setElementsByIdsDisplayBlock("allcomments");} if(commentCount==0){cComments=0;setElementsByIdsEmpty("firstcomment","allcomments","commentcount");setElementsByIdsDisplayNone("writecomment","showcommentslink");el=document.getElementById("tdcommentscontrols");el.style.width="92px";}else if(commentCount==1){var el=document.getElementById("firstcomment");el.innerHTML=""+xml.documentElement.getElementsByTagName("firstposter")[0].firstChild.nodeValue+" skrev: "+xml.documentElement.getElementsByTagName("firstcomment")[0].firstChild.nodeValue+"";} var fFocusNow=false;if(fShowCommentFormOnLoad){el=document.getElementById("writecomment");el.style.display="block";el=document.getElementById("photoGalleryTable");fShowCommentFormOnLoad=false;fScrollToBottomOnLoad=true;fFocusNow=true;} pidCommentsLoaded=pid;enlargeWindow();if(fScrollToBottomOnLoad){scrollToBottom();fScrollToBottomOnLoad=false;if(fFocusNow) document.photoCommentForm.text.focus();}}}}}} function processAddComment(myAJAX){if(myAJAX.readyState==4){fSubmitting=false;if(myAJAX.status==200){var xml=myAJAX.responseXML;if(xml.documentElement){var status=xml.documentElement.getElementsByTagName("status")[0].firstChild.nodeValue;if(status=="OK"){document.photoCommentForm.text.value="";var el=document.getElementById("writecomment");el.style.display="none";fScrollToBottomOnLoad=true;getCommentsForced();return;}else if(status=="login"){openLoginForm(null,fMemberGallery?"mg":"regular",false,2);return;}}} alert("Misslyckades att posta...");}} function processDeleteComment(myAJAX){if(myAJAX.readyState==4){if(myAJAX.status==200){var response=myAJAX.responseText;var index=response.indexOf("status=OK");if(index>=0){getCommentsForced();}else alert("Misslyckades att ta bort kommentaren...");}else{}}} function showCommentForm(){fShowCommentFormOnLoad=true;if(!getComments()){removeCommentEditForm();removeCommentReportForm();setElementsByIdsDisplayBlock("writecomment");enlargeWindow();scrollToBottom();fShowCommentFormOnLoad=false;document.photoCommentForm.text.focus();}} function hideCommentForm(){setElementsByIdsDisplayNone("writecomment");} function scrollToBottom(){var el=document.getElementById("photoGalleryTable");window.scrollTo(0,el.clientHeight);} function submitCommentForm(){if(!fSubmitting){var text=trim(document.photoCommentForm.text.value);if(text.length>0){fSubmitting=true;var poststr="pgid="+document.photoCommentForm.pgid.value+"&pid="+document.photoCommentForm.pid.value+"&postcomment"+"&text="+ajaxEscape(text);return new AJAXRequest("POST","/photoaddcomment.jspax",poststr,"http://www.vaxjopuls.se/photogallery.jsp",processAddComment);}else alert("Glöm inte att skriva en kommentar :p");}} function removeCommentEditForm(){if(elEditForm&&elEditForm.parentNode){elEditForm.parentNode.removeChild(elEditForm);}} function removeCommentReportForm(){if(elReportForm&&elReportForm.parentNode){if(elReportChangedBorder){elReportChangedBorder.style.border="1px solid #777777";elReportChangedBorder=null;} elReportForm.parentNode.removeChild(elReportForm);}} function editComment(cid){return new AJAXRequest("POST","/photogetcomment.jspax","pgid="+pgid+"&pid="+pid+"&cid="+cid,"http://www.vaxjopuls.se/photogallery.jsp",processGetCommentForEditXML);} function processGetCommentForEditXML(myAJAX){if(myAJAX.readyState==4){if(myAJAX.status==200){var xml=myAJAX.responseXML;if(xml.documentElement){var status=xml.documentElement.getElementsByTagName("status")[0].firstChild.nodeValue;if(status=="OK"){var cid=xml.documentElement.getElementsByTagName("id")[0].firstChild.nodeValue;var rawtext=xml.documentElement.getElementsByTagName("rawtext")[0].firstChild.nodeValue;if(!elEditForm) elEditForm=document.getElementById("editcomment");var elDest=document.getElementById("c_"+cid);if(elEditForm&&elDest){hideCommentForm();removeCommentReportForm();removeCommentEditForm();elEditForm.style.display="block";elDest.appendChild(elEditForm);document.photoCommentEditForm.text.value=rawtext;document.photoCommentEditForm.pgid.value=pgid;document.photoCommentEditForm.pid.value=pid;document.photoCommentEditForm.cid.value=cid;} return;}else if(status=="login"){openLoginForm(null,fMemberGallery?"mg":"regular",false,2);return;}}}}} function submitCommentEditForm(){var text=trim(document.photoCommentEditForm.text.value);if(text.length>0){var poststr="pgid="+document.photoCommentEditForm.pgid.value+"&pid="+document.photoCommentEditForm.pid.value+"&cid="+document.photoCommentEditForm.cid.value+"&updatecomment"+"&text="+ajaxEscape(text);return new AJAXRequest("POST","/photoupdatecomment.jspax",poststr,"http://www.vaxjopuls.se/photogallery.jsp",processUpdateCommentXML);}else alert("Glöm inte att skriva nåt också :p");} function processUpdateCommentXML(myAJAX){if(myAJAX.readyState==4){if(myAJAX.status==200){var xml=myAJAX.responseXML;if(xml.documentElement){var status=xml.documentElement.getElementsByTagName("status")[0].firstChild.nodeValue;if(status=="OK"){document.photoCommentEditForm.text.value="";removeCommentEditForm();fScrollToBottomOnLoad=true;getCommentsForced();return;}else if(status=="login"){openLoginForm(null,fMemberGallery?"mg":"regular",false,2);return;}}} alert("Misslyckades att uppdatera...");}} function deleteComment(cid){if(confirm("Är du säker på att du vill ta bort den här kommentaren?")){return new AJAXRequest("POST","/photodeletecomment.jspax","pgid="+pgid+"&pid="+pid+"&cid="+cid,"http://www.vaxjopuls.se/photogallery.jsp",processDeleteComment);}} function reportComment(cid){if(!elReportForm) elReportForm=document.getElementById("reportcomment");var elDest=document.getElementById("c_"+cid);if(elReportForm&&elDest){hideCommentForm();removeCommentEditForm();removeCommentReportForm();elReportChangedBorder=document.getElementById("ct_"+cid);elReportChangedBorder.style.border="1px solid #A63232";elReportForm.style.display="block";elDest.appendChild(elReportForm);document.photoCommentReportForm.message.value="";document.photoCommentReportForm.pgid.value=pgid;document.photoCommentReportForm.pid.value=pid;document.photoCommentReportForm.cid.value=cid;} return;} function submitCommentReportForm(){if(!fSubmitting){fSubmitting=true;var message=trim(document.photoCommentReportForm.message.value);var poststr="pgid="+document.photoCommentReportForm.pgid.value+"&pid="+document.photoCommentReportForm.pid.value+"&cid="+document.photoCommentReportForm.cid.value+"&reportcomment"+"&message="+ajaxEscape(message);return new AJAXRequest("POST","/photoreportcomment.jspax",poststr,"http://www.vaxjopuls.se/photogallery.jsp",processReportCommentXML);}} function processReportCommentXML(myAJAX){if(myAJAX.readyState==4){fSubmitting=false;if(myAJAX.status==200){var xml=myAJAX.responseXML;if(xml.documentElement){var status=xml.documentElement.getElementsByTagName("status")[0].firstChild.nodeValue;if(status=="OK"){document.photoCommentReportForm.message.value="";removeCommentReportForm();alert("Tack för din anmälan!");return;}else if(status=="login"){openLoginForm(null,fMemberGallery?"mg":"regular",false,2);return;}else{alert("Kommentaren kunde inte hittas. Kanske är den redan borttagen?");return;}}} alert("Misslyckades med anmälan...");}} function enlargeWindow(){setElementsByIdsDisplayBlock('divBelowThumbnails');if(fResizeEnabled){var el=document.getElementById("photoGalleryTable");if(el){var yWin=0;if(window.screenY) yWin=window.screenY;if(window.screenTop) yWin=window.screenTop;var cyWin=0;var cyUnusable=30;if(typeof(window.outerHeight)=='number'){cyUnusable=window.outerHeight-window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){cyUnusable=30;} var cyMax=screen.height-yWin-cyUnusable-35;var cy=cyMax;if(el.clientHeight>600&&el.clientHeight1){animateSlideToggleOut(true);}} function doNifty(){if(!NiftyCheck())return;var els=getElementsBySelector("b.artop");if(els){for(var i=0;i1){var fPlaying=fHighResMode?fSlideshowEnabled:currentState==2;if(fPlaying!=fPlayButtonState){animateSlideToggle("/images/cardpres/"+(fPlaying?"slidestart.gif":"slidepause.gif"),false);}} if(!fNoReset) cClicks=0;} function toggleLoaderCallBack(bLoaded,image){var elImg=document.getElementById("imgslidestart");var elImgOver=document.getElementById("toggleslide_over");elImgOver.style.visibility="visible";if(image.src.indexOf("slidestart.gif")>=0){fPlayButtonState=true;}else{fPlayButtonState=false;} toggleEffect.startFadeEffect(elImgOver,elImg,image,function(){animateSlideToggleDone();});} function animateSlideToggleDone(){var elImgOver=document.getElementById("toggleslide_over");elImgOver.style.visibility="hidden";if(fSlideInQueued){fSlideInQueued=false;animateSlideToggleIn();}else if(fSlideOutQueued){fSlideOutQueued=false;animateSlideToggleOut();}} function showGalleryTextExtended(){var el=document.getElementById("text_extended_box");if(el.filters) el.filters.alpha.opacity="0";el.style.opacity="0.0";el.style.display="block";var effect=new OpacityFadeEffect();effect.startFadeEffect(el,null,false,null);} var flvplayer=null;function showGalleryVideo(videofile,videoPreviewFile,cxVideo,cyVideo){var el=document.getElementById("flv_video_box");if(el.style.display=="block"){hideGalleryVideo();return;}else{setElementsByIdsDisplayBlock("photoGalleryHighRes","flv_video_box","photoGalleryHighRes3");document.body.oncontextmenu=function(){return false;};} if(flvplayer==null){trackclick(null,"gallery_flv");flvplayer=new SWFObject("/video/flvplayer.swf","mpl",cxVideo,cyVideo+21,"7");flvplayer.addParam("allowfullscreen","true");flvplayer.addVariable("file","/video/"+videofile);flvplayer.addVariable("image",videoPreviewFile);flvplayer.addVariable("width",cxVideo);flvplayer.addVariable("height",cyVideo+21);flvplayer.addVariable("enablejs","true");flvplayer.addVariable("javascriptid","mpl");flvplayer.addVariable("lightcolor","0x557722");flvplayer.addVariable("backcolor","0x000000");flvplayer.addVariable("frontcolor","0xCCCCCC");flvplayer.write("flv_video");}} function hideGalleryVideo(){var el=document.getElementById("flv_video_box");if(flvplayer!=null&&el.style.display=="block"){if(currentState==2) sendEvent('playpause');document.body.oncontextmenu=function(){return true;};setElementsByIdsDisplayNone("photoGalleryHighRes","flv_video_box","photoGalleryHighRes3");}} var currentPosition;var currentVolume;var currentItem;var currentState=0;function sendEvent(typ,prm){thisMovie("mpl").sendEvent(typ,prm);};function getUpdate(typ,pr1,pr2,pid){if(typ=="time"){currentPosition=pr1;} else if(typ=="volume"){currentVolume=pr1;} else if(typ=="item"){currentItem=pr1;setTimeout("getItemData(currentItem)",100);} else if(typ=="state"){if(currentState!=pr1){if(pr1==2) enablePlayState(false);else disablePlayState(false);} currentState=pr1;}};function loadFile(obj){thisMovie("mpl").loadFile(obj);};function addItem(obj,idx){thisMovie("mpl").addItem(obj,idx);} function removeItem(idx){thisMovie("mpl").removeItem(idx);} function getItemData(idx){};function thisMovie(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName];}else{return document[movieName];}};