function activate(x,val){
	for(i=0; i<=x.parentNode.childNodes.length-1; i++){
		if(x.parentNode.childNodes[i].tagName=="A"){
			x.parentNode.childNodes[i].className= "marketTab";
		}
		x.className= "marketTabActive";	
	}
	if(val=='nse') {
		document.getElementById("nse").style.display = "block";
		document.getElementById("bse").style.display = "none";
	} else {
		document.getElementById("nse").style.display = "none";
		document.getElementById("bse").style.display = "block";	
	}
}
function aboutUsPop(aboutUsUrl){
	eval("window.open(aboutUsUrl,'AboutUs','left=50,top=50,scrollbars=1,resizable=1,width='+(screen.width-200)+',height='+(screen.height-150)+',');");
}
function helpCenterPop(helpUrl){
	eval("window.open(helpUrl, 'helpCenter', 'left=5,top=5,,scrollbars=1,resizable=1,width='+(screen.width-15)+',height='+(screen.height-110)+',');");
}
function popup_liveHelp(myUrl){
	eval("window.open(myUrl,'LiveHelp','location=0,left=50,top=50,width=440,height=650,resizable=1,scrollbars=1');");
}
function liveSample(){
  loginInfo();
  location.href = "liveSample.do";
}
function loginInfo(){
	var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{	// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 	// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	]
	
};
	BrowserDetect.init();
	var browserTemp=BrowserDetect.browser;
	var versionTemp=BrowserDetect.version;
	if(browserTemp==null) {
	   		document.getElementById("browserType").value="";
	}else {
		document.getElementById("browserType").value=browserTemp;
	}
	if(versionTemp==null) {
	   	document.getElementById("browserVer").value="";
	}else{
	  	document.getElementById("browserVer").value=versionTemp;	       
	}
	document.getElementById("screenWidth").value=screen.width;
}
/*footer function start*/
function popUpfb(){
	eval("window.open('fbLogin.do?feedEvent=feedbackLoginDetail','feedbackdetails','left=100,top=100,width=400,height=450,resizable=0');");
}
function popupTermsConditions(myUrl){
	eval("window.open(myUrl,'TermsConditions','location=0,left=50,top=50,width='+(screen.width-200)+',height='+(screen.height-310)+',resizable=1,scrollbars=1');");
}
function  popup_privacypolicy(myUrl){
	eval("window.open(myUrl,'PrivacyPolicy','location=0,left=50,top=50,width='+(screen.width-200)+',height='+(screen.height-310)+',resizable=1,scrollbars=1');");
}		
function popup_AboutUs(myUrl){
	eval("window.open(myUrl,'AboutUs','location=0,left=50,top=50,width='+(screen.width-200)+',height='+(screen.height-200)+',resizable=1,scrollbars=1');");
}
