

var message="This web site is copyright (c) 2011 HITS-UK Consultancy Ltd, all rights reserved. If you wish to use our web services, please contact 0844 414 2274 for more information, or send a request via our contacts page.";

var message2="Internet Explorer 9 is not fully supported. Please switch it to Compatibility Mode, but even then it may still not render properly - thanks Microsoft!";

// JavaScript by David Wade (c) 2007 to 2011 all rights reserved
// Published at: http://medical.HITS-UK.com

function getInternetExplorerVersion() {
    var rv = -1; // Return value assumes failure.
    if (navigator.appName == 'Microsoft Internet Explorer') {
        var ua = navigator.userAgent;
        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
        if (re.exec(ua) != null)
            rv = parseFloat(RegExp.$1);
        if (rv == 9)
            alert(rv);
    }
    return rv;
}

function checkVersion() {
    var msg = "You're not using Windows Internet Explorer.";
    var ver = getInternetExplorerVersion();
    if (ver > -1) {
        if (ver >= 8.0)
            msg = "You're using a recent copy of Windows Internet Explorer."
        else
            msg = "You should upgrade your copy of Windows Internet Explorer.";
    }
    alert(msg);
}

function IE(e) 
{
     if (navigator.appName == "Microsoft Internet Explorer" && (event.button == "2" || event.button == "3"))
     {
          alert(message);
          return false;
     }
}
function NS(e) 
{
     if (document.layers || (document.getElementById && !document.all))
     {
          if (e.which == "2" || e.which == "3")
          {
               alert(message);
               return false;
          }
     }
}
document.onmousedown=IE;document.onmouseup=NS;document.oncontextmenu=new Function("return false");

function printWindow(strPage)
{
	var url;
	url = "hits-uk.com/" + strPage;
	window.print(url);
}


/*
MAIL ADDRESS ZONE
*/

function writeMailAddress()
{
	var user = "software";
	var domain = "hits-uk.com";
	var mail = user + "@" + domain;
	var message = user + "@" + domain;
	document.write("<a href=\"mailto:"+mail+"\">"+ message+"</a>");
}

function writeAccountsAddress()
{
	var user = "accounts";
	var domain = "hits-uk.com";
	var mail = user + "@" + domain;
	var message = user + "@" + domain;
	document.write("<a href=\"mailto:"+mail+"\">"+ message+"</a>");
}

function writeSupportAddress()
{
	var user = "support";
	var domain = "hits-uk.com";
	var mail = user + "@" + domain;
	var message = user + "@" + domain;
	document.write("<a href=\"mailto:"+mail+"\">"+ message+"</a>");
}

/* 
RANDOM IMAGE DISPLAY FOR BANNER
*/

var theImages = new Array() // do not change this unless req'd

theImages[0] = './images/banner/1.jpg'
theImages[1] = './images/banner/2.jpg'
theImages[2] = './images/banner/3.jpg'
theImages[3] = './images/banner/1.jpg'
theImages[4] = './images/banner/5.jpg'

// ======================================
//     Sets variable header display
// ======================================

var j = 0
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

