if(typeof aptExpAd=="undefined"){var aptExpAd_expanding_ads=new Object();var aptExpAd_prefix_id="expanding_ad_";var aptExpAd_default_width=468;var aptExpAd_default_contracted_width=468;var aptExpAd_default_height=400;var aptExpAd_default_contracted_height=100;var aptExpAd_default_version=7;var aptExpAd_default_type="expand";var aptExpAd_default_clicktag_name="clickTag";var aptExpAd=new Object();aptExpAd.ExpandingAd=function(_1){if(!document.getElementById){return;}this.attributes=new Object();switch(true){case !_1.swf:case !_1.fallback:alert("Du m\ufffd definere opp swf og fallback");return;break;default:break;}this.Att("swf",_1.swf);this.Att("fallback",_1.fallback);this.Att("expanded_fallback",_1.expanded_fallback);this.Att("url",(!_1.url)?"":_1.url);this.Att("width",(!_1.width)?aptExpAd_default_width:_1.width);this.Att("contracted_width",(!_1.contracted_width)?aptExpAd_default_contracted_width:_1.contracted_width);this.Att("height",(!_1.height)?aptExpAd_default_height:_1.height);this.Att("contracted_height",(!_1.contracted_height)?aptExpAd_default_contracted_height:_1.contracted_height);this.Att("version",new deconcept.PlayerVersion((!_1.version)?aptExpAd_default_version.toString().split("."):_1.version.toString().split(".")));this.Att("type",(!_1.type)?aptExpAd_default_type:_1.type);this.Att("html_prepend",(!_1.html_prepend)?"":_1.html_prepend);this.Att("html_append",(!_1.html_append)?"":_1.html_append);this.Att("clicktag_name",(!_1.clicktag_name)?aptExpAd_default_clicktag_name:_1.clicktag_name);this.Att("written",false);this.Att("expanded",false);this.Att("using_fallback",false);this.Att("id",aptExpAd_prefix_id+""+Math.floor(Math.random(1)*100000));};aptExpAd.ExpandingAd.Expand=function(id){return ((obj=this.Find(id))?obj.Expand():null);};aptExpAd.ExpandingAd.Contract=function(id){return ((obj=this.Find(id))?obj.Contract():null);};aptExpAd.ExpandingAd.Find=function(id){return aptExpAd_expanding_ads[id];};aptExpAd.ExpandingAd.prototype={Att:function(n,v){if(v!=undefined){this.attributes[n]=v;}return (this.attributes[n]);},Expand:function(){if(!this.Att("expanded")){container=document.getElementById(this.Att("id")+"_container");if(container){container.style.width=this.Att("width")+"px";container.style.height=this.Att("height")+"px";if(this.Att("using_fallback")){container.innerHTML="<a href=\""+this.Att("url")+"\" onmouseout=\"ExpandingAd.Contract( '"+this.Att("id")+"' );\" target=\"_blank\"><img src=\""+this.Att("expanded_fallback")+"\" alt=\"\" height=\""+this.Att("height")+"\" width=\""+this.Att("width")+"\" id=\"\" border=\"0\" /></a>";}this.Att("expanded",true);}}},Contract:function(){if(this.Att("expanded")){container=document.getElementById(this.Att("id")+"_container");if(container){container.style.width=this.Att("contracted_width")+"px";container.style.height=this.Att("contracted_height")+"px";if(this.Att("using_fallback")){container.innerHTML="<a href=\""+this.Att("url")+"\" onmouseover=\"ExpandingAd.Expand( '"+this.Att("id")+"' );\" target=\"_blank\"><img src=\""+this.Att("fallback")+"\" alt=\"\" height=\""+this.Att("contracted_height")+"\" width=\""+this.Att("contracted_width")+"\"id=\"\" border=\"0\" /></a>";}this.Att("expanded",false);}}},Write:function(id){var _8=new SWFObject(this.Att("swf")+"?"+this.Att("clicktag_name")+"="+this.Att("url")+"&expanding_ad_id="+this.Att("id"),this.Att("id"),"100%","100%",this.Att("version"));var _9="";var _a="";var _b=9999;var _c=(this.Att("type")=="dropdown")?"absolute":"relative";if(_8.installedVer.versionIsValid(this.Att("version"))){_8.addParam("quality","high");_8.addParam("salign","t");_8.addParam("scale","noscale");_8.addParam("allowScriptAccess","always");if(this.Att("type")=="expand"){_8.addParam("wmode","opaque");}_a=_8.getSWFHTML();}else{this.Att("using_fallback",true);if(this.Att("expanded_fallback")){_a="<a href=\""+this.Att("url")+"\" onmouseover=\"ExpandingAd.Expand( '"+this.Att("id")+"' );\"><img src=\""+this.Att("fallback")+"\" width=\""+this.Att("contracted_width")+"\" height=\""+this.Att("contracted_height")+"\" alt=\"\" id=\"\" border=\"0\" /></a>";_b=10;}else{_a="<a href=\""+this.Att("url")+"\" target=\"_blank\"><img src=\""+this.Att("fallback")+"\" alt=\"\" id=\"\" border=\"0\"/></a>";}}var _d=this.Att("html_prepend")+"<div id=\""+this.Att("id")+"_container\" class=\"expanding_ad_container\" style=\"position:"+_c+"; width:"+this.Att("contracted_width")+"px; height:"+this.Att("contracted_height")+"px; overflow:hidden; z-index:1;\">"+_a+"</div>"+this.Att("html_append");switch(this.Att("type")){case "dropdown":_d="<div id=\""+this.Att("id")+"_outercontainer\" class=\"expanding_ad_outercontainer\" style=\"position:relative; width:"+this.Att("contracted_width")+"px; height:"+this.Att("contracted_height")+"px; z-index:"+_b+";\">"+_d+"</div>";break;default:break;}if(!this.Att("written")){if(id){element=(typeof id=="string")?document.getElementById(id):id;if(element){element.innerHTML=_d;}}else{document.write(_d);}aptExpAd_expanding_ads[this.Att("id")]=this;this.Att("written",true);}}};var ExpandingAd=aptExpAd.ExpandingAd;}