			var infoPopupBox = Class.create
				({
				 	initialize: function()
						{
							this.cookieName = 'hrt_info_popup';
							this.state = null;
							this.checkState = null;
							this.opened = false;
							
							this.getState();
							
							var thisClass = this;

							if(this.getState() == 'show')
								{
									// lägg på event på alla checkboxar
									$$('.send_to').each(function(elm)
										{
											elm.observe('click', thisClass.openBox.bindAsEventListener(thisClass));
											elm.up('label').observe('click', thisClass.openBox.bindAsEventListener(thisClass));
										});
								}
							
							
						},
					
					openBox: function()
						{
							if(this.getState() == 'hide' | this.opened) return;

							this.box = new Element('div',{'class':'infoPopupBox'});
							this.boxcontent = new Element('div',{'class':'content'}).update('<h1>Skicka förfrågan till flera företag</h1>Skriv ditt meddelande och fyll i dina kontaktuppgifter<br />i den blå rutan högst upp på sidan när du har valt<br />vilka företag som du ska skicka din förfrågan till.');
							this.checker = new Element('div',{'class':'checker'});
							this.checkrow = new Element('div',{'class':'checkrow'});
							this.closer = new Element('div',{'class':'closer'});
							this.checktext = new Element('span').update('Visa inte detta meddelande igen');
							
							// sätt placeringen
							this.box.style.top= (document.viewport.getScrollOffsets().top+((document.viewport.getHeight()/2)-203))+'px';
							this.box.style.left= (document.viewport.getScrollOffsets().left+((document.viewport.getWidth()/2)-197))+'px';
							this.checktext.style.cursor='pointer';
							
							this.check(true); // default kryssad eller inte
							
							this.checker.observe('click', this.check.bindAsEventListener(this));
							this.checktext.observe('click', this.check.bindAsEventListener(this));
							this.closer.observe('click', this.closeBox.bindAsEventListener(this));
							
							
							$(document.body).insert(this.box);
							this.box.insert(this.boxcontent);
							this.box.insert(this.checkrow);
							this.checkrow.insert(this.checker);
							this.checkrow.insert(this.checktext);
							this.box.insert(this.closer);
							
							this.opened = true;
						},
					
					closeBox: function()
						{
							if(!this.opened) return;
							this.box.remove();
							this.opened = false;
						},
						
					check: function(set)
						{
							if(typeof set == "undefined" | typeof set == "object")
								{
									if(this.checkState != null) this.check(!this.checkState);
									else this.check(true);
								}
							else
								{
									if(set)
										{
											this.checker.style.backgroundImage='url(/graphic/info_box_popup_check_1.png)';
											this.setState('hide');
										}
									else
										{
											this.checker.style.backgroundImage='url(/graphic/info_box_popup_check_0.png)';
											this.setState('show');
										}
									
									this.checkState = set;
								}
							
						},
						
					setState: function(state)
						{
							this.state = state;
							createCookie(this.cookieName,state,30);
						},
						
					getState: function()
						{
							if(this.state == null)
								{
									if(readCookie(this.cookieName) == null)
										{
											this.setState('show');
										}
									else
										{
											this.state = readCookie(this.cookieName);
										}
								}
							return this.state;
						}
				})
			
