var p1_h="";var pO_h="";var mJ_h="";var uV_h="";var viewMoreText='<p align="right" class="viewMoreStyle">View More...</p>';var viewMorehG="live-market-info/world-market-indices.php";function z(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){gzxGet(A)};gzxLoopFunction()}function gzxGet(E){var A=E;var C="#339933";var B="#CC0000";if(A.readyState==4){if(A.responseXML!=null){var D=A.responseXML.documentElement;if(D!=null){parseAndFill_i(D,"p1",3);parseAndFill_i(D,"pO",3);parseAndFill_i(D,"mJ",3);parseAndFill_i(D,"uV",3)}}}}function pausecomp(C){var B=new Date();var A=null;do{A=new Date()}while(A-B<C)}function parseAndFill_i(C,M,I){if(M=="p1"){tag=v11}if(M=="pO"){tag=lZ1z}if(M=="mJ"){tag=v1l}if(M=="uV"){tag=k11}eleArr=C.getElementsByTagName(tag+"Index");if(eleArr!=null){var B=eleArr.length;var G;if(B>I){B=I}htmlText="";htmlText=htmlText+'<span style="height:2px; font-size:2px;">&nbsp;</span>';for(G=0;G<B;G++){var L=eleArr[G];var O=L.childNodes;var H=O.length;var Q="";var A,E,K,P;for(j=0;j<H;j++){var D=O[j];var F=D.nodeName;if(F==l1){A=D.childNodes[0].nodeValue}if(F==b1l){E=D.childNodes[0].nodeValue}if(F==dl1){K=D.childNodes[0].nodeValue}if(F==c1l){P=D.childNodes[0].nodeValue}}var N="worldIndexLoserPerChg";if(P>0){N="worldIndexGainerPerChg"}htmlText=htmlText+'<table width="100%">';htmlText=htmlText+' <tr> <td class="worldIndexName"> '+A+"</td>";htmlText=htmlText+' <td class="worldIndexLTP"> '+E+"</td>";htmlText=htmlText+' <td class="'+N+'"> '+K+"</td> </tr>";htmlText=htmlText+"</table>"}htmlText=htmlText+'<p class="viewMoreStyle"> <a href="'+viewMorehG+"#"+M+'">'+viewMoreText+"</a> </p>";var J=document.getElementById(M+"_i");J.innerHTML=htmlText}}function showWorld_iMenu(A){if(A=="p1_i"){hideMenu("pO_i");hideMenu("mJ_i");hideMenu("uV_i");togglePannelAnimatedStatus(A,50,50)}if(A=="pO_i"){hideMenu("p1_i");hideMenu("mJ_i");hideMenu("uV_i");togglePannelAnimatedStatus(A,100,50)}if(A=="mJ_i"){hideMenu("p1_i");hideMenu("pO_i");hideMenu("uV_i");togglePannelAnimatedStatus(A,50,50)}if(A=="uV_i"){hideMenu("p1_i");hideMenu("mJ_i");hideMenu("pO_i");togglePannelAnimatedStatus(A,50,50)}}function gzxLoopFunction(){var A;indexTimeout=setTimeout(function(){gzxLoopFunction()},60000);A=ajaxFunction();A.onreadystatechange=function(){gzxGet(A)};A.open(hJ,h1G,true);A.send(null)};    var ccHTML="";function cc(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){ccGet(A)};ccLoopFunction()}function ccGet(Q){var C=Q;var K="#339933";var G="#CC0000";if(C.readyState==4){if(C.responseXML!=null){var R=C.responseXML.documentElement;if(R!=null){var F=R.getElementsByTagName(dZ1);if(F!=null){var A=F.length;var N;if(A>2){A=2}var D="";for(N=0;N<A;N++){var B=F[N];var H=B.childNodes;var M=H.length;var I="";var T,P,E,S;for(j=0;j<M;j++){var L=H[j];var O=L.nodeName;if(O==l1){T=L.childNodes[0].nodeValue}if(O==b1l){P=L.childNodes[0].nodeValue}if(O==dl1){E=L.childNodes[0].nodeValue}if(O==c1l){S=L.childNodes[0].nodeValue}}D=D+'<table width="90%">';D=D+' <tr> <td class="glScripName"> '+T+"</td>";D=D+' <td class="glScripLTP"> '+P+"</td>";if(S>0)D=D+' <td class="gainerPerChg"> '+E+"</td>";else D=D+' <td class="loserPerChg"> '+E+"</td>";D=D+" </tr> ";D=D+"</table>"}ccHTML=D;var J=document.getElementById("cboeVolatility");J.innerHTML=D}}}}}function ccLoopFunction(){var A;indexTimeout=setTimeout(function(){ccLoopFunction()},360000);A=ajaxFunction();A.onreadystatechange=function(){ccGet(A)};A.open(hJ,cc_Mz,true);A.send(null)};   var currencyHTML="";function bz(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){bzGet(A)};bzLoopFunction()}function bzGet(Q){var C=Q;var K="#339933";var G="#CC0000";if(C.readyState==4){if(C.responseXML!=null){var R=C.responseXML.documentElement;if(R!=null){var F=R.getElementsByTagName(hl1);if(F!=null){var A=F.length;var N;if(A>2){A=2}var D="";for(N=0;N<A;N++){var B=F[N];var I=B.childNodes;var M=I.length;var J="";var S,P,E;for(j=0;j<M;j++){var L=I[j];var O=L.nodeName;if(O==l1){S=L.childNodes[0].nodeValue}if(O==b1l){P=L.childNodes[0].nodeValue}}D=D+'<table width="90%">';D=D+' <tr> <td class="currencyName"> '+S+"</td>";D=D+' <td class="currencyLTP"> '+P+"</td>";D=D+"</table>"}currencyHTML=D;var H=document.getElementById("ck");H.innerHTML=D}}}}}function bzLoopFunction(){var A;indexTimeout=setTimeout(function(){bzLoopFunction()},60000);A=ajaxFunction();A.onreadystatechange=function(){bzGet(A)};A.open(hJ,bz__p,true);A.send(null)};   //var zz="";var gg="";var pl="";var kk=""; 
var LKL=true;var MnT=false;
function nal32_Zkis(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){indexGainersLosersGet(indexName,A)};indexGainerLoserLoopFunction(s1m)}

function aZ_as(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){indexGainersLosersGet(indexName,A)};indexGainerLoserLoopFunction(o1lx)}function indexGainersLosersGet(A,R){var D=R;var L="#339933";var I="#CC0000";if(D.readyState==4){if(D.responseXML!=null){var S=D.responseXML.documentElement;if(S!=null){var H=S.getElementsByTagName("LoserScrip");if(H!=null){var B=H.length;var O;if(B>2){B=2}var E="";for(O=0;O<B;O++){var C=H[O];var J=C.childNodes;var N=J.length;var K="";var U,Q,G;for(j=0;j<N;j++){var M=J[j];var P=M.nodeName;if(P==l1){U=M.childNodes[0].nodeValue}if(P==b1l){Q=M.childNodes[0].nodeValue}if(P==e11){G=M.childNodes[0].nodeValue;G=G+"%"}}E=E+'<table width="90%">';E=E+' <tr> <td class="glScripName"> '+U+"</td>";E=E+' <td class="glScripLTP"> '+Q+"</td>";E=E+' <td class="loserPerChg"> '+G+"</td> </tr> </table>"}if(A=="nifty"){zz=E}else{if(A=="sensex"){pl=E}}if((LKL==true)&&(A=="nifty")){var T=document.getElementById("nlt");T.innerHTML=E}}E="";H=S.getElementsByTagName("GainerScrip");if(H!=null){var B=H.length;var O;if(B>2){B=2}for(O=0;O<B;O++){var C=H[O];var J=C.childNodes;var N=J.length;var K="";var U,Q,G;for(j=0;j<N;j++){var M=J[j];var P=M.nodeName;if(P=="Name"){U=M.childNodes[0].nodeValue}if(P=="CurVal"){Q=M.childNodes[0].nodeValue}if(P=="PerChange"){G=M.childNodes[0].nodeValue;G=G+"%"}}E=E+'<table width="90%">';E=E+' <tr> <td class="glScripName"> '+U+"</td>";E=E+' <td class="glScripLTP"> '+Q+"</td>";E=E+' <td class="gainerPerChg"> '+G+"</td> </tr> </table>"}if(A=="nifty"){gg=E}else{if(A=="sensex"){kk=E}}if((LKL==true)&&(A=="nifty")){var F=document.getElementById("nt");F.innerHTML=E}}}}}}function indexGainerLoserLoopFunction(B){var A;indexTimeout=setTimeout(function(){indexGainerLoserLoopFunction(B)},60000);A=ajaxFunction();A.onreadystatechange=function(){indexGainersLosersGet(B,A)};if(B=="nifty"){A.open(hJ,nsQ,true);A.send(null)}else{if(B=="sensex"){A.open(hJ,s_sQ,true);A.send(null)}}}

function iZ(){var A=document.getElementById("niftyGLTabA");var B=document.getElementById("niftyGLTabSpan");A.style.backgroundPosition="0% -42px";B.style.backgroundPosition="100% -42px";A=document.getElementById("sensexGLTabA");B=document.getElementById("sensexGLTabSpan");A.style.backgroundPosition="";B.style.backgroundPosition="";var D=document.getElementById("nlt");D.innerHTML=zz;var C=document.getElementById("nt");C.innerHTML=gg;LKL=true;MnT=false};
function lN1(){var A=document.getElementById("sensexGLTabA");var B=document.getElementById("sensexGLTabSpan");A.style.backgroundPosition="0% -42px";B.style.backgroundPosition="100% -42px";A=document.getElementById("niftyGLTabA");B=document.getElementById("niftyGLTabSpan");A.style.backgroundPosition="";B.style.backgroundPosition="";var D=document.getElementById("nlt");D.innerHTML=pl;var C=document.getElementById("nt");C.innerHTML=kk;LKL=false;MnT=true};

   var w1HTML="";function w1(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){w1Get(A)};w1LoopFunction()}function w1Get(Q){var C=Q;var K="#339933";var G="#CC0000";if(C.readyState==4){if(C.responseXML!=null){var R=C.responseXML.documentElement;if(R!=null){var F=R.getElementsByTagName(k1l);if(F!=null){var A=F.length;var N;if(A>2){A=2}var D="";for(N=0;N<A;N++){var B=F[N];var H=B.childNodes;var M=H.length;var J="";var T,P,E,S;for(j=0;j<M;j++){var L=H[j];var O=L.nodeName;T="India VIX";if(O=="Close"){P=L.childNodes[0].nodeValue}if(O==dl1){E=L.childNodes[0].nodeValue}if(O==c1l){S=L.childNodes[0].nodeValue}}D=D+'<table width="90%">';D=D+' <tr> <td class="glScripName"> '+T+"</td>";D=D+' <td class="glScripLTP"> '+P+"</td>";if(S>0)D=D+' <td class="gainerPerChg"> '+E+"%"+"</td>";else D=D+' <td class="gainerPerChg"> '+E+"%"+"</td>";D=D+" </tr> ";D=D+"</table>"}w1HTML=D;var I=document.getElementById("kal");I.innerHTML=D}}}}}function w1LoopFunction(){var A;indexTimeout=setTimeout(function(){w1LoopFunction()},360000);A=ajaxFunction();A.onreadystatechange=function(){w1Get(A)};A.open(hJ,w1_mM,true);A.send(null)};   var xxHTML="";function xx(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){xxGet(A)};xxLoopFunction()}function xxGet(Q){var C=Q;var J="#339933";var G="#CC0000";if(C.readyState==4){if(C.responseXML!=null){var R=C.responseXML.documentElement;if(R!=null){var F=R.getElementsByTagName("InterCommodity");if(F!=null){var A=F.length;var N;if(A>2){A=2}var D="";for(N=0;N<A;N++){var B=F[N];var H=B.childNodes;var M=H.length;var I="";var T,P,E,S;for(j=0;j<M;j++){var K=H[j];var O=K.nodeName;if(O==l1){T=K.childNodes[0].nodeValue}if(O==b1l){P=K.childNodes[0].nodeValue}if(O==dl1){E=K.childNodes[0].nodeValue}if(O==c1l){S=K.childNodes[0].nodeValue}}D=D+'<table width="90%">';D=D+' <tr> <td class="glScripName"> '+T+"</td>";D=D+' <td class="glScripLTP"> '+P+"</td>";if(S>0)D=D+' <td class="gainerPerChg"> '+S+"</td>";else D=D+' <td class="loserPerChg"> '+S+"</td>";D=D+" </tr> ";D=D+"</table>"}xxHTML=D;var L=document.getElementById("lo");L.innerHTML=D}}}}}function xxLoopFunction(){var A;indexTimeout=setTimeout(function(){xxLoopFunction()},60000);A=ajaxFunction();A.onreadystatechange=function(){xxGet(A)};A.open(hJ,xx_p8,true);A.send(null)};   var nT="",sT="";

function _n_z() {var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}; A.onreadystatechange=function(){x_(_l,A)};i_(s1m)}function z1l(){var A;A=ajaxFunction(A);if(typeof (A)=="Boolean"){if(A==false){return }}A.onreadystatechange=function(){x_(_l,A)};i_(o1lx)}function x_(K,H){var I=H;var D="#339933";var E="#CC0000";  if(I.readyState==4){ var A=I.responseXML.documentElement; if(A!=null){var M=A.getElementsByTagName(b1l)[0];if(M!=null){M=M.childNodes[0];var C=M.nodeValue;if(document.getElementById){if(M=document.getElementById(K+"Value")){var G=M.style.backgroundColor;blinkColors(M,M.innerHTML,C,0,G);M.innerHTML=C}if(M=document.getElementById(K+l1m)){__o=A.getElementsByTagName("Change")[0];__o=__o.childNodes[0];var F=__o.nodeValue;M.innerHTML=F;if(F>0){M.style.color=D}else{M.style.color=E}}if(M=document.getElementById(K+e11)){pp=A.getElementsByTagName("PerChange")[0];pp=pp.childNodes[0];var B=pp.nodeValue;M.innerHTML=B;var J=document.getElementById(K+"Value");if(F>0){M.style.color=D;J.style.color=D}else{M.style.color=E;J.style.color=E}}if(M=document.getElementById(K+"Time")){l_k=A.getElementsByTagName("TimeStamp")[0];l_k=l_k.childNodes[0];var L=l_k.nodeValue;M.innerHTML=""+L}}}}}}function i_(B){var A;indexTimeout=setTimeout(function(){i_(B)},10000);A=ajaxFunction();A.onreadystatechange=function(){x_(B,A)};if(B=="nifty") {   A.open(hJ,nBK1,true);   A.send(null); } else if(B=="sensex") {  A.open(hJ,sBK1,true);   A.send(null); }} function niftyTabClick(){tmp=findSWF("chart");x=tmp.reload(bB_+"/cron/nifty-chart-data.php",true);var A=document.getElementById("niftyTabA");var B=document.getElementById("niftyTabSpan");A.style.backgroundPosition="0% -42px";B.style.backgroundPosition="100% -42px";A=document.getElementById("sensexTabA");B=document.getElementById("sensexTabSpan");A.style.backgroundPosition="";B.style.backgroundPosition=""}function sensexTabClick(){tmp=findSWF("chart");x=tmp.reload(bB_+"/cron/sensex-chart-data.php",true);var A=document.getElementById("sensexTabA");var B=document.getElementById("sensexTabSpan");A.style.backgroundPosition="0% -42px";B.style.backgroundPosition="100% -42px";A=document.getElementById("niftyTabA");B=document.getElementById("niftyTabSpan");A.style.backgroundPosition="";B.style.backgroundPosition=""}function findSWF(A){if(navigator.appName.indexOf("Microsoft")!=-1){return window["ie_"+A]}else{return document[A]}}; 
