function randomURL(sUrl,symbol)
{
	var x=0;
	x=(Math.random())*(Math.pow(10,18));
	var vUrl=sUrl+symbol+"ran="+x;
	return vUrl;
}
//////////////////////////////////////////////////////////
function randomCall(x)
{
  parent.main.location.href=''+randomURL(x,'?');
}
//////////////////////////////////////////////////////////
function sameRandomCall(x)
{
  location.href=''+randomURL(x,'?');
}
//////////////////////////////////////////////////////////
function sethiddenval(hidval)
{
	top.frames[0].document.param.notinlayer.value=parseInt(hidval);
}
//////////////////////////////////////////////////////////

function setval(eventObject)
{
	var xpos; var ypos; var layerx; var layery; var layerw; var layerh;
  	var layervisible = parseInt(top.frames[0].document.param.layervisible.value);
  
	if ((DHTML) && (layervisible))
	{
		if (isIE)
		{ 
			xpos = event.x; ypos = event.y;
			layerx = parseInt(top.frames[1].document.all.menulayer.style.left) - parseInt(top.frames[1].document.body.scrollLeft);
			layery = parseInt(top.frames[1].document.all.menulayer.style.top) - parseInt(top.frames[1].document.body.scrollTop);
			layerw = parseInt(top.frames[1].document.all.menulayer.style.width);
			layerh = parseInt(top.frames[1].document.all.menulayer.style.height);
		}
		if (isNS4)
		{
			xpos = eventObject.pageX; ypos = eventObject.pageY; ypos = ypos - parseInt(top.frames[1].pageYOffset);
			layerx = parseInt(document.layers['menulayer'].left);
			layery = parseInt(document.layers['menulayer'].top)  - parseInt(top.frames[1].pageYOffset);
			layerw = parseInt(document.layers['menulayer'].clip.width);
			layerh = parseInt(document.layers['menulayer'].clip.height);
		}		
		if (isNS6)
		{	
			xpos = eventObject.pageX; ypos = eventObject.pageY; ypos = ypos - parseInt(top.frames[1].pageYOffset);
			layerx = parseInt(document.getElementById("menulayer").style.left);
			layery = parseInt(document.getElementById("menulayer").style.top)  - parseInt(top.frames[1].pageYOffset);
			layerw = parseInt(document.getElementById("menulayer").style.width);
			layerh = parseInt(document.getElementById("menulayer").style.height);
		}		

		if(isTop) {
			if(ypos < 70) 
				sethiddenval(1);
		}
		else 
		{
			if ((xpos <= (layerx + layerw)) && (xpos >= layerx) && (ypos <= layery + layerh) && (ypos >= layery))
			{
				top.frames[0].document.param.notinlayer.value=0;
			}
			else 
			{
				sethiddenval(1);
			}
		}
	}
}

//////////////////////////////////////////////////////////
function capEvents()
{
	isTop = false;
	if (isNS)
	{
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove= setval;
	}
	if (isIE)
	{
		document.onmousemove= setval;
	}
}
//////////////////////////////////////////////////////////
function capEventsTop()
{
	isTop = true;
	if (isNS)
	{
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove= setval;
	}
	if (isIE)
	{
		document.onmousemove= setval;
	}
}

//////////////////////////////////////////////////////////
function Openwindow(x)
{
	r=window.open(x,'NMCEIL','top=170,left=210, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=515,height=415');
	r.focus();

}
function Openwindow2(x)
{
	r=window.open(x,'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r.focus();

}
function Openwindow3()
{
	r=window.open("http://nmcecoin.w01.winhost.com/MarketData/livemarketpicture.aspx",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://220.224.201.202:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://124.125.171.62:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r.focus();

}
function Openwin(x)
{
	win1=window.open(x,'DETAIL',config='height=240,width=500,left=230,top=220,screenX=300,screenY=300, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no,screenX=300,screenY=300, directories=no, status=no');	
	//win3.moveTo(screen.width/2-250,screen.height/2-100)
	//win1.location.reload();
	return false;
}
function OpenwindowX()
{
	//r=window.open("market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://124.125.171.62:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://220.224.201.202:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r=window.open("http://nmcecoin.w01.winhost.com/MarketData/livemarketpicture.aspx",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r.focus();

}
function OpenwindowY()
{
	//r=window.open("LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://124.125.171.62:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://220.224.201.202:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r=window.open("http://nmcecoin.w01.winhost.com/MarketData/livemarketpicture.aspx",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r.focus();

}
function OpenwindowZ()
{
	//r=window.open("../LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://124.125.171.62:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	//r=window.open("http://220.224.201.202:1008/market/LiveMarket.jsp",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r=window.open("http://nmcecoin.w01.winhost.com/MarketData/livemarketpicture.aspx",'NMCEIL','top=100,left=0, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=780,height=450');
	r.focus();

}
arMenu1 = new Array(
135,
10,"57",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"About us","about_us/about_us.jsp",0,
"Evolution","about_us/Evolution.jsp",0,
"Vision & Mission","about_us/vision.jsp",0,
"Salient Features","about_us/salientfeatures.jsp",0,
"Promoters","about_us/promoters.jsp",0,
"The Board of Directors","about_us/board.jsp",0,
"Regulatory Framework","about_us/Regulatory_Framework.jsp",0
)

arMenu2 = new Array(
135,
97,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"Types Of Market","trading/markets.jsp",0,
"Futures Market","trading/FutureMarket.jsp",0,
"Trading At NMCE","trading/trade_nmce.jsp",0,
"Risk Management","trading/risk_mng.jsp",0,
"Delivery Mechanism","trading/Delivery.jsp",0,
"Benefits of NMCE","trading/benefitNMCE.jsp",0,
//"Warehouse Receipt","trading/warehouseReceipt.jsp",0,
//"CWC Warehouses","CWCDETAILS/CWCWarehouses.jsp",0,
"PNB Branches","trading/PNBBranches.jsp",0,
"Trade Calendar","trading/calendar.jsp",0
)

arMenu3 = new Array(
180,
175,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"Membership Norms","member_info/membershipform.jsp",0,
"Member Feedback Form","member_info/memberfeedbackform.zip",0,
//"CTCL Empanelment","member_info/NMCE-CTCL Empanelled Vendor  Application & Undertaking.zip",0,
//"Empanelled Vendors","member_info/Empanelled_Vendors.jsp",0,
"Member Directory","member_info/memb_query.jsp",0,
"Terminal Disablement","member_info/termdis.jsp",0,
"Member Proprietary Positions & Margins","member_info/mppm.jsp",0,
"Clearing Banks","member_info/ClearingBanks.jsp",0
)

arMenu4 = new Array(
180,
275,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
//"Live Market Picture","javascript:Openwindow3()",0,
//"Market Summary","market/market_summary.jsp",0,
//"Press Release","market/press_release/press_release.jsp",0,
//"Trade Calendar","market/calendar.jsp",0,
"Warehouse Receipt","market/warehouseReceipt.jsp",0,
"CWC Warehouses","CWCDETAILS/CWCWarehouses.jsp",0,
"CWC Stock Position (Weekly)","market/selectproduct.jsp",0,
"CWC Stock Position (Daily)","market/wh_stock_pos.jsp",0,
"Vacancy in CWC Warehouse","market/wh_vacancy.jsp",0,
"CWC Stock Position & Vacant Space","market/stock_pos_vacant_space.jsp",0
)

arMenu5 = new Array(
135,
456,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"Market Summary","market/market_summary.jsp",0,
"Press Release","market/press_release/press_release.jsp",0,
"Recognition","trading/recog_nmce.jsp",0,
//"Trader WorkStation","javascript:Openwin('traderdownload.jsp')",0,
"Application Download","download/TWSApplication.jsp",0,
"Rules","download/rules.zip",0,
"Regulations","download/regulations_anax.zip",0,
"Byelaws","download/byelaws.zip",0,
"Circulars","download/circular.jsp",0,
"101 FAQ","faq/faqFMC.jsp",0
)

arMenu6 = new Array(
120,
741,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"General Inquiry","contact/general_inq.htm",0,
"Membership Inquiry","contact/mem_inq.htm",0
)

arMenu7 = new Array(
160,
544,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"Contract Specifications","trading/contract_spec.jsp",0,
"Active Contracts","trading/contracts.jsp",0,
"Commodity Study","commodityStudy.jsp",0,
"Commodity Analysis","commodity_search/selectcommodity.jsp",0,
"Commodity Information","commodity_search/comminfo.jsp",0,
//"Live Commodity Search","LiveCommodity.jsp",0
"Live Commodity Search","commodity_search/selectseries.jsp",0
)

arMenu8 = new Array(
160,
680,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"Contract Specifications","trading/contract_spec.jsp",0,
"Active Contracts","trading/contracts.jsp",0,
"Commodity Study","commodityStudy.jsp",0,
"Commodity Analysis","commodity_search/selectcommodity.jsp",0,
"Commodity Information","commodity_search/comminfo.jsp",0,
//"Live Commodity Search","LiveCommodity.jsp",0
"Live Commodity Search","commodity_search/selectseries.jsp",0
)

arMenu9 = new Array(
185,
368,"157",
"","",
"E6E6E6",
"#B1B1B1",
"666666",
"999999",
"Connectivity FAQs", "Technology/ConnectivityFAQ.jsp", 0,
"System Specifications","Technology/hardware_config.jsp",0,
"Technology Circular", "Technology/TechnologyCircular.jsp", 0,
"Connectivity Format", "Technology/ConnectivityFormat.jsp", 0,
//"Empanelled Vendors", "Technology/EmpanelledVendors.jsp", 0,
"NMCE Datafeed Format", "Technology/NMCEDatafeedFormat.jsp", 0
)
//arMenu9_7 = new Array(
//"Reuters-RIL", "", 0,
//"Reurets-BSNL", "", 0,
//"Telequote", "", 0,
//"CMOTS", "", 0,
//"MYIRIS", "", 0,
//"IQS", "", 0
//)
//arMenu9_7.width = 100;

//arMenu9_2 = new Array(
//"VSAT", "", 0,
//"Lease Line", "", 0,
//"CST/ST", "", 0
//)