function setCommandName(commandName)
{
	document.frmSearch.Command.value = commandName;	
}

function getPage(comboBox){
	
	var sUrl = comboBox.options[comboBox.selectedIndex].value;
	if(sUrl.length != 0)
		window.location = sUrl;

}

function getDocumentTypes(comboBox, baseUrl, poID){
	
	var sUrl = baseUrl + 'GetPage=Filings&PO_ID=' + poID;
	sUrl = sUrl + '&FilingType=' + comboBox.options[comboBox.selectedIndex].value;
	sUrl = sUrl + '&DocumentTypes=';
	sUrl = sUrl + '&searchType=';
	
	if(document.fil.searchType[0].checked)
		sUrl = sUrl + document.fil.searchType[0].value;
	else
		sUrl = sUrl + document.fil.searchType[1].value;
		
	sUrl = sUrl + '&StartMonth=' + document.fil.StartMonth[document.fil.StartMonth.selectedIndex].value;
	sUrl = sUrl + '&StartDay=' + document.fil.StartDay[document.fil.StartDay.selectedIndex].value;	
	sUrl = sUrl + '&StartYear=' + document.fil.StartYear[document.fil.StartYear.selectedIndex].value;
	sUrl = sUrl + '&EndMonth=' + document.fil.EndMonth[document.fil.EndMonth.selectedIndex].value;
	sUrl = sUrl + '&EndDay=' + document.fil.EndDay[document.fil.EndDay.selectedIndex].value;	
	sUrl = sUrl + '&EndYear=' + document.fil.EndYear[document.fil.EndYear.selectedIndex].value;				
		
	//alert(sUrl);
	
	window.location = sUrl; 
	
}

function getBulletinTypes(comboBox, baseUrl, poID){
	
	var sUrl = baseUrl + 'GetPage=CompanyDocuments&PO_ID=' + poID;
	sUrl = sUrl + '&NoticeCategory=' + comboBox.options[comboBox.selectedIndex].value;
	sUrl = sUrl + '&StartMonth=' + document.notices.StartMonth[document.notices.StartMonth.selectedIndex].value;
	sUrl = sUrl + '&StartDay=' + document.notices.StartDay[document.notices.StartDay.selectedIndex].value;	
	sUrl = sUrl + '&StartYear=' + document.notices.StartYear[document.notices.StartYear.selectedIndex].value;
	sUrl = sUrl + '&EndMonth=' + document.notices.EndMonth[document.notices.EndMonth.selectedIndex].value;
	sUrl = sUrl + '&EndDay=' + document.notices.EndDay[document.notices.EndDay.selectedIndex].value;	
	sUrl = sUrl + '&EndYear=' + document.notices.EndYear[document.notices.EndYear.selectedIndex].value;				
	sUrl = sUrl + '&BulletinsMode=on';
	if (document.getElementById("newsCheckbox").checked) 
		sUrl = sUrl + '&NewsReleases=on';
		
	//alert(sUrl);
	
	window.location = sUrl; 
	
}

function getBulletinTypes2(comboBox, baseUrl, poID){
	
	var sUrl = baseUrl + 'GetPage=LatestCompanyDocuments&PO_ID=' + poID;
	sUrl = sUrl + '&NoticeCategory=' + comboBox.options[comboBox.selectedIndex].value;
	sUrl = sUrl + '&StartMonth=' + document.notices.StartMonth[document.notices.StartMonth.selectedIndex].value;
	sUrl = sUrl + '&StartDay=' + document.notices.StartDay[document.notices.StartDay.selectedIndex].value;	
	sUrl = sUrl + '&StartYear=' + document.notices.StartYear[document.notices.StartYear.selectedIndex].value;
	sUrl = sUrl + '&EndMonth=' + document.notices.EndMonth[document.notices.EndMonth.selectedIndex].value;
	sUrl = sUrl + '&EndDay=' + document.notices.EndDay[document.notices.EndDay.selectedIndex].value;	
	sUrl = sUrl + '&EndYear=' + document.notices.EndYear[document.notices.EndYear.selectedIndex].value;				
	sUrl = sUrl + '&BulletinsMode=on';
	if (document.getElementById("newsCheckbox").checked) 
		sUrl = sUrl + '&NewsReleases=on';
		
	//alert(sUrl);
	
	window.location = sUrl; 
	
}

function getURL(sUrl){
	
	if(sUrl.length != 0)
		window.location = sUrl;

}

function getAffiliations(poid, cond)
{
	location.href = "TSXVentureHttpController?GetPage=CompanySummary&PO_ID=" 
		+ poid           + cond 
		+ "&PO1_AFLTN_TYPE=" + document.PO1AfltnType.PO1_AFLTN.options[document.PO1AfltnType.PO1_AFLTN.selectedIndex].value
		+ "&PO2_AFLTN_TYPE=" + document.PO2AfltnType.PO2_AFLTN.options[document.PO2AfltnType.PO2_AFLTN.selectedIndex].value;
}


function scan_all_dir(poid, cond, checkboxmgt)
{
	if (document.afl.CHECK_ALL_DIR.checked)
	{
		location.href = "/TSXVenture/TSXVentureHttpController?GetPage=Management" 
			      + "&PO_ID="         + poid              
			      +  cond 
			      + "&CHECK_ALL_DIR=" + "on" 
			      + "&CHECK_ALL_MGT=" + checkboxmgt;
	}
	else
	{
		location.href = "/TSXVenture/TSXVentureHttpController?GetPage=Management"
		              + "&PO_ID="         + poid  
			      +  cond  
			      + "&CHECK_ALL_MGT=" + checkboxmgt;
	}
}

function scan_all_mgt(poid, cond, checkboxdir)
{
	if (document.afl.CHECK_ALL_MGT.checked)
	{
		location.href = "/TSXVenture/TSXVentureHttpController?GetPage=Management" 
			      + "&PO_ID="         + poid 
			      +  cond			  
			      + "&CHECK_ALL_MGT=" + "on" 
			      + "&CHECK_ALL_DIR=" + checkboxdir;
	}
	else
	{
		location.href = "/TSXVenture/TSXVentureHttpController?GetPage=Management" 
		              + "&PO_ID="         + poid 
		              +  cond		             
			      + "&CHECK_ALL_DIR=" + checkboxdir;
	}
}

function showHideBulletinContentOnload() {	
	if (!isNetscape4() && (!document.getElementById("bulletinCheckbox").checked)) {
		document.getElementById("divHolder").value = document.getElementById("bulletinContent").innerHTML;
		document.getElementById("bulletinContent").innerHTML = ""; 		
	}
}

function showHideBulletinContent()
{	
	if (!isNetscape4()) {
		if (document.getElementById("bulletinCheckbox").checked)
		{
			document.getElementById("bulletinContent").innerHTML = document.getElementById("divHolder").value;
			document.getElementById("divHolder").value = ""; 
		}
		else
		{
			document.getElementById("divHolder").value = document.getElementById("bulletinContent").innerHTML;
			document.getElementById("bulletinContent").innerHTML = ""; 
		}
	}
}


function isNetscape4()
{
  if (navigator.appName.indexOf('Netscape') != -1) {
  	if (parseInt(navigator.appVersion) < 5) {
  		return true;
  	}
  } else {
  	return false;
  }
}

function hideNaics() {	
	if (!isNetscape4()) {
		document.getElementById("divHolder1").value = document.getElementById("naicsContent1").innerHTML;
		document.getElementById("naicsContent1").innerHTML = "<a href='#' onclick='showNaics()'><small>Show list of Industry classifications</small></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; 		
		
		document.getElementById("divHolder2").value = document.getElementById("naicsContent2").innerHTML;
		document.getElementById("naicsContent2").innerHTML = ""; 				
	}
}

function showNaics() {	
	if (!isNetscape4()) {
		document.getElementById("naicsContent1").innerHTML = document.getElementById("divHolder1").value;
		document.getElementById("divHolder1").value = ""; 		
		
		document.getElementById("naicsContent2").innerHTML = document.getElementById("divHolder2").value;
		document.getElementById("divHolder2").value = ""; 				
	}
}

function tsxVentureFooter(path)
{
document.write('<BR/><BR/>&copy; TSX Inc. &nbsp;&nbsp;<A HREF=\"' + path + '/en/legal/index.html\">Terms of Use</A>');
document.write(' | <A HREF=\"' + path + '/en/legal/index.html#privacy\">Privacy Policy</A><BR/>');
document.write('For full optimization and view of this web site, users are recommended to set their screen display at 1024x768 pixels.<BR/>TSX Group Inc. and its affiliates do not endorse or recommend any securities issued by any companies identified on, or linked through, this site. Please seek professional advice to evaluate specific securities or other content on this site. Links to third party sites are for informational purposes only and not for trading purposes. TSX Group Inc. and its affiliates have not prepared, reviewed or updated any content on third party sites and assume no responsibility for the information posted on them.<BR/><BR/>');
}

