function refreshPageShims() {
for (var pageImageCount = 0; pageImageCount < document.images.length; pageImageCount++) {
if (document.images[pageImageCount].name == 'm') {
document.images[pageImageCount].src = 'http://www.backcountrytaxi.com/i/1.gif';
}
}
}
var originalAFSize = 10;
function minusArticleFont() {
for (i = 0; i < document.styleSheets[0].cssRules.length; i++) {
if (document.styleSheets[0].cssRules[i].selectorText == ".articleFont") {
var articleFontSize = parseInt(document.styleSheets[0].cssRules[i].style.fontSize.replace("px","").replace("pt",""));
if (6 < articleFontSize) {
document.styleSheets[0].cssRules[i].style.fontSize = articleFontSize - 2;
}
}
}
}
function plusArticleFont() {
for (i = 0; i < document.styleSheets[0].cssRules.length; i++) {
if (document.styleSheets[0].cssRules[i].selectorText == ".articleFont") {
var articleFontSize = parseInt(document.styleSheets[0].cssRules[i].style.fontSize.replace("px","").replace("pt",""));
if (originalAFSize == articleFontSize) {
document.styleSheets[0].cssRules[i].style.fontSize = 6 + articleFontSize;
} else {
document.styleSheets[0].cssRules[i].style.fontSize = 2 + articleFontSize;
}
}
}
}
function setArticleFont(newValue) {
for (i = 0; i < document.styleSheets[0].cssRules.length; i++) {
if (document.styleSheets[0].cssRules[i].selectorText == ".articleFont") {
document.styleSheets[0].cssRules[i].style.fontSize = newValue;
}
}
}
function getRule(styleSheet, ruleName) {
for (i = 0; i < document.styleSheets[styleSheet].cssRules.length; i++) {
if (document.styleSheets[styleSheet].cssRules[i].selectorText == "." + ruleName) {
return document.styleSheets[styleSheet].cssRules[i];
}
}
return null;
}
function upjs(thisString) {
return thisString.replace(/&quot;/gi, "\"").replace(/&#39;/gi, "'").replace(/&#39/gi, "'");
}
function setYearCookie(name, value) {
setTimedCookieFromNow(name, value, 1, 0, 0, 0, 0, 0)
}
function setTwoHourCookie(name, value) {
setTimedCookieFromNow(name, value, 0, 0, 0, 2, 0, 0)
}
function setTimedCookieFromNow(name, value, year, month, day, hour, minute, second) {
var today = new Date();
var y = year + today.getFullYear();
var m = month + today.getMonth();
var d = day + today.getDate();
var hr = hour + today.getHours();
var min = minute + today.getMinutes();
var s = second + today.getSeconds();
setCookie(name, value, new Date(y, m, d, hr, min, s));
}
function setCookie(name, value, expire) {
document.cookie = name + "=" + escape(value)
+ ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}
function deleteCookie(name) {
if (getCookie(name)) document.cookie = name + "=expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1) end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
}
function hexdec(someHexNumber) {
someHexNumber = someHexNumber.toUpperCase();
rval = parseInt(someHexNumber,16);
return rval;
}
function dechex(i) {
a2 = '';
ihex = hexQuot(i);
idiff = eval(i + '-(' + ihex + '*16)');
a2 = itohex(idiff) + a2;
while( ihex > 16) {
itmp = hexQuot(ihex);
idiff = eval(ihex + '-(' + itmp + '*16)');
a2 = itohex(idiff) + a2;
ihex = itmp;
}
a1 = itohex(ihex);
return a1 + a2 ;
}
function hexQuot(i){
return Math.floor(eval(i +'/16'));
}
function itohex(i) {
if( i == 0) aa = '0';
else if( i== 1) aa = '1';
else if( i== 2) aa = '2';
else if( i == 3) aa = '3' ;
else if( i== 4) aa = '4';
else if( i == 5) aa = '5' ;
else if( i== 6) aa = '6';
else if( i == 7) aa = '7' ;
else if( i== 8) aa = '8';
else if( i == 9) aa = '9';
else if( i==10) aa = 'A';
else if( i==11) aa = 'B';
else if( i==12) aa = 'C';
else if( i==13) aa = 'D';
else if( i==14) aa = 'E';
else if( i==15) aa = 'F';
return aa
}
function showErrMsg() {
var chanceRoll = Math.random()*100;
if (chanceRoll < 10) {
var randomHex3 = dechex(Math.round(Math.random()*4294967294));
var randomHex4 = dechex(Math.round(Math.random()*4294967294));
randomHex3 = randomHex3.toLowerCase();
randomHex4 = randomHex4.toLowerCase();
var errmssg = 'The instruction at \u00220x' + randomHex3 + '\u0022 referenced memory at \u00220x' + randomHex4 + '\u0022.The memory could not be \u0022read\u0022.\u000A\u000A'
errmssg = errmssg + 'Click on OK to terminate the program\u000AClick on CANCEL to debug the program';
confirm(errmssg);
return false;
}
}
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
return showErrMsg();
}
return true;
}
function left(e) {
return showErrMsg();
}
document.onmousedown=right;
var sThisURL = unescape(window.location.pathname);
function doFramesBuster() {
if ( top != self ) {
breakFrames();
}
}
function breakFrames() {
setTimeout( "top.location.href = sThisURL", 0.1*1000 );
}
function breakFrames() {
top.location.replace( sThisURL );
}
if ( "MSIE" == navigator.appName ) {
doFramesBuster();
}
