


var launchflag = false;
var curURL = "";



function LoadTTnow() {
if ( window.location.host!= "www.cornwallandislesofscilly.nhs.uk") { return; }

if ( window.loadedTT || launchflag == true ) {

try {
document.getElementById("TTLaunchA").href="javascript:";

document.getElementById("TTLaunchA").onclick = function() { talklets(); }

}

catch(err)

{}

   } 
else {

var compstate = "";
try {compstate=document.readyState;} catch(err) {}

if (document&&document.body&&(compstate=="complete")) {

launchflag = true;
curURL = window.document.URL;
 var  d  =  document;  var  h  =  d.getElementsByTagName('head')[0];  var  s  =  d.createElement('SCRIPT');  s.src  =  'http://r3.talklets-secure.com/Talklets2/Core_Javascript_Manager.aspx?ReqID=' + Math.round(100*Math.random()) + '&URL=' + curURL ;  s.type='text/javascript';  h.appendChild(s);  void  (0);
document.getElementById("TTLoadingOverlay").style.display="none";

setTimeout("hackSetFontSize();", 4);

    if (navigator.userAgent.toLowerCase().indexOf('msie')!=-1)
    {
  document.write = function(text)
  {


 
      this.insertAdjacentHTML("afterEnd", text);
    }
  document.writeln = function(text)
  {


 
      this.insertAdjacentHTML("afterEnd", text);
    }

  }

try {
document.getElementById("TTLaunchA").href="javascript:";

document.getElementById("TTLaunchA").onclick = function() 
{ }
}

catch(err)

{}




}
else {setTimeout("LoadTTnow()", 150);}

}


}


function ff() {
setTimeout("hackSetFontSize();", 4);
if ( window.location.host!= "www.cornwallandislesofscilly.nhs.uk") { return; }
if (document.body && launchflag == false) {
launchflag = true;
document.getElementById("TTLoadingOverlay").style.display="none";
if (document&&document.getElementById&&document.getElementById("vbrowserurl")){curURL = document.getElementById("vbrowserurl").value; } else {curURL = window.document.URL;}

var  d  =  document;  var  h  =  d.getElementsByTagName('head')[0];  var  s  =  d.createElement('SCRIPT');  s.src  =  'http://r3.talklets-secure.com/Talklets2/Core_Javascript_Manager.aspx?ReqID=' + Math.round(100*Math.random()) + '&URL=' + curURL;  s.type='text/javascript';  h.appendChild(s); 
 try {setTimeout("revertStyles(3);", 500);}
catch(err)
{}

}
else
{setTimeout("ff()",100);}


}

if (navigator.userAgent.indexOf("IE")==-1){ setTimeout("ff()", 20);}
setTimeout("LoadTTnow()", 150);


hackSetFontSize = function(){
if (revertStyles) {
setTimeout("revertStyles(3);", 1000);
}
else {
setTimeout("hackSetFontSize();", 4);
}

}
