var count=0, scrw, scrh;
var b, bVer;
var prevMenu, prevBox, strFront, strEnd;
var loaded = 'false'

function whichVersion()
{
 scrh = screen.height;
 scrw = screen.width;
  prevMenu="";
 var myBrowser = navigator.userAgent;
 if((myBrowser.lastIndexOf("MSIE")!=-1) && (myBrowser.lastIndexOf("5.0")!=-1)){b = "IE"; bVer=5;}
 if((myBrowser.lastIndexOf("MSIE")!=-1) && (myBrowser.lastIndexOf("4.0")!=-1)){b = "IE"; bVer=4;}
 if((myBrowser.lastIndexOf("MSIE")!=-1) && (myBrowser.lastIndexOf("3.0")!=-1)){b = "IE"; bVer=3;}
 if((myBrowser.lastIndexOf("MSIE")==-1) && (myBrowser.lastIndexOf("2.0")!=-1)){b = "NS"; bVer=2;}
 if((myBrowser.lastIndexOf("MSIE")==-1) && (myBrowser.lastIndexOf("3.0")!=-1)){b = "NS"; bVer=3;}
 if((myBrowser.lastIndexOf("MSIE")==-1) && (myBrowser.lastIndexOf("4.0")!=-1)){b = "NS"; bVer=4;}

 if (b=="IE")
  {
    strFront = "document.all.";
    strEnd = ".style";  }
 else
  {
   strFront = "document.";
   strEnd = "";
  }
}

function setup()
{
 whichVersion();
 WelcomeMessage();
}


function MM_callJS(jsStr)
 { //v2.0
  return eval(jsStr)
 }

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 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) { //v3.0
  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); 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 ShowMenu(set)
{
 if(prevMenu)document.getElementById(prevMenu).style.visibility = "hidden";
 if(set!="")document.getElementById(set).style.visibility = "visible";
 prevMenu = set;
}

function ShowInfo(set)
{
 if(prevMenu)document.getElementById(prevMenu).style.visibility = "hidden";
 if(set!="")
  {
   document.getElementById(set).style.visibility = "visible";
//	 document.getElementById(set).style.left = event.clientX;
 if(document.body.scrollTop)document.getElementById(set).style.top = 50 + document.body.scrollTop; //window.event.clientY + document.body.scrollTop;

	}
 prevMenu = set;
}

function ShowPostcard()
{
 var PicWin;
 PicWin = window.open("postcard.htm", "Picture", "width=510,height=425,menubar=no,toolbar=no,status=no,resizable=no,scrollbars=no,screenX=5,screenY=5");
 PicWin.focus();
}	

function WelcomeMessage()
{
 var Message;
 Message = "<p>Hi,</p><p>Thank you for visiting the Tallowin website.</p>";
 Message = Message + "<p>We present not "; 
 Message = Message + "just a platform to promote our services, but also a developing ";
 Message = Message + "resource for business leaders. (In line with our own philosophy of website design and marketing.)</p>";
 Message = Message + "<p>The heart of business is about relationships. We classify ourselves as a P2P (person to person) organisation. "; 
 Message = Message + "So, please feel free to <a href='contact.asp'>contact us</a> to ";
 Message = Message + "discuss your needs/concerns in relation to any of the topics presented "; 
 Message = Message + "on this site.</p><p>Rod Tallowin</p>";
 document.getElementById("WELCOME").innerHTML = Message;
}

function TestIt()
{
 var test_txt;
 test_txt = "THIS IS OLD TEXT";
 //test_txt = getURL("possum.txt");
 var url="possum.txt";
 alert(url);

 document.getElementById("testbox").innerHTML = test_txt;
}	
loaded = 'true'
