﻿//<!-- Start 

function popup(url,name,win_height,win_width) 
{
	pos_horizon = ((screen.width/2)-(win_width/2));
	pos_vertical = ((screen.height/2)-((win_height/2)+70));
	window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon);
}
	
function Count(tBox) 
{
    var max = 599;
    if (tBox.value.length > max) 
    {
      alert("Max 600 tegn i din meddelelse!");
      return false;
    }
}


var box;

function butclick(button)
{
    if((box.id.substring(29, box.id.length)) == (button.id.substring(33, button.id.length)))
    {
       box=null;
    }
    else
    {
      alert('This button will not save the edited content!');
      return false;
    }

}

function ActiveBox(tBox)
{
   box = tBox;
}

function GetActiveBox(tBox)
{  
    if(box!=null)
    {
        if (tBox != box) 
        {
          alert("Remember to save!");
          return false;
        }
    }
}
// Slut -->
