// Main JavaScript Include File // Copyright (C) 2004 - 2006 by Barchart.com, Inc. All Rights Reserved. // This file may only be used by an authorized firm, on an authorized website. // Any unauthorized use is expressly prohibited. var bc_BaseURL = ''; function bcfn_CheckDomain() { var d = bcfn_GetDomain(); if ((d == 'barchart') || (d == 'insidefutures')) return true; else return false; } function bcfn_GetDomain() { var s = document.domain; s = s.toLowerCase(); if (s.substring(0, 7) == 'http://') { s = s.substring(7); } var ary1 = s.split('/'); var ary2 = ary1[0].split('.'); var d = ''; if ((ary2[ary2.length - 1] == 'com') || (ary2[ary2.length - 1] == 'org') || (ary2[ary2.length - 1] == 'net') || (ary2[ary2.length - 1] == 'edu') || (ary2[ary2.length - 1] == 'localhost') || (ary2[ary2.length - 1] == 'gov')) { if (ary2.length > 1) d = ary2[ary2.length - 2]; } else { if (ary2.length > 2) d = ary2[ary2.length - 3]; } return d; } function bcfn_GetColor(s) { var c = s.substring(0, 1); if (c == '+') return '#008800'; else if (c == '-') return '#EE0000'; else return '#0000FF'; } function bcfn_GetImageColor(s) { var c = s.substring(0, 1); if (c == '+') return bc_ImageURL + '/up.gif'; else if (c == '-') return bc_ImageURL + '/dn.gif'; else return bc_ImageURL + '/noch.gif'; } function bcfn_OpenFlipbook(u, p) { var url = 'http://quotes-cust.barchart.com/pl/if/flipbook.asp?list=' + p; window.open(url, '_blank', 'width=614,height=429,left=25,top=10'); } function bcfn_ParseQuery(s) { var ary = new Array(); var pairs = s.split('&'); for (var i = 0; i < pairs.length; i++) { var tmp = pairs[i].split('='); ary[tmp[0]] = tmp[1]; } return ary; } function bcfn_PrintDisclaimer() { document.write('

'); document.write('
'); document.write('Website provided by Barchart.com. User Agreement Applies.
'); document.write('Intraday data provided by ddfplus and subject to '); document.write('terms of use.
'); document.write('End of Day and historical data provided by CRB - Commodity Research Bureau.
'); document.write('Data is exchange delayed. 10 minutes for CME, CBOT, KCBT, WCE, and MGEX. 30 minutes for NYBOT and NYMEX.

'); document.write('Data and information is provided for informational purposes only, and is not intended for trading purposes.'); document.write('

'); document.write('
'); } var bc_bShowDisclaimer = true; //var bc_QueryString = (new String(document.location.search)).substring(1); var bc_QueryString = 'page=lookup&'; var bc_QueryForm = bcfn_ParseQuery(bc_QueryString); // Core URL's for some of the support files var bc_ImageURL = 'http://images.barchart.com/pl'; if (!bc_QueryForm['sym']) bc_QueryForm['sym'] = ''; if (bcfn_CheckDomain()) { document.write(''); } else { document.write('!!! Unauthorized Access !!!'); } if (bc_bShowDisclaimer) { document.write(''); }