var msgComp = '&bull; <a href="http://glassproperties.com/glasses/">Commercial glasses</a><br>&bull; <a href="http://glassproperties.com/references/pnnl.htm">Nuclear waste immobilization</a><br>&bull; <a href="http://glassproperties.com/sofc/">SOFC sealing glasses</a><br>&bull; <a href="http://glassproperties.com/phase-separation/">Phase separation</a><br>&bull; <a href="http://glassproperties.com/glasses/Converter.xls" target="_blank">Converter, wt% to mol%, mol% to wt%</a>';

var msgDb = 'Glass property-composition<br>and glass model databases<br>&bull; <a href="http://glassproperties.com/databases/">Database overview</a><br>&bull; <a href="http://www.sciglass.info/" target="_blank">SciGlass</a><br>&bull; <a href="http://www.newglass.jp/interglad_6/gaiyo/info_e.html" target="_blank">Interglad</a><br>&bull; <a href="http://www.nist.gov/srd/nist31.htm" target="_blank">Phase equilibria diagrams</a>';

var msgEq = '&bull; <a href="http://glassproperties.com/principle/">Statistical analysis of historical data</a><br>&bull; <a href="http://glassproperties.com/experimental-design/">Experimental design and planning</a><br>&bull; <a href="http://glassproperties.com/optimization/">Optimization of several properties simultaneously</a>';

var msgErr = '&bull; <a href="http://glassproperties.com/errors/">Measurement error overview</a><br>&bull; <a href="http://glassproperties.com/errors/#dec">Decreasing reliability of modern data</a><br>&bull; <a href="http://glassproperties.com/errors/#acc">Accidental errors</a><br>&bull; <a href="http://glassproperties.com/errors/#syst">Systematic errors</a><br>&bull; &quot;<a href="http://glassproperties.com/prospect/">History and Prospect</a>&quot;, by O. V. Mazurin';

var msgVisc = '&bull; Glass <a href="http://glassproperties.com/viscosity/">viscosity calculation</a><br>&bull; <a href="http://glassproperties.com/viscosity/GlassViscCalc_6.xls" target="_blank">Viscosity calculator</a>, 1.7 MB<br>&bull; <a href="http://glassproperties.com/viscosity/Viscosity_2006_AFluegel.pdf" target="_blank">Paper, related to viscosity calculator</a>, 3 MB<br>&bull; <a href="http://glassproperties.com/viscosity/Viscosity-Model-Comparison.htm">Comparison of viscosity models</a><br>&bull; <a href="http://glassproperties.com/viscosity/ViscosityMeasurement.htm">Viscosity measurement techniques</a><br>&bull; <a href="http://glassproperties.com/viscosity/mixed-alkali-effect-viscosity/">The mixed-alkali effect for the viscosity</a><br>&bull; <a href="http://glassproperties.com/viscosity/Glass-Viscosity-Fixpoints.htm">Viscosity fixpoints and units</a>';

var msgTl = '&bull; Glass <a href="http://glassproperties.com/liquidus/">liquidus temperature calculation</a> in the<br><small>&nbsp;<sub>&nbsp;&nbsp;</sub></small>system SiO<sub>2</sub>-Na<sub>2</sub>O-K<sub>2</sub>O-CaO-MgO-Al<sub>2</sub>O<sub>3</sub><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub></small>using <a href="http://glassproperties.com/principle/#NR">disconnected peak functions</a><br>&bull; <a href="http://glassproperties.com/liquidus/GlassTLCalc_1.xls" target="_blank">Liquidus temperature calculator</a>, 30 kB';

var msgDe = '&bull; Glass <a href="http://glassproperties.com/density/room-temperature/">room temperature density calculation</a><br>&bull; <a href="http://glassproperties.com/density/room-temperature/GlassDensityRTCalc_1.xls" target="_blank">Room temperature density calculator</a>, 700 kB<br>&bull; <a href="http://dx.doi.org/10.1111/j.1551-2916.2007.01751.x" target="_blank">Paper, related to density calculator</a>';

var msgDm = '&bull; <a href="http://glassproperties.com/density/">Glass melt density and thermal expansion</a><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub></small>calculation at 1000-1400&deg;C<br>&bull; <a href="http://glassproperties.com/density/GlassMeltDensityCTECalc.xls" target="_blank">Glass melt density and expansion calculator</a>, 150 kB<br>&bull; <a href="http://glassproperties.com/density/DensityCTE_GlassMelts_2006.pdf" target="_blank">Paper, related to density calculator</a>, 230 kB';

var msgExp = '&bull; <a href="http://glassproperties.com/expansion/">Thermal expansion calculation</a> of glasses<br><small>&nbsp;<sub>&nbsp;&nbsp;</sub></small>below the <a href="http://glassproperties.com/tg/">glass transition, Tg</a><br>&bull; <a href="http://glassproperties.com/expansion/GlassThermalExpansionCalc_2.xls" target="_blank">Thermal expansion calculator</a>, 250 kB<br>&bull; <a href="http://glassproperties.com/expansion/Expansivity_Glass_2006.pdf" target="_blank">Paper, related to expansion calculator</a>, 360 kB<br>&bull; <a href="http://glassproperties.com/expansion/ExpansionMeasurement.htm">Thermal expansion measurement techniques</a><br>&bull; <a href="http://glassproperties.com/expansion/Old-Thermal-Expansion-Models.htm">Older thermal expansion models</a>';

var msgOpt = 'Selected model properties:<br>&bull; <a href="http://glassproperties.com/refractive_index/">Refractive index model</a><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub><a href="http://glassproperties.com/refractive_index/#nddens">Relation with density</a></small><br>&bull; <a href="http://glassproperties.com/dispersion/">Mean dispersion model</a><br>&bull; <a href="http://glassproperties.com/abbe_number/">Abbe\'s number</a><br>&bull; <a href="http://glassproperties.com/reflection/">Reflection</a>';

var msgElas = 'Selected model properties:<br>&bull; <a href="http://glassproperties.com/young_modulus/">Young\'s modulus</a><br>&bull; <a href="http://glassproperties.com/shear_modulus/">Shear modulus</a><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub><a href="http://glassproperties.com/shear_modulus/GlassShearModulusCalc_2.xls" target="_blank">Shear modulus calculator</a>, 200 kB</small><br>&bull; <a href="http://glassproperties.com/bulk_modulus/">Bulk modulus</a><br>&bull; <a href="http://glassproperties.com/poisson_ratio/">Poisson\'s ratio</a>';

var msgEc = '&bull; <a href="http://glassproperties.com/resistivity/">Electrical conductivity calculation</a>, melts at 1000-1400&deg;C<br>&bull; <a href="http://glassproperties.com/resistivity/GlassMeltElectrResistCalc_4.xls" target="_blank">Electrical conductivity calculator</a>, 400 kB<br>&bull; <a href="http://glassproperties.com/resistivity/ElectrResist_GlassMelts_2005.pdf" target="_blank">Paper, related to conductivity calculator</a>, 340 kB<br>&bull; <a href="http://glassproperties.com/resistivity/ElectrResistMeasurement.htm">Electrical conductivity measurement techniques</a>';

var msgDur = '&bull; <a href="http://glassproperties.com/chemical_durability/">Chemical durability calculation</a><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub>(hydrolytic class, according to ISO 719)</small><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub><a href="http://glassproperties.com/chemical_durability/#devcd">Error development</a></small><br>&bull; <a href="http://glassproperties.com/chemical_durability/GlassChemDurabilityCalc_2.xls" target="_blank">Hydrolytic class calculator</a>, 200 kB';

var msgTc = 'Calculation of the glass thermal (phonon)<br>conductivity at room temperature and in melts<br>by Choudhary et al. and van der Tempel et al.<br>&bull; <a href="http://glassproperties.com/thermal-conductivity/">Summary</a><br>&bull; <a href="http://glassproperties.com/thermal-conductivity/GlassThermalConductivityCalc_1.xls" target="_blank">Calculator, Choudhary et al.</a>, 25 kB';

var msgWs = 'Calculation of the water solubility<br>in glass melts at 1200&deg;C<br>&bull; <a href="http://glassproperties.com/watersolubility/">Abstract and model</a><br>&bull; <a href="http://glassproperties.com/watersolubility/WaterSol.xls" target="_blank">Water solubility calculator</a>, 100 kB';

var msgSt = 'Calculation of the surface tension of<br>glass melts at 1400&deg;C by A. Kucuk et al.<br>&bull; <a href="http://glassproperties.com/surfacetension/">Abstract and model</a><br>&bull; <a href="http://glassproperties.com/surfacetension/GlassSurfaceTension_Kucuk.xls" target="_blank">Surface tension calculator</a>, 26 kB';

var msgMo = '&bull; <a href="http://glassproperties.com/modelsummary/">Overview of existing glass property models</a><br>&bull; <a href="http://glassproperties.com/modelsummary/#add">Classical additivity models</a> <small>(<a href="http://glassproperties.com/viscosity/Lakatos.htm">Lakatos et al.,</a><br>&nbsp;<sub>&nbsp;&nbsp;</sub><a href="http://glassproperties.com/hrma/" target="_blank">P. Hrma</a>, <a href="http://glassproperties.com/expansion/Old-Thermal-Expansion-Models.htm">Old thermal expansion models</a>,<br>&nbsp;<sub>&nbsp;&nbsp;</sub><a href="http://glassproperties.com/references/CGR_Models.htm">CGR-Models</a>, <a href="http://glassproperties.com/references/pnnl.htm">PNNL waste glass models</a>)</small><br>&bull; <a href="http://glassproperties.com/modelsummary/#semi">Structural and semi-empirical models</a><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub>(<a href="http://glassproperties.com/priven/">A. I. Priven</a>, <a href="http://glassproperties.com/expansion/Old-Thermal-Expansion-Models.htm">A. Appen</a>, <a href="http://glassproperties.com/ghiorso/">M. S. Ghiorso et al.</a>)</small><br>&bull; <a href="http://glassproperties.com/modelsummary/#stat">Statistical models</a><br>&bull; <a href="http://glassproperties.com/modelsummary/#ded">Deductive models</a>';

var msgMes = '&bull; <a href="http://glassproperties.com/viscosity/ViscosityMeasurement.htm">Viscosity Measurement</a><br>&bull; <a href="http://glassproperties.com/expansion/ExpansionMeasurement.htm">Thermal Expansion Measurement</a><br>&bull; <a href="http://glassproperties.com/resistivity/ElectrResistMeasurement.htm">Electrical Conductivity Measurement</a><br>&bull; <a href="http://glassproperties.com/tg/">Tg Measurement</a><br>&bull; <a href="http://glassproperties.com/standards/">Standards for Calibration</a><br>&bull; <a href="http://glassproperties.com/melting/">Glass Melting in the Laboratory</a><br><small>&nbsp;<sub>&nbsp;&nbsp;</sub>(<a href="http://glassproperties.com/melting/BatchCalc_3.xls"  target="_blank">Glass batch calculator</a>, 300 kB)</small>';

var msgLik = '&bull; <a href="http://glassproperties.com/links/">Organizations</a><br>&bull; <a href="http://glassproperties.com/links/">Universities, USA, Canada</a><br>&bull; <a href="http://glassproperties.com/links/#journals">Glass Journals</a><br>&bull; <a href="http://glassproperties.com/links/#Calculation_Glass_Properties">Glass Property Calculation Alternatives</a><br>&bull; <a href="http://glassproperties.com/links/#pertab">Periodic Tables</a><br>&bull; <a href="http://glassproperties.com/links/#scitech">Glass Science and Technology Links</a><br>&bull; <a href="http://www.concrete.com/calculatorsconversion.htm" target="_blank">Unit Conversion</a>, <a href="http://glassproperties.com/links/calendar.html" target="_blank">Calendar</a>, <a href="http://glassproperties.com/links/calculator.htm" target="_blank">Calculator</a><br>&bull; <a href="http://glassproperties.com/links/#scitech">Universities, Germany</a>';

var lkout = {
  getWinWidth: function () {
    this.width = 0;
    if (window.innerWidth) this.width = window.innerWidth - 18;
    else if (document.documentElement && document.documentElement.clientWidth) 
  		this.width = document.documentElement.clientWidth;
    else if (document.body && document.body.clientWidth) 
  		this.width = document.body.clientWidth;
  },
  
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 18;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  },
  
  getScrollY: function () {
    this.scrollY = 0;    
    if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop)
  		this.scrollY = document.documentElement.scrollTop;
  	else if (document.body && document.body.scrollTop) 
  		this.scrollY = document.body.scrollTop; 
  	else if (window.scrollY) this.scrollY = window.scrollY;
  },
  
  getAll: function () {
    this.getWinWidth(); this.getWinHeight();this.getScrollY();
  }
  
}

var evnt = {
  
  add: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
    else if (obj.attachEvent) obj.attachEvent("on" + etype, fp);
  }, 

  remove: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.removeEventListener) obj.removeEventListener(etype, fp, cap);
    else if (obj.detachEvent) obj.detachEvent("on" + etype, fp);
  }, 

  DOMit: function(e) { 
    e = e? e: window.event;
    e.tgt = e.srcElement? e.srcElement: e.target;
    
    if (!e.preventDefault) e.preventDefault = function () { return false; }
    if (!e.stopPropagation) e.stopPropagation = function () { if (window.event) window.event.cancelBubble = true; }
        
    return e;
  }
  
}

var Tooltip = {
    offX: 8,
    offY: 12,
    tipID: "tips",
ready:false,timer:null,tip:null,init:function(){if(document.createElement&&document.body&&typeof document.body.appendChild!="undefined"){if(!document.getElementById(this.tipID)){var el=document.createElement("DIV");el.id=this.tipID;document.body.appendChild(el);}this.ready=true;}},show:function(e,msg){if(this.timer){clearTimeout(this.timer);this.timer=0;}this.tip=document.getElementById(this.tipID);this.writeTip(msg);tt=2;lkout.getAll();this.positionTip(e);this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'visible')",0);},writeTip:function(msg){if(this.tip&&typeof this.tip.innerHTML!="undefined")this.tip.innerHTML=msg;},positionTip:function(e){if(this.tip&&this.tip.style){var x=249;var y=e.pageY?e.pageY:e.clientY+lkout.scrollY;if(y+this.tip.offsetHeight+this.offY>480+lkout.scrollY){y=y-this.tip.offsetHeight-this.offY;if(y<lkout.scrollY)y=lkout.height+lkout.scrollY-this.tip.offsetHeight;}else y=y+this.offY;this.tip.style.left=x+"px";this.tip.style.top=y+"px";}},hide:function(){if(this.timer){clearTimeout(this.timer);this.timer=0;tt=1;}this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'hidden')",0);},toggleVis:function(id,vis){var el=document.getElementById(id);if(el)el.style.visibility=vis;},trackMouse:function(e){e=evnt.DOMit(e);Tooltip.positionTip(e);}};

Tooltip.offX = 50;
Tooltip.offY = -20;

function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.clearTimer();
  var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
  if ( tip && tip.onmouseout == null) {
      tip.onmouseout = Tooltip.tipOutCheck;
      tip.onmouseover = Tooltip.clearTimer;
  }
  {Tooltip.show(e, msg);tt=2}
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.timerId = setTimeout("Tooltip.hide()", 0);
}

Tooltip.tipOutCheck = function(e) {
  e = evnt.DOMit(e);
  var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
  if ( this != toEl  && !contained(toEl, this) ) {Tooltip.hide();tt=1;}
}

function contained(oNode, oCont) {
  if (!oNode) return;
  while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true;
  return false;
}

Tooltip.timerId = 0;
Tooltip.clearTimer = function() {
  if (Tooltip.timerId) { clearTimeout(Tooltip.timerId); Tooltip.timerId = 0;}
}

Tooltip.unHookHover = function () {
    var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
    if (tip) {
        tip.onmouseover = null; 
        tip.onmouseout = null;
        tip = null;
    }
}

evnt.add(window, "unload", Tooltip.unHookHover, true);