$import("com.dowjones.mouse") $import("com.dowjones.utils.objDimensions") $import("com.dowjones.utils.SimpleDateFormat") com.dowjones.rolloverQuotes={ suppress:(navigator.userAgent.indexOf('MSIE 5.23; Mac')>-1),useIframe:(navigator.userAgent.toLowerCase().indexOf('safari')==-1&&navigator.userAgent.indexOf('Mac')==-1),inProgress:false,inProgressTimer:null,attempts:0,rolloverParent:null,type:"",symbol:"",timer:null,chartPrefix:"http://chart.bigcharts.com/custom/wsj-com/charts/commodities/chart.asp?size=2&style=2101&type=256&mocktick=1",container:null, containerDoc:function(){ var o=null if(this.useIframe){ if(typeof document.frames!='undefined'){ o=document.frames['rqTip'].document }else if(typeof com.dowjones.rolloverQuotes.container.contentDocument!='undefined'){ o=$('rqTip').contentDocument }else if(typeof com.dowjones.rolloverQuotes.container.contentWindow!='undefined'){ o=$('rqTip').contentWindow } }else{ o=document } return o }, containerBody:function(){;return (this.useIframe)?((typeof this.containerDoc()=='object')?this.containerDoc().body:this.containerDoc()):this.container;}, createPanel:function(){ if(this.useIframe){ this.container=document.createElement('iframe') this.container.src='/static_html_files/blank.htm' this.container.marginWidth='0' this.container.marginHeight='0' this.container.hspace='0' this.container.vspace='0' this.container.frameBorder='0' this.container.scrolling='no' }else{ this.container=document.createElement('div') } this.container.id='rqTip' this.container.style.display='none' this.container.style.margin='0px' this.container.style.padding='0px' this.container.style.borderColor='#000' this.container.style.borderStyle='solid' this.container.style.borderWidth='1px' this.container.style.position='absolute' this.container.style.left='0px' this.container.style.top='0px' this.container.style.width='250px' this.container.style.height='1px' document.body.appendChild(this.container) }, inPopup:function(){;return (com.dowjones.mouse.x>com.dowjones.utils.objDimensions.left(this.container)&&com.dowjones.mouse.x<(com.dowjones.utils.objDimensions.left(this.container)+com.dowjones.utils.objDimensions.width(this.container))&&com.dowjones.mouse.y>com.dowjones.utils.objDimensions.top(this.container)&&com.dowjones.mouse.y<(com.dowjones.utils.objDimensions.top(this.container)+this.containerBody().scrollHeight));}, show:function(n,s,t){ if(this.suppress){;return true;} t=(t)?t:'usstock' this.rolloverParent=n this.symbol=s this.type=t window.clearTimeout(this.timer) if($('rqTip')==null) this.createPanel() if(this.container==null) this.container=$('rqTip') if(this.useIframe){ if(this.containerBody()==null){ this.timer=setTimeout("com.dowjones.rolloverQuotes.showagain()",100) return true } } if(this.containerBody().childNodes.length<1){ if(this.useIframe){;var n=this.containerDoc().createElement('link');n.rel='stylesheet';n.type='text/css';n.href='/j20type.css';this.containerBody().appendChild(n);} var n=this.containerDoc().createElement('div');n.id='rqContent';this.containerBody().appendChild(n); var n=this.containerDoc().createElement('div');n.id='rqContentHeadlines';this.containerBody().appendChild(n) var n=this.containerDoc().createElement('div');n.id='rqContentPR';this.containerBody().appendChild(n) var n=this.containerDoc().createElement('div');n.id='rqPromo';this.containerBody().appendChild(n) var n=this.containerDoc().createElement('div');n.id='rqFootnote';this.containerBody().appendChild(n) if(this.useIframe){;this.containerDoc().onmouseover=function(){;parent.window.clearTimeout(parent.com.dowjones.rolloverQuotes.timer);};this.containerDoc().onmouseout=function(){;parent.com.dowjones.rolloverQuotes.hidelater();};}else{;this.containerBody().onmouseover=function(){;window.clearTimeout(com.dowjones.rolloverQuotes.timer);};this.containerBody().onmouseout=function(){;com.dowjones.rolloverQuotes.hidelater();};} } this.containerDoc().getElementById('rqContent').innerHTML='
Change | % Change | Volume |
'+this.data.rtc+' | '+this.data.rtp+' | '+this.data.rtv+' |
Source: Nasdaq Last Sale |
Last | Change | % Change | Volume |
'+this.data.l+' | '+this.data.c+' | '+this.data.p+' | '+this.data.v+''
temp=temp+' '
temp=temp+' '
var div=com.dowjones.rolloverQuotes.containerDoc().getElementById('rqPromo')
div.innerHTML = temp
div.style.display='block'
//temp="";
//temp=temp+''
temp=temp+'Get: Full Research | '
temp=temp+'Price & Volume Alerts'
temp=temp+' '
//temp=temp+' '
//div=com.dowjones.rolloverQuotes.containerDoc().getElementById('rqFootnote')
//div.innerHTML = temp
//div.style.display='block'
}else{;if(com.dowjones.rolloverQuotes.attempts<5){;setTimeout("QUOTEJSON.callback()",100);}else{;com.dowjones.rolloverQuotes.showagain();};}
}}
QUOTEHEADLINEJSON={data:null,callback:function(){
var temp=""
if(this.data.length>0){
temp=temp+''
//temp=temp+'Snapshot quotes reflect real-time trades reported through Nasdaq only; '
//temp=temp+'Comprehensive quotes reflect trading in all markets(composite) and are delayed '
//temp=temp+'up to 20 minutes.'
//temp=temp+' '
//temp=temp+''
temp=temp+' '
temp=temp+''
}
var div=com.dowjones.rolloverQuotes.containerDoc().getElementById('rqContentHeadlines')
if(div){
if(QUOTEJSON.data==null){
com.dowjones.rolloverQuotes.containerDoc().getElementById('rqContent').innerHTML=''
temp=temp+' '
temp=temp+'Latest News: '
temp=temp+''
temp=temp+''
for(var a=0;a ';
}
temp=temp+'Sorry '
temp='Unfortunately this service is unavailable temporally, please try later. '
}
div.innerHTML=temp
div.style.display=(this.data.length>0)?'block':'none';
com.dowjones.rolloverQuotes.adjustheight()
setTimeout("com.dowjones.rolloverQuotes.adjustheight()",100)
setTimeout("com.dowjones.rolloverQuotes.adjustheight()",500)
com.dowjones.rolloverQuotes.inProgress=false
}else{;if(com.dowjones.rolloverQuotes.attempts<5){;setTimeout("QUOTEHEADLINEJSON.callback()",100);}else{;com.dowjones.rolloverQuotes.showagain();};}
}}
QUOTEPRJSON={data:null,callback:function(){
var temp=""
if(this.data.length>0){
temp=temp+''
temp=temp+' '
temp=temp+''
}
var div=com.dowjones.rolloverQuotes.containerDoc().getElementById('rqContentPR')
if(div){
if(QUOTEJSON.data==null){
com.dowjones.rolloverQuotes.containerDoc().getElementById('rqContent').innerHTML=''
temp=temp+' '
temp=temp+'Latest Press Release: '
temp=temp+''
temp=temp+''
for(var a=0;a ';
}
temp=temp+'Sorry '
temp='Unfortunately this service is unavailable temporally, please try later. '
}
div.innerHTML=temp
div.style.display=(this.data.length>0)?'block':'none';
com.dowjones.rolloverQuotes.adjustheight()
setTimeout("com.dowjones.rolloverQuotes.adjustheight()",100)
setTimeout("com.dowjones.rolloverQuotes.adjustheight()",500)
com.dowjones.rolloverQuotes.inProgress=false
}else{;if(com.dowjones.rolloverQuotes.attempts<5){;setTimeout("QUOTEPRJSON.callback()",100);}else{;com.dowjones.rolloverQuotes.showagain();};}
}}
SetCookie("CRS","","1m-");SetCookie("CRT","","1m-");$import("/public/quotes/json.html?type="+this.type+"&symbol="+this.symbol+"&r="+new Date().getTime(),'rcq',((this.useIframe)?false:true))
}else{;window.clearTimeout(this.inProgressTimer);this.inProgressTimer=setTimeout("com.dowjones.rolloverQuotes.fetch()",100);}
},
adjustheight:function(){
this.container.style.height="0px";this.container.style.height=(this.containerBody().scrollHeight)+"px"
if(((com.dowjones.utils.objDimensions.top(this.container)-((typeof window.pageYOffset!='undefined')?window.pageYOffset:((typeof document.documentElement!='undefined')?document.documentElement.scrollTop:document.body.scrollTop)))+com.dowjones.utils.objDimensions.height(this.container))>((navigator.userAgent.indexOf("Mac")>0)?((typeof window.innerHeight!='undefined')?window.innerHeight:document.body.clientHeight):((typeof window.innerHeight!='undefined')?window.innerHeight:((document.documentElement)?document.documentElement.clientHeight:document.body.offsetHeight)))){
this.container.style.top=((((navigator.userAgent.indexOf("Mac")>0)?((typeof window.innerHeight!='undefined')?window.innerHeight:document.body.clientHeight):((typeof window.innerHeight!='undefined')?window.innerHeight:((document.documentElement)?document.documentElement.clientHeight:document.body.offsetHeight)))-com.dowjones.utils.objDimensions.height(this.container))+((typeof window.pageYOffset!='undefined')?window.pageYOffset:((typeof document.documentElement!='undefined')?document.documentElement.scrollTop:document.body.scrollTop))-4)+"px"
}
}
}
|