var wmSearch="Søk magasin...";var wmName="Navn";var wmEmail="E-post";var urlAgreements="/allmenne-vilkar.asp";var urlGiftCard="/present.asp";document.observe("dom:loaded",function() {if($('txtSearch')!=null) new WaterMark({textBoxId:'txtSearch',text:wmSearch,classWaterMarked:'WaterMark',classNoWaterMarked:'WaterMarkNo'});});function popupAgreement() {window.open(urlAgreements,"agreement","left="+screen.width/4+",top="+screen.height/4+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=640,height=480");} function PopupPresent(intProductId,strPublicId,intGiftCard) {var win=window.open(urlGiftCard+"?product_id="+intProductId+"&public_id="+strPublicId+"&pic="+intGiftCard,"present","left="+screen.width/4+",top="+screen.height/4+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=900,height=770");win.focus();} function PopupAgreement(intProductId,strPublicId,intGiftCard) {var left=screen.width/4;var top=screen.height/4;window.open(urlGiftCard+"?product_id="+intProductId+"&public_id="+strPublicId+"&pic="+intGiftCard,"present","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=860,height=690");} var WaterMark=Class.create();WaterMark.prototype={initialize:function(options) {this._initialized=false;this.options={textBoxId:null,text:'watermark',classWaterMarked:'',classNoWaterMarked:''};Object.extend(this.options,options);this.marked=($F(this.options.textBoxId).length==0) if(this.marked) {$(this.options.textBoxId).value=this.options.text;$(this.options.textBoxId).toggleClassName(this.options.classWaterMarked);} else {$(this.options.textBoxId).toggleClassName(this.options.classNoWaterMarked);} $(this.options.textBoxId).observe('focus',this.focusMark.bindAsEventListener(this,this.options));$(this.options.textBoxId).observe('blur',this.blurMark.bindAsEventListener(this,this.options));},focusMark:function(event,options) {if(this.marked) {$(options.textBoxId).value='';$(options.textBoxId).removeClassName(options.classWaterMarked);$(options.textBoxId).toggleClassName(options.classNoWaterMarked);this.marked=false;}},blurMark:function(event,options) {if(($F(this.options.textBoxId).length==0)) {$(options.textBoxId).value=options.text;$(options.textBoxId).removeClassName(options.classNoWaterMarked);$(options.textBoxId).toggleClassName(options.classWaterMarked);this.marked=true;}}};