			function popUp(url)
			{
				newwindow=window.open(url,'web001','height=660,width=790');
				if (window.focus) {newwindow.focus()}
			}
			function popUnder(url)
			{
				newwindow=window.open(url,'web001','');
				newwindow.blur();
				window.focus();
			}


function showTransactions(id){
		var row=document.getElementById('trans_'+id)
		var anchorHide=document.getElementById('anchorHide_'+id)
		var anchorAdd=document.getElementById('anchorAdd_'+id)
		var anchorShow=document.getElementById('anchorShow_'+id)
		var oldClass=row.className;
		var newclass=(oldClass.replace(/Hide/, ""))
		row.className=newclass;
		anchorHide.className='';
		anchorAdd.className='';
		anchorShow.className='transanchorHide';
		
	}

function hideTransactions(id){
		var row=document.getElementById('trans_'+id)
		var anchorHide=document.getElementById('anchorHide_'+id)
		var anchorAdd=document.getElementById('anchorAdd_'+id)
		var anchorShow=document.getElementById('anchorShow_'+id)
		var oldClass=row.className;
		var newclass=oldClass+'Hide';
		row.className=newclass;
		anchorHide.className='transanchorHide';
		anchorAdd.className='transanchorHide';
		anchorShow.className='';
		
	}


	function check_numeric(fld){
		sText=fld.value;
		var ValidChars = "0123456789";
	   var IsNumber=true;
	   var Char;
		var newstr='';
	 
	   for (i = 0; i < sText.length && IsNumber == true; i++) 
		  { 
		  Char = sText.charAt(i); 
			if (ValidChars.indexOf(Char) > -1) 
			 {
				newstr=newstr+Char;
			 }
			if (Char=="-" && i==0) //only hyphens at the beggining
			{
				newstr=newstr+Char;
			}
			if (Char=="." && newstr.indexOf(Char)==-1) //only one period(.)
			{
				newstr=newstr+Char;
			}
		  }
	   fld.value=newstr;
	}


	function displayHomepageGraph(ticker, width, height,color) {
		
		// add some default values here
		document.write(
			"<img id='homePageGraph"+ticker+"' src=\"http://partnercharting.digitallook.com/?username=city_equities&password=hqhvb5281" +
			"&co_border^set=-1&co_dimension^width="+width+"&co_dimension^height="+height+
			"&primary_chart_colour="+color+"&tiny_chart=1&chart_primary_ticker="+ticker+"&chart_time_period=7_day"+
			"\" alt=\"chart\" />"
			);
	}

	function displayChartLink(indexName, indexTicker, thisIndex, numIndices){
		document.write("<a href=\"javascript:changeIndicesChart('"+indexTicker+"','"+thisIndex+"','"+numIndices+"');\">"+indexName+"</a>" );
	}

	function changeIndicesChart(indexTicker,thisIndex, numIndices){
	
		var i;
		var y = -1;
		for (i=0;i<=numIndices ;i++ )
		{
			if (i!=thisIndex)
			{	
				if(document.getElementById('chart'+i)){
					document.getElementById('chart'+i).style.visibility='hidden';
					//document.getElementById('homePageGraph'+indexTicker).style.visibility='hidden';
				}
			}
			else {
				if(document.getElementById('chart'+i)){
					y = i;
					//document.getElementById('chart'+i).className='chartOn';
					//document.getElementById('homePageGraph'+indexTicker).style.visibility='visible';
					document.getElementById('chart'+i).style.visibility='visible';
				}
			}
		}
		if (y > -1) {
			//showTemp(y);
		}
	}

	function showTemp(y){
		document.getElementById('chart'+y).className='chartOn';
	}

	function displaySummaryGraph(width, height,color) {
		
		// add some default values here
		document.write(
			"<img src=\"http://partnercharting.digitallook.com/?username=city_equities&password=hqhvb5281" +
			"&chart_primary_ticker=VOD&chart_comparison_tickers=&from_date=&to_date=&primary_chart_type=stack_line" + 
			"&chart_moving_average_1=&chart_moving_average_2=&chart_moving_average_3=&chart_overlay_indicator=" + 
			"&chart_lower_indicator=&co_border^set=-1&co_dimension^width="+width+"&co_dimension^height="+height+
			"&primary_chart_colour="+color+"&tiny_chart=1&chart_time_period=1_day" +
			"\" alt=\"chart\" />"
			);
	}

	function displayTinySummaryGraph(width, height,color) {
		
		// add some default values here
		document.write(
			"<img src=\"http://partnercharting.digitallook.com/?username=city_equities&password=hqhvb5281" +
			"&chart_primary_ticker=VOD&chart_comparison_tickers=&from_date=&to_date=&primary_chart_type=stack_line" + 
			"&chart_moving_average_1=&chart_moving_average_2=&chart_moving_average_3=&chart_overlay_indicator=" + 
			"&chart_lower_indicator=&co_border^set=-1&co_dimension^width="+width+"&co_dimension^height="+height+
			"&primary_chart_colour="+color+"&tiny_chart=1&chart_time_period=1_day" +
			"\" alt=\"chart\" />"
			);
	}

	
	function displayCompanyGraph(ticker, name, period, width, height,color) {
		
		// add some default values here
		document.write(
			"<img src=\"http://partnercharting.digitallook.com/?rand="+Math.floor(Math.random()*10001)+"&username=city_equities&password=hqhvb5281" +
			"&chart_primary_ticker="+ticker+"&chart_comparison_tickers=&from_date=&to_date=&primary_chart_type=stack_line" + 
			"&chart_moving_average_1=&chart_moving_average_2=&chart_moving_average_3=&chart_overlay_indicator=" + 
			"&chart_lower_indicator=&co_border^set=-1&co_dimension^width="+width+"&co_dimension^height="+height+
			"&primary_chart_colour="+color+"&tiny_chart=1&chart_time_period="+period +
			"\" alt=\""+name+" "+period+" chart\" />"
			);
	}
