﻿var WarrantCall;var WarrantPut;var CBBCBull;var CBBCBear;var Color;var ChartPath;var ChartID;function SetDivHeight(){var a=document.getElementById('maindiv').offsetHeight;document.getElementById("chartdiv").style.height=a-3+"px";document.getElementById("quotediv").style.height=a+"px"}function WarrantList(c,d,e){var f='<a href="DetailQuote.aspx?symbol={0}" class="font12a">{1}</a>';var g='';var h='';var j,symbolListPut;try{j=WarrantCall[c].split(',');for(i=0;i<j.length;i++){g+=', '+f.replace('{0}',j[i]).replace('{1}',j[i])}symbolListPut=WarrantPut[c].split(',');for(i=0;i<symbolListPut.length;i++){h+=', '+f.replace('{0}',symbolListPut[i]).replace('{1}',symbolListPut[i])}if(g!=''){g=g.substring(2)}if(h!=''){h=h.substring(2)}var a=document.getElementById(d);if(a){a.innerHTML=g}var b=document.getElementById(e);if(b){b.innerHTML=h}}catch(ex){}}function CBBCList(c,d,e){var f='<a href="DetailQuote.aspx?symbol={0}" class="font12a">{1}</a>';var g='';var h='';var j,symbolListPut;try{j=CBBCBull[c].split(',');for(i=0;i<j.length;i++){g+=', '+f.replace('{0}',j[i]).replace('{1}',j[i])}symbolListPut=CBBCBear[c].split(',');for(i=0;i<symbolListPut.length;i++){h+=', '+f.replace('{0}',symbolListPut[i]).replace('{1}',symbolListPut[i])}if(g!=''){g=g.substring(2)}if(h!=''){h=h.substring(2)}var a=document.getElementById(d);if(a){a.innerHTML=g}var b=document.getElementById(e);if(b){b.innerHTML=h}}catch(ex){}}function ChartChange(){var a=document.getElementById("chartdiv");var b=document.getElementById('maindiv').offsetHeight;var c=document.getElementById('hidColor').value;var d=document.getElementById('hidPeriod').value;a.style.height=b-3+"px";document.getElementById(ChartID).src=ChartPath.replace("{1}",d).replace("{2}",c);if(c=="3"){a.style.background="#000000"}else{a.style.background="#FFFFFF"}}function SetHiddenValue(a,b){document.getElementById(a).value=b;if(a=="hidColor"){setCookie("scheme",b,365)}ChartChange()}function setCookie(a,b,c){var d=new Date();d.setDate(d.getDate()+c);document.cookie=a+"="+escape(b)+";domain=.aastocks.com;path=/;"+((c==null)?"":";expires="+d.toGMTString())}function QuoteMeter(a){alert(a)}function overIC(){if(document.getElementById("divIC")){document.getElementById("divIC").style.visibility="visible"}}function outIC(){if(document.getElementById("divIC")){document.getElementById("divIC").style.visibility="hidden"}}function overDelayBtn(){if(document.getElementById("divDelay")){document.getElementById("divDelay").style.visibility="visible"}}function outDelayBtn(){if(document.getElementById("divDelay")){document.getElementById("divDelay").style.visibility="hidden"}}var w3c=(document.getElementById)?true:false;var agt=navigator.userAgent.toLowerCase();var ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1)&&(agt.indexOf("omniweb")==-1));var ie5=(w3c&&ie)?true:false;var ns6=(w3c&&(navigator.appName=="Netscape"))?true:false;var op8=(navigator.userAgent.toLowerCase().indexOf("opera")==-1)?false:true;var offsettop=5;var offsetleft=18;var curr_w_pop_id="";var cLeft=0;var cTop=0;function ClipTransform(a){this.objToTransfrom=a;this.clipLeft=0;this.clipRight=350;this.clipBottom=350;this.clipTop=0;this.increment=1;this.step=16;this.cl=350;this.cr=350;this.cb=0;this.ct=0;this.changeNeed=false;this.timeoutID=0;this.transform=function(){var d="rect("+this.ct+"px "+this.cr+"px "+this.cb+"px "+this.cl+"px )";this.objToTransfrom.style.clip=d};this.objToTransfrom.style.display="";this.change=function(){this.changeNeed=false;if(this.cl>0){this.cl-=this.step;this.changeNeed=true}if(this.cb<this.clipBottom){this.cb+=this.step;this.changeNeed=true}if(this.ct<this.clipTop){this.ct+=this.step;this.changeNeed=true}return this.changeNeed};this.stop=function(){clearTimeout(this.timeoutID);this.changeNeed=false}}function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function showPW(a,b){if(curr_w_pop_id!=""){hidePW(curr_w_pop_id)}getTopLeft(b);curr_w_pop_id=a;var c=document.getElementById(a);c.style.visibility="visible";c.style.top=cTop+b.offsetHeight+offsettop+"px";var d=ie&&!window.opera?ietruebody().clientWidth:window.innerWidth-20;c.style.left=cLeft-c.offsetWidth+offsetleft+"px";new ClipTransform(c)}function hidePW(a){var b=document.getElementById(a);b.style.visibility="hidden"}function getTopLeft(a){var b=0;var c=0;var d=a;while(d!=null&&d!=document.body){b+=d.offsetLeft;c+=d.offsetTop;if(!ns6){parseInt(d.currentStyle.borderLeftWidth)>0?b+=parseInt(d.currentStyle.borderLeftWidth):"";parseInt(d.currentStyle.borderTopWidth)>0?c+=parseInt(d.currentStyle.borderTopWidth):""}d=d.offsetParent}cLeft=b;cTop=c}
