<!-- #include file="../ticker/tickscript.inc" -->
function MM_openBrWindow(theURL,winName,features) { 
window.open(theURL,winName,features);}

function MM_displayStatusMsg(msgStr) { 
status=msgStr;
document.MM_returnValue = true;}





function CallOpinionPoll1(vote_val,theURL,winName,features){
var i;
var ctr ;
ctr =0 ;
//alert(vote_val);
if(vote_val=="vote")
{//alert(vote_val);
//alert(document.opin1.opinionpoll_radio.value);
       if (document.opin1.opinionpoll_radio.value!= "") 
    {
        for (i=0;i<document.opin1.opinionpoll_radio.length;i++){
            if (document.opin1.opinionpoll_radio[i].checked)
            {   break;
            }
            else
            {
                ctr=ctr+1;
            }
        }

    }
 
}
else if(vote_val=="vote1")

{
//alert(vote_val);
//alert(document.opin1.opinionpoll_radio1.value);
    if (document.opin1.opinionpoll_radio1.value!= "") 
{
    for (i=0;i<document.opin1.opinionpoll_radio1.length;i++){
        if (document.opin1.opinionpoll_radio1[i].checked)
        {   break;
        }
        else
        {
            ctr=ctr+1;
        }
    }
}
}



//OpnCode = document.opin1.opn_id.value;

theURL = theURL + "?OpnSelected=" + i + "&val=" + vote_val;

//alert(theURL);
//window.open(theURL,winName,features);
window.open(theURL,winName,features);
}

function CallOpinionPoll(theURL,winName,features){
var i;
var ctr ;
ctr =0 ;

for (i=0;i<document.opin.opinionpoll_radio.length;i++){
if (document.opin.opinionpoll_radio[i].checked){
break;}else{ctr=ctr+1;}}
OpnCode = document.opin.opn_id.value;
theURL = theURL + "?OpnCode=" + OpnCode + "&OpnSelected=" + i;
window.open(theURL,winName,features);}

function winOpenGetQuote(symbolValue,comboValue){
var newwin1;	
if ((symbolValue.value== "") || (symbolValue.value == "Get symbol")){	
alert("Enter the company name or find the symbol name")
return false;}else{	

//checking here ... uncomment it later!
//wind = window.open("../search/" + escape(comboValue) + "?text=" + escape(symbolValue.value),'comboValue','width=730,height=450,resizable=1,scrollbars=yes,toolbar=no, menubar=no, directories=no,left=0,top=0');


winpar1=window;
newwin1=winpar1.open("","newn","scrollbars,top=0,left=0,width=500,height=330,resizable=yes");
newwin1.opener=winpar1
/*newwin1.moveTo(0,0)
newwin1.resizeTo(730,450)*/
newwin1.location="../search/" + escape(comboValue) + "?text=" + escape(symbolValue.value)}
return true;}

function mktwinOpenGetQuote(symbolValue,comboValue){
var newwin1;	
if ((symbolValue.value== "") || (symbolValue.value == "Get symbol")){	
alert("Enter the company name or find the symbol name")
return false;}else{	
winpar1=window;
newwin1=winpar1.open("","","scrollbars,top=0,left=0,width=730,height=450");
newwin1.opener=winpar1
/*newwin1.moveTo(0,0)
newwin1.resizeTo(730,450)*/
newwin1.location="../../search/" + escape(comboValue) + "?text=" + escape(symbolValue.value)}
return true;}

function winOpenForContest(Uid){
var newwin2;
winpar2 = window;
newwin2=winpar2.open("","","scrollbars,top=0,left=0,width=730,height=450");
newwin2.opener = winpar2
/*newwin2.moveTo(0,0)
newwin2.resizeTo(730,450)*/
newwin2.location="Contest.asp?UID=" + Uid 
return true;} 

function budgetflash(){
var newwinbf;
winparbf = window;
newwinbf=winparbf.open("","","scrollbars,top=0,left=0,width=550,height=90");
newwinbf.opener = winparbf
/*newwinbf.moveTo(0,0)
newwinbf.resizeTo(800,90)*/
newwinbf.location="newwinticker.asp"
return true;} 

function winOpen2(field,symbolName){	
var newwin3;
newwin3=window.open("","newn","scrollbars,top=0,left=0,width=500,height=330,resizable=yes");

/*newwin3.moveTo(0,0)
newwin3.resizeTo(600,450)	*/
if(field.value == "")
{
newwin3.location="/home/searchSymbol.asp?symb=" + escape(symbolName)}
else{
newwin3.location="/home/getSymbol1.asp?txt=" + escape(field.value) + "&symb=" + escape(symbolName)}
return false;
}

function switchimg(imgname){
d = new Date();

  var d, s = "";
  var c = ":";
  d = new Date();
  s += (d.getMonth() + 1) + "/";
  s += d.getDate() + "/";
  s += d.getYear();  
  s += d.getHours() + c;
  s += d.getMinutes() + c;
  s += d.getSeconds() + c;
  s += d.getMilliseconds();
  
  


if(imgname=='NSEI'){
//document.images['imgtp'].src="http://www.majorgainz.com/images/nsegraph.jpg?"+s}
//document.images['imgtp'].src="http://192.168.11.252/images/nsegraph.jpg?"+s
document.images['imgtp'].src="../ExchangeGraph/nsegraph.jpg?"+s
document.all["map1"].innerHTML="<map name=map>"+
							   "<area shape='rect' alt='<%=prevclose%>' coords='<%=zerox%>,<%=zeroy%>,<%=zerox+199%>,<%=zeroy+1%>' href='#'>"+
							   "<area shape='rect' alt='<%=sensvolnse &" @ "&formatdatetime(tm,4)%>' coords='<%=lstx-2%>,<%=lsty-2%>,<%=lstx+2%>,<%=lsty+2%>' href='#'>"+
							   "<area shape='rect' alt='<%=prevclose%>' coords='<%=zerox%>,<%=zeroy%>,<%=zerox+199%>,<%=zeroy+1%>' href='#'>"+
							   //"<area shape='rect' alt='<%=highnse &" @ "&formatdatetime(highnsetm,4)%>' coords='<%=highnsex-2%>,<%=highnsey-2%>,<%=highnsex+2%>,<%=highnsey+2%>' href='#'>"+
							   //"<area shape='rect' alt='<%=lownse &" @ "&formatdatetime(lownsetm,4)%>' coords='<%=lownsex-2%>,<%=lownsey-2%>,<%=lownsex+2%>,<%=lownsey+2%>' href='#'>"+							   							   							   							   
							   "</map>"
}
//document.images['imgtp'].src="http://major/images/nsegraph.jpg?" + s}
else{
//document.images['imgtp'].src="http://www.majorgainz.com/images/bsegraph2.jpg?"+s}}
//document.images['imgtp'].src="http://192.168.11.252/images/bsegraph2.jpg?" + s
document.images['imgtp'].src="../ExchangeGraph/bsegraph2.jpg?" + s
document.all["map1"].innerHTML="<map name=map>"+
							   "<area shape='rect' alt='<%=prevclosebse%>' coords='<%=zeroxbse%>,<%=zeroybse%>,<%=zeroxbse+199%>,<%=zeroybse+1%>' href='#'>"+
							   "<area shape='rect' alt='<%=sensvolbse &" @ "&formatdatetime(tmbse,4)%>' coords='<%=lstxbse-2%>,<%=lstybse-2%>,<%=lstxbse+2%>,<%=lstybse+2%>' href='#'>"+
							   //"<area shape='rect' alt='<%=highbse &" @ "&formatdatetime(highbsetm,4)%>' coords='<%=highbsex-2%>,<%=highbsey-2%>,<%=highbsex+2%>,<%=highbsey+2%>' href='#'>"+
							   //"<area shape='rect' alt='<%=lowbse &" @ "&formatdatetime(lowbsetm,4)%>' coords='<%=lowbsex-2%>,<%=lowbsey-2%>,<%=lowbsex+2%>,<%=lowbsey+2%>' href='#'>"+							   							   							   
							   "</map>"
}}

function page(){
var newwin4;
winpar4=window;
newwin4=winpar4.open("","","scrollbars");
newwin4.opener=winpar4
newwin4.moveTo(0,0)
newwin4.resizeTo(723,400)
newwin4.location=document.form1.searchIn.options[document.form1.searchIn.selectedIndex].value+"?text="+document.form1.text.value;}

function winOpen1(url){
var newwin5;
winpar5=window;
newwin5=winpar5.open("","","scrollbars");
newwin5.opener=winpar5
newwin5.moveTo(0,0)
newwin5.resizeTo(723,400)
newwin5.location=url}

function winOpenfinolex(){	
var newwin3;
winpar3 = window;
newwin3=winpar3.open("","","scrollbars");
newwin3.moveTo(0,0)
newwin3.resizeTo(800,640)	
newwin3.location="http://www.majorgainz.com/home/finolex.htm?page=home/finolex.htm"
return true;}

function winOpen3(){	
var newwin3;
winpar3 = window;
newwin3=winpar3.open("","","scrollbars,top=0,left=80,width=790,height=570,resizable=yes");
newwin3.opener = winpar3
newwin3.location="../sector1/watch1.asp?page=sector1/watch1.asp&file1=<%=file1%>&lyr=Layer1&lc=20"
return true;}

function winOpen4(){	
var newwin6;
winpar6 = window;
newwin6=winpar6.open("","","scrollbars,top=0,left=0,width=790,height=570,resizable=yes,status");
//alert("../mktsnapshot1/snapshot.asp?page=mktsnapshot1/snapshot.asp&file1=<%=file1%>&lyr=Layer2&lc=20");
newwin6.location="../mktsnapshot1/snapshot.asp?page=mktsnapshot1/snapshot.asp&file1=<%=file1%>&lyr=Layer2&lc=20"
return true;}



function liveMarketWin(sel){
qty = sel.options[sel.selectedIndex].value;
window.open (qty,'_top');}
    
    

function researchrptWin(sel){
	qty = sel.options[sel.selectedIndex].value;
    window.open (qty,'_top');}

function winOpen(type,PageFilePath,symbolName)
{	winpar = window;	
	newwin=winpar.open("","","location=no,top=0,left=0,width=650,height=325,scrollbars=yes,menubar=no,resizable=yes");	newwin.opener = winpar
	
	if (type=="chart")
	{
				  newwin.location=PageFilePath + "?text=" + escape(symbolName)
	}
	else
	{
		newwin.location=PageFilePath + "?text=" + escape(symbolName)
	}
	//return false;
}
function winOpen_econ(){	
var new_win;
win_par = window;
new_win=win_par.open("","","scrollbars,top=0,left=0,width=700,height=550,resizable=yes");
new_win.location="http://major/nseit/"
return true;}


function winOpenSector(){	
var newwin3;
winpar3 = window;
newwin3=winpar3.open("","","scrollbars,top=0,left=80,width=790,height=570,resizable=yes");
newwin3.opener = winpar3
/*newwin3.moveTo(280,0)
newwin3.resizeTo(550,580)	*/
newwin3.location="../sector1/watch1.asp?page=sector1/watch1.asp&file1=<%=file1%>&lyr=Layer1&lc=20"
return true;}

