// JavaScript Document
window.addEvent('domready', function() {
//alert('DOM READY');
//alert('in checkuseragent');
//returns true if user is using one of the following mobile browsers
var ismobile = false;
var safetylink = document.id("safety");
var safetyLinkHeader = document.id("safety1");
var isi = document.id("isi");
if (navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(Windows Phone)|(webOS)/i))
ismobile = true;
else
ismobile = false;
//alert(ismobile);
//alert(isi);
if(ismobile)
{
safetylink.set('html', 'Important Safety Information');
safetyLinkHeader.set('html', 'Important Safety Information');
if(isi != null){
isi.set('styles', {
height: '100%',
overflow: 'hidden'
});
}
}
else
{
safetylink.set('html', 'Important Safety Information');
safetyLinkHeader.set('html', 'Important Safety Information');
}
});
function newImage( imgSrc ){
var imgName = new Image();
imgName.src = imgSrc;
return imgName;
}
function change( imgName, imgLocation )
{
document[imgName].src = imgLocation ;
}
var preloadFlag = false;
function loadImages()
{
if (document.images)
{
down_over = newImage("/images/site/textSize/down_over.aspx");
up_over = newImage("/images/site/textSize/up_over.aspx");
preloadFlag = true;
}
}
var dfontSizes = "";
var dlineHeight = "";
function fontSizer(eSize, e) {
maxSizeUp = 2;
maxSizeDown = -2;
defaultfontSizes = 14;
defaultlineHeight = 20;
element = e;
classes = new Array();
classes[0] = getAllClassName("article_Detail");
classes[1] = getAllClassName("article_summary");
classes[2] = getAllClassName("article_1summary");
classes[3] = getAllClassName("article_Titlesummary");
classes[4] = getAllClassName("faqQuestion");
classes[5] = getAllClassName("faqBodyText");
//alert(classes.length);
for(var i=0; i= (parseInt(defaultfontSizes) + maxSizeDown)) {
fontSizes = parseInt(fontSizes) + eSize;
lineHeight = parseInt(lineHeight) + eSize;
classes[i][a].style.fontSize = fontSizes + 'px';
classes[i][a].style.lineHeight = lineHeight + 'px';
}
}
}
//alert((parseInt(dfontSizes)+maxSizeUp) + " ::::::::::: " + fontSizes);
if((parseInt(dfontSizes)+maxSizeUp) == fontSizes || (parseInt(dfontSizes)+maxSizeDown) == fontSizes) {
if(eSize == 1) {
element.style.backgroundImage = "url(/images/site/textSize/up_disabled.aspx)";
}else{
element.style.backgroundImage = "url(/images/site/textSize/down_disabled.aspx)";
}
}else{
document.getElementById("textDown").style.backgroundImage = "url(/images/site/textSize/down_enabled.aspx)";
document.getElementById("textUp").style.backgroundImage = "url(/images/site/textSize/up_enabled.aspx)";
}
/*
//alert(classes[i][a].style.fontSize + " :::::: " + classes[i][a].style.lineHeight);
if((parseInt(fontSizes) + eSize) == (parseInt(defaultfontSizes) + maxSizeUp) || (parseInt(fontSizes) + eSize) == (parseInt(defaultfontSizes) + maxSizeDown)) {
alert(parseInt(fontSizes) + eSize + " ::::::::::: " + parseInt(defaultfontSizes) + maxSizeUp);
alert(parseInt(fontSizes) + eSize + " ::::::::::: " + parseInt(defaultfontSizes) + maxSizeDown);
if(eSize == 1) {
//alert("Here 1");
element.style.backgroundImage = "url(/images/site/textSize/up_disabled.aspx)";
document.getElementById("textDown").style.backgroundImage = "url(/images/site/textSize/down_enabled.aspx)";
}else{
element.style.backgroundImage = "url(/images/site/textSize/down_disabled.aspx)";
document.getElementById("textUp").style.backgroundImage = "url(/images/site/textSize/up_enabled.aspx)";
}
}else{
document.getElementById("textUp").style.backgroundImage = "url(/images/site/textSize/up_enabled.aspx)";
document.getElementById("textDown").style.backgroundImage = "url(/images/site/textSize/down_enabled.aspx)";
}
*/
}
function getAllClassName(eClass) {
var pElements = new Array();
pElements = document.getElementsByTagName( "*" );
getByClassName = new Array();
countInt = 0;
for(var p=0; pIs this correct?
";
//building the button onlcick event function call
var ocValue = "btnClick('" + newURL + "')";
//show the modal panel
objModal.style.display = 'block';
//dynlically insert the message
//objMsgDiv.innerHTML = msg;
//dynamically insert the new onclick event
objBtn.setAttribute('onclick', ocValue);
}
function btnClick(siteNam) {
//reference to parent modal panel
var objMod = document.getElementById('leaving');
//hide the modal panel
closeMessage();
//objMod.style.display = 'none';
//open the url in a new window or tab
window.open(siteNam);
}function modalClose() {
//reference to parent modal panel
var objMod = document.getElementById('leaving');
//hide the modal panel
objMod.style.display = 'none';
}
function buildDisableModal() {
eH = document.documentElement.scrollHeight + 'px';
//eW = document.documentElement.scrollWidth - 20 + 'px';
eW = '100%';
document.getElementById('pageDisable').style.minHeight = eH;
document.getElementById('pageDisable').style.width = eW;
}
function secondsToTime(secs) {
hours = Math.floor(secs / (60 * 60));
divisor_for_minutes = secs % (60 * 60);
minutes = Math.floor(divisor_for_minutes / 60);
divisor_for_seconds = divisor_for_minutes % 60;
seconds = Math.ceil(divisor_for_seconds);
obj = {"h": hours, "m": minutes, "s": seconds};
//return obj;
timecode = numPad(minutes,2) + ":" + numPad(seconds,2);
return timecode;
}
function numPad(number, length) {
str = '' + number;
while (str.length < length) {
str = '0' + str;
}
return str;
}
function showHideALL(e, eDIV, eAction) {
e.style.display = "none";
document.getElementById(eDIV).style.display = "inline-block";
//alert(eAction);
if(eAction == "none") {
eAction = "faqBodyContent";
plusMinus = "A";
}else{
eAction = "faqBodyContentOn";
plusMinus = "B";
}
for(var i=0; i