function replacetitle(newtitle) {
document.title = newtitle;
}

function setCookie( value ) {
  var expires = new Date();
  expires.setTime( expires.getTime() + 12*60*60*1000 );
  var curCookie = escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      "; path=/"
      document.cookie = curCookie;
}

function ActivateChildlock() {
 setCookie('CHILDLOCK');
}

function DeactivateChildlock() {
 setCookie('NO-CHILDLOCK');
}

function CheckCookieValue() {
 if (document.cookie=='CHILDLOCK') {
  alert('Børnesikring er aktiveret');
 }
 else {
  alert('Børnesikring er deaktiveret');
 }
}

function GoToLink(link, linkid) {
 if (document.cookie!='CHILDLOCK') {
	linkcount_pic= new Image(1,1);
	linkcount_pic.src="funktioner/countlink.php?link=" + link;
	document.location = link;
 } else {
 	 //lockpic = new Image(20,20);
	 //lockpic.src="images/laas.png";
	 //lockpic.border="0";
	 //document.getElementById(linkid).appendChild(lockpic);
	 

 }
}