var searchUI={windows:['course','school'],currentW:'',counties:false,schools:[],selectedCounties:{},numSelectedCounties:0,prevTab:'left_tab_1',hideWindows:function(){var n=searchUI.modals.length;for(var i=0;i<n;i++){$(modals[i]+'_modal').setStyle('display','none');}},showWindow:function(w){w+='_modal';searchUI.hideCurrentWindow();$(w).setStyle('display','block');searchUI.currentW=w;},hideCurrentWindow:function(){if(searchUI.currentW){$(searchUI.currentW).setStyle('display','none');}},showSchoolCounties:function(){var counties,county,schools,n,display;if(!searchUI.counties){counties={};schools=[];$$('.skole_option').each(function(e){county=e.className;county=county.substring(county.lastIndexOf('_')+1);if(county){if(counties[county]==undefined){counties[county]=[];}
counties[county].push(e);}
schools.push({county:county,el:e});});searchUI.counties=counties;searchUI.schools=schools;}
else{counties=searchUI.counties;schools=searchUI.schools;}
if(searchUI.numSelectedCounties==0){n=schools.length;for(var i=0;i<n;i++){schools[i]['el'].setStyle('display','block');}}
else{n=schools.length;for(var i=0;i<n;i++){county=schools[i].county;if(searchUI.selectedCounties[county]!=undefined&&searchUI.selectedCounties[county]){schools[i]['el'].setStyle('display','block');}
else{schools[i]['el'].setStyle('display','none');}}}},search:function(){$('frm_school_search').submit();},handleTab:function(){var h=this.href
h=h.substring(h.indexOf('#')+1);searchUI.showTab(h);return false;},showTab:function(t){searchUI.hideTab(searchUI.prevTab);$(t).removeClass('left_tab_closed').addClass('left_tab_open');$(t+'_toggle').addClass('btn_result_selected');searchUI.prevTab=t;},hideTab:function(t){$(t).addClass('left_tab_closed').removeClass('left_tab_open');$(t+'_toggle').removeClass('btn_result_selected');},addFacet:function(el){if(typeof(el)=='string'){if(el.substring(0,6)=='region'){$('dummy_region').set('checked',false);}
el=$(el);}
if(el&&el.checked!==undefined){$(el).set('checked',true);this.search();}
return false;}}
$(window).addEvent('load',function(){var left=$$('.side_panel');var left_cont=$('left_content');if(left_cont){var size=left_cont.getSize();var lSize=left.getSize()[0];if(size.y>lSize.y+36){left.setStyle('height',size.y-36);}}
if(!$('find_school_submit')){return false;}
$('show_course_modal').addEvent('click',function(){searchUI.showWindow('course');return false;});$('show_school_modal').addEvent('click',function(){searchUI.showWindow('school');return false;});$$('.big_btn_overlay').addEvent('click',function(){searchUI.hideCurrentWindow();return false;});$('find_school_submit').addEvent('click',function(){searchUI.search();return false;});$$('.chc_fylke').each(function(e){e.addEvent('click',function(){var county=this.id.substring(this.id.lastIndexOf('_')+1);searchUI.selectedCounties[county]=this.checked;searchUI.numSelectedCounties+=this.checked?1:-1;searchUI.showSchoolCounties();});});$$('.search_facet span').each(function(e){e.addEvent('click',function(){return false;});});$$('.chc_region').each(function(e){e.addEvent('click',function(){$('dummy_region').set('checked',false);})});var region_dummy=$('dummy_region');if(region_dummy){region_dummy.addEvent('click',function(e){$$('.chc_region').set('checked',false);});$('dummy_region_label').addEvent('click',function(e){for(var i=1;i<=5;i++){$('region_'+i).set('checked',false);}
searchUI.search();return false;});}
var subject=$('subject-search');new Autocompleter.Request.JSON(subject,EDIT_CORE.JSSiteRoot+'site/skole/search.php?a=autocomplete',{'indicatorClass':'autocompleter-loading','minLength':3,'maxChoices':12,'zIndex':10000});if(!subject.get('value')){subject.watermark(i18n.searchString);}
if($('left_tab_0_toggle')){$('left_tab_0_toggle').addEvent('click',searchUI.handleTab);}
if($('left_tab_1_toggle')){$('left_tab_1_toggle').addEvent('click',searchUI.handleTab);}});var current_school_image=0;var school_image_timer=null;var ytplayer=false;function init_image_widget(){$(window).addEvent('domready',function(){if(school_images&&school_images.length>1){$$('.school_thumbs img').each(function(el){el.addEvent('click',function(e,elem){var img_id=this.id.replace('school_thumb_','');set_school_image(img_id,true);});});$('school_header_image').addEvent('mouseenter',function(){$('school_thumbs').tween('bottom','0px');});$('school_header_image').addEvent('mouseleave',function(){$('school_thumbs').tween('bottom','-60px');});}
school_image_timer=setInterval(next_school_image,4000);set_school_image(0,false);});}
function next_school_image(){var img_i=current_school_image+1;if(img_i>=school_images.length){img_i=0;}
set_school_image(img_i);}
function prev_school_image(){var img_i=(current_school_image>0)?(current_school_image-1):(school_images.length-1);set_school_image(img_i);}
function set_school_image(i,stop_cycle){if(school_images.length>1){$('school_thumb_'+current_school_image).removeClass('selected');$('school_thumb_'+i).addClass('selected');}
$('school_image').set('src',school_images[i].src);current_school_image=i;if(school_images[i].videoId){$('school_image').addClass('has_action').addEvent('click',video_click);}
else{$('school_image').removeClass('has_action').removeEvent('click',video_click);}
if(stop_cycle){clearInterval(school_image_timer);}}
function video_click(){show_school_video(school_images[current_school_image].videoId,school_images[current_school_image].videoProvider);}
function show_school_video(videoId,videoProvider){if(school_images.length>1){$('school_thumbs').setStyle('display','none');}
$('school_image').setStyle('display','none');if(!ytplayer){if(videoProvider=='vimeo'){VimeoPlayer.load('http://vimeo.com/'+videoId);}
else{load_yt_video(videoId);}}
else{$('yt-video').setStyle('display','');}}
function load_yt_video(id){var params={allowScriptAccess:"always"};var atts={id:"yt-video"};swfobject.embedSWF("http://www.youtube.com/e/"+id+"?enablejsapi=1&playerapiid=yt-video&autoplay=1&autohide=1","yt_video",597,332,"8",null,null,params,atts);}
function onYouTubePlayerReady(playerId){ytplayer=document.getElementById('yt-video');ytplayer.addEventListener("onStateChange","onPlayerStateChange");}
function onPlayerStateChange(state){if(state=="0"&&school_images.length>1){restore_school_img();}}
function restore_school_img(){$('yt-video').setStyle('display','none');$('school_image').setStyle('display','inline-block');$('school_thumbs').setStyle('display','block');}
var VimeoPlayer={vid:null,autostart:true,load:function(videoUrl){var endpoint='http://www.vimeo.com/api/oembed.json';var url=endpoint+'?url='+encodeURIComponent(videoUrl)+'&api=1&callback=VimeoPlayer.embed&width=597';var js=document.createElement('script');js.setAttribute('type','text/javascript');js.setAttribute('src',url);document.getElementsByTagName('head').item(0).appendChild(js);},embed:function(video){if(window.addEventListener){window.addEventListener('message',VimeoPlayer.ready);}
else{window.attachEvent('onmessage',VimeoPlayer.ready);}
var vid=document.getElementById('yt_video');var holder=document.createElement('div');holder.id='yt-video';holder.innerHTML=unescape(video.html);vid.appendChild(holder);VimeoPlayer.vid=holder.getElementsByTagName("iframe")[0];ytplayer=VimeoPlayer.vid;},ready:function(e){var data=JSON.parse(e.data);if(data.event=="ready"){VimeoPlayer.post('addEventListener','finish');if(VimeoPlayer.autostart){VimeoPlayer.post('play');}}
else{if(VimeoPlayer[data.event]){VimeoPlayer[data.event].call(VimeoPlayer);}}},post:function(action,value){if(!VimeoPlayer.vid.contentWindow.postMessage)return false;var data={method:action};if(value){data.value=value;}
var url=VimeoPlayer.vid.src.split('?')[0];VimeoPlayer.vid.contentWindow.postMessage(JSON.stringify(data),url);},finish:function(){if(school_images.length>1){restore_school_img();}}};
;Element.implement({watermark:function(value){this.set('value',value).addClass('watermark');this.addEvents({'focus':function(){if(this.get('value')==value)this.set('value','').removeClass('watermark');},'blur':function(){if(this.get('value')=="")this.set('value',value).addClass('watermark');}});}});
;function school_select_changed($option,$school_page_id){var siteroot=EDIT_CORE.JSSiteRoot.replace('https','http');var value=$option.options[$option.options.selectedIndex].value;if(value.indexOf('redirect_alert')!=-1){value=value.slice(value.lastIndexOf('_')+1);alert('Denne skolen har skiftet navn til Stavern folkehøyskole Fredtun');}
document.location.href=siteroot+"index.php?page_id="+$school_page_id+"&skole_id="+value;}
function check_picked_course(){if((document.frm_school_search.chc_faginteresse.options.selectedIndex==-1)&&(document.frm_school_search.chc_kurstype.checked!=true)){alert('Du må velge faginteresse!');return false;}else{return true;}}
function printcontents(element){var win=window.open(element,"TrackHistoryData","width=690,height=480,top=0,left=0,toolbars=yes,scrollbars=yes,status=no,resizable=yes");win.focus();}
function kursliste_click($SCRIPT,$PAGE_ID,$SKOLE_ID,$KURS_ID,$PAGE_ROW_PARAM,$EXTRA_PARAM){location.href='../../site/'+$SCRIPT+'?page_id='+$PAGE_ID+'&skole_id='+$SKOLE_ID+'&produkt_id='+$KURS_ID+'&page_row_id='+$PAGE_ROW_PARAM+$EXTRA_PARAM;}
;function fix_anchors(){$("a[href^='\#']").click(function(e){e.preventDefault();document.location.hash=this.href.substr(this.href.indexOf('#')+1);});}
function fix_anchors_base(){if(document.getElementsByTagName("base")[0]){var anchors=document.getElementsByTagName("a");var basehref=document.getElementsByTagName("base")[0].href;var url=window.location.href;if(url.indexOf("#")>0)url=url.substr(0,url.indexOf("#"));if(basehref){for(var i=0;i<anchors.length;i++){var anchor=anchors[i];poundPos=anchor.href.indexOf("/#");if(poundPos>0){anchor.href=url+anchor.href.substr(poundPos+1);}}}}
else{}}
window.addEvent('load',function(){fix_anchors_base();});
;var Observer=new Class({Implements:[Options,Events],options:{periodical:false,delay:1000},initialize:function(el,onFired,options){this.element=$(el)||$$(el);this.addEvent('onFired',onFired);this.setOptions(options);this.bound=this.changed.bind(this);this.resume();},changed:function(){var value=this.element.get('value');if($equals(this.value,value))return;this.clear();this.value=value;this.timeout=this.onFired.delay(this.options.delay,this);},setValue:function(value){this.value=value;this.element.set('value',value);return this.clear();},onFired:function(){this.fireEvent('onFired',[this.value,this.element]);},clear:function(){$clear(this.timeout||null);return this;},pause:function(){if(this.timer)$clear(this.timer);else this.element.removeEvent('keyup',this.bound);return this.clear();},resume:function(){this.value=this.element.get('value');if(this.options.periodical)this.timer=this.changed.periodical(this.options.periodical,this);else this.element.addEvent('keyup',this.bound);return this;}});var $equals=function(obj1,obj2){return(obj1==obj2||JSON.encode(obj1)==JSON.encode(obj2));};
;var Autocompleter=new Class({Implements:[Options,Events],options:{minLength:1,markQuery:true,width:'inherit',maxChoices:10,injectChoice:null,customChoices:null,emptyChoices:null,visibleChoices:true,className:'autocompleter-choices',zIndex:42,delay:400,observerOptions:{},fxOptions:{},autoSubmit:false,overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true,choicesMatch:null,multiple:false,separator:', ',separatorSplit:/\s*[,;]\s*/,autoTrim:false,allowDupes:false,cache:true,relative:false},initialize:function(element,options){this.element=$(element);this.setOptions(options);this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({'delay':this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter)this.filter=this.options.filter.bind(this);var mode=this.options.selectMode;this.typeAhead=(mode=='type-ahead');this.selectMode=(mode===true)?'selection':mode;this.cached=[];},build:function(){if($(this.options.customChoices)){this.choices=this.options.customChoices;}else{this.choices=new Element('ul',{'class':this.options.className,'styles':{'zIndex':this.options.zIndex}}).inject(document.body);this.relative=false;if(this.options.relative){this.choices.inject(this.element,'after');this.relative=this.element.getOffsetParent();}
this.fix=new OverlayFix(this.choices);}
if(!this.options.separator.test(this.options.separatorSplit)){this.options.separatorSplit=this.options.separator;}
this.fx=(!this.options.fxOptions)?null:new Fx.Tween(this.choices,$merge({'property':'opacity','link':'cancel','duration':200},this.options.fxOptions)).addEvent('onStart',Chain.prototype.clearChain).set(0);this.element.setProperty('autocomplete','off').addEvent((Browser.Engine.trident||Browser.Engine.webkit)?'keydown':'keypress',this.onCommand.bind(this)).addEvent('click',this.onCommand.bind(this,[false])).addEvent('focus',this.toggleFocus.create({bind:this,arguments:true,delay:100})).addEvent('blur',this.toggleFocus.create({bind:this,arguments:false,delay:100}));},destroy:function(){if(this.fix)this.fix.destroy();this.choices=this.selected=this.choices.destroy();},toggleFocus:function(state){this.focussed=state;if(!state)this.hideChoices(true);this.fireEvent((state)?'onFocus':'onBlur',[this.element]);},onCommand:function(e){if(!e&&this.focussed)return this.prefetch();if(e&&e.key&&!e.shift){switch(e.key){case'enter':if(this.element.value!=this.opted)return true;if(this.selected&&this.visible){this.choiceSelect(this.selected);return!!(this.options.autoSubmit);}
break;case'up':case'down':if(!this.prefetch()&&this.queryValue!==null){var up=(e.key=='up');this.choiceOver((this.selected||this.choices)[(this.selected)?((up)?'getPrevious':'getNext'):((up)?'getLast':'getFirst')](this.options.choicesMatch),true);}
return false;case'esc':case'tab':this.hideChoices(true);break;}}
return true;},setSelection:function(finish){var input=this.selected.inputValue,value=input;var start=this.queryValue.length,end=input.length;if(input.substr(0,start).toLowerCase()!=this.queryValue.toLowerCase())start=0;if(this.options.multiple){var split=this.options.separatorSplit;value=this.element.value;start+=this.queryIndex;end+=this.queryIndex;var old=value.substr(this.queryIndex).split(split,1)[0];value=value.substr(0,this.queryIndex)+input+value.substr(this.queryIndex+old.length);if(finish){var tokens=value.split(this.options.separatorSplit).filter(function(entry){return this.test(entry);},/[^\s,]+/);if(!this.options.allowDupes)tokens=[].combine(tokens);var sep=this.options.separator;value=tokens.join(sep)+sep;end=value.length;}}
this.observer.setValue(value);this.opted=value;if(finish||this.selectMode=='pick')start=end;this.element.selectRange(start,end);this.fireEvent('onSelection',[this.element,this.selected,value,input]);},showChoices:function(){var match=this.options.choicesMatch,first=this.choices.getFirst(match);this.selected=this.selectedValue=null;if(this.fix){var pos=this.element.getCoordinates(this.relative),width=this.options.width||'auto';this.choices.setStyles({'left':pos.left,'top':pos.bottom,'width':(width===true||width=='inherit')?pos.width:width});}
if(!first)return;if(!this.visible){this.visible=true;this.choices.setStyle('display','');if(this.fx)this.fx.start(1);this.fireEvent('onShow',[this.element,this.choices]);}
if(this.options.selectFirst||this.typeAhead||first.inputValue==this.queryValue)this.choiceOver(first,this.typeAhead);var items=this.choices.getChildren(match),max=this.options.maxChoices;var styles={'overflowY':'hidden','height':''};this.overflown=false;if(items.length>max){var item=items[max-1];styles.overflowY='scroll';styles.height=item.getCoordinates(this.choices).bottom;this.overflown=true;};this.choices.setStyles(styles);this.fix.show();if(this.options.visibleChoices){var scroll=document.getScroll(),size=document.getSize(),coords=this.choices.getCoordinates();if(coords.right>scroll.x+size.x)scroll.x=coords.right-size.x;if(coords.bottom>scroll.y+size.y)scroll.y=coords.bottom-size.y;window.scrollTo(Math.min(scroll.x,coords.left),Math.min(scroll.y,coords.top));}},hideChoices:function(clear){if(clear){var value=this.element.value;if(this.options.forceSelect)value=this.opted;if(this.options.autoTrim){value=value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);}
this.observer.setValue(value);}
if(!this.visible)return;this.visible=false;if(this.selected)this.selected.removeClass('autocompleter-selected');this.observer.clear();var hide=function(){this.choices.setStyle('display','none');this.fix.hide();}.bind(this);if(this.fx)this.fx.start(0).chain(hide);else hide();this.fireEvent('onHide',[this.element,this.choices]);},prefetch:function(){var value=this.element.value,query=value;if(this.options.multiple){var split=this.options.separatorSplit;var values=value.split(split);var index=this.element.getSelectedRange().start;var toIndex=value.substr(0,index).split(split);var last=toIndex.length-1;index-=toIndex[last].length;query=values[last];}
if(query.length<this.options.minLength){this.hideChoices();}else{if(query===this.queryValue||(this.visible&&query==this.selectedValue)){if(this.visible)return false;this.showChoices();}else{this.queryValue=query;this.queryIndex=index;if(!this.fetchCached())this.query();}}
return true;},fetchCached:function(){return false;if(!this.options.cache||!this.cached||!this.cached.length||this.cached.length>=this.options.maxChoices||this.queryValue)return false;this.update(this.filter(this.cached));return true;},update:function(tokens){this.choices.empty();this.cached=tokens;var type=tokens&&$type(tokens);if(!type||(type=='array'&&!tokens.length)||(type=='hash'&&!tokens.getLength())){(this.options.emptyChoices||this.hideChoices).call(this);}else{if(this.options.maxChoices<tokens.length&&!this.options.overflow)tokens.length=this.options.maxChoices;tokens.each(this.options.injectChoice||function(token){var choice=new Element('li',{'html':this.markQueryValue(token)});choice.inputValue=token;this.addChoiceEvents(choice).inject(this.choices);},this);this.showChoices();}},choiceOver:function(choice,selection){if(!choice||choice==this.selected)return;if(this.selected)this.selected.removeClass('autocompleter-selected');this.selected=choice.addClass('autocompleter-selected');this.fireEvent('onSelect',[this.element,this.selected,selection]);if(!this.selectMode)this.opted=this.element.value;if(!selection)return;this.selectedValue=this.selected.inputValue;if(this.overflown){var coords=this.selected.getCoordinates(this.choices),margin=this.options.overflowMargin,top=this.choices.scrollTop,height=this.choices.offsetHeight,bottom=top+height;if(coords.top-margin<top&&top)this.choices.scrollTop=Math.max(coords.top-margin,0);else if(coords.bottom+margin>bottom)this.choices.scrollTop=Math.min(coords.bottom-height+margin,bottom);}
if(this.selectMode)this.setSelection();},choiceSelect:function(choice){if(choice)this.choiceOver(choice);this.setSelection(true);this.queryValue=false;this.hideChoices();},filter:function(tokens){return(tokens||this.tokens).filter(function(token){return this.test(token);},new RegExp(((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp(),(this.options.filterCase)?'':'i'));},markQueryValue:function(str){return(!this.options.markQuery||!this.queryValue)?str:str.replace(new RegExp('('+((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp()+')',(this.options.filterCase)?'':'i'),'<span class="autocompleter-queried">$1</span>');},addChoiceEvents:function(el){return el.addEvents({'mouseover':this.choiceOver.bind(this,[el]),'click':this.choiceSelect.bind(this,[el])});}});var OverlayFix=new Class({initialize:function(el){if(Browser.Engine.trident){this.element=$(el);this.relative=this.element.getOffsetParent();this.fix=new Element('iframe',{'frameborder':'0','scrolling':'no','src':'javascript:false;','styles':{'position':'absolute','border':'none','display':'none','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'}}).inject(this.element,'after');}},show:function(){if(this.fix){var coords=this.element.getCoordinates(this.relative);delete coords.right;delete coords.bottom;this.fix.setStyles($extend(coords,{'display':'','zIndex':(this.element.getStyle('zIndex')||1)-1}));}
return this;},hide:function(){if(this.fix)this.fix.setStyle('display','none');return this;},destroy:function(){if(this.fix)this.fix=this.fix.destroy();}});Element.implement({getSelectedRange:function(){if(!Browser.Engine.trident)return{start:this.selectionStart,end:this.selectionEnd};var pos={start:0,end:0};var range=this.getDocument().selection.createRange();if(!range||range.parentElement()!=this)return pos;var dup=range.duplicate();if(this.type=='text'){pos.start=0-dup.moveStart('character',-100000);pos.end=pos.start+range.text.length;}else{var value=this.value;var offset=value.length-value.match(/[\n\r]*$/)[0].length;dup.moveToElementText(this);dup.setEndPoint('StartToEnd',range);pos.end=offset-dup.text.length;dup.setEndPoint('StartToStart',range);pos.start=offset-dup.text.length;}
return pos;},selectRange:function(start,end){if(Browser.Engine.trident){var diff=this.value.substr(start,end-start).replace(/\r/g,'').length;start=this.value.substr(0,start).replace(/\r/g,'').length;var range=this.createTextRange();range.collapse(true);range.moveEnd('character',start+diff);range.moveStart('character',start);range.select();}else{this.focus();this.setSelectionRange(start,end);}
return this;}});Autocompleter.Base=Autocompleter;
;Autocompleter.Request=new Class({Extends:Autocompleter,options:{postData:{},ajaxOptions:{},postVar:'value'},query:function(){var data=$unlink(this.options.postData)||{};data[this.options.postVar]=this.queryValue;var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','');var cls=this.options.indicatorClass;if(cls)this.element.addClass(cls);this.fireEvent('onRequest',[this.element,this.request,data,this.queryValue]);this.request.send({'data':data});},queryResponse:function(){var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','none');var cls=this.options.indicatorClass;if(cls)this.element.removeClass(cls);return this.fireEvent('onComplete',[this.element,this.request]);}});Autocompleter.Request.JSON=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.JSON($merge({'url':url,'link':'cancel'},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this));},queryResponse:function(response){this.parent();this.update(response);}});Autocompleter.Request.HTML=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.HTML($merge({'url':url,'link':'cancel','update':this.choices},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this));},queryResponse:function(tree,elements){this.parent();if(!elements||!elements.length){this.hideChoices();}else{this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice||function(choice){var value=choice.innerHTML;choice.inputValue=value;this.addChoiceEvents(choice.set('html',this.markQueryValue(value)));},this);this.showChoices();}}});Autocompleter.Ajax={Base:Autocompleter.Request,Json:Autocompleter.Request.JSON,Xhtml:Autocompleter.Request.HTML};
;var pris=new Array()
var fieldList=new Array()
var fieldMsg=new Array()
var form_submited=false;var field_bare_tall_list=new Array()
var field_bare_tall_ant=new Array()
var field_bare_tall_msg=new Array()
var containsList=new Array()
var containsMsg=new Array()
var containsString=new Array()
var notcontainsList=new Array()
var notcontainsMsg=new Array()
var notcontainsString=new Array()
var radioList=new Array()
var radioMsg=new Array()
var selectList=new Array()
var selectMsg=new Array()
var cbxList=new Array()
var cbxMsg=new Array()
var arkiv_bilde_id=0;var arkiv_call_back=null;function add_arkiv_bilde(pic_id,src){csAlert.display_iFrame_arkiv(0);document.getElementById('pollfield'+arkiv_bilde_id+'_pic_id').value=pic_id;if(src){document.getElementById('prieview_bilde_'+arkiv_bilde_id).src=src;document.getElementById('prieview_bilde_'+arkiv_bilde_id).width=80;document.getElementById('delete_ark_bilde_'+arkiv_bilde_id).style.display='inline';}}
function hide_frame(pic_id,src){csAlert.display_iFrame_arkiv(0);}
function fjerne_bilde(id){document.getElementById('pollfield'+id+'_pic_id').value=0;document.getElementById('prieview_bilde_'+id).src='../../site/pages/shim.gif';document.getElementById('prieview_bilde_'+id).width=1;document.getElementById('delete_ark_bilde_'+arkiv_bilde_id).style.display='none';}
function summere(){var sum=0
var Txf;for(var i=0;i<pris.length;i++){var temp="document.forms[0].textfield"
temp+=i
Txf=eval(temp)
var inputChck=parseInt(Txf.value,10)
if((isNaN(inputChck))&&((isEmpty(Txf.value)==false))){alert("Entries must be numbers only.")
select(Txf)
return false}
else{if(isEmpty(Txf.value)==false){sum+=(inputChck*pris[i])
document.forms[0].TxfSum.value=sum}}}
document.forms[0].TxfSum.value=sum
document.forms[0].hFSum.value=sum}
function select(field){field.focus()
field.select()}
function isEmpty(inputStr){if(inputStr=""||inputStr==null||inputStr==""){return true}
return false}
function notEditable(field){select(document.forms[0].textfield0)}
function chkField(field,msg){if(field!=null){if(isEmpty(field.value)){alert(msg);select(field);return false;}}
else{alert('finne ikke felt:'+msg);return false;}}
function chk_field_bare_tall(field,msg,ant){var digits=(""+field.value).length
if((ant>1)&&(digits!=ant)){alert(msg)
select(field)
return false}
else if(isNaN(field.value*1)){alert(msg)
select(field)
return false}}
function chk_must_contain(txf_content,msg,contain_string){var ret=false;var found;var content=txf_content.value;found=content.search(contain_string);if(found>-1){ret=true;}
else{alert(msg);select(txf_content);}
return ret;}
function chk_must_notcontain(txf_content,msg,contain_string){var ret=false;var found;var content=txf_content.value;found=content.search(contain_string);if(found>-1){alert(msg);select(txf_content);}
else{ret=true;}
return ret;}
function chkFieldList(){if(form_submited==true)return false;var ret=true
for(var i=0;i<cbxList.length;i++){var i_i=0;var n=10;ret=false
for(i_i=0;i_i<n;i_i++){cbx_obj=MM_findObj(cbxList[i]+'_'+i_i);if(cbx_obj){if(cbx_obj.checked){ret=true
break}}
else{break;}}
if(ret==false){alert(cbxMsg[i])
return false}}
for(var i=0;i<radioList.length;i++){ret=false
for(var k=0;k<radioList[i].length;k++){if(radioList[i][k].checked){ret=true
break}}
if(ret==false){alert(radioMsg[i])
return false}}
for(var i=0;i<selectList.length;i++){if(selectList[i]!=null){if((selectList[i].options.selectedIndex==0)||(selectList[i].options.selectedIndex==-1)){alert(selectMsg[i]);return false;break;}}}
for(var i=0;i<fieldList.length;i++){if(chkField(fieldList[i],fieldMsg[i])==false){ret=false
break}}
for(var i=0;i<field_bare_tall_list.length;i++){if(chk_field_bare_tall(field_bare_tall_list[i],field_bare_tall_msg[i],field_bare_tall_ant[i])==false){ret=false
break}}
for(var i=0;i<containsList.length;i++){if(chk_must_contain(containsList[i],containsMsg[i],containsString[i])==false){ret=false
break}}
for(var i=0;i<notcontainsList.length;i++){if(chk_must_notcontain(notcontainsList[i],notcontainsMsg[i],notcontainsString[i])==false){ret=false
break}}
try{if(ret==true){document.forms["frm_poll"].Submit.disabled=true;form_submited=true;}}
catch(e){}
return ret}
function notEmpty(field,msg){fieldList[fieldList.length]=field
fieldMsg[fieldMsg.length]=msg}
function bare_tall(field,msg,ant){field_bare_tall_list[field_bare_tall_list.length]=field
field_bare_tall_ant[field_bare_tall_ant.length]=ant
field_bare_tall_msg[field_bare_tall_msg.length]=msg}
function must_contain(field,msg,contain_string){containsList[containsList.length]=field;containsString[containsString.length]=contain_string;containsMsg[containsMsg.length]=msg;}
function must_notcontain(field,msg,contain_string){notcontainsList[notcontainsList.length]=field;notcontainsString[notcontainsString.length]=contain_string;notcontainsMsg[notcontainsMsg.length]=msg;}
function addToRadioList(field,msg){radioList[radioList.length]=field
radioMsg[radioMsg.length]=msg}
function addToCbxList(form,fieldname,msg){cbxList[cbxList.length]=fieldname;cbxMsg[cbxMsg.length]=msg}
function addToSelectList(field,msg){selectList[selectList.length]=field;selectMsg[selectMsg.length]=msg;}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
var document_mother=document;function MM_findObj(n,d){var p,i,x;if(!d){if(document_mother==null){d=document;}
else{d=document_mother;}}
if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(n);return x;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
;nereidFadeObjects=new Object();nereidFadeTimers=new Object();function nereidFade(object,destOp,rate,delta){if((!document.all)||(!object.filters.alpha.opacity)){return}
if(object!="[object]"){setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);return;}
clearTimeout(nereidFadeTimers[object.sourceIndex]);diff=destOp-object.filters.alpha.opacity;direction=1;if(object.filters.alpha.opacity>destOp){direction=-1;}
delta=Math.min(direction*diff,delta);object.filters.alpha.opacity+=direction*delta;if(object.filters.alpha.opacity!=destOp){nereidFadeObjects[object.sourceIndex]=object;nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);}}
;var nanofadeProto={transProp:null,transEndEvent:null,filter:'DXImageTransform.Microsoft.Fade',transType:null,el1:null,el2:null,currentEl:null,nextEl:null,current:1,images:null,links:null,duration:null,slidetime:null,fadeTimer:null,options:null,animFade:function(el,from,to,dur,after){var start=+new Date,finish=start+dur;var self=this;var interval=setInterval(function(){var time=+new Date,pos=time>finish?1:(time-start)/dur;el.style['opacity']=((from+(to-from)*pos).toFixed(3));if(time>finish){clearInterval(interval);after&&self.schedule(after,1);}},10);},cssFade:function(el,from,to,dur){el.style[this.transProp]='opacity '+(dur/1000)+'s linear';el.style.opacity=to;},filterFade:function(el,dur){el.style.filter='progid:'+this.filter+'(duration='+(dur/1000)+')';el.filters.item(this.filter).apply();this.show(el,this.current);el.filters.item(this.filter).play();},getTransitionType:function(el){var props={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','Transition':'transitionend'};for(var p in props){if(el.style[p]!==undefined){this.transProp=p;this.transEndEvent=props[p];}}
if(this.transProp!==null){return'css';}
else if(el.filters!==undefined){return'filter';}
return'anim';},stack:function(){this.currentEl.style.zIndex=100;var next=(this.currentEl==this.el1)?this.el2:this.el1;next.style[this.transProp]='';next.style.zIndex=10;next.style.opacity=1;this.show(next,this.current);this.nextEl=next;},show:function(el,i){this.getImg(el).src=this.images[i];if(this.links){el.href=this.links[i]||this.options.defaultLink;}},getImg:function(el){return el.tagName=='A'?el.firstChild:el;},fade:function(){if(!this.getImg(this.nextEl).complete){this.schedule(this.fade,500);return false;}
if(this.transType=='css'){this.cssFade(this.currentEl,1,0,this.duration);}
else if(this.transType=='filter'){this.filterFade(this.el1,this.getImg(this.el2).src,this.duration);this.getImg(this.el2).src=this.images[this.current];}
else{this.animFade(this.currentEl,1,0,this.duration,this.stack);}
this.currentEl=this.nextEl;this.current=(this.current<this.images.length-1)?this.current+1:0;this.schedule(this.fade,this.slidetime);},goto:function(i){if(i<this.images.length){clearTimeout(this.fadeTimer);this.current=i;this.show(this.nextEl,i);this.fade();}
return false;},initialize:function(el,img,options){if(img.length<=1)return;this.images=img;this.options=options=options||{};this.duration=options.duration||500;this.slidetime=options.slidetime||6000;var img1=(typeof el=='string'?document.getElementById(el):el);var img2=document.createElement('img');img1.className=img2.className=(options.imageClass||'fade_img');this.transType=this.getTransitionType(img1);var wrapper=document.createElement('div');wrapper.style.position='relative';if(options.height){wrapper.style.height=options.height+'px';}
if(options.width){wrapper.style.width=options.width+'px';}
img1.parentNode.replaceChild(wrapper,img1);wrapper.appendChild(img1);wrapper.appendChild(img2);if(options.links){this.links=options.links;var im=[img1,img2],l=[];for(var i=0;i<im.length;i++){l[i]=document.createElement('a');if(options.linktarget){l[i].target='_blank';}
im[i].parentNode.replaceChild(l[i],im[i]);l[i].appendChild(im[i]);}
l[0].href=this.links[0]||this.options.defaultLink;this.el1=l[0];this.el2=l[1];}
else{this.el1=img1;this.el2=img2;}
this.currentEl=this.el1;var l=[this.el1,this.el2];var self=this;for(var i=0;i<l.length;i++){l[i].style.cssText='position:absolute;top:0;left:0';if(this.transType=='css'){l[i].addEventListener(this.transEndEvent,function(){self.stack();});}}
this.stack();this.schedule(this.fade,this.slidetime);},schedule:function(fn,time){var self=this;this.fadeTimer=setTimeout(function(){fn.apply(self);},time);}}
function nanofade(){var instance=new function(){};for(var a in nanofadeProto){instance[a]=nanofadeProto[a];}
nanofadeProto.initialize.apply(instance,arguments);return instance;}
;var MooFade=new Class(nanofadeProto);var MooFadeExt=new Class({Extends:MooFade,texts:null,caption1:null,caption2:null,currentCaption:null,stack:function(){this.parent();this.nextEl.style.opacity=0;if(this.transType=='filter'){this.nextEl.style['filter']='alpha(opacity=0)';}
var caption=(this.currentEl==this.el1)?this.caption2:this.caption1;caption.set('html',this.texts[this.current]);},initialize:function(el,img,texts,options){var captionClass=options.captionClass||'fade_caption';var captionProp={'class':captionClass};this.caption1=new Element('div',captionProp);this.caption2=new Element('div',captionProp);this.texts=texts;this.parent(el,img,options);if(this.caption1.style['opacity']!==undefined){this.transType='anim';}
this.caption1.injectInside(this.el1);this.caption1.zIndex=100;this.caption2.injectInside(this.el2);this.caption1.zIndex=10;this.caption1.set('html',texts[0]);this.currentCaption=this.caption1;},filterFade:function(el,from,to,dur,after){var start=+new Date,finish=start+dur;var self=this;var reOpacity=/alpha\(opacity=([^\)]+)\)/;var interval=setInterval(function(){var time=+new Date,pos=time>finish?1:(time-start)/dur;var value=((from+(to-from)*pos).toFixed(3));var es=el.style;if(reOpacity.test(es.filter)){value=value>=0.9999?'':('alpha(opacity='+(value*100)+')');es.filter=es.filter.replace(reOpacity,value);}
else{es.filter+=' alpha(opacity='+(value*100)+')';}
if(time>finish){clearInterval(interval);after&&self.schedule(after,1);}},10);},fade:function(){if(!this.getImg(this.nextEl).complete){this.schedule(this.fade,500);return false;}
if(this.transType=='css'){this.cssFade(this.currentEl,1,0,this.duration);}
else if(this.transType=='filter'){this.filterFade(this.currentEl,1,0,this.duration,this.stack);}
else{this.animFade(this.currentEl,1,0,this.duration);}
this.currentEl=this.nextEl;this.current=(this.current<this.images.length-1)?this.current+1:0;this.schedule(this.fadeIn,750);},fadeIn:function(){if(this.transType=='css'){this.cssFade(this.currentEl,0,1,this.duration);}
else if(this.transType=='filter'){this.filterFade(this.currentEl,0,1,this.duration,this.stack);}
else{this.animFade(this.currentEl,0,1,this.duration,this.stack);}
this.schedule(this.fade,this.slidetime);}});
;var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
