
function getcookie(logoimg) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(logoimg);
 if (index1==-1 || logoimg=="") return ""; 
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length; 
 return unescape(cookiestring.substring(index1+logoimg.length+1,index2));
 }

function addbookmark() {
var locBrow=wheret;
bookmarkurl=window.location.href;
bookmarktitle=locBrow;

if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);

else if (window.sidebar)
window.sidebar.addPanel(bookmarktitle, bookmarkurl, "")
}


/* pop up video */

	function filterid(id){
	if (id ==1){id="262";}//Film 3
	else if (id ==2){id="259";}//60 Minutes
	else if (id ==3){id="261";}//Campbell Live
	else if (id ==4){id="260";}//Nightline Video
	else if (id ==5){id="254";}//News-Business
	else if (id ==6){id="251";}//News-Entertainment
	else if (id ==7){id="255";}//News-Health/Science
	else if (id ==8){id="252";}//News-International
	else if (id ==9){id="249";}//News-National
	else if (id ==10){id="112";}//News Video (all)
	else if (id ==11){id="256";}//News-Politics
	else if (id ==12){id="250";}//News-Sport
	else if (id ==13){id="253";}//News-Technology
	else if (id ==14){id="257";}//News-Weather
	else if (id ==15){id="206";}//Programmes
	else if (id ==16){id="258";}//Extended Video
	var where= "/Home/Video/tabid/"+ id +"/Default.aspx";
	winBRopen(where,'videoplayer','768','680','toolbar=no,scrollbars=no, location=no,menubar=no,noresizeable=no,status=no') 
	}
	
	/* homepage */
	function setHomePage(siteURL) {
  if (document.all)
  {
    document.body.style.behavior = "url(#default#homepage)";
    document.body.setHomePage(siteURL);
  }
  else
    alert("only works in IE 4.0 or higher! \n to Add tv3 as you home page from other browsers simply go \n1) tools \n 2) options and add it here");
}


function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}
function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}
function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
<!--

// ----------------------------------------------
// StyleSwitcher functions written by Paul Sowden
// http://www.idontsmoke.co.uk/ss/
// - - - - - - - - - - - - - - - - - - - - - - -
// For the details, visit ALA:
// http://www.alistapart.com/stories/alternate/

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

//-->
<!--
	var fontSize = GetCookie('fonttextsize');
	if(fontSize != null) {
		setActiveStyleSheet(fontSize, 1);
	}	
//-->


