function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // *** BROWSER VERSION ***
    this.major = parseInt(navigator.appVersion)
    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav4 = (this.nav && (this.major == 4))
    this.nav4up = this.nav && (this.major >= 4)

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie4  = (this.ie && (this.major == 4))
    this.ie4up  = this.ie  && (this.major >= 4)
}
var is = new Is();



function maketheBalloon(id, width, message)
{
   var theString = '<STYLE TYPE="text/css">#'+id+'{width:'+width+';}</STYLE>';
   theString+='<DIV CLASS="balloon" id="'+id+'">'+message+'</DIV>';
   document.write(theString);
}

function makeItVisible(anchor, event)
{

        if (is.nav4up) {
		var id=anchor.text;
		if(document.getElementById)
                {
			var xPos=event.pageX + 10;
			if(xPos>document.width-200){xPos=document.width-200;}
			var yPos=event.pageY + 10;
			if(yPos>document.height-50){yPos=document.height-50;}
                        document.getElementById(id).style.left =xPos; 
                        document.getElementById(id).style.top =yPos;
                        document.getElementById(id).style.visibility="visible";
 
                }
		else
		{
			 var xPos=event.pageX + 10;
                        if(xPos>document.width-200){xPos=document.width-200;}
                        var yPos=event.pageY + 10;
                        if(yPos>document.height-50){yPos=document.height-50;}
                	document.layers[id].left = xPos;
                	document.layers[id].top = yPos;
                	document.layers[id].visibility="show";
		}
        }
        else {
		var id=anchor.innerText;
	        var xPos=event.clientX+ 10;
                if(xPos>document.body.clientWidth-200){xPos=document.body.clientWidth-200;}
                var yPos=event.clientY+ 10;
                if(yPos>document.body.clientHeight-50){yPos=document.body.clientHeight-50;}
                document.all[id].style.pixelLeft = (document.body.scrollLeft +xPos);
                document.all[id].style.pixelTop = (document.body.scrollTop + yPos);
                document.all[id].style.visibility="visible";
        }
                
}

function hideHelp(anchor)
{
	if(is.nav4up)
	{
		var id=anchor.text;
		if(document.getElementById)
                {
                        document.getElementById(id).style.visibility="hidden";
		}
		else
		{
			document.layers[id].visibility="hide";
		}
	}
	else
	{
		var id=anchor.innerText;	
		document.all[id].style.visibility="hidden";
	}
}
function setUpHelp()
{
   
maketheBalloon("AEA",200," Atomic Energy Authority");
maketheBalloon("AEAT",200," AEA Technology");
maketheBalloon("AMD",200," amendment to standard");
maketheBalloon("ARCAN",200," inventor of a mixed-mode shear test");
maketheBalloon("ASTM",200," American Society for Testing and Materials");
maketheBalloon("BMC",200," bulk moulding compound");
maketheBalloon("BSI",200," British Standards Institute");
maketheBalloon("BVID",200," barely visible impact damage");
maketheBalloon("CAI",200," compression after impact test");
maketheBalloon("CARAD",200," Commercial Aircraft Research and Development, a DTI programme");
maketheBalloon("CEN",200," Commitee European de Normalisation");
maketheBalloon("CFRP",200," carbon fibre reinforced plastic");
maketheBalloon("CMMT",200," Centre for Materials Measurement and Technology");
maketheBalloon("CNF",200," centre notch flexure test geometry");
maketheBalloon("CORDIS",200," Community Research and Development Information Services");
maketheBalloon("CPD",200," Composites Performance and Design programme");
maketheBalloon("CRAG",200," Composites Research Advisory Group, a UK MOD committee");
maketheBalloon("CTS",200," Composites Testing and Standardisation conference series");
maketheBalloon("DEA",200," dielectric analysis");
maketheBalloon("DFC",200," Deformation and Fracture of Composites conference");
maketheBalloon("DIS",200," Draft International Standard - ballot stage");
maketheBalloon("DMA",200," Dynamic Mechanical Analysis");
maketheBalloon("DMC",200," Dough Moulding Compound");
maketheBalloon("DME",200," Degradation of materials in aggressive environments");
maketheBalloon("DMM",200," Division of Materials Metrology (NPL materials Dept.)");
maketheBalloon("DSC",200," Differential Scanning Calorimetry ");
maketheBalloon("DTI",200," Department of Trade and Industry");
maketheBalloon("DTUL",200," Deflection temperature under load (test)");
maketheBalloon("ECCM",200," European Conference on Composite Materials");
maketheBalloon("EEC",200," European Economic Community");
maketheBalloon("EIS",200," Engineering Integrity Society");
maketheBalloon("ELS",200," Edge Longitudinal Split, a Mode II test method");
maketheBalloon("EPSRC",200," Engineering and Physical Sciences Research Council");
maketheBalloon("EPTA",200," European Pultruders Technical Association");
maketheBalloon("EUPOCO",200," European Postgraduate Programme in Polymer and Composite Engineering");
maketheBalloon("FDIS",200," Formal ballot stage of Draft International Standard");
maketheBalloon("GRP",200," glass fibre reinforced plastic");
maketheBalloon("IAG",200," Industrial Advisory Group");
maketheBalloon("ICCM",200," International Conference on Composite Materials");
maketheBalloon("ICFC",200," International Conference on Fatigue of Composites");
maketheBalloon("IEC",200,"  International Electrotechnical Commission");
maketheBalloon("ILSS",200," interlaminar shear strength test");
maketheBalloon("IME",200," Institute of Mechnical Engineers");
maketheBalloon("IOM",200," Institute of Materials");
maketheBalloon("IOP",200," Institute of Physics");
maketheBalloon("ISBN",200," International Standard Book Number");
maketheBalloon("ISO",200," International Standards Organisation");
maketheBalloon("ISSN",200," International Standard Serial Number");
maketheBalloon("JIS",200," Japanese Industrial Standards");
maketheBalloon("JSCM",200," Japanese Society for Composite Materials");
maketheBalloon("MATC",200," Materials Centre at NPL");
maketheBalloon("MIDAS",200," NPL Materials Information, Dissemination, Advice and Services web site");
maketheBalloon("MMC",200," Metal Matrix Composite");
maketheBalloon("MOD",200," UK Ministry of Defence");
maketheBalloon("MTPB",200," Modified three point bending test for strength of sandwich interfaces");
maketheBalloon("NAFEMS",200," International association for the engineering analysis community");
maketheBalloon("NDE",200," non-destructive evaluation");
maketheBalloon("NDT",200," non-destructive testing");
maketheBalloon("NGCC",200," Network Group on Composites in Construction, DTI supported at BRE");
maketheBalloon("NPL",200," National Physical Laboratory");
maketheBalloon("NWI",200," new work item - intial ballot stage for a proposed new standard");
maketheBalloon("OHC",200," open-hole compression test method");
maketheBalloon("OHT",200," open-hole tension test method");
maketheBalloon("ONR",200," US Office of Naval Research");
maketheBalloon("PAJ",200," Performance of Adhesive Joints - a DTI project");
maketheBalloon("PDF",200," portable document format");
maketheBalloon("PEEK",200," Polyetheretherketone");
maketheBalloon("PMC",200," polymer matrix composite");
maketheBalloon("PREDICT",200," software package to predict cracking in composites");
maketheBalloon("PVC",200," polyvinyl chloride");
maketheBalloon("QMW",200," Queen Mary and Westfield College (University of London)");
maketheBalloon("RAPRA",200," Rubber and Plastics Research Association");
maketheBalloon("RARDE",200," Royal Armaments Research and Development Establishment");
maketheBalloon("SIC",200," Standard Industry Code - for qualifying data against industry sector");
maketheBalloon("SQP",200," Standard Qualification Plan");
maketheBalloon("TMA",200," Thermal Mechanical Analysis");
maketheBalloon("TMDSC",200," Temperature modulated differential scanning calorimetry");
maketheBalloon("TWA",200," Technical Working Area of VAMAS");
maketheBalloon("USA",200," United States of America");
maketheBalloon("UTS",200," Ultimate Tensile Strength");
maketheBalloon("VAMAS",200," Versaille Project on Advanced Materials and Standards");
maketheBalloon("WPAFB",200," Wright Patterson Airforce Base (USA)");
maketheBalloon("WPC",200," World Pultrusion Conference");
maketheBalloon("YCRM",200," Young Composites Researchers Meeting");

}
