// retrieve cookie.

function getCookie(name){

  var cname = name + "=";

  var dc = document.cookie;

  if (dc.length > 0) {

    begin = dc.indexOf(cname);

    if (begin != -1) {

      begin += cname.length;

      end = dc.indexOf(";", begin);

      if (end == -1) end = dc.length;

        return unescape(dc.substring(begin, end));

    }

  }

  return null;

}



// set cookie.

function setCookie(name, value, expires, path, domain, secure) {

  document.cookie = name + "=" + escape(value) +

  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +

  ((path == null) ? "" : "; path=" + path) +

  ((domain == null) ? "" : "; domain=" + domain) +

  ((secure == null) ? "" : "; secure");

}



// delete cookie.

function delCookie (name,path,domain) {

  if (getCookie(name)) {

    document.cookie = name + "=" +

    ((path == null) ? "" : "; path=" + path) +

    ((domain == null) ? "" : "; domain=" + domain) +

    "; expires=Thu, 01-Jan-70 00:00:01 GMT";

  }

}



function setEnglishFontsize(){

	var sFontsize = getCookie('fontSize');

	if(sFontsize!=null)

		document.body.style.fontSize = sFontsize;

	else

		document.body.style.fontSize = '70%';

	

	document.getElementById('resizetext').innerHTML = (document.body.style.fontSize=='70%')?'Large text':'Small text';

}



function toogleEnglishFontsize(){

	document.body.style.fontSize = (document.body.style.fontSize=='70%')?'80%':'70%';

	document.getElementById('resizetext').innerHTML = (document.body.style.fontSize=='70%')?'Large text':'Small text';

	setCookie('fontSize', document.body.style.fontSize);

}