window.onscroll= window_scroll; window.onresize = window_scroll; /******************** GENERAL FUNCTIONS *********************/ //--Get css info --// function getStyle(oElm, strCssRule){ var strValue = ""; if(document.defaultView && document.defaultView.getComputedStyle){ strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule); } else if(oElm.currentStyle){ strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ return p1.toUpperCase(); }); strValue = oElm.currentStyle[strCssRule]; } return strValue; } //-- Build Flash --// function buildFlash (divId, swfLoc, swfName, swfHeight, swfWidth, swfVar, swfVar2){ var flashVersion = 8; var so = new SWFObject(swfLoc, swfName, swfWidth, swfHeight, flashVersion, "#FFFFFF"); //so.addParam("wmode", "transparent"); so.addParam("scale", "noscale"); if (swfVar){ so.addVariable("v1", swfVar); } if (swfVar2){ so.addVariable("v2", swfVar2); } so.write(divId); } function hideLogo (){ document.getElementById('viewlogo').style.display = "none"; } //-- Show/Hide functions --// //-- Show/Hide functions --// function hideAll(lyrId) { var divs = document.getElementsByTagName('div'); for(i=0;i" + str + ""; a[i].innerHTML = lnk; } } var activeFaq = "" function showFaq(fid){ var str = "flink" + fid; if (activeFaq == str){ hideAll('faqText'); document.getElementById(activeFaq).style.background = 'url(http://www.thameswater.co.uk/clickable_house/common/images/link-arrow.gif) no-repeat 0 2px'; activeFaq = "" } else{ hideAll('faqText'); if (activeFaq != ""){ document.getElementById(activeFaq).style.background = 'url(http://www.thameswater.co.uk/clickable_house/common/images/link-arrow.gif) no-repeat 0 2px'; } activeFaq = str; document.getElementById(str).style.background = 'url(http://www.thameswater.co.uk/clickable_house/common/images/link-arrow-down.gif) no-repeat 0 2px'; str = "faqText" + fid; show(str); } } function hideAll(lyrId) { var divs = document.getElementsByTagName('div'); for(i=0;i