var LangEng = "eng";
var LangB5="tc";
var LangGb="sc";

var Lastupdate="31/12/2009";
var EmailToFrdEnable="N";

//=================================================
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//=================================================
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

//=================================================
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//=================================================
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//=================================================
function IsNetscape() {
    var agt=navigator.userAgent.toLowerCase(); 
    return ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
}

//=================================================
function IsIE() {
    var agt=navigator.userAgent.toLowerCase(); 
    var is_ie = (agt.indexOf("msie") != -1);
    return true;
}

//=================================================
function changeVer(lang2) {
	window.location.href = window.location.href.replace(lang,lang2);
}

//=================================================
function addFavourite() {
	bookmarkurl = location.href;
	bookmarktitle = document.title;
	
	if (document.all) 
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
	else if (window.sidebar) // firefox
			window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}

//=================================================
function setHomepage() {
	theURL = location.href;
	this.style.behavior='url(#default#homepage)';
	this.setHomePage(theURL);
}

//=================================================

function sendToFriend() {
	var mail_str ;
	mail_str = "mailto:?subject="+sendToFriend_subject+"" ;
	mail_str += "&body="+sendToFriend_body+"" ;
	mail_str += escape(window.location.href); 
	window.location.href = mail_str;
}

//=================================================

function changeCss(size){
	var target = document.getElementById("curr_css");
	var target_href = target.href;
	var temp = target_href.indexOf("css/");
	temp = target_href.substr(0,(temp+4));
//	alert(temp);

	if (size < 0){
		target.href = temp+"style_small.css";
	} else if (size > 0){
		target.href = temp+"style_large.css";
	} else {
		target.href = temp+"style_normal.css";
	}
//alert(target.href);	
}

//=================================================
function SwitchLang(lang) {

            if (top.location.href.indexOf("#") != -1) {
                        locationx = top.location.href.substring(0, top.location.href.indexOf("#"));
            } else {
                        locationx = top.location.href;
            }

            if (lang == LangEng) {
                        if (locationx.indexOf("/eng/") != -1) {  // en
                        } else if (locationx.indexOf("/tc/") != -1 && locationx.indexOf("/sc/") == -1) { //b5
                                    top.location.replace(locationx.replace("/tc/","/eng/"));
                        } else if (locationx.indexOf("/sc/") != -1) { //gb
                                    top.location.replace(locationx.replace("/sc/","/eng/"));
                        }
            } else if (lang == LangB5) {
                        if (locationx.indexOf("/eng/") != -1) {  // en
                                    top.location.replace(locationx.replace("/eng/","/tc/"));
                        } else if (locationx.indexOf("/tc/") != -1 && locationx.indexOf("/sc/") == -1) { //b5
                        } else if (locationx.indexOf("/sc/") != -1) { //gb
                                    top.location.replace(locationx.replace("/sc/", "/tc/"));
                        }
			} else if (lang == LangGb) {
						if (locationx.indexOf("/eng/") != -1) {  // en
							top.location.replace(locationx.replace("/eng/","/sc/"));
						} else if (locationx.indexOf("/tc/") != -1 && locationx.indexOf("/sc/") == -1) { //b5
							top.location.replace(locationx.replace("/tc/","/sc/"));
						} else if (locationx.indexOf("/sc/") != -1) { //gb
						}
			}
			
}


//=================================================

function PrintPage() {
    winNew = window.open("print_page.htm","PrintPage" ,"width=650,height=500,status=yes,location=no,toobar=no,menubar=yes,scrollbars=yes");
    winNew.focus();
}

function GetPrintSource(tagIdcontent) {
    var spnPrint =  document.getElementById(tagIdcontent);
    var spnSource =  window.opener.document.getElementById(tagIdcontent);
    content_area.innerHTML = spnSource.innerHTML;
}

function show_btnon(btn) {
	if (btn==1) {
		changeCss(-1);
		font_s_oo.style.visibility="hidden";
		font_m_oo.style.visibility="visible";
		font_l_oo.style.visibility="visible";
	}
	if (btn==2) {
		changeCss(0);
		font_s_oo.style.visibility="visible";
		font_m_oo.style.visibility="hidden";
		font_l_oo.style.visibility="visible";
	}
	if (btn==3) {
		changeCss(1);
		font_s_oo.style.visibility="visible";
		font_m_oo.style.visibility="visible";
		font_l_oo.style.visibility="hidden";
	}
}

function ProPrintPage() {
    winNew = window.open("pro_print_page.htm","PrintPage" ,"width=650,height=500,status=yes,location=no,toobar=no,menubar=yes,scrollbars=yes");
    winNew.focus();
}

function ChangeVer(curver, tover){
	var cururl = document.location.href;
	cururl = cururl.replace(curver, tover);
	
	//Cut the '#'(which is last character) at the url - mady in 2005-07-29 16:39
	if ( cururl.substr(cururl.length-1)=="#") {
		cururl = cururl.substr(0, cururl.length-1) ;
	}
	document.location = cururl;		
}

function emailThisPage() {
	window.location = "mailto:?subject=Health Care Voucher" + "&body=You have received the following link:" + escape("\n\n")+  " Click the following to access the sent link:" + escape("\n\n") + escape(window.opener.location.href);
}


function PopupEmailPage() {
	winNew = window.open("email_to_friend.htm","EmailtoFriendPage" ,"width=10,height=10,status=yes,location=no,toobar=no,menubar=yes,scrollbars=no");
}
